code stringlengths 3 1.01M | repo_name stringlengths 5 116 | path stringlengths 3 311 | language stringclasses 30
values | license stringclasses 15
values | size int64 3 1.01M |
|---|---|---|---|---|---|
import pl.edu.agh.amber.common.AmberClient;
import pl.edu.agh.amber.drivetopoint.DriveToPointProxy;
import pl.edu.agh.amber.drivetopoint.Location;
import pl.edu.agh.amber.drivetopoint.Point;
import pl.edu.agh.amber.drivetopoint.Result;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
/**
* Drive to point proxy example.
*
* @author Pawel Suder <pawel@suder.info>
*/
public class DriveToPointExample {
public static void main(String[] args) {
(new DriveToPointExample()).runDemo();
}
public void runDemo() {
Scanner keyboard = new Scanner(System.in);
System.out.print("IP (default: 127.0.0.1): ");
String hostname = keyboard.nextLine();
if ("".equals(hostname)) {
hostname = "127.0.0.1";
}
AmberClient client;
try {
client = new AmberClient(hostname, 26233);
} catch (IOException e) {
System.out.println("Unable to connect to robot: " + e);
return;
}
DriveToPointProxy driveToPointProxy = new DriveToPointProxy(client, 0);
try {
List<Point> targets = Arrays.asList(
new Point(2.44725, 4.22125, 0.25),
new Point(1.46706, 4.14285, 0.25),
new Point(0.67389, 3.76964, 0.25),
new Point(0.47339, 2.96781, 0.25));
driveToPointProxy.setTargets(targets);
while (true) {
Result<List<Point>> resultNextTargets = driveToPointProxy.getNextTargets();
Result<List<Point>> resultVisitedTargets = driveToPointProxy.getVisitedTargets();
List<Point> nextTargets = resultNextTargets.getResult();
List<Point> visitedTargets = resultVisitedTargets.getResult();
System.out.println(String.format("next targets: %s, visited targets: %s", nextTargets.toString(), visitedTargets.toString()));
Thread.sleep(1000);
}
} catch (IOException e) {
System.out.println("Error in sending a command: " + e);
} catch (Exception e) {
e.printStackTrace();
} finally {
client.terminate();
}
}
}
| project-capo/amber-java-clients | amber-java-examples/src/main/java/DriveToPointExample.java | Java | mit | 2,273 |
/****************************************************************************
Copyright (c) 2013-2015 scutgame.com
http://www.scutgame.com
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.
****************************************************************************/
using ZyGames.Framework.Game.Service;
using ZyGames.Tianjiexing.BLL.Base;
using ZyGames.Tianjiexing.Lang;
using ZyGames.Tianjiexing.Model;
using ZyGames.Tianjiexing.BLL.Combat;
namespace ZyGames.Tianjiexing.BLL.Action
{
/// <summary>
/// 4206_加入队伍接口
/// </summary>
public class Action4206 : BaseAction
{
private int teamID = 0;
private int ops = 0;
private FunctionEnum funEnum;
public Action4206(ZyGames.Framework.Game.Contract.HttpGet httpGet)
: base(ActionIDDefine.Cst_Action4206, httpGet)
{
}
public override void BuildPacket()
{
PushIntoStack(teamID);
}
public override bool GetUrlElement()
{
if (httpGet.GetInt("Ops", ref ops) && httpGet.GetEnum("FunEnum", ref funEnum))
{
httpGet.GetInt("TeamID", ref teamID);
return true;
}
return false;
}
public override bool TakeAction()
{
if (!PlotTeamCombat.IsMorePlotDate(ContextUser.UserID, funEnum))
{
ErrorCode = LanguageManager.GetLang().ErrorCode;
ErrorInfo = LanguageManager.GetLang().St4202_OutMorePlotDate;
return false;
}
if (UserHelper.IsBeiBaoFull(ContextUser))
{
ErrorCode = LanguageManager.GetLang().ErrorCode;
ErrorInfo = LanguageManager.GetLang().St1107_GridNumFull;
return false;
}
var plotTeam = new PlotTeamCombat(ContextUser);
var team = plotTeam.GetTeam(teamID);
if (team != null)
{
if (team.Status == 2)
{
ErrorCode = LanguageManager.GetLang().ErrorCode;
ErrorInfo = LanguageManager.GetLang().St4206_TeamPlotStart;
return false;
}
if (team.Status == 3)
{
ErrorCode = LanguageManager.GetLang().ErrorCode;
ErrorInfo = LanguageManager.GetLang().St4206_TeamPlotLead;
return false;
}
}
if (ops == 1)
{
plotTeam.AddTeam(teamID);
}
else if (ops == 2)
{
if (funEnum == FunctionEnum.Multiplot)
{
plotTeam.AddTeam(out teamID);
}
else
{
plotTeam.AddMoreTeam(out teamID);
}
if (teamID == -1)
{
ErrorCode = LanguageManager.GetLang().ErrorCode;
ErrorInfo = LanguageManager.GetLang().St4206_NoTeam;
return false;
}
}
return true;
}
}
} | wenhulove333/ScutServer | Sample/Koudai/Server/src/ZyGames.Tianjiexing.BLL/Action/Action4206.cs | C# | mit | 4,309 |
package daemon
import (
"log"
"time"
"github.com/Cloakaac/cloak/models"
)
type RecordDaemon struct{}
func (r *RecordDaemon) tick() {
total := models.GetOnlineCount()
err := models.AddOnlineRecord(total, time.Now().Unix())
if err != nil {
log.Fatal(err)
}
}
| Cloakaac/cloak | daemon/record.go | GO | mit | 270 |
from django.dispatch import Signal
user_email_bounced = Signal() # args: ['bounce', 'should_deactivate']
email_bounced = Signal() # args: ['bounce', 'should_deactivate']
email_unsubscribed = Signal() # args: ['email', 'reference']
| fin/froide | froide/bounce/signals.py | Python | mit | 236 |
<?php declare(strict_types = 1);
namespace PHPStan\Rules\Comparison;
use PHPStan\Type\Constant\ConstantBooleanType;
class BooleanOrConstantConditionRule implements \PHPStan\Rules\Rule
{
public function getNodeType(): string
{
return \PhpParser\Node\Expr\BinaryOp\BooleanOr::class;
}
/**
* @param \PhpParser\Node\Expr\BinaryOp\BooleanOr $node
* @param \PHPStan\Analyser\Scope $scope
* @return string[]
*/
public function processNode(
\PhpParser\Node $node,
\PHPStan\Analyser\Scope $scope
): array
{
$messages = [];
$leftType = ConstantConditionRuleHelper::getBooleanType($scope, $node->left);
if ($leftType instanceof ConstantBooleanType) {
$messages[] = sprintf(
'Left side of || is always %s.',
$leftType->getValue() ? 'true' : 'false'
);
}
$rightType = ConstantConditionRuleHelper::getBooleanType(
$scope->filterByFalseyValue($node->left),
$node->right
);
if ($rightType instanceof ConstantBooleanType) {
$messages[] = sprintf(
'Right side of || is always %s.',
$rightType->getValue() ? 'true' : 'false'
);
}
return $messages;
}
}
| rquadling/phpstan | src/Rules/Comparison/BooleanOrConstantConditionRule.php | PHP | mit | 1,115 |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
body, html{
background-color:#ddd;
margin: 0px;
height: 100%;
overflow-x: hidden;
overflow-y: auto;
}
#bodymovin{
background-color:#000;
width:100%;
height:100%;
/*width:800px;
height:500px;*/
display:block;
overflow: hidden;
transform: translate3d(0,0,0);
margin: auto;
opacity: 1;
}
.botas_loop_3,.botas_loop_2{
display:none
}
</style>
<!-- build:js bodymovin.js -->
<script src="js/main.js"></script>
<script src="js/utils/common.js"></script>
<script src="js/3rd_party/transformation-matrix.js"></script>
<script src="js/3rd_party/seedrandom.js"></script>
<script src="js/3rd_party/BezierEaser.js"></script>
<script src="js/utils/MatrixManager.js"></script>
<script src="js/utils/animationFramePolyFill.js"></script>
<script src="js/utils/functionExtensions.js"></script>
<script src="js/utils/bez.js"></script>
<script src="js/utils/DataManager.js"></script>
<script src="js/utils/FontManager.js"></script>
<script src="js/utils/PropertyFactory.js"></script>
<script src="js/utils/shapes/ShapeProperty.js"></script>
<script src="js/utils/shapes/ShapeModifiers.js"></script>
<script src="js/utils/shapes/TrimModifier.js"></script>
<script src="js/utils/shapes/RoundCornersModifier.js"></script>
<script src="js/utils/imagePreloader.js"></script>
<script src="js/utils/featureSupport.js"></script>
<script src="js/utils/filters.js"></script>
<script src="js/renderers/BaseRenderer.js"></script>
<script src="js/renderers/SVGRenderer.js"></script>
<script src="js/renderers/CanvasRenderer.js" data-light-skip="true"></script>
<script src="js/renderers/HybridRenderer.js" data-light-skip="true"></script>
<script src="js/mask.js"></script>
<script src="js/elements/BaseElement.js"></script>
<script src="js/elements/svgElements/SVGBaseElement.js"></script>
<script src="js/elements/TextElement.js"></script>
<script src="js/elements/svgElements/SVGTextElement.js"></script>
<script src="js/elements/svgElements/effects/SVGTintEffect.js"></script>
<script src="js/elements/svgElements/effects/SVGFillFilter.js"></script>
<script src="js/elements/svgElements/effects/SVGStrokeEffect.js"></script>
<script src="js/elements/svgElements/effects/SVGTritoneFilter.js"></script>
<script src="js/elements/svgElements/effects/SVGProLevelsFilter.js"></script>
<script src="js/elements/svgElements/SVGEffects.js"></script>
<script src="js/elements/CompElement.js"></script>
<script src="js/elements/ImageElement.js"></script>
<script src="js/elements/ShapeElement.js"></script>
<script src="js/elements/SolidElement.js"></script>
<script src="js/elements/canvasElements/CVBaseElement.js" data-light-skip="true"></script>
<script src="js/elements/canvasElements/CVCompElement.js" data-light-skip="true"></script>
<script src="js/elements/canvasElements/CVImageElement.js" data-light-skip="true"></script>
<script src="js/elements/canvasElements/CVMaskElement.js" data-light-skip="true"></script>
<script src="js/elements/canvasElements/CVShapeElement.js" data-light-skip="true"></script>
<script src="js/elements/canvasElements/CVSolidElement.js" data-light-skip="true"></script>
<script src="js/elements/canvasElements/CVTextElement.js" data-light-skip="true"></script>
<script src="js/elements/htmlElements/HBaseElement.js" data-light-skip="true"></script>
<script src="js/elements/htmlElements/HSolidElement.js" data-light-skip="true"></script>
<script src="js/elements/htmlElements/HCompElement.js" data-light-skip="true"></script>
<script src="js/elements/htmlElements/HShapeElement.js" data-light-skip="true"></script>
<script src="js/elements/htmlElements/HTextElement.js" data-light-skip="true"></script>
<script src="js/elements/htmlElements/HImageElement.js" data-light-skip="true"></script>
<script src="js/elements/htmlElements/HCameraElement.js" data-light-skip="true"></script>
<script src="js/animation/AnimationManager.js"></script>
<script src="js/animation/AnimationItem.js"></script>
<!-- Expressions -->
<script src="js/utils/expressions/Expressions.js" data-light-skip="true"></script>
<script src="js/utils/expressions/ExpressionPropertyDecorator.js" data-light-skip="true"></script>
<script src="js/utils/expressions/ExpressionManager.js" data-light-skip="true"></script>
<script src="js/utils/expressions/ShapeInterface.js" data-light-skip="true"></script>
<script src="js/utils/expressions/LayerInterface.js" data-light-skip="true"></script>
<script src="js/utils/expressions/CompInterface.js" data-light-skip="true"></script>
<script src="js/utils/expressions/TransformInterface.js" data-light-skip="true"></script>
<script src="js/utils/expressions/ProjectInterface.js" data-light-skip="true"></script>
<script src="js/utils/expressions/EffectInterface.js" data-light-skip="true"></script>
<script src="js/effects/SliderEffect.js" data-light-skip="true"></script>
<script src="js/effects.js" data-light-skip="true"></script>
<!-- end Expressions -->
<!-- endbuild -->
<script src="js/module.js" data-skip="true"></script>
<!-- <script src="bodymovin.js"></script> -->
<!-- <script src="bodymovin_light.js"></script> -->
</head>
<body>
<div id="bodymovin"></div>
<script>
var anim;
var animData = {
container: document.getElementById('bodymovin'),
renderer: 'svg',
loop: true,
autoplay: true,
rendererSettings: {
progressiveLoad:false
},
path: 'exports/render/data.json'
};
anim = bodymovin.loadAnimation(animData);
</script>
</body>
</html>
| chen-ye/bodymovin | player/index.html | HTML | mit | 6,058 |
package org.bitcoins.core.p2p
import org.bitcoins.core.p2p.TypeIdentifier._
import org.bitcoins.testkit.util.BitcoinSUnitTest
class TypeIdentifierTest extends BitcoinSUnitTest {
"MsgTx" must "serialize to 01000000" in {
MsgTx.hex must be("01000000")
}
"MsgWitnessTx" must "serialize to 01000040" in {
MsgWitnessTx.hex must be("01000040")
}
"MsgBlock" must "serialize to 02000000" in {
MsgBlock.hex must be("02000000")
}
"MsgWitnessBlock" must "serialize to 02000040" in {
MsgWitnessBlock.hex must be("02000040")
}
"MsgFilteredBlock" must "serialize to 03000000" in {
MsgFilteredBlock.hex must be("03000000")
}
"MsgFilteredWitnessBlock" must "serialize to 03000040" in {
MsgFilteredWitnessBlock.hex must be("03000040")
}
}
| bitcoin-s/bitcoin-s-core | core-test/src/test/scala/org/bitcoins/core/p2p/TypeIdentifierTest.scala | Scala | mit | 779 |
// pin_io_macros.h
//
// Makes it easy to define pins as logical names and then use those names
// throughout the program. Not the most efficient method for multiple pins
// on the same port but otherwise makes coding easier and more transportable.
//
// by Paul Duke 2012
#ifndef PIN_IO_MACROS
#define PIN_IO_MACROS
// pin I/O helper macros
//
#define INPUT2(port,pin) DDR ## port &= ~_BV(pin)
#define OUTPUT2(port,pin) DDR ## port |= _BV(pin)
#define CLEAR2(port,pin) PORT ## port &= ~_BV(pin)
#define SET2(port,pin) PORT ## port |= _BV(pin)
#define CLEAR_PULLUP2(port,pin) PUE ## port &= ~_BV(pin)
#define SET_PULLUP2(port,pin) PUE ## port |= _BV(pin)
#define TOGGLE2(port,pin) PORT ## port ^= _BV(pin)
#define READ2(port,pin) ((PIN ## port & _BV(pin))?1:0)
#define STATE2(port,pin) ((DDR ## port & _BV(pin))?1:0)
#define PIN_NAME2(port,pin) PIN_NAME3(P ## port ## pin)
#define PIN_NAME3(name) #name
#define PIN_NUMBER2(port, pin) pin
//
#define INPUT(x) INPUT2(x)
#define OUTPUT(x) OUTPUT2(x)
#define CLEAR(x) CLEAR2(x)
#define SET(x) SET2(x)
#define TOGGLE(x) TOGGLE2(x)
#define READ(x) READ2(x)
#define STATE(x) STATE2(x)
#if defined(__ATTINY10__)
#define PULLUP_ON(x) INPUT2(x); SET_PULLUP2(x)
#define PULLUP_OFF(x) INPUT2(x); CLEAR_PULLUP2(x)
#else
#define PULLUP_ON(x) INPUT2(x); SET2(x)
#define PULLUP_OFF(x) INPUT2(x); CLEAR2(x)
#endif
#define PIN_NAME(x) PIN_NAME2(x)
#define PIN_NUMBER(x) PIN_NUMBER2(x)
#endif
| pduke/UNO_TPI | pin_io_macros.h | C | mit | 1,474 |
<html>
<head>
<title>
Keep fighting for justice!
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>
</head>
<body bgcolor="#FFFFCC" text="000000" link="990000" vlink="660000" alink="003366" leftmargin="0" topmargin="0">
<table width="744" cellspacing="0" cellpadding="0" border="0">
<tr><td width="474"><a name="Top"></a><?php include "../../legacy-includes/TopLogo.htmlf" ?></td>
<td width="270"><?php include "../../legacy-includes/TopAd.htmlf" ?>
</td></tr></table>
<table width="744" cellspacing="0" cellpadding="0" border="0">
<tr><td width="18" bgcolor="FFCC66"></td>
<td width="108" bgcolor="FFCC66" valign=top><?php include "../../legacy-includes/LeftButtons.htmlf" ?></td>
<td width="18"></td>
<td width="480" valign="top">
<?php include "../../legacy-includes/BodyInsert.htmlf" ?>
<P><font face="Times New Roman, Times, serif" size="4">Kenny Collins taken off of death row in Maryland</font><br>
<font face="Times New Roman, Times, serif" size="5"><b>Keep fighting for justice!</b></font></P>
<p><font face="Arial, Helvetica, sans-serif" size="2">February 27, 2004 | Page 4</font></P>
<B><P><font face="Times New Roman, Times, serif" size="3">Dear <I>Socialist Worker,</I></B><BR>
On February 5, Somerset County Judge Daniel Long removed Maryland inmate Kenny Collins from death row because his original trial lawyer failed to represent him adequately during the sentencing phase of his 1988 trial. This dramatic reversal, in effect an admission that Kenny has spent that last 16 years under an illegal death sentence, is a blow to Maryland's death penalty system and a victory for activists and attorneys who have been fighting to prove Kenny's innocence.</P>
<P>Far from having a change of heart, the judge's hand was forced after the U.S. Supreme Court overturned the death sentence of Maryland death row inmate Kevin Wiggins. In both Wiggins' and Collins' cases, their trial attorneys failed to conduct an investigation, prepare arguments or call witnesses on their clients' behalf during the sentencing phase of trial.</P>
<P>In the past, Maryland courts have ignored such outrages if the trial attorneys claimed these failures were part of some deliberate strategy. However, in Wiggins' case, the U.S. Supreme Court pointed out that strategic legal decisions only occur when attorneys know the facts—not when they don't bother to investigate them.</P>
<P>The fight for justice in Kenny's case is far from over. Kenny has steadfastly maintained his innocence. Convicted without eyewitnesses, physical evidence or a confession, the case against Kenny rests on the testimony of the man originally arrested for the crime, Tony Michie, and his cousin, Andre Thorpe. Two years ago, in the aftermath of the successful effort to take Eugene Colvin-El off death row, Thorpe came forward to admit in a taped interview that he had lied at trial to protect his cousin. </P>
<P>Despite this dramatic new evidence, Judge Long denied Kenny's request for a new trial—and instead, after removing the death sentence, re-sentenced Kenny to life in prison. This is an outrage—an attempt to silence an innocent man. Kenny and his supporters have pledged to continue the fight for justice. Free Kenny Collins!<br>
<B>Mike Stark</B>, Washington, D.C.</P>
<?php include "../../legacy-includes/BottomNavLinks.htmlf" ?>
<td width="12"></td>
<td width="108" valign="top">
<?php include "../../legacy-includes/RightAdFolder.htmlf" ?>
</td>
</tr>
</table>
</body>
</html>
| ISO-tech/sw-d8 | web/2004-1/488/488_04_KennyCollins.php | PHP | mit | 3,573 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft Azure Batch Management Library")]
[assembly: AssemblyDescription("Provides Microsoft Azure Batch Management APIs.")]
[assembly: AssemblyVersion("1.0.0.60")]
[assembly: AssemblyFileVersion("1.18.0.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Microsoft Azure .NET SDK")]
[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]
| hovsepm/azure-libraries-for-net | src/ResourceManagement/Batch/Properties/AssemblyInfo.cs | C# | mit | 804 |
// member.cs
//
// Copyright 2010 Microsoft Corporation
//
// 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.
using System.Collections.Generic;
namespace Microsoft.Ajax.Utilities
{
public sealed class Member : Expression
{
private AstNode m_root;
public AstNode Root
{
get { return m_root; }
set
{
ReplaceNode(ref m_root, value);
}
}
public string Name { get; set; }
public Context NameContext { get; set; }
public Member(Context context)
: base(context)
{
}
public override OperatorPrecedence Precedence
{
get
{
return OperatorPrecedence.FieldAccess;
}
}
public override void Accept(IVisitor visitor)
{
if (visitor != null)
{
visitor.Visit(this);
}
}
public override bool IsEquivalentTo(AstNode otherNode)
{
var otherMember = otherNode as Member;
return otherMember != null
&& string.CompareOrdinal(this.Name, otherMember.Name) == 0
&& this.Root.IsEquivalentTo(otherMember.Root);
}
internal override string GetFunctionGuess(AstNode target)
{
return Root.GetFunctionGuess(this) + '.' + Name;
}
public override IEnumerable<AstNode> Children
{
get
{
return EnumerateNonNullNodes(Root);
}
}
public override bool ReplaceChild(AstNode oldNode, AstNode newNode)
{
if (Root == oldNode)
{
Root = newNode;
return true;
}
return false;
}
public override AstNode LeftHandSide
{
get
{
// the root object is on the left
return Root.LeftHandSide;
}
}
}
}
| afisd/jovice | Aphysoft.Share/External/AjaxMin/JavaScript/member.cs | C# | mit | 2,558 |
<?php
/**
* TableBlock.php
*
* @since 31/05/15
* @author gseidel
*/
namespace Enhavo\Bundle\AppBundle\Block\Block;
use Enhavo\Bundle\AppBundle\Block\BlockInterface;
use Enhavo\Bundle\AppBundle\Type\AbstractType;
class TableBlock extends AbstractType implements BlockInterface
{
public function render($parameters)
{
$translationDomain = $this->getOption('translationDomain', $parameters, null);
$tableRoute = $this->getRequiredOption('table_route', $parameters);
if(!isset($parameters['filters'])) {
$filters = $this->getFiltersFromRoute($tableRoute, $translationDomain);
} else {
$filters = $this->getFilters($this->getOption('filters', $parameters, []), $translationDomain);
}
return $this->renderTemplate('EnhavoAppBundle:Block:table.html.twig', [
'app' => $this->getOption('app', $parameters, 'app/Block/Table'),
'table_route' => $tableRoute,
'table_route_parameters' => $this->getOption('table_route_parameters', $parameters, null),
'update_route_parameters' => $this->getOption('update_route_parameters', $parameters, null),
'update_route' => $this->getOption('update_route', $parameters, null),
'translationDomain' => $translationDomain,
'filters' => $this->convertToFilterRows($filters),
'filterRowSize' => $this->calcFilterRowSize($filters)
]);
}
protected function getFiltersFromRoute($route, $translationDomain)
{
$route = $this->container->get('router')->getRouteCollection()->get($route);
$sylius = $route->getDefault('_sylius');
if(is_array($sylius)&& isset($sylius['filters'])) {
return $this->getFilters($sylius['filters'], $translationDomain);
}
return [];
}
protected function calcFilterRowSize($filters)
{
$amount = count($filters);
if($amount == 1) {
return 12;
}
if($amount == 2) {
return 6;
}
if($amount == 3) {
return 4;
}
return 3;
}
protected function convertToFilterRows($filters)
{
$rows = [];
$i = 0;
$index = 0;
foreach($filters as $filter) {
if($i === 0) {
$rows[$index] = [];
}
$rows[$index][] = $filter;
if($i == 3) {
$i = 0;
$index++;
} else {
$i++;
}
}
return $rows;
}
protected function getFilters(array $filters, $translationDomain = null)
{
foreach($filters as $name => &$options) {
$options['value'] = '';
$options['name'] = $name;
}
foreach($filters as $name => &$options) {
if(!array_key_exists('translationDomain', $options)) {
$options['translationDomain'] = $translationDomain;
}
}
return $filters;
}
public function getType()
{
return 'table';
}
} | kiwibun/enhavo | src/Enhavo/Bundle/AppBundle/Block/Block/TableBlock.php | PHP | mit | 3,107 |
// package main provides an implementation of netcat using the secio package.
// This means the channel is encrypted (and MACed).
// It is meant to exercise the spipe package.
// Usage:
// seccat [<local address>] <remote address>
// seccat -l <local address>
//
// Address format is: [host]:port
package main
import (
"context"
"errors"
"flag"
"fmt"
"io"
"net"
"os"
"os/signal"
"syscall"
pstore "gx/ipfs/QmPgDWmTmuzvP7QE5zwo1TmjbJme9pmZHNujB2453jkCTr/go-libp2p-peerstore"
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
peer "gx/ipfs/QmXYjuNuxVzXKJCfWasQk1RqkhVLDM9jtUKhqc2WPQmFSB/go-libp2p-peer"
ci "gx/ipfs/QmaPbCnUMBohSGo3KnxEa2bHqyJVVeEEcwtqJAYxerieBo/go-libp2p-crypto"
secio "gx/ipfs/QmbSkjJvDuxaZYtR46sF9ust7XY1hcg7DrA6Mxu4UiSWqs/go-libp2p-secio"
)
var verbose = false
// Usage prints out the usage of this module.
// Assumes flags use go stdlib flag pacakage.
var Usage = func() {
text := `seccat - secure netcat in Go
Usage:
listen: %s [<local address>] <remote address>
dial: %s -l <local address>
Address format is Go's: [host]:port
`
fmt.Fprintf(os.Stderr, text, os.Args[0], os.Args[0])
flag.PrintDefaults()
}
type args struct {
listen bool
verbose bool
debug bool
localAddr string
remoteAddr string
// keyfile string
keybits int
}
func parseArgs() args {
var a args
// setup + parse flags
flag.BoolVar(&a.listen, "listen", false, "listen for connections")
flag.BoolVar(&a.listen, "l", false, "listen for connections (short)")
flag.BoolVar(&a.verbose, "v", true, "verbose")
flag.BoolVar(&a.debug, "debug", false, "debugging")
// flag.StringVar(&a.keyfile, "key", "", "private key file")
flag.IntVar(&a.keybits, "keybits", 2048, "num bits for generating private key")
flag.Usage = Usage
flag.Parse()
osArgs := flag.Args()
if len(osArgs) < 1 {
exit("")
}
if a.verbose {
out("verbose on")
}
if a.listen {
a.localAddr = osArgs[0]
} else {
if len(osArgs) > 1 {
a.localAddr = osArgs[0]
a.remoteAddr = osArgs[1]
} else {
a.remoteAddr = osArgs[0]
}
}
return a
}
func main() {
args := parseArgs()
verbose = args.verbose
if args.debug {
logging.SetDebugLogging()
}
go func() {
// wait until we exit.
sigc := make(chan os.Signal, 1)
signal.Notify(sigc, syscall.SIGABRT)
<-sigc
panic("ABORT! ABORT! ABORT!")
}()
if err := connect(args); err != nil {
exit("%s", err)
}
}
func setupPeer(a args) (peer.ID, pstore.Peerstore, error) {
if a.keybits < 1024 {
return "", nil, errors.New("Bitsize less than 1024 is considered unsafe.")
}
out("generating key pair...")
sk, pk, err := ci.GenerateKeyPair(ci.RSA, a.keybits)
if err != nil {
return "", nil, err
}
p, err := peer.IDFromPublicKey(pk)
if err != nil {
return "", nil, err
}
ps := pstore.NewPeerstore()
ps.AddPrivKey(p, sk)
ps.AddPubKey(p, pk)
out("local peer id: %s", p)
return p, ps, nil
}
func connect(args args) error {
p, ps, err := setupPeer(args)
if err != nil {
return err
}
var conn net.Conn
if args.listen {
conn, err = Listen(args.localAddr)
} else {
conn, err = Dial(args.localAddr, args.remoteAddr)
}
if err != nil {
return err
}
// log everything that goes through conn
rwc := &logRW{n: "conn", rw: conn}
// OK, let's setup the channel.
sk := ps.PrivKey(p)
sg := secio.SessionGenerator{LocalID: p, PrivateKey: sk}
sess, err := sg.NewSession(context.TODO(), rwc)
if err != nil {
return err
}
out("remote peer id: %s", sess.RemotePeer())
netcat(sess.ReadWriter().(io.ReadWriteCloser))
return nil
}
// Listen listens and accepts one incoming UDT connection on a given port,
// and pipes all incoming data to os.Stdout.
func Listen(localAddr string) (net.Conn, error) {
l, err := net.Listen("tcp", localAddr)
if err != nil {
return nil, err
}
out("listening at %s", l.Addr())
c, err := l.Accept()
if err != nil {
return nil, err
}
out("accepted connection from %s", c.RemoteAddr())
// done with listener
l.Close()
return c, nil
}
// Dial connects to a remote address and pipes all os.Stdin to the remote end.
// If localAddr is set, uses it to Dial from.
func Dial(localAddr, remoteAddr string) (net.Conn, error) {
var laddr net.Addr
var err error
if localAddr != "" {
laddr, err = net.ResolveTCPAddr("tcp", localAddr)
if err != nil {
return nil, fmt.Errorf("failed to resolve address %s", localAddr)
}
}
if laddr != nil {
out("dialing %s from %s", remoteAddr, laddr)
} else {
out("dialing %s", remoteAddr)
}
d := net.Dialer{LocalAddr: laddr}
c, err := d.Dial("tcp", remoteAddr)
if err != nil {
return nil, err
}
out("connected to %s", c.RemoteAddr())
return c, nil
}
func netcat(c io.ReadWriteCloser) {
out("piping stdio to connection")
done := make(chan struct{}, 2)
go func() {
n, _ := io.Copy(c, os.Stdin)
out("sent %d bytes", n)
done <- struct{}{}
}()
go func() {
n, _ := io.Copy(os.Stdout, c)
out("received %d bytes", n)
done <- struct{}{}
}()
// wait until we exit.
sigc := make(chan os.Signal, 1)
signal.Notify(sigc, syscall.SIGHUP, syscall.SIGINT,
syscall.SIGTERM, syscall.SIGQUIT)
select {
case <-done:
case <-sigc:
return
}
c.Close()
}
| kyledrake/go-ipfs | cmd/seccat/seccat.go | GO | mit | 5,208 |
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<base href="/">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!-- build:css(client) app/vendor.css -->
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/angular-list-group/dist/angular-list-group.css" />
<link rel="stylesheet" href="bower_components/ui-select/dist/select.css" />
<link rel="stylesheet" href="bower_components/angular-toastr/dist/angular-toastr.css" />
<!-- endbower -->
<!-- endbuild -->
<!-- build:css({.tmp,client}) app/app.css -->
<link rel="stylesheet" href="app/app.css">
<!-- injector:css -->
<!-- endinjector -->
<!-- endbuild -->
<link rel="stylesheet" href="bower_components/odometer/themes/odometer-theme-minimal.css" />
</head>
<body ng-app="tdpharmaClientApp" hashchange-event keydown-event>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- Add your site or application content here -->
<div ui-view=""></div>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXX-X');
ga('send', 'pageview');
</script>
<!--[if lt IE 9]>
<script src="bower_components/es5-shim/es5-shim.js"></script>
<script src="bower_components/json3/lib/json3.min.js"></script>
<![endif]-->
<!-- build:js({client,node_modules}) app/vendor.js -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="bower_components/angular-list-group/dist/angular-list-group.min.js"></script>
<script src="bower_components/angular-resource/angular-resource.js"></script>
<script src="bower_components/angular-smart-table/dist/smart-table.js"></script>
<script src="bower_components/angular-socket-io/socket.js"></script>
<script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
<script src="bower_components/lodash/lodash.js"></script>
<script src="bower_components/moment/moment.js"></script>
<script src="bower_components/angular-translate/angular-translate.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/ui-select/dist/select.js"></script>
<script src="bower_components/ng-file-upload/ng-file-upload.js"></script>
<script src="bower_components/ng-file-upload-shim/ng-file-upload-shim.js"></script>
<script src="bower_components/async/lib/async.js"></script>
<script src="bower_components/ngstorage/ngStorage.js"></script>
<script src="bower_components/angular-toastr/dist/angular-toastr.tpls.js"></script>
<script src="bower_components/aws-sdk/dist/aws-sdk.js"></script>
<script src="bower_components/ng-lodash/build/ng-lodash.js"></script>
<script src="bower_components/angular-moment/angular-moment.js"></script>
<script src="bower_components/odometer/odometer.js"></script>
<script src="bower_components/angular-odometer-js/dist/angular-odometer.js"></script>
<script src="bower_components/angular-io-barcode/build/angular-io-barcode.js"></script>
<script src="bower_components/highcharts-ng/dist/highcharts-ng.js"></script>
<script src="bower_components/highcharts/highcharts.js"></script>
<script src="bower_components/highcharts/highcharts-more.js"></script>
<script src="bower_components/highcharts/modules/exporting.js"></script>
<!-- endbower -->
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/moment/locale/vi.js"></script>
<script src="socket.io-client/socket.io.js"></script>
<!-- endbuild -->
<!-- build:js({.tmp,client}) app/app.js -->
<script src="app/DYMO.Label.Frameork_2.0Beta.js"></script>
<script src="app/app.js"></script>
<script src="app/config.js"></script>
<!-- injector:js -->
<script src="app/account/account.js"></script>
<script src="app/account/login/login.controller.js"></script>
<script src="app/account/settings/settings.controller.js"></script>
<script src="app/account/signup/signup.controller.js"></script>
<script src="app/admin/admin.controller.js"></script>
<script src="app/admin/admin.js"></script>
<script src="app/app-config/angular-locale_en-us.js"></script>
<script src="app/app-config/angular_locale_vi_vn.js"></script>
<script src="app/app-config/config_angular_translate_en.js"></script>
<script src="app/app-config/config_angular_translate_vn.js"></script>
<script src="app/categories/categories.js"></script>
<script src="app/categories/index/categories.controller.js"></script>
<script src="app/categories/item/categoriesItem.controller.js"></script>
<script src="app/checkout/checkout.controller.js"></script>
<script src="app/checkout/checkout.js"></script>
<script src="app/checkoutv2/checkoutv2.js"></script>
<script src="app/checkoutv2/confirm/checkoutConfirm.controller.js"></script>
<script src="app/checkoutv2/index/checkoutv2.controller.js"></script>
<script src="app/dashboard/dashboard.js"></script>
<script src="app/dashboard/index/dashboard.controller.js"></script>
<script src="app/inventory/index/inventory.controller.js"></script>
<script src="app/inventory/inventory.js"></script>
<script src="app/inventory/item/inventoryItem.controller.js"></script>
<script src="app/main/main.controller.js"></script>
<script src="app/main/main.js"></script>
<script src="app/orders/adjustments/adjustments.controller.js"></script>
<script src="app/orders/orderItem/orderItem.controller.js"></script>
<script src="app/orders/orders.js"></script>
<script src="app/orders/purchases/new_purchase.controller.js"></script>
<script src="app/orders/purchases/purchases.controller.js"></script>
<script src="app/orders/sales/sales.controller.js"></script>
<script src="app/products/id/productsId.js"></script>
<script src="app/products/index/products.controller.js"></script>
<script src="app/products/products.js"></script>
<script src="components/directives/authorSelect/authorSelect.directive.js"></script>
<script src="components/directives/backImgUrl/backImgUrl.directive.js"></script>
<script src="components/directives/csSelect/csSelect.directive.js"></script>
<script src="components/directives/goClick/goClick.directive.js"></script>
<script src="components/directives/hashchangeEvent/hashchangeEvent.directive.js"></script>
<script src="components/directives/keydownEvent/keydownEvent.directive.js"></script>
<script src="components/directives/mongoose-error/mongoose-error.directive.js"></script>
<script src="components/directives/pageSelect/pageSelect.directive.js"></script>
<script src="components/directives/selectOnClick/selectOnClick.directive.js"></script>
<script src="components/directives/textFormat/textFormat.directive.js"></script>
<script src="components/filters/resolve/resolve.filter.js"></script>
<script src="components/filters/unique/unique.filter.js"></script>
<script src="components/models/Category/Category.service.js"></script>
<script src="components/models/InventoryItem/InventoryItem.service.js"></script>
<script src="components/models/Medicine/Medicine.service.js"></script>
<script src="components/models/Receipt/Receipt.service.js"></script>
<script src="components/models/Transaction/Transaction.service.js"></script>
<script src="components/models/config/config.service.js"></script>
<script src="components/models/medBatch/medBatch.service.js"></script>
<script src="components/services/DataHelper/DataHelper.service.js"></script>
<script src="components/services/S3Upload/S3Upload.service.js"></script>
<script src="components/services/auth/auth.service.js"></script>
<script src="components/services/auth/user.service.js"></script>
<script src="components/services/inventorySearch/inventorySearch.service.js"></script>
<script src="components/services/modal/modal.service.js"></script>
<script src="components/services/orderSearch/orderSearch.service.js"></script>
<script src="components/services/pharmacare/pharmacare.service.js"></script>
<script src="components/services/socket/socket.service.js"></script>
<script src="components/services/util/util.service.js"></script>
<script src="components/templates/navbar/navbar.controller.js"></script>
<!-- endinjector -->
<!-- endbuild -->
</body>
</html>
| tdang2/tdpharma-client | client/index.html | HTML | mit | 10,329 |
/* eslint-disable */
"use strict";
var express = require("express"),
path = require("path"),
webpack = require("webpack"),
config = require("./examples.config");
config.module.loaders[0].query = {presets: ["react-hmre"]};
config.entry.unshift("webpack-hot-middleware/client");
config.plugins = [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
];
var app = express();
var compiler = webpack(config);
app.use(require("webpack-dev-middleware")(compiler, {
noInfo: true,
publicPath: config.output.publicPath
}));
app.use(require("webpack-hot-middleware")(compiler));
app.use(express.static(path.resolve(process.cwd(), "examples")));
app.get("*", function(req, res) {
res.sendFile(path.join(__dirname, "examples", "index.html"));
});
app.listen(3000, "localhost", function(err) {
if (err) {
console.log(err);
return;
}
console.log("Listening at http://localhost:3000");
});
| danielyaa5/react-contextulize | server.js | JavaScript | mit | 944 |
// f is not called via a go function, instead the go function is inside the body of f.
package main
func main() {
x := "Hello World"
ch := make(chan string)
f(ch)
// @expectedflow: false
sink(x)
x = source()
ch <- x
}
func f(ch chan string) {
// *ssa.MakeClosure
go func() {
y := <-ch
// @expectedflow: true
sink(y)
}()
}
func sink(s string) {
}
func source() string {
return "secret"
}
| akwick/gotcha | tests/exampleCode/chanPaper2.go | GO | mit | 408 |
a = [int(i) for i in input().split()]
print(sum(a))
| maisilex/Lets-Begin-Python | list.py | Python | mit | 52 |
<?php
/* WebProfilerBundle:Collector:memory.html.twig */
class __TwigTemplate_ccb1a70d7cfd163aa51619d0fc404c67 extends Twig_Template
{
protected $parent;
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->blocks = array(
'toolbar' => array($this, 'block_toolbar'),
);
}
public function getParent(array $context)
{
if (null === $this->parent) {
$this->parent = $this->env->loadTemplate("WebProfilerBundle:Profiler:layout.html.twig");
}
return $this->parent;
}
protected function doDisplay(array $context, array $blocks = array())
{
$context = array_merge($this->env->getGlobals(), $context);
$this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
}
// line 3
public function block_toolbar($context, array $blocks = array())
{
// line 4
echo " ";
ob_start();
// line 5
echo " <img width=\"13\" height=\"28\" alt=\"Memory Usage\" style=\"vertical-align: middle; margin-right: 5px;\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAcCAYAAAC6YTVCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJBJREFUeNpi/P//PwOpgImBDDAcNbE4ODiAg+/AgQOC586d+4BLoZGRkQBQ7Xt0mxQIWKCAzXkCBDQJDEBAIHOKiooicSkEBtTz0WQ0xFI5Mqevr285HrUOMAajvb09ySULk5+f3w1SNIDUMwKLsAIg256IrAECoEx6EKQJlLkkgJiDCE0/gPgF4+AuLAECDAAolCeEmdURAgAAAABJRU5ErkJggg==\"/>
";
$context['icon'] = new Twig_Markup(ob_get_clean());
// line 7
echo " ";
ob_start();
// line 8
echo " ";
echo twig_escape_filter($this->env, sprintf("%.0f", ($this->getAttribute($this->getContext($context, 'collector'), "memory", array(), "any", false) / 1024)), "html");
echo " KB
";
$context['text'] = new Twig_Markup(ob_get_clean());
// line 10
echo " ";
$this->env->loadTemplate("WebProfilerBundle:Profiler:toolbar_item.html.twig")->display(array_merge($context, array("link" => false)));
}
public function getTemplateName()
{
return "WebProfilerBundle:Collector:memory.html.twig";
}
public function isTraitable()
{
return false;
}
}
| radzikowski/alf | app/cache/dev/twig/cc/b1/a70d7cfd163aa51619d0fc404c67.php | PHP | mit | 2,299 |
<!DOCTYPE html>
<html lang="en">
<!-- Mirrored from bucketadmin.themebucket.net/google_map.html by HTTrack Website Copier/3.x [XR&CO'2013], Fri, 21 Feb 2014 19:39:48 GMT -->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="ThemeBucket">
<link rel="shortcut icon" href="images/favicon.html">
<title>Google map</title>
<!--Core CSS -->
<link href="bs3/css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-reset.css" rel="stylesheet">
<link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
<link href="css/style-responsive.css" rel="stylesheet" />
<!-- Just for debugging purposes. Don't actually copy this line! -->
<!--[if lt IE 9]><script src="js/ie8/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/library/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/library/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<section id="container" >
<!--header start-->
<header class="header fixed-top clearfix">
<!--logo start-->
<div class="brand">
<a href="index-2.html" class="logo">
<img src="images/logo.png" alt="">
</a>
<div class="sidebar-toggle-box">
<div class="fa fa-bars"></div>
</div>
</div>
<!--logo end-->
<div class="nav notify-row" id="top_menu">
<!-- notification start -->
<ul class="nav top-menu">
<!-- settings start -->
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<i class="fa fa-tasks"></i>
<span class="badge bg-success">8</span>
</a>
<ul class="dropdown-menu extended tasks-bar">
<li>
<p class="">You have 8 pending tasks</p>
</li>
<li>
<a href="#">
<div class="task-info clearfix">
<div class="desc pull-left">
<h5>Target Sell</h5>
<p>25% , Deadline 12 June’13</p>
</div>
<span class="notification-pie-chart pull-right" data-percent="45">
<span class="percent"></span>
</span>
</div>
</a>
</li>
<li>
<a href="#">
<div class="task-info clearfix">
<div class="desc pull-left">
<h5>Product Delivery</h5>
<p>45% , Deadline 12 June’13</p>
</div>
<span class="notification-pie-chart pull-right" data-percent="78">
<span class="percent"></span>
</span>
</div>
</a>
</li>
<li>
<a href="#">
<div class="task-info clearfix">
<div class="desc pull-left">
<h5>Payment collection</h5>
<p>87% , Deadline 12 June’13</p>
</div>
<span class="notification-pie-chart pull-right" data-percent="60">
<span class="percent"></span>
</span>
</div>
</a>
</li>
<li>
<a href="#">
<div class="task-info clearfix">
<div class="desc pull-left">
<h5>Target Sell</h5>
<p>33% , Deadline 12 June’13</p>
</div>
<span class="notification-pie-chart pull-right" data-percent="90">
<span class="percent"></span>
</span>
</div>
</a>
</li>
<li class="external">
<a href="#">See All Tasks</a>
</li>
</ul>
</li>
<!-- settings end -->
<!-- inbox dropdown start-->
<li id="header_inbox_bar" class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<i class="fa fa-envelope-o"></i>
<span class="badge bg-important">4</span>
</a>
<ul class="dropdown-menu extended inbox">
<li>
<p class="red">You have 4 Mails</p>
</li>
<li>
<a href="#">
<span class="photo"><img alt="avatar" src="images/avatar-mini.jpg"></span>
<span class="subject">
<span class="from">Jonathan Smith</span>
<span class="time">Just now</span>
</span>
<span class="message">
Hello, this is an example msg.
</span>
</a>
</li>
<li>
<a href="#">
<span class="photo"><img alt="avatar" src="images/avatar-mini-2.jpg"></span>
<span class="subject">
<span class="from">Jane Doe</span>
<span class="time">2 min ago</span>
</span>
<span class="message">
Nice admin template
</span>
</a>
</li>
<li>
<a href="#">
<span class="photo"><img alt="avatar" src="images/avatar-mini-3.jpg"></span>
<span class="subject">
<span class="from">Tasi sam</span>
<span class="time">2 days ago</span>
</span>
<span class="message">
This is an example msg.
</span>
</a>
</li>
<li>
<a href="#">
<span class="photo"><img alt="avatar" src="images/avatar-mini.jpg"></span>
<span class="subject">
<span class="from">Mr. Perfect</span>
<span class="time">2 hour ago</span>
</span>
<span class="message">
Hi there, its a test
</span>
</a>
</li>
<li>
<a href="#">See all messages</a>
</li>
</ul>
</li>
<!-- inbox dropdown end -->
<!-- notification dropdown start-->
<li id="header_notification_bar" class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<i class="fa fa-bell-o"></i>
<span class="badge bg-warning">3</span>
</a>
<ul class="dropdown-menu extended notification">
<li>
<p>Notifications</p>
</li>
<li>
<div class="alert alert-info clearfix">
<span class="alert-icon"><i class="fa fa-bolt"></i></span>
<div class="noti-info">
<a href="#"> Server #1 overloaded.</a>
</div>
</div>
</li>
<li>
<div class="alert alert-danger clearfix">
<span class="alert-icon"><i class="fa fa-bolt"></i></span>
<div class="noti-info">
<a href="#"> Server #2 overloaded.</a>
</div>
</div>
</li>
<li>
<div class="alert alert-success clearfix">
<span class="alert-icon"><i class="fa fa-bolt"></i></span>
<div class="noti-info">
<a href="#"> Server #3 overloaded.</a>
</div>
</div>
</li>
</ul>
</li>
<!-- notification dropdown end -->
</ul>
<!-- notification end -->
</div>
<div class="top-nav clearfix">
<!--search & user info start-->
<ul class="nav pull-right top-menu">
<li>
<input type="text" class="form-control search" placeholder=" Search">
</li>
<!-- user login dropdown start-->
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<img alt="" src="images/avatar1_small.jpg">
<span class="username">John Doe</span>
<b class="caret"></b>
</a>
<ul class="dropdown-menu extended logout">
<li><a href="#"><i class=" fa fa-suitcase"></i>Profile</a></li>
<li><a href="#"><i class="fa fa-cog"></i> Settings</a></li>
<li><a href="login.html"><i class="fa fa-key"></i> Log Out</a></li>
</ul>
</li>
<!-- user login dropdown end -->
<li>
<div class="toggle-right-box">
<div class="fa fa-bars"></div>
</div>
</li>
</ul>
<!--search & user info end-->
</div>
</header>
<!--header end-->
<aside>
<div id="sidebar" class="nav-collapse">
<!-- sidebar menu start--> <div class="leftside-navigation">
<ul class="sidebar-menu" id="nav-accordion">
<li>
<a href="index-2.html">
<i class="fa fa-dashboard"></i>
<span>Dashboard</span>
</a>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-laptop"></i>
<span>Layouts</span>
</a>
<ul class="sub">
<li><a href="boxed_page.html">Boxed Page</a></li>
<li><a href="horizontal_menu.html">Horizontal Menu</a></li>
<li><a href="language_switch.html">Language Switch Bar</a></li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-book"></i>
<span>UI Elements</span>
</a>
<ul class="sub">
<li><a href="general.html">General</a></li>
<li><a href="buttons.html">Buttons</a></li>
<li><a href="widget.html">Widget</a></li>
<li><a href="slider.html">Slider</a></li>
<li><a href="tree_view.html">Tree View</a></li>
<li><a href="nestable.html">Nestable</a></li>
<li><a href="grids.html">Grids</a></li>
<li><a href="calendar.html">Calender</a></li>
<li><a href="draggable_portlet.html">Draggable Portlet</a></li>
</ul>
</li>
<li>
<a href="fontawesome.html">
<i class="fa fa-bullhorn"></i>
<span>Fontawesome </span>
</a>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-th"></i>
<span>Data Tables</span>
</a>
<ul class="sub">
<li><a href="basic_table.html">Basic Table</a></li>
<li><a href="responsive_table.html">Responsive Table</a></li>
<li><a href="dynamic_table.html">Dynamic Table</a></li>
<li><a href="editable_table.html">Editable Table</a></li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-tasks"></i>
<span>Form Components</span>
</a>
<ul class="sub">
<li><a href="form_component.html">Form Elements</a></li>
<li><a href="advanced_form.html">Advanced Components</a></li>
<li><a href="form_wizard.html">Form Wizard</a></li>
<li><a href="form_validation.html">Form Validation</a></li>
<li><a href="file_upload.html">Muliple File Upload</a></li>
<li><a href="dropzone.html">Dropzone</a></li>
<li><a href="inline_editor.html">Inline Editor</a></li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-envelope"></i>
<span>Mail </span>
</a>
<ul class="sub">
<li><a href="mail.html">Inbox</a></li>
<li><a href="mail_compose.html">Compose Mail</a></li>
<li><a href="mail_view.html">View Mail</a></li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class=" fa fa-bar-chart-o"></i>
<span>Charts</span>
</a>
<ul class="sub">
<li><a href="morris.html">Morris</a></li>
<li><a href="chartjs.html">Chartjs</a></li>
<li><a href="flot_chart.html">Flot Charts</a></li>
<li><a href="c3_chart.html">C3 Chart</a></li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;" class="active">
<i class=" fa fa-bar-chart-o"></i>
<span>Maps</span>
</a>
<ul class="sub">
<li class="active"><a href="google_map.html">Google Map</a></li>
<li><a href="vector_map.html">Vector Map</a></li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-glass"></i>
<span>Extra</span>
</a>
<ul class="sub">
<li><a href="blank.html">Blank Page</a></li>
<li><a href="lock_screen.html">Lock Screen</a></li>
<li><a href="profile.html">Profile</a></li>
<li><a href="invoice.html">Invoice</a></li>
<li><a href="pricing_table.html">Pricing Table</a></li>
<li><a href="timeline.html">Timeline</a></li>
<li><a href="gallery.html">Media Gallery</a></li><li><a href="404.html">404 Error</a></li>
<li><a href="500.html">500 Error</a></li>
<li><a href="registration.html">Registration</a></li>
</ul>
</li>
<li>
<a href="login.html">
<i class="fa fa-user"></i>
<span>Login Page</span>
</a>
</li>
</ul></div>
<!-- sidebar menu end-->
</div>
</aside>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<!-- page start-->
<div class="row">
<div class="col-sm-12">
<section class="panel">
<header class="panel-heading">
Google Map with Loaction List
<span class="tools pull-right">
<a href="javascript:;" class="fa fa-chevron-down"></a>
<a href="javascript:;" class="fa fa-cog"></a>
<a href="javascript:;" class="fa fa-times"></a>
</span>
</header>
<div class="panel-body">
<div id="gmap-list"></div>
</div>
</section>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<section class="panel">
<header class="panel-heading">
Google Map with Tab Location
<span class="tools pull-right">
<a href="javascript:;" class="fa fa-chevron-down"></a>
<a href="javascript:;" class="fa fa-cog"></a>
<a href="javascript:;" class="fa fa-times"></a>
</span>
</header>
<div class="panel-body">
<div id="controls-tabs"></div>
<div id="info"></div>
<div id="gmap-tabs"></div>
</div>
</section>
</div>
</div>
<!-- page end-->
</section>
</section>
<!--main content end-->
<!--right sidebar start-->
<div class="right-sidebar">
<div class="search-row">
<input type="text" placeholder="Search" class="form-control">
</div>
<div class="right-stat-bar">
<ul class="right-side-accordion">
<li class="widget-collapsible">
<a href="#" class="head widget-head red-bg active clearfix">
<span class="pull-left">work progress (5)</span>
<span class="pull-right widget-collapse"><i class="ico-minus"></i></span>
</a>
<ul class="widget-container">
<li>
<div class="prog-row side-mini-stat clearfix">
<div class="side-graph-info">
<h4>Target sell</h4>
<p>
25%, Deadline 12 june 13
</p>
</div>
<div class="side-mini-graph">
<div class="target-sell">
</div>
</div>
</div>
<div class="prog-row side-mini-stat">
<div class="side-graph-info">
<h4>product delivery</h4>
<p>
55%, Deadline 12 june 13
</p>
</div>
<div class="side-mini-graph">
<div class="p-delivery">
<div class="sparkline" data-type="bar" data-resize="true" data-height="30" data-width="90%" data-bar-color="#39b7ab" data-bar-width="5" data-data="[200,135,667,333,526,996,564,123,890,564,455]">
</div>
</div>
</div>
</div>
<div class="prog-row side-mini-stat">
<div class="side-graph-info payment-info">
<h4>payment collection</h4>
<p>
25%, Deadline 12 june 13
</p>
</div>
<div class="side-mini-graph">
<div class="p-collection">
<span class="pc-epie-chart" data-percent="45">
<span class="percent"></span>
</span>
</div>
</div>
</div>
<div class="prog-row side-mini-stat">
<div class="side-graph-info">
<h4>delivery pending</h4>
<p>
44%, Deadline 12 june 13
</p>
</div>
<div class="side-mini-graph">
<div class="d-pending">
</div>
</div>
</div>
<div class="prog-row side-mini-stat">
<div class="col-md-12">
<h4>total progress</h4>
<p>
50%, Deadline 12 june 13
</p>
<div class="progress progress-xs mtop10">
<div style="width: 50%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="20" role="progressbar" class="progress-bar progress-bar-info">
<span class="sr-only">50% Complete</span>
</div>
</div>
</div>
</div>
</li>
</ul>
</li>
<li class="widget-collapsible">
<a href="#" class="head widget-head terques-bg active clearfix">
<span class="pull-left">contact online (5)</span>
<span class="pull-right widget-collapse"><i class="ico-minus"></i></span>
</a>
<ul class="widget-container">
<li>
<div class="prog-row">
<div class="user-thumb">
<a href="#"><img src="images/avatar1_small.jpg" alt=""></a>
</div>
<div class="user-details">
<h4><a href="#">Jonathan Smith</a></h4>
<p>
Work for fun
</p>
</div>
<div class="user-status text-danger">
<i class="fa fa-comments-o"></i>
</div>
</div>
<div class="prog-row">
<div class="user-thumb">
<a href="#"><img src="images/avatar1.jpg" alt=""></a>
</div>
<div class="user-details">
<h4><a href="#">Anjelina Joe</a></h4>
<p>
Available
</p>
</div>
<div class="user-status text-success">
<i class="fa fa-comments-o"></i>
</div>
</div>
<div class="prog-row">
<div class="user-thumb">
<a href="#"><img src="images/chat-avatar2.jpg" alt=""></a>
</div>
<div class="user-details">
<h4><a href="#">John Doe</a></h4>
<p>
Away from Desk
</p>
</div>
<div class="user-status text-warning">
<i class="fa fa-comments-o"></i>
</div>
</div>
<div class="prog-row">
<div class="user-thumb">
<a href="#"><img src="images/avatar1_small.jpg" alt=""></a>
</div>
<div class="user-details">
<h4><a href="#">Mark Henry</a></h4>
<p>
working
</p>
</div>
<div class="user-status text-info">
<i class="fa fa-comments-o"></i>
</div>
</div>
<div class="prog-row">
<div class="user-thumb">
<a href="#"><img src="images/avatar1.jpg" alt=""></a>
</div>
<div class="user-details">
<h4><a href="#">Shila Jones</a></h4>
<p>
Work for fun
</p>
</div>
<div class="user-status text-danger">
<i class="fa fa-comments-o"></i>
</div>
</div>
<p class="text-center">
<a href="#" class="view-btn">View all Contacts</a>
</p>
</li>
</ul>
</li>
<li class="widget-collapsible">
<a href="#" class="head widget-head purple-bg active">
<span class="pull-left"> recent activity (3)</span>
<span class="pull-right widget-collapse"><i class="ico-minus"></i></span>
</a>
<ul class="widget-container">
<li>
<div class="prog-row">
<div class="user-thumb rsn-activity">
<i class="fa fa-clock-o"></i>
</div>
<div class="rsn-details ">
<p class="text-muted">
just now
</p>
<p>
<a href="#">Jim Doe </a>Purchased new equipments for zonal office setup
</p>
</div>
</div>
<div class="prog-row">
<div class="user-thumb rsn-activity">
<i class="fa fa-clock-o"></i>
</div>
<div class="rsn-details ">
<p class="text-muted">
2 min ago
</p>
<p>
<a href="#">Jane Doe </a>Purchased new equipments for zonal office setup
</p>
</div>
</div>
<div class="prog-row">
<div class="user-thumb rsn-activity">
<i class="fa fa-clock-o"></i>
</div>
<div class="rsn-details ">
<p class="text-muted">
1 day ago
</p>
<p>
<a href="#">Jim Doe </a>Purchased new equipments for zonal office setup
</p>
</div>
</div>
</li>
</ul>
</li>
<li class="widget-collapsible">
<a href="#" class="head widget-head yellow-bg active">
<span class="pull-left"> shipment status</span>
<span class="pull-right widget-collapse"><i class="ico-minus"></i></span>
</a>
<ul class="widget-container">
<li>
<div class="col-md-12">
<div class="prog-row">
<p>
Full sleeve baby wear (SL: 17665)
</p>
<div class="progress progress-xs mtop10">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
<span class="sr-only">40% Complete</span>
</div>
</div>
</div>
<div class="prog-row">
<p>
Full sleeve baby wear (SL: 17665)
</p>
<div class="progress progress-xs mtop10">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 70%">
<span class="sr-only">70% Completed</span>
</div>
</div>
</div>
</div>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!--right sidebar end-->
</section>
<!-- Placed js at the end of the document so the pages load faster -->
<!--Core js-->
<script src="js/library/jquery.js"></script>
<script src="bs3/js/bootstrap.min.js"></script>
<script class="include" type="text/javascript" src="js/accordion-menu/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scrollTo/jquery.scrollTo.min.js"></script>
<script src="assets/jQuery-slimScroll-1.3.0/jquery.slimscroll.js"></script>
<script src="js/nicescroll/jquery.nicescroll.js"></script>
<!--Easy Pie Chart-->
<script src="assets/easypiechart/jquery.easypiechart.js"></script>
<!--Sparkline Chart-->
<script src="assets/sparkline/jquery.sparkline.js"></script>
<!--jQuery Flot Chart-->
<script src="assets/flot-chart/jquery.flot.js"></script>
<script src="assets/flot-chart/jquery.flot.tooltip.min.js"></script>
<script src="assets/flot-chart/jquery.flot.resize.js"></script>
<script src="assets/flot-chart/jquery.flot.pie.resize.js"></script>
<!--Google Map-->
<script src="http://maps.google.com/maps/api/js?sensor=false&libraryraries=geometry&v=3.7"></script>
<script src="assets/google-map/maplace.js"></script>
<script src="assets/google-map/data/points.js"></script>
<!--common script init for all pages-->
<script src="js/scripts.js"></script>
<script>
//ul list example
new Maplace({
locations: LocsB,
map_div: '#gmap-list',
controls_type: 'list',
controls_title: 'Choose a location:'
}).Load();
new Maplace({
locations: LocsB,
map_div: '#gmap-tabs',
controls_div: '#controls-tabs',
controls_type: 'list',
controls_on_map: false,
show_infowindow: false,
start: 1,
afterShow: function(index, location, marker) {
$('#info').html(location.html);
}
}).Load();
</script>
</body>
<!-- Mirrored from bucketadmin.themebucket.net/google_map.html by HTTrack Website Copier/3.x [XR&CO'2013], Fri, 21 Feb 2014 19:39:48 GMT -->
</html>
| mromrell/quotadeck-frontend | public/partials/theme/google_map.html | HTML | mit | 29,848 |
<?php
/**
* CompraingredienteFixture
*
*/
class CompraingredienteFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'),
'resto_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false),
'restosurcusale_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false),
'proveedore_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false),
'compratipopago_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false),
'fecha_compra' => array('type' => 'date', 'null' => false, 'default' => null),
'fecha_vencimiento' => array('type' => 'date', 'null' => false, 'default' => null),
'num_factura' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'observaciones' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'created' => array('type' => 'datetime', 'null' => false, 'default' => null),
'modified' => array('type' => 'datetime', 'null' => false, 'default' => null),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'resto_id' => 1,
'restosurcusale_id' => 1,
'proveedore_id' => 1,
'compratipopago_id' => 1,
'fecha_compra' => '2017-01-20',
'fecha_vencimiento' => '2017-01-20',
'num_factura' => 'Lorem ipsum dolor sit amet',
'observaciones' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
'created' => '2017-01-20 15:51:45',
'modified' => '2017-01-20 15:51:45'
),
);
}
| kster007/CUBETECH-SOLTERA | app/Test/Fixture/CompraingredienteFixture.php | PHP | mit | 2,307 |
#
# This file belongs to MTYPE13 package by Wlodek Bzyl <matwb@univ.gda.pl>
#
DVIPSFLAGS = -u +sign-000.map
# Read in font independent definitions.
make_root = ../../../make
include $(make_root)/type3common.mk
GENERATEDFILES = test-signs.{log,dvi,ps}
sign-000.dvi : sign-000.t3 sign-000.proof
test-signs.dvi : sign-000.t3
| wbzyl/mtype13 | metapost/type3/signposts-000/Makefile | Makefile | mit | 328 |
<?php
namespace spec\Prophecy\Exception\Prophecy;
use PhpSpec\ObjectBehavior;
use Prophecy\Prophecy\ObjectProphecy;
class ObjectProphecyExceptionSpec extends ObjectBehavior
{
function let(ObjectProphecy $objectProphecy)
{
$this->beConstructedWith('message', $objectProphecy);
}
function it_should_be_a_prophecy_exception()
{
$this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ProphecyException');
}
function it_holds_double_reference($objectProphecy)
{
$this->getObjectProphecy()->shouldReturn($objectProphecy);
}
}
| gustavokev/preescolar1 | vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php | PHP | mit | 611 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5
*
* 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 burstcoin.faucet.data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;
@Entity
public class Account
implements Serializable
{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
private Long id;
@Column(nullable = false, unique = true)
private String accountId;
@Column(nullable = true)
private Date lastClaim;
protected Account()
{
}
public Account(String accountId, Date lastClaim)
{
this.accountId = accountId;
this.lastClaim = lastClaim;
}
public Long getId()
{
return id;
}
public void setAccountId(String accountId)
{
this.accountId = accountId;
}
public void setLastClaim(Date lastClaim)
{
this.lastClaim = lastClaim;
}
public String getAccountId()
{
return accountId;
}
public Date getLastClaim()
{
return lastClaim;
}
}
| de-luxe/burstcoin-faucet | src/main/java/burstcoin/faucet/data/Account.java | Java | mit | 2,187 |
"use strict";
const _ = require ('underscore')
_.hasTypeMatch = true
/* Type matching for arbitrary complex structures (TODO: test)
======================================================================== */
Meta.globalTag ('required')
Meta.globalTag ('atom')
$global.const ('$any', _.identity)
_.deferTest (['type', 'type matching'], function () {
$assert (_.omitTypeMismatches ( { '*': $any, foo: $required ('number'), bar: $required ('number') },
{ baz: 'x', foo: 42, bar: 'foo' }),
{ })
$assert (_.omitTypeMismatches ( { foo: { '*': $any } },
{ foo: { bar: 42, baz: 'qux' } }),
{ foo: { bar: 42, baz: 'qux' } })
$assert (_.omitTypeMismatches ( { foo: { bar: $required(42), '*': $any } },
{ foo: { bar: 'foo', baz: 'qux' } }),
{ })
$assert (_.omitTypeMismatches ( [{ foo: $required ('number'), bar: 'number' }],
[{ foo: 42, bar: 42 },
{ foo: 24, },
{ bar: 42 }]), [{ foo: 42, bar: 42 }, { foo: 24 }])
$assert (_.omitTypeMismatches ({ '*': 'number' }, { foo: 42, bar: 42 }), { foo: 42, bar: 42 })
$assert (_.omitTypeMismatches ({ foo: $any }, { foo: 0 }), { foo: 0 }) // there was a bug (any zero value was omitted)
$assert (_.decideType ([]), [])
$assert (_.decideType (42), 'number')
$assert (_.decideType (_.identity), 'function')
$assert (_.decideType ([{ foo: 1 }, { foo: 2 }]), [{ foo: 'number' }])
$assert (_.decideType ([{ foo: 1 }, { bar: 2 }]), [])
$assert (_.decideType ( { foo: { bar: 1 }, foo: { baz: [] } }),
{ foo: { bar: 'number' }, foo: { baz: [] } })
$assert (_.decideType ( { foo: { bar: 1 }, foo: { bar: 2 } }),
{ foo: { bar: 'number' } })
$assert (_.decideType ( { foo: { bar: 1 },
bar: { bar: 2 } }),
{ '*': { bar: 'number' } })
if (_.hasOOP) {
var Type = $prototype ()
$assert (_.decideType ({ x: new Type () }), { x: Type }) }
}, function () {
_.isMeta = function (x) { return (x === $any) || $atom.is (x) || $required.is (x) }
var zip = function (type, value, pred) {
var required = Meta.unwrapAll (_.filter2 (type, $required.is))
var match = _.nonempty (_.zip2 (Meta.unwrapAll (type), value, pred))
if (_.isEmpty (required)) {
return match }
else { var requiredMatch = _.nonempty (_.zip2 (required, value, pred))
var allSatisfied = _.values2 (required).length === _.values2 (requiredMatch).length
return allSatisfied ?
match : _.coerceToEmpty (value) } }
var hyperMatch = _.hyperOperator (_.binary,
function (type_, value, pred) { var type = Meta.unwrap (type_)
if (_.isArray (type)) { // matches [ItemType] → [item, item, ..., N]
if (_.isArray (value)) {
return zip (_.times (value.length, _.constant (type[0])), value, pred) }
else {
return undefined } }
else if (_.isStrictlyObject (type) && type['*']) { // matches { *: .. } → { a: .., b: .., c: .. }
if (_.isStrictlyObject (value)) {
return zip (_.extend ( _.map2 (value, _.constant (type['*'])),
_.omit (type, '*')), value, pred) }
else {
return undefined } }
else {
return zip (type_, value, pred) } })
var typeMatchesValue = function (c, v) { var contract = Meta.unwrap (c)
return (contract === $any) ||
((contract === undefined) && (v === undefined)) ||
(_.isFunction (contract) && (
_.isPrototypeConstructor (contract) ?
_.isTypeOf (contract, v) : // constructor type
(contract (v) === true))) || // test predicate
(typeof v === contract) || // plain JS type
(v === contract) } // constant match
_.mismatches = function (op, contract, value) {
return hyperMatch (contract, value,
function (contract, v) {
return op (contract, v) ? undefined : contract }) }
_.omitMismatches = function (op, contract, value) {
return hyperMatch (contract, value,
function (contract, v) {
return op (contract, v) ? v : undefined }) }
_.typeMismatches = _.partial (_.mismatches, typeMatchesValue)
_.omitTypeMismatches = _.partial (_.omitMismatches, typeMatchesValue)
_.valueMismatches = _.partial (_.mismatches, function (a, b) { return (a === $any) || (b === $any) || (a === b) })
var unifyType = function (value) {
if (_.isArray (value)) {
return _.nonempty ([_.reduce (value.slice (1), function (a, b) { return _.undiff (a, b) }, _.first (value) || undefined)]) }
else if (_.isStrictlyObject (value)) {
var pairs = _.pairs (value)
var unite = _.map ( _.reduce (pairs.slice (1), function (a, b) { return _.undiff (a, b) }, _.first (pairs) || [undefined, undefined]),
_.nonempty)
return (_.isEmpty (unite) || _.isEmpty (unite[1])) ? value : _.fromPairs ([[unite[0] || '*', unite[1]]]) }
else {
return value } }
_.decideType = function (value) {
var operator = _.hyperOperator (_.unary,
function (value, pred) {
if (value && value.constructor && value.constructor.$definition) {
return value.constructor }
return unifyType (_.map2 (value, pred)) })
return operator (value, function (value) {
if (_.isPrototypeInstance (value)) {
return value.constructor }
else {
return _.isEmptyArray (value) ? value : (typeof value) } }) } }) // TODO: fix hyperOperator to remove additional check for []
| xpl/useless | base/tier0/typeMatch.js | JavaScript | mit | 6,907 |
<?php
return [
'app' => [
'name' => 'OctoberCMS',
'tagline' => 'Getting back to basics'
],
'locale' => [
'be' => 'Беларуская',
'bg' => 'Български',
'cs' => 'Čeština',
'da' => 'Dansk',
'en' => 'English (United States)',
'en-au' => 'English (Australia)',
'en-ca' => 'English (Canada)',
'en-gb' => 'English (United Kingdom)',
'et' => 'Eesti',
'de' => 'Deutsch',
'el' => 'Ελληνικά',
'es' => 'Español',
'es-ar' => 'Español (Argentina)',
'fa' => 'فارسی',
'fr' => 'Français',
'fr-ca' => 'Français (Canada)',
'hu' => 'Magyar',
'id' => 'Bahasa Indonesia',
'it' => 'Italiano',
'ja' => '日本語',
'kr' => '한국어',
'lt' => 'Lietuvių',
'lv' => 'Latviešu',
'nb-no' => 'Norsk (Bokmål)',
'nl' => 'Nederlands',
'pl' => 'Polski',
'pt-br' => 'Português (Brasil)',
'pt-pt' => 'Português (Portugal)',
'ro' => 'Română',
'ru' => 'Русский',
'fi' => 'Suomi',
'sv' => 'Svenska',
'sk' => 'Slovenský',
'tr' => 'Türkçe',
'uk' => 'Українська мова',
'zh-cn' => '简体中文',
'zh-tw' => '繁體中文',
'vn' => 'Tiếng việt'
],
'directory' => [
'create_fail' => 'Không thể tạo danh mục: :name'
],
'file' => [
'create_fail' => 'Không thể tạo file: :name'
],
'combiner' => [
'not_found' => "Không tìm thấy combiner file ':name'."
],
'system' => [
'name' => 'Hệ thống',
'menu_label' => 'Hệ thống',
'categories' => [
'cms' => 'CMS',
'misc' => 'Misc',
'logs' => 'Các bản ghi',
'mail' => 'Mail',
'shop' => 'Cửa hàng',
'team' => 'Team',
'users' => 'Người dùng',
'system' => 'Hệ thống',
'social' => 'Mạng xã hội',
'backend' => 'Trang quản trị',
'events' => 'Sự kiện',
'customers' => 'Khách hàng',
'my_settings' => 'Cài đặt của tôi',
'notifications' => 'Thông báo'
]
],
'theme' => [
'label' => 'Theme',
'unnamed' => 'Theme chưa được đặt tên',
'name' => [
'label' => 'Tên theme',
'help' => 'Tên của theme không được trùng lặp. Ví dụ RainLab.Vanilla'
],
],
'themes' => [
'install' => 'Cài đặt themes',
'search' => 'Tìm kiếm theme để cài đặt...',
'installed' => 'Các theme đã cài đặt',
'no_themes' => 'Không có theme nào được cài đặt từ chợ theme.',
'recommended' => 'Được khuyến khích cài đặt',
'remove_confirm' => 'Bạn có chắc chắn muốn xóa theme này?'
],
'plugin' => [
'label' => 'Plugin',
'unnamed' => 'Plugin chưa được đặt tên',
'name' => [
'label' => 'Tên plugin',
'help' => 'Tên của plugin không được trùng lặp. For example, RainLab.Blog'
]
],
'plugins' => [
'manage' => 'Quản lý các plugin',
'enable_or_disable' => 'Bật hoặc tắt',
'enable_or_disable_title' => 'Bật hoặc tắt plugin',
'install' => 'Cài đặt plugin',
'install_products' => 'Các sản phẩm để cài đặt',
'search' => 'Tìm kiếm plugin để cài đặt...',
'installed' => 'Các plugin đã cài đặt',
'no_plugins' => 'Không có plugin nào được cài đặt từ chợ plugin',
'recommended' => 'Được khuyến khích cài đặt',
'remove' => 'Xóa',
'refresh' => 'Làm mới',
'disabled_label' => 'Đã tắt',
'disabled_help' => 'Các plugin đã tắt và không được sử dụng bới ứng dụng',
'frozen_label' => 'Tắt cập nhật',
'frozen_help' => 'Những plugin tắt cập nhật sẽ không được sử lý cập nhật tự động.',
'selected_amount' => 'Số plugin đã được chọn: :amount',
'remove_confirm' => 'Xác nhận xóa plugin này?',
'remove_success' => 'Đã xóa các plugin ra khỏi hệ thống.',
'refresh_confirm' => 'Xác nhận?',
'refresh_success' => 'Đã làm mới các plugin.',
'disable_confirm' => 'Xác nhận tắt?',
'disable_success' => 'Đã tắt các plugin.',
'enable_success' => 'Đã bật các plugin.',
'unknown_plugin' => 'Đã xóa các file của plugin ra khỏi hệ thống.'
],
'project' => [
'name' => 'Dự án',
'owner_label' => 'Người sở hữu',
'attach' => 'Chèn Dự án',
'detach' => 'Gỡ bỏ Dự án',
'none' => 'Trống',
'id' => [
'label' => 'ID Dự án',
'help' => 'Cách để xem ID Dự án',
'missing' => 'Điền vào ID Dự án để sử dụng.'
],
'detach_confirm' => 'Xác nhận gỡ Dự án?',
'unbind_success' => 'Dự án đã được gỡ ra.'
],
'settings' => [
'menu_label' => 'Cài đặt',
'not_found' => 'Không tìm thấy các cấu hình được chỉ định.',
'missing_model' => 'Không có Model cho trang cài đặt.',
'update_success' => 'Cấu hình cho :name thành công',
'return' => 'Trở lại trang cài đặt',
'search' => 'Tìm kiếm'
],
'mail' => [
'log_file' => 'Log file',
'menu_label' => 'Cấu hình mail',
'menu_description' => 'Quản lý các cấu hình mail.',
'general' => 'Cấu hình chung',
'method' => 'Phương thức gửi mail',
'sender_name' => 'Tên người gửi',
'sender_email' => 'Email người gửi',
'php_mail' => 'PHP mail',
'smtp' => 'SMTP',
'smtp_address' => 'Địa chỉ SMTP',
'smtp_authorization' => 'Yêu cầu cấp quyền',
'smtp_authorization_comment' => 'Chọn mụ này nếu SMTP sever của bạn yêu cầu cấp quyền truy cập(requires authorization).',
'smtp_username' => 'Tên đăng nhập',
'smtp_password' => 'Mật khẩu',
'smtp_port' => 'SMTP port',
'smtp_ssl' => 'Yêu cầu sử dụng SSL',
'smtp_encryption' => 'Giao thức mã hóa SMTP',
'smtp_encryption_none' => 'Không mã hóa',
'smtp_encryption_tls' => 'TLS',
'smtp_encryption_ssl' => 'SSL',
'sendmail' => 'Gửi mail',
'sendmail_path' => 'Đường dẫn gửi mail',
'sendmail_path_comment' => 'Please specify the path of the sendmail program.',
'mailgun' => 'Mailgun',
'mailgun_domain' => 'Tên miền trên Mailgun',
'mailgun_domain_comment' => 'Điền tên miền trên Mailgun',
'mailgun_secret' => 'Mã bí mật trên Mailgun(secret key)',
'mailgun_secret_comment' => 'Điền vào mã Mailgun API của bạn',
'mandrill' => 'Mandrill',
'mandrill_secret' => 'Mã bí mật trên Mandrill (secret key)',
'mandrill_secret_comment' => 'Điền vào mã Mandrill API của bạn.',
'ses' => 'SES',
'ses_key' => 'Mã SES',
'ses_key_comment' => 'Điền vào mã SES API của bạn',
'ses_secret' => 'Mã bí mật trên SES (secret key)',
'ses_secret_comment' => 'Điền vào mã bí mật trên SES API của bạn (secret key)',
'ses_region' => 'Ku vực SES',
'ses_region_comment' => 'Điền vào khu vực SES (ví dụ us-east-1)',
'drivers_hint_header' => 'Trình điều khiển chưa được cài đặt',
'drivers_hint_content' => 'Phương thức gửi mail này cần phải cài ":plugin" plugin, bạn cần phải cài đặt nó trước mới gửi được mail'
],
'mail_templates' => [
'menu_label' => 'Các mẫu mail',
'menu_description' => 'Quản lý các mẫu mail sẽ được gửi cho user và administrators.',
'new_template' => 'Thêm mẫu mới',
'new_layout' => 'Thêm mẫu mới',
'new_partial' => 'Thêm Partial',
'template' => 'Giao diện mẫu',
'templates' => 'Các giao diện mẫu',
'partial' => 'Partial',
'partials' => 'Partials',
'menu_layouts_label' => 'Giao diện mail mẫu',
'menu_partials_label' => 'Mail Partials',
'layout' => 'Giao diễn mẫu',
'layouts' => 'Các giao diễn mẫu',
'no_layout' => '-- Không sử dụng mẫu --',
'name' => 'Tên',
'name_comment' => 'Tên của giao diễn mẫu không được trùng nhau.',
'code' => 'Code',
'code_comment' => 'Nhập một mã không được trùng với các mẫu giao diện khác',
'subject' => 'Tiêu đề mail',
'subject_comment' => 'Tiêu đề của mail',
'description' => 'Mô tả',
'content_html' => 'HTML',
'content_css' => 'CSS',
'content_text' => 'Văn bản thô',
'test_send' => 'Gửi mail test',
'test_success' => 'Đã gửi mail test.',
'test_confirm' => 'Gửi mail test đến :email. Tiếp tục?',
'creating' => 'Đang tạo mẫu...',
'creating_layout' => 'Đang tạo Layout...',
'saving' => 'Đang lưu mẫu...',
'saving_layout' => 'Đang lưu Layout...',
'delete_confirm' => 'Xác nhận xóa template này?',
'delete_layout_confirm' => 'Xác nhận xóa layout này?',
'deleting' => 'Đang xóa mẫu...',
'deleting_layout' => 'Đang xóa Layout...',
'sending' => 'Đang gửi mail test...',
'return' => 'Quay lại trang danh sách mail mẫu'
],
'mail_brand' => [
'menu_label' => 'Giao diện Mail',
'menu_description' => 'Chỉnh sửa màu sắc, giao diện của mẫu mail.',
'page_title' => 'Tùy chỉnh giao diện của mẫu mail',
'sample_template' => [
'heading' => 'Tiêu đề',
'paragraph' => 'Đây là đoạn văn mẫu.... This is a paragraph filled with Lorem Ipsum and a link. Cumque dicta <a>doloremque eaque</a>, enim error laboriosam pariatur possimus tenetur veritatis voluptas.',
'table' => [
'item' => 'Danh sách các mục',
'description' => 'Mô tả',
'price' => 'Giá',
'centered' => 'Căn giữa',
'right_aligned' => 'Căn phải'
],
'buttons' => [
'primary' => 'Nút bấm chính',
'positive' => 'Nút nổi bật',
'negative' => 'Nút chú ý',
],
'panel' => 'Mẫu giao diện này thật tuyện vời!',
'more' => 'Mô tả thêm',
'promotion' => 'Mã ưu đãi: OCTOBER',
'subcopy' => 'Thông tin thêm',
'thanks' => 'Lời cám ơn'
],
'fields' => [
'_section_background' => 'Màu nền',
'body_bg' => 'Màu nền chính',
'content_bg' => 'Màu nền nội dung',
'content_inner_bg' => 'Màu nền bên trong nội dung',
'_section_buttons' => 'Màu nền của các nút bấm',
'button_text_color' => 'Màu chữ của nút bấm',
'button_primary_bg' => 'Màu của nút bấm chính',
'button_positive_bg' => 'Màu của nút bấm nổi bật',
'button_negative_bg' => 'Màu của nút bấm chú ý',
'_section_type' => 'Màu của chữ',
'header_color' => 'Màu của tiêu đề',
'heading_color' => 'Màu của tiêu đề',
'text_color' => 'Màu chữ bình thường',
'link_color' => 'Màu đường dẫn',
'footer_color' => 'Màu chữ chân trang',
'_section_borders' => 'Đường viền',
'body_border_color' => 'Màu của đường viền toàn trang',
'subcopy_border_color' => 'Màu đường viền phần mô tả thêm',
'table_border_color' => 'Màu của đường viền bảng',
'_section_components' => 'Thành phần khác',
'panel_bg' => 'Nền của bảng điều khiển',
'promotion_bg' => 'Nền mục khuyến mãi',
'promotion_border_color' => 'Viền của mục khuyến mãi',
]
],
'install' => [
'project_label' => 'Chèn Project',
'plugin_label' => 'Cài đặt Plugin',
'theme_label' => 'Cài đặt Theme',
'missing_plugin_name' => 'Điền vào tên Plugin để cài đặt.',
'missing_theme_name' => 'Điền vào tên Theme để cài đặt.',
'install_completing' => 'Hoàn tất cài đặt',
'install_success' => 'Plugin đã được cài thành công'
],
'updates' => [
'title' => 'Quản lý các cập nhật',
'name' => 'Cập nhật hệ thống',
'menu_label' => 'Những cập nhật & Plugins',
'menu_description' => 'Cập nhật hệ thống, quản lý và cài đặt plugins, themes.',
'return_link' => 'Quay lại trang cập nhật hệ thống',
'check_label' => 'Kiểm tra cập nhật',
'retry_label' => 'Thử lại',
'plugin_name' => 'Tên Plugin',
'plugin_code' => 'Code',
'plugin_description' => 'Mô tả',
'plugin_version' => 'Phiên bản',
'plugin_author' => 'Tác giả',
'plugin_not_found' => 'Không tìm thấy Plugin',
'core_current_build' => 'Current build',
'core_build' => 'Build :build',
'core_build_help' => 'Phiên bản build gần nhất.',
'core_downloading' => 'Đang tải file ứng dụng',
'core_extracting' => 'Đang giải nén',
'core_set_build' => 'Cài đặt build number',
'plugins' => 'Plugins',
'themes' => 'Themes',
'disabled' => 'Đã tắt',
'plugin_downloading' => 'Đang tải plugin: :name',
'plugin_extracting' => 'Đang giải nén plugin: :name',
'plugin_version_none' => 'Tạo mới plugin',
'plugin_current_version' => 'Phiên bản hiện tại version',
'theme_new_install' => 'Cài đặt theme mới.',
'theme_downloading' => 'Đang tải theme: :name',
'theme_extracting' => 'Đang giải nén theme: :name',
'update_label' => 'cập nhật hệ thống',
'update_completing' => 'Cập nhật hoàn tất',
'update_loading' => 'Đang kiểm tra các cập nhật có sẵn...',
'update_success' => 'Cập nhật hoàn tất',
'update_failed_label' => 'Lỗi cập nhật',
'force_label' => 'Bắt buộc cập nhật',
'found' => [
'label' => 'Có cập nhật mới!',
'help' => 'Bấm cập nhật hệ thống để bắt đầu cập nhật.'
],
'none' => [
'label' => 'Không có cập nhật',
'help' => 'Không tìm thấy bản cập nhật nào.'
],
'important_action' => [
'empty' => 'Chọn hành động',
'confirm' => 'Xác nhận cập nhật',
'skip' => 'Bỏ qua bản cập nhật này (Chỉ lần này)',
'ignore' => 'Bỏ qua bản cập nhật này (luôn luôn bỏ qua)'
],
'important_action_required' => 'Hành động này là bắt buộc',
'important_view_guide' => 'Xem hướng dẫn nâng cấp',
'important_view_release_notes' => 'Xem ghi chú',
'important_alert_text' => 'Một số cập nhật cần phải chú ý.',
'details_title' => 'Chi tiết Plugin',
'details_view_homepage' => 'Đến trang chủ',
'details_readme' => 'Tài liệu hướng dẫn',
'details_readme_missing' => 'Không có tài liệu được cung cấp.',
'details_changelog' => 'Các lần thay đổi',
'details_changelog_missing' => 'Không có bản ghi các lần thay đổi.',
'details_upgrades' => 'Hướng dẫn nâng cấp',
'details_upgrades_missing' => 'Không có hướng dẫn nâng cấp nào được cung cấp.',
'details_licence' => 'Giấy phép',
'details_licence_missing' => 'Không có giấy phép nào được cung cấp.',
'details_current_version' => 'Phiên bản hiện tại',
'details_author' => 'Tác giả'
],
'server' => [
'connect_error' => 'Lỗi kết nối đến máy chủ.',
'response_not_found' => 'Không tìm thấy máy chủ cập nhật.',
'response_invalid' => 'Phản hồi không hợp lệ từ máy chủ.',
'response_empty' => 'Phản hồi trống từ máy chủ.',
'file_error' => 'Lỗi máy chủ không thể gửi về các package.',
'file_corrupt' => 'File trên máy chủ bị hỏng.'
],
'behavior' => [
'missing_property' => 'Class :class cần phải khai báo thuộc tính $:property được sử dụng bởi :behavior behavior.'
],
'config' => [
'not_found' => 'Không tìm thấy tệp tin cấu hình :file được khai báo cho :location.',
'required' => "Cấu hình được sử dụng cho :location cần phải có giá trị ':property'."
],
'zip' => [
'extract_failed' => "Không thể giải nén tệp tin ':file'."
],
'event_log' => [
'hint' => 'Bản ghi các lỗi có thể sảy ra trong ứng dụng, ví dụ exceptions và thông tin debug.',
'menu_label' => 'Bản ghi các sự kiện',
'menu_description' => 'Xem nhật ký hệ thống với thông tin thời gian cụ thể.',
'empty_link' => 'Xóa hết các bản ghi',
'empty_loading' => 'Đang xóa các bản ghi...',
'empty_success' => 'Đã xóa các bản ghi sự kiện',
'return_link' => 'Quay lại trang các bản ghi sự kiện',
'id' => 'ID',
'id_label' => 'Event ID',
'created_at' => 'Ngày giờ',
'message' => 'Nội dung',
'level' => 'Cấp độ',
'preview_title' => 'Event'
],
'request_log' => [
'hint' => 'Bản ghi các request lỗi của trình duyệt. Ví dụ, nếu có khách truy cập vào một trang nội dung mà hệ thống không tìm thấy trang đó, một bản ghi sẽ được tạo ra với mã trạng thái 404.',
'menu_label' => 'Bản ghi các Request',
'menu_description' => 'Xem các request lỗi hoặc bị chuyển hướng, ví dụ như Không tìm thấy trang (404).',
'empty_link' => 'Xóa hết các request log',
'empty_loading' => 'Đang xóa request log...',
'empty_success' => 'Đã xóa hết request log',
'return_link' => 'Quay lại trang request log',
'id' => 'ID',
'id_label' => 'Log ID',
'count' => 'Số lần',
'referer' => 'Người giới thiệu',
'url' => 'URL',
'status_code' => 'Trạng thái',
'preview_title' => 'Request'
],
'permissions' => [
'name' => 'Hệ thống',
'manage_system_settings' => 'Quản lý các cài đặt của hệ thống',
'manage_software_updates' => 'Quản lý các cập nhật của hệ thống',
'access_logs' => 'Xem các bản ghi hệ thống',
'manage_mail_templates' => 'Quản lý các mẫu mail',
'manage_mail_settings' => 'Quản lý các cài đặt mail',
'manage_other_administrators' => 'Quản lý các administrator khác',
'manage_preferences' => 'Cá nhân hóa trang quản trị',
'manage_editor' => 'Cá nhân hóa trình biên tập(code editor)',
'view_the_dashboard' => 'Xem bảng điều khiển',
'manage_branding' => 'Tùy chỉnh trang quản trị'
],
'log' => [
'menu_label' => 'Cài đặt log',
'menu_description' => 'Cấu hình những mục sẽ được ghi log.',
'default_tab' => 'Những lần đăng nhập',
'log_events' => 'Ghi các sự kiện của hệ thống',
'log_events_comment' => 'Lưu các sự kiện của hệ thống vào database dựa trên file log',
'log_requests' => 'Bản ghi các lỗi request',
'log_requests_comment' => 'Các lỗi request của trình duyệt, ví dụ lỗi 404.',
'log_theme' => 'Bản ghi các thay đổi của theme',
'log_theme_comment' => 'Khi thay đổi theme thông qua giao diện quản trị.',
],
'media' => [
'invalid_path' => "Đường dẫn không hợp lệ: ':path'.",
'folder_size_items' => 'item(s)',
],
];
| c57fr/c57 | modules/system/lang/vn/lang.php | PHP | mit | 21,151 |
Braintree Multi-Merchant Example
================================
## Set Up
Note: This example requires multiple Braintree sandbox accounts.
1. Clone this repository
2. [Install Composer](https://getcomposer.org/download/), if necessary
3. Install dependencies (`composer install`)
4. Modify `credentials.php` to include all of your sandbox credentials
## Running
php multi_merchant_transaction_test.php
| matthewpatterson/braintree_multi_merchant_example | README.md | Markdown | mit | 413 |
void inplace(double *invec, double *outvec, int n, int m) {
int i;
for (i=0; i < n; i++) {
outvec[i] = 2*invec[i];
}
}
| odellus/year_of_code | swig/inplace/inplace.c | C | mit | 139 |
/**
* Copyright 2017, 2018, 2019, 2020 Stephen Powis https://github.com/Crim/pardot-java-client
*
* 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.darksci.pardot.api.request.form;
import com.darksci.pardot.api.request.BaseRequest;
/**
* For creating new Forms using Pardot's API.
*/
public class FormCreateRequest extends BaseRequest<FormCreateRequest> {
@Override
public String getApiEndpoint() {
return "form/do/create";
}
/**
* Define the name of the form.
* @param name The name of the form.
* @return FormCreateRequest builder.
*/
public FormCreateRequest withName(final String name) {
setParam("name", name);
return this;
}
/**
* Associate form with a campaign.
* @param campaignId Id of campaign to associate with form.
* @return FormCreateRequest builder.
*/
public FormCreateRequest withCampaignId(final Long campaignId) {
setParam("campaign_id", campaignId);
return this;
}
/**
* Associate form with a layout template.
* @param layoutTemplateId Id of layout template to associate with form.
* @return FormCreateRequest builder.
*/
public FormCreateRequest withLayoutTemplateId(final Long layoutTemplateId) {
setParam("layout_template_id", layoutTemplateId);
return this;
}
/**
* Associate form with a folder.
* @param folderId Id of folder to associate with form.
* @return FormCreateRequest builder.
*/
public FormCreateRequest withFolderId(final Long folderId) {
setParam("folder_id", folderId);
return this;
}
}
| Crim/pardot-java-client | src/main/java/com/darksci/pardot/api/request/form/FormCreateRequest.java | Java | mit | 2,672 |
import { $, util } from './util-node'
import Taglet from './taglet'
var
lace,
version = '1.0.0',
defaults = {
opts: {}
},
warehouse = {
singleton: null,
compiled_dom: null,
laces: {
global: null
},
taglets: {}
}
;
class Lace {
constructor(name) {
this.name = name;
}
/**
*
* @param name
* @param def
* @param global, true when make available only for this lace
* @returns {*}
*/
annotation(name, def, global = false) {
/*if (typeof def !== Type.UNDEFINED) {
this.definition('annotation', name, def);
}
return this.instance('annotation', name);*/
}
taglet(name, def, global = false) {
/*if (typeof def !== Type.UNDEFINED) {
this.definition('taglet', name, def);
}
return this.instance('taglet', name);*/
}
compile() {
}
render(template, data) {
var $tmpl = $(template);
console.log($tmpl);
}
definition(type, name, def) {
return this.__lace__[type]['definitions'][name] = def || this.__lace__[type]['definitions'][name];
}
instance(type, name, inst) {
return this.__lace__[type]['instances'][name] = inst || this.__lace__[type]['instances'][name];
}
}
//TODO: should I declare in prototype?
Lace.prototype.__lace__ = {
annotation: {
definitions: {},
instances: {}
},
taglet: {
definitions: {},
instances: {}
}
};
Lace.init = function (name) {
return warehouse.laces[name] = warehouse.laces[name] || new Lace(name);
};
Lace.parse = function(template) {
};
/**
* MODULE function for lace
* @param name
* @returns {Function|*}
*/
lace = function(name) {
name = name || 'global';
return Lace.init(name);
};
export default lace; | jRoadie/lace | src/es6/lace.js | JavaScript | mit | 1,897 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cinema
{
class Program
{
static void Main(string[] args)
{
var project = Console.ReadLine().ToLower();
var r = double.Parse(Console.ReadLine());
var c = double.Parse(Console.ReadLine());
var result = r * c;
var price = -1.0;
if (project == "premiere")
{
price = 12.00;
}
else if (project == "normal")
{
price = 7.50;
}
else if (project == "discount")
{
price = 5.00;
}
if (price >= 0)
{
Console.WriteLine("{0:f2}", price * result);
}
}
}
}
| vasilchavdarov/SoftUniHomework | Projects/ComplexCondition/Cinema/Program.cs | C# | mit | 875 |
from django.conf import settings
from django.conf.urls import static
from django.urls import include, path, re_path
from django.contrib import admin
urlpatterns = [
path(r"admin/", admin.site.urls),
path(r"flickr/", include("ditto.flickr.urls")),
path(r"lastfm/", include("ditto.lastfm.urls")),
path(r"pinboard/", include("ditto.pinboard.urls")),
path(r"twitter/", include("ditto.twitter.urls")),
path(r"", include("ditto.core.urls")),
]
if settings.DEBUG:
import debug_toolbar
urlpatterns += [
re_path(r"^__debug__/", include(debug_toolbar.urls)),
]
urlpatterns += static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static.static(
settings.STATIC_URL, document_root=settings.STATIC_ROOT
)
| philgyford/django-ditto | devproject/devproject/urls.py | Python | mit | 795 |
import angular from 'rollup-plugin-angular';
import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import typescript from 'rollup-plugin-typescript';
import uglify from 'rollup-plugin-uglify';
import { minify } from 'uglify-es';
// rollup-plugin-angular addons
import sass from 'node-sass';
import CleanCSS from 'clean-css';
import { minify as minifyHtml } from 'html-minifier';
const cssmin = new CleanCSS();
const htmlminOpts = {
caseSensitive: true,
collapseWhitespace: true,
removeComments: true,
};
export default {
input: 'dist/index.js',
output: {
// core output options
file: 'dist/bundle.umd.js', // required
format: 'umd', // required
name: 'ngx-form.element',
globals: {
'@angular/core': 'ng.core',
'rxjs/Subject': 'Subject',
'@angular/forms': 'ng.forms',
'@ngx-core/common': 'ngx-core.common',
'@ngx-form/interface': 'ngx-form.interface',
'@angular/common': 'ng.common',
'@angular/material': 'ng.material'
},
// advanced output options
// paths: ,
// banner: ,
// footer: ,
// intro:,
// outro: ,
sourcemap: true, // true | inline
// sourcemapFile: ,
// interop: ,
// danger zone
exports: 'named',
// amd: ,
// indent: ,
// strict:
},
onwarn,
plugins: [
angular({
preprocessors: {
template: template => minifyHtml(template, htmlminOpts),
style: scss => {
const css = sass.renderSync({ data: scss }).css;
return cssmin.minify(css).styles;
},
}
}),
commonjs(),
nodeResolve({
// use "module" field for ES6 module if possible
module: true, // Default: true
// use "jsnext:main" if possible
// – see https://github.com/rollup/rollup/wiki/jsnext:main
jsnext: true, // Default: false
// use "main" field or index.js, even if it's not an ES6 module
// (needs to be converted from CommonJS to ES6
// – see https://github.com/rollup/rollup-plugin-commonjs
main: true, // Default: true
// some package.json files have a `browser` field which
// specifies alternative files to load for people bundling
// for the browser. If that's you, use this option, otherwise
// pkg.browser will be ignored
browser: true, // Default: false
// not all files you want to resolve are .js files
extensions: [ '.js', '.json' ], // Default: ['.js']
// whether to prefer built-in modules (e.g. `fs`, `path`) or
// local ones with the same names
preferBuiltins: true, // Default: true
// Lock the module search in this path (like a chroot). Module defined
// outside this path will be mark has external
jail: '/src', // Default: '/'
// If true, inspect resolved files to check that they are
// ES2015 modules
modulesOnly: false, // Default: false
// Any additional options that should be passed through
// to node-resolve
customResolveOptions: {}
}),
typescript({
typescript: require('./node_modules/typescript')
}),
uglify({}, minify)
]
};
function onwarn(message) {
const suppressed = [
'UNRESOLVED_IMPORT',
'THIS_IS_UNDEFINED'
];
if (!suppressed.find(code => message.code === code)) {
return console.warn(message.message);
}
}
| ngx-form/element | rollup.config.js | JavaScript | mit | 3,420 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>stalmarck: 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 / stalmarck - 8.9.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
stalmarck
<small>
8.9.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-11-22 00:16:09 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-22 00:16:09 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-gmp 3 Virtual package relying on a GMP lib system installation
coq 8.13.2 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
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "palmskog@gmail.com"
homepage: "https://github.com/coq-community/stalmarck"
dev-repo: "git+https://github.com/coq-community/stalmarck.git"
bug-reports: "https://github.com/coq-community/stalmarck/issues"
license: "LGPL-2.1-or-later"
synopsis: "Proof of Stålmarck's algorithm in Coq"
description: """
A two-level approach to prove tautologies using Stålmarck's algorithm in Coq.
"""
build: [make "-j%{jobs}%"]
install: [make "install"]
depends: [
"ocaml"
"coq" {>= "8.9" & < "8.10~"}
]
tags: [
"category:Computer Science/Decision Procedures and Certified Algorithms/Decision procedures"
"category:Miscellaneous/Extracted Programs/Decision procedures"
"keyword:boolean formula"
"keyword:tautology checker"
"logpath:Stalmarck"
"date:2019-05-19"
]
authors: [
"Pierre Letouzey"
"Laurent Théry"
]
url {
src: "https://github.com/coq-community/stalmarck/archive/v8.9.0.tar.gz"
checksum: "sha256=c0c6958e059d632cca0d0e67ff673d996abb0c9e389ecdffa9d1e1186884168b"
}
</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-stalmarck.8.9.0 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-stalmarck -> coq < 8.10~ -> 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-stalmarck.8.9.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.13.2/stalmarck/8.9.0.html | HTML | mit | 7,149 |
using System;
namespace Problem_04_Float_or_Integer
{
class Program_04_Float_or_Integer
{
static void Main()
{
decimal number = decimal.Parse(Console.ReadLine());
number = Math.Round(number);
Console.WriteLine(number);
}
}
}
| ReapeR-MaxPayne/SU-TM-PF-Ext-0517-Excersises-CSharp | 03-DataTypesAndVariables-Exercises/Problem_04_Float or Integer/Program_04_Float_or_Integer.cs | C# | mit | 302 |
using System;
using System.Collections;
using UnityEngine;
namespace Doubility3D.Resource.Downloader
{
public class WWWDownloader : IDownloader
{
private string home;
internal WWWDownloader (string _home)
{
home = _home;
if (home [home.Length - 1] != '/') {
home += "/";
}
}
public IEnumerator ResourceTask (string path, Action<Byte[],string> actOnComplate)
{
Byte[] _bytes = null;
WWW www = new WWW (home + path);
while (!www.isDone) {
yield return www;
}
if (string.IsNullOrEmpty (www.error)) {
_bytes = www.bytes;
}
actOnComplate (_bytes, www.error);
}
public string Home { get { return home;} }
public void Dispose(){
}
}
}
| lighter-cd/Doubility3D | DoubilityUnity/Runtime/Doubility3D/Resource/Downloader/WWWDownloader.cs | C# | mit | 704 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from os import listdir
import os
import re
import sys
from argparse import ArgumentParser
import random
import subprocess
from math import sqrt
import ast
from adderror import adderror
"""ENSAMBLE, -d directory -n number of models """
"""-k number of selected structure"""
"""-r repet of program"""
files = []
pdb_files = []
exp_file = []
list_of_random_items_modified = []
list_of_random_items = []
selected_files_for_ensamble = []
def argument():
parser = ArgumentParser()
parser.add_argument("-d", "--dir", dest="myDirVariable",
help="Choose dir", metavar="DIR", required=True)
parser.add_argument("-n", metavar='N', type=int,
dest="number_of_selected_files",
help="Number of selected structure",
required=True)
parser.add_argument("-k", metavar='K', type=int,
dest="k_number_of_options",
help="Number of possibility structure, less then selected files",
required=True)
parser.add_argument("-q", metavar='Q', type=int,
dest="mixing_koeficient", help="Mixing koeficient",
default=1)
parser.add_argument("-r", metavar='R', type=int,
dest="repeat", help="Number of repetitions",
default=1)
parser.add_argument("--verbose", help="increase output verbosity",
action="store_true")
args = parser.parse_args()
global files
global list_of_random_items_modified
files = listdir(args.myDirVariable)
list_of_random_items_modified = [None]*args.k_number_of_options
return(args)
def rmsd_pymol(structure_1, structure_2):
with open("file_for_pymol.pml", "w") as file_for_pymol:
file_for_pymol.write("""
load {s1}
load {s2}
align {s3}, {s4}
quit
""".format(s1=structure_1, s2=structure_2,
s3=os.path.splitext(structure_1)[0],
s4=os.path.splitext(structure_2)[0]))
out_pymol = subprocess.check_output(" pymol -c file_for_pymol.pml | grep Executive:", shell=True)
#part for home:
out_pymol = subprocess.check_output(" pymol -c file_for_pymol.pml | grep Executive:", shell=True)
#part for META:out_pymol = subprocess.check_output("module add pymol-1.8.2.1-gcc; pymol -c file_for_pymol.pml | grep Executive:;module rm pymol-1.8.2.1-gcc", shell=True)
rmsd = float(out_pymol[out_pymol.index(b'=')+1:out_pymol.index(b'(')-1])
print('RMSD ', structure_1, ' and ', structure_2, ' = ', rmsd)
return rmsd
def searching_pdb():
for line in files:
line = line.rstrip()
if re.search('.pdb$', line):
#if re.search('.pdb.dat', line):
pdb_files.append(line)
#if re.search('exp.dat', line):
#print('experimental file', line)
# exp_file.append(line)
total_number_of_pdb_files = len(pdb_files)
return(total_number_of_pdb_files)
def argument_processing(args, total_number_of_pdb_files):
#print(args)
print('Parametrs ')
print('Total number of pdb files', total_number_of_pdb_files)
if total_number_of_pdb_files < args.number_of_selected_files:
print("Number od pdb files is ", total_number_of_pdb_files)
sys.exit(0)
if args.k_number_of_options > args.number_of_selected_files:
print("Number of selected structure is only", args.number_of_selected_files)
sys.exit(0)
if args.mixing_koeficient != 1:
print ("For q>1 is not implemented now \n")
sys.exit(0)
print('Files from directory', args.myDirVariable)
print('The number of the selected files',
args.number_of_selected_files)
print('The number of selected options', args.k_number_of_options)
print('All pdb.dat files \n', pdb_files)
global selected_files_for_ensamble
selected_files_for_ensamble = random.sample(pdb_files,
args.number_of_selected_files)
print('Randomly selected files: \n', selected_files_for_ensamble)
global list_of_random_items
list_of_random_items = random.sample(selected_files_for_ensamble,
args.k_number_of_options)
print('Randomly selected files: \n', list_of_random_items)
def using_adderror():
for i in range(args.k_number_of_options):
list_of_random_items_modified[i] = adderror("exp.dat",list_of_random_items[i]+'.dat')
str1 = ''.join(str(e)+"\n" for e in list_of_random_items_modified)
str2 = ''.join(str(e)+"\n" for e in list_of_random_items)
print(str1)
print(str2)
return(str1, str2)
def find_index(strings):
for e in list_of_random_items:
value_of_index[e] = selected_files_for_ensamble.index(e)
print(selected_files_for_ensamble.index(e))
with open("input_for_ensamble_fit", "w") as f:
f.write(strings[0])
def ensamble_fit():
ensable_output=[None]*args.k_number_of_options
for i in range(k_number_of_options):
command = "/storage/brno3-cerit/home/krab1k/saxs-ensamble-fit/core/ensamble-fit -L -p /storage/brno2/home/petrahrozkova/SAXS/mod -n " + str(args.number_of_selected_files) + " -m /storage/brno2/home/petrahrozkova/SAXS/" +list_of_random_items_modified[i]+".dat"
subprocess.call(command,shell=True)
ensable_output[i] = result_rmsd()
return(ensable_output)
def result_rmsd():
with open('result', 'r') as f:
(f.readline())
result = f.readline()
values_of_index_result = result.split(',')[4:]
return(values_of_index_result)
def pymol_processing(ensable_output):
sum_rmsd = 0
values_of_index_result = ensable_output[0]
dictionary_index_and_structure = dict()
for i, j in enumerate(selected_files_for_ensamble):
dictionary_index_and_structure[i] = j
for i, j in enumerate(values_of_index_result):
f = float(j)
if f != 0:
computed_rmsd = rmsd_pymol(selected_files_for_ensamble[i],
list_of_random_items[0])
print('Adjusted rmsd ', f*computed_rmsd, '\n')
sum_rmsd += f*computed_rmsd
print('Sum of RMSD', sum_rmsd)
if __name__ == '__main__':
args = argument()
total_number_of_pdb_files = searching_pdb()
for i in range(args.repeat):
argument_processing(args, total_number_of_pdb_files)
strings = using_adderror()
#find_index(strings)
# ensamble_output = ensamble-fit()
ensamble_output=[None]*2
ensamble_output[0] = result_rmsd()
if args.k_number_of_options ==1:
pymol_processing(ensamble_output)
else:
print("not implemented")
| spirit01/SAXS | test_caxs.py | Python | mit | 6,842 |
// 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.
namespace Fixtures.Azure.AcceptanceTestsLro
{
using Azure;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Threading;
using System.Threading.Tasks;
/// <summary>
/// Extension methods for LRORetrysOperations.
/// </summary>
public static partial class LRORetrysOperationsExtensions
{
/// <summary>
/// Long running put request, service returns a 500, then a 201 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Polls
/// return this value until the last poll returns a ‘200’ with
/// ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
public static ProductInner Put201CreatingSucceeded200(this ILRORetrysOperations operations, ProductInner product = default(ProductInner))
{
return operations.Put201CreatingSucceeded200Async(product).GetAwaiter().GetResult();
}
/// <summary>
/// Long running put request, service returns a 500, then a 201 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Polls
/// return this value until the last poll returns a ‘200’ with
/// ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ProductInner> Put201CreatingSucceeded200Async(this ILRORetrysOperations operations, ProductInner product = default(ProductInner), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.Put201CreatingSucceeded200WithHttpMessagesAsync(product, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Long running put request, service returns a 500, then a 200 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Poll
/// the endpoint indicated in the Azure-AsyncOperation header for operation
/// status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
public static ProductInner PutAsyncRelativeRetrySucceeded(this ILRORetrysOperations operations, ProductInner product = default(ProductInner))
{
return operations.PutAsyncRelativeRetrySucceededAsync(product).GetAwaiter().GetResult();
}
/// <summary>
/// Long running put request, service returns a 500, then a 200 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Poll
/// the endpoint indicated in the Azure-AsyncOperation header for operation
/// status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ProductInner> PutAsyncRelativeRetrySucceededAsync(this ILRORetrysOperations operations, ProductInner product = default(ProductInner), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.PutAsyncRelativeRetrySucceededWithHttpMessagesAsync(product, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request, with an entity that contains ProvisioningState=’Accepted’.
/// Polls return this value until the last poll returns a ‘200’ with
/// ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static ProductInner DeleteProvisioning202Accepted200Succeeded(this ILRORetrysOperations operations)
{
return operations.DeleteProvisioning202Accepted200SucceededAsync().GetAwaiter().GetResult();
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request, with an entity that contains ProvisioningState=’Accepted’.
/// Polls return this value until the last poll returns a ‘200’ with
/// ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ProductInner> DeleteProvisioning202Accepted200SucceededAsync(this ILRORetrysOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.DeleteProvisioning202Accepted200SucceededWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request. Polls return this value until the last poll returns a
/// ‘200’ with ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static LRORetrysDelete202Retry200HeadersInner Delete202Retry200(this ILRORetrysOperations operations)
{
return operations.Delete202Retry200Async().GetAwaiter().GetResult();
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request. Polls return this value until the last poll returns a
/// ‘200’ with ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<LRORetrysDelete202Retry200HeadersInner> Delete202Retry200Async(this ILRORetrysOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.Delete202Retry200WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request. Poll the endpoint indicated in the Azure-AsyncOperation
/// header for operation status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static LRORetrysDeleteAsyncRelativeRetrySucceededHeadersInner DeleteAsyncRelativeRetrySucceeded(this ILRORetrysOperations operations)
{
return operations.DeleteAsyncRelativeRetrySucceededAsync().GetAwaiter().GetResult();
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request. Poll the endpoint indicated in the Azure-AsyncOperation
/// header for operation status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<LRORetrysDeleteAsyncRelativeRetrySucceededHeadersInner> DeleteAsyncRelativeRetrySucceededAsync(this ILRORetrysOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.DeleteAsyncRelativeRetrySucceededWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
/// <summary>
/// Long running post request, service returns a 500, then a 202 to the initial
/// request, with 'Location' and 'Retry-After' headers, Polls return a 200 with
/// a response body after success
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
public static LRORetrysPost202Retry200HeadersInner Post202Retry200(this ILRORetrysOperations operations, ProductInner product = default(ProductInner))
{
return operations.Post202Retry200Async(product).GetAwaiter().GetResult();
}
/// <summary>
/// Long running post request, service returns a 500, then a 202 to the initial
/// request, with 'Location' and 'Retry-After' headers, Polls return a 200 with
/// a response body after success
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<LRORetrysPost202Retry200HeadersInner> Post202Retry200Async(this ILRORetrysOperations operations, ProductInner product = default(ProductInner), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.Post202Retry200WithHttpMessagesAsync(product, null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
/// <summary>
/// Long running post request, service returns a 500, then a 202 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Poll
/// the endpoint indicated in the Azure-AsyncOperation header for operation
/// status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
public static LRORetrysPostAsyncRelativeRetrySucceededHeadersInner PostAsyncRelativeRetrySucceeded(this ILRORetrysOperations operations, ProductInner product = default(ProductInner))
{
return operations.PostAsyncRelativeRetrySucceededAsync(product).GetAwaiter().GetResult();
}
/// <summary>
/// Long running post request, service returns a 500, then a 202 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Poll
/// the endpoint indicated in the Azure-AsyncOperation header for operation
/// status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<LRORetrysPostAsyncRelativeRetrySucceededHeadersInner> PostAsyncRelativeRetrySucceededAsync(this ILRORetrysOperations operations, ProductInner product = default(ProductInner), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.PostAsyncRelativeRetrySucceededWithHttpMessagesAsync(product, null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
/// <summary>
/// Long running put request, service returns a 500, then a 201 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Polls
/// return this value until the last poll returns a ‘200’ with
/// ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
public static ProductInner BeginPut201CreatingSucceeded200(this ILRORetrysOperations operations, ProductInner product = default(ProductInner))
{
return operations.BeginPut201CreatingSucceeded200Async(product).GetAwaiter().GetResult();
}
/// <summary>
/// Long running put request, service returns a 500, then a 201 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Polls
/// return this value until the last poll returns a ‘200’ with
/// ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ProductInner> BeginPut201CreatingSucceeded200Async(this ILRORetrysOperations operations, ProductInner product = default(ProductInner), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.BeginPut201CreatingSucceeded200WithHttpMessagesAsync(product, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Long running put request, service returns a 500, then a 200 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Poll
/// the endpoint indicated in the Azure-AsyncOperation header for operation
/// status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
public static ProductInner BeginPutAsyncRelativeRetrySucceeded(this ILRORetrysOperations operations, ProductInner product = default(ProductInner))
{
return operations.BeginPutAsyncRelativeRetrySucceededAsync(product).GetAwaiter().GetResult();
}
/// <summary>
/// Long running put request, service returns a 500, then a 200 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Poll
/// the endpoint indicated in the Azure-AsyncOperation header for operation
/// status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ProductInner> BeginPutAsyncRelativeRetrySucceededAsync(this ILRORetrysOperations operations, ProductInner product = default(ProductInner), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.BeginPutAsyncRelativeRetrySucceededWithHttpMessagesAsync(product, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request, with an entity that contains ProvisioningState=’Accepted’.
/// Polls return this value until the last poll returns a ‘200’ with
/// ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static ProductInner BeginDeleteProvisioning202Accepted200Succeeded(this ILRORetrysOperations operations)
{
return operations.BeginDeleteProvisioning202Accepted200SucceededAsync().GetAwaiter().GetResult();
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request, with an entity that contains ProvisioningState=’Accepted’.
/// Polls return this value until the last poll returns a ‘200’ with
/// ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ProductInner> BeginDeleteProvisioning202Accepted200SucceededAsync(this ILRORetrysOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.BeginDeleteProvisioning202Accepted200SucceededWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request. Polls return this value until the last poll returns a
/// ‘200’ with ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static LRORetrysDelete202Retry200HeadersInner BeginDelete202Retry200(this ILRORetrysOperations operations)
{
return operations.BeginDelete202Retry200Async().GetAwaiter().GetResult();
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request. Polls return this value until the last poll returns a
/// ‘200’ with ProvisioningState=’Succeeded’
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<LRORetrysDelete202Retry200HeadersInner> BeginDelete202Retry200Async(this ILRORetrysOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.BeginDelete202Retry200WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request. Poll the endpoint indicated in the Azure-AsyncOperation
/// header for operation status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static LRORetrysDeleteAsyncRelativeRetrySucceededHeadersInner BeginDeleteAsyncRelativeRetrySucceeded(this ILRORetrysOperations operations)
{
return operations.BeginDeleteAsyncRelativeRetrySucceededAsync().GetAwaiter().GetResult();
}
/// <summary>
/// Long running delete request, service returns a 500, then a 202 to the
/// initial request. Poll the endpoint indicated in the Azure-AsyncOperation
/// header for operation status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<LRORetrysDeleteAsyncRelativeRetrySucceededHeadersInner> BeginDeleteAsyncRelativeRetrySucceededAsync(this ILRORetrysOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.BeginDeleteAsyncRelativeRetrySucceededWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
/// <summary>
/// Long running post request, service returns a 500, then a 202 to the initial
/// request, with 'Location' and 'Retry-After' headers, Polls return a 200 with
/// a response body after success
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
public static LRORetrysPost202Retry200HeadersInner BeginPost202Retry200(this ILRORetrysOperations operations, ProductInner product = default(ProductInner))
{
return operations.BeginPost202Retry200Async(product).GetAwaiter().GetResult();
}
/// <summary>
/// Long running post request, service returns a 500, then a 202 to the initial
/// request, with 'Location' and 'Retry-After' headers, Polls return a 200 with
/// a response body after success
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<LRORetrysPost202Retry200HeadersInner> BeginPost202Retry200Async(this ILRORetrysOperations operations, ProductInner product = default(ProductInner), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.BeginPost202Retry200WithHttpMessagesAsync(product, null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
/// <summary>
/// Long running post request, service returns a 500, then a 202 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Poll
/// the endpoint indicated in the Azure-AsyncOperation header for operation
/// status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
public static LRORetrysPostAsyncRelativeRetrySucceededHeadersInner BeginPostAsyncRelativeRetrySucceeded(this ILRORetrysOperations operations, ProductInner product = default(ProductInner))
{
return operations.BeginPostAsyncRelativeRetrySucceededAsync(product).GetAwaiter().GetResult();
}
/// <summary>
/// Long running post request, service returns a 500, then a 202 to the initial
/// request, with an entity that contains ProvisioningState=’Creating’. Poll
/// the endpoint indicated in the Azure-AsyncOperation header for operation
/// status
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='product'>
/// Product to put
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<LRORetrysPostAsyncRelativeRetrySucceededHeadersInner> BeginPostAsyncRelativeRetrySucceededAsync(this ILRORetrysOperations operations, ProductInner product = default(ProductInner), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.BeginPostAsyncRelativeRetrySucceededWithHttpMessagesAsync(product, null, cancellationToken).ConfigureAwait(false))
{
return _result.Headers;
}
}
}
}
| matthchr/autorest | src/generator/AutoRest.CSharp.Azure.Fluent.Tests/Expected/AcceptanceTests/Lro/LRORetrysOperationsExtensions.cs | C# | mit | 27,615 |
import isEnabled from 'ember-metal/features';
import run from 'ember-metal/run_loop';
import { observer } from 'ember-metal/mixin';
import { set } from 'ember-metal/property_set';
import { bind } from 'ember-metal/binding';
import {
beginPropertyChanges,
endPropertyChanges
} from 'ember-metal/property_events';
import { testBoth } from 'ember-metal/tests/props_helper';
import EmberObject from 'ember-runtime/system/object';
import { peekMeta } from 'ember-metal/meta';
QUnit.module('ember-runtime/system/object/destroy_test');
testBoth('should schedule objects to be destroyed at the end of the run loop', function(get, set) {
var obj = EmberObject.create();
var meta;
run(function() {
obj.destroy();
meta = peekMeta(obj);
ok(meta, 'meta is not destroyed immediately');
ok(get(obj, 'isDestroying'), 'object is marked as destroying immediately');
ok(!get(obj, 'isDestroyed'), 'object is not destroyed immediately');
});
meta = peekMeta(obj);
ok(!meta, 'meta is destroyed after run loop finishes');
ok(get(obj, 'isDestroyed'), 'object is destroyed after run loop finishes');
});
if (isEnabled('mandatory-setter')) {
// MANDATORY_SETTER moves value to meta.values
// a destroyed object removes meta but leaves the accessor
// that looks it up
QUnit.test('should raise an exception when modifying watched properties on a destroyed object', function() {
var obj = EmberObject.extend({
fooDidChange: observer('foo', function() { })
}).create({
foo: 'bar'
});
run(function() {
obj.destroy();
});
throws(function() {
set(obj, 'foo', 'baz');
}, Error, 'raises an exception');
});
}
QUnit.test('observers should not fire after an object has been destroyed', function() {
var count = 0;
var obj = EmberObject.extend({
fooDidChange: observer('foo', function() {
count++;
})
}).create();
obj.set('foo', 'bar');
equal(count, 1, 'observer was fired once');
run(function() {
beginPropertyChanges();
obj.set('foo', 'quux');
obj.destroy();
endPropertyChanges();
});
equal(count, 1, 'observer was not called after object was destroyed');
});
QUnit.test('destroyed objects should not see each others changes during teardown but a long lived object should', function () {
var shouldChange = 0;
var shouldNotChange = 0;
var objs = {};
var A = EmberObject.extend({
objs: objs,
isAlive: true,
willDestroy() {
this.set('isAlive', false);
},
bDidChange: observer('objs.b.isAlive', function () {
shouldNotChange++;
}),
cDidChange: observer('objs.c.isAlive', function () {
shouldNotChange++;
})
});
var B = EmberObject.extend({
objs: objs,
isAlive: true,
willDestroy() {
this.set('isAlive', false);
},
aDidChange: observer('objs.a.isAlive', function () {
shouldNotChange++;
}),
cDidChange: observer('objs.c.isAlive', function () {
shouldNotChange++;
})
});
var C = EmberObject.extend({
objs: objs,
isAlive: true,
willDestroy() {
this.set('isAlive', false);
},
aDidChange: observer('objs.a.isAlive', function () {
shouldNotChange++;
}),
bDidChange: observer('objs.b.isAlive', function () {
shouldNotChange++;
})
});
var LongLivedObject = EmberObject.extend({
objs: objs,
isAliveDidChange: observer('objs.a.isAlive', function () {
shouldChange++;
})
});
objs.a = new A();
objs.b = new B();
objs.c = new C();
new LongLivedObject();
run(function () {
var keys = Object.keys(objs);
for (var i = 0; i < keys.length; i++) {
objs[keys[i]].destroy();
}
});
equal(shouldNotChange, 0, 'destroyed graph objs should not see change in willDestroy');
equal(shouldChange, 1, 'long lived should see change in willDestroy');
});
QUnit.test('bindings should be synced when are updated in the willDestroy hook', function() {
var bar = EmberObject.create({
value: false,
willDestroy() {
this.set('value', true);
}
});
var foo = EmberObject.create({
value: null,
bar: bar
});
run(function() {
bind(foo, 'value', 'bar.value');
});
ok(bar.get('value') === false, 'the initial value has been bound');
run(function() {
bar.destroy();
});
ok(foo.get('value'), 'foo is synced when the binding is updated in the willDestroy hook');
});
| topaxi/ember.js | packages/ember-runtime/tests/system/object/destroy_test.js | JavaScript | mit | 4,435 |
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Stellar::Client do
let(:client) { Stellar::Client.new }
shared_examples_for 'an authenticated client' do
describe 'get_nokogiri' do
let(:page) { client.get_nokogiri '/atstellar' }
it 'should be a Nokogiri document' do
page.should be_kind_of(Nokogiri::HTML::Document)
end
it 'should have course links' do
page.css('a[title*="class site"]').length.should > 0
end
end
end
describe '#auth' do
describe 'with Kerberos credentials' do
before do
client.auth :kerberos => test_mit_kerberos
end
it_should_behave_like 'an authenticated client'
end
describe 'with a certificate' do
before do
client.auth :cert => test_mit_cert
end
it_should_behave_like 'an authenticated client'
end
describe 'with bad Kerberos credentials' do
it 'should raise ArgumentError' do
lambda {
client.auth :kerberos => test_mit_kerberos.merge(:pass => 'fail')
}.should raise_error(ArgumentError)
end
end
end
describe '#course' do
before do
client.auth :kerberos => test_mit_kerberos
end
let(:six) { client.course('6.006', 2011, :fall) }
it 'should return a Course instance' do
six.should be_kind_of(Stellar::Course)
end
it 'should return a 6.006 course' do
six.number.should == '6.006'
end
end
end
| pwnall/stellar | spec/stellar/client_spec.rb | Ruby | mit | 1,522 |
package seedu.tache.ui;
import java.util.logging.Logger;
//import org.controlsfx.control.Notifications;
import com.google.common.eventbus.Subscribe;
import javafx.application.Platform;
//import javafx.geometry.Pos;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.image.Image;
//import javafx.scene.image.ImageView;
import javafx.stage.Stage;
//import javafx.util.Duration;
import seedu.tache.MainApp;
import seedu.tache.commons.core.ComponentManager;
import seedu.tache.commons.core.Config;
import seedu.tache.commons.core.LogsCenter;
import seedu.tache.commons.events.model.TaskManagerChangedEvent;
import seedu.tache.commons.events.storage.DataSavingExceptionEvent;
import seedu.tache.commons.events.ui.JumpToListRequestEvent;
import seedu.tache.commons.events.ui.PopulateRecurringGhostTaskEvent;
import seedu.tache.commons.events.ui.ShowHelpRequestEvent;
import seedu.tache.commons.events.ui.TaskPanelConnectionChangedEvent;
import seedu.tache.commons.util.StringUtil;
import seedu.tache.logic.Logic;
import seedu.tache.model.UserPrefs;
/**
* The manager of the UI component.
*/
public class UiManager extends ComponentManager implements Ui {
private static final Logger logger = LogsCenter.getLogger(UiManager.class);
private static final String ICON_APPLICATION = "/images/tache.png";
public static final String ALERT_DIALOG_PANE_FIELD_ID = "alertDialogPane";
private Logic logic;
private Config config;
private UserPrefs prefs;
private HotkeyManager hotkeyManager;
private NotificationManager notificationManager;
private MainWindow mainWindow;
public UiManager(Logic logic, Config config, UserPrefs prefs) {
super();
this.logic = logic;
this.config = config;
this.prefs = prefs;
}
@Override
public void start(Stage primaryStage) {
logger.info("Starting UI...");
primaryStage.setTitle(config.getAppTitle());
//Set the application icon.
primaryStage.getIcons().add(getImage(ICON_APPLICATION));
hotkeyManager = new HotkeyManager(primaryStage);
hotkeyManager.start();
try {
mainWindow = new MainWindow(primaryStage, config, prefs, logic);
mainWindow.show(); //This should be called before creating other UI parts
mainWindow.fillInnerParts();
} catch (Throwable e) {
logger.severe(StringUtil.getDetails(e));
showFatalErrorDialogAndShutdown("Fatal error during initializing", e);
}
notificationManager = new NotificationManager(logic);
notificationManager.start();
}
@Override
public void stop() {
prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());
mainWindow.hide();
mainWindow.releaseResources();
hotkeyManager.stop();
notificationManager.stop();
}
private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {
final String content = details + ":\n" + cause.toString();
showAlertDialogAndWait(AlertType.ERROR, "File Op Error", description, content);
}
private Image getImage(String imagePath) {
return new Image(MainApp.class.getResourceAsStream(imagePath));
}
void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {
showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);
}
private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,
String contentText) {
final Alert alert = new Alert(type);
alert.getDialogPane().getStylesheets().add("view/TacheTheme.css");
alert.initOwner(owner);
alert.setTitle(title);
alert.setHeaderText(headerText);
alert.setContentText(contentText);
alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);
alert.showAndWait();
}
private void showFatalErrorDialogAndShutdown(String title, Throwable e) {
logger.severe(title + " " + e.getMessage() + StringUtil.getDetails(e));
showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());
Platform.exit();
System.exit(1);
}
//==================== Event Handling Code ===============================================================
@Subscribe
private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {
logger.info(LogsCenter.getEventHandlingLogMessage(event));
showFileOperationAlertAndWait("Could not save data", "Could not save data to file", event.exception);
}
@Subscribe
private void handleShowHelpEvent(ShowHelpRequestEvent event) {
logger.info(LogsCenter.getEventHandlingLogMessage(event));
mainWindow.handleHelp();
}
@Subscribe
private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {
logger.info(LogsCenter.getEventHandlingLogMessage(event));
mainWindow.getTaskListPanel().scrollTo(event.targetIndex);
}
//@@author A0139925U
@Subscribe
private void handleTaskPanelConnectionChangedEvent(TaskPanelConnectionChangedEvent event) {
logger.info(LogsCenter.getEventHandlingLogMessage(event));
if (mainWindow.getTaskListPanel() != null) {
mainWindow.getTaskListPanel().resetConnections(event.getNewConnection());
}
}
@Subscribe
private void handlePopulateRecurringGhostTaskEvent(PopulateRecurringGhostTaskEvent event) {
logger.info(LogsCenter.getEventHandlingLogMessage(event));
if (mainWindow.getTaskListPanel() != null) {
mainWindow.getCalendarPanel().addAllEvents(event.getAllCompletedRecurringGhostTasks());
mainWindow.getCalendarPanel().addAllEvents(event.getAllUncompletedRecurringGhostTasks());
}
}
@Subscribe
public void handleUpdateNotificationsEvent(TaskManagerChangedEvent event) {
logger.info(LogsCenter.getEventHandlingLogMessage(event));
notificationManager.updateNotifications(event);
}
}
| CS2103JAN2017-T09-B4/main | src/main/java/seedu/tache/ui/UiManager.java | Java | mit | 6,234 |
// softlayer_billing_item_cancellation_request - SoftLayer customers can use this API to submit a
// cancellation request. A single service cancellation can contain multiple cancellation items which
// contain a billing item.
package softlayer_billing_item_cancellation_request
// DO NOT EDIT. THIS FILE WAS AUTOMATICALLY GENERATED
| sudorandom/softlayer-go-gen | methods/softlayer_billing_item_cancellation_request/doc.go | GO | mit | 333 |
<?xml version="1.0" encoding="iso-8859-1"?>
<!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>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Updated.php</title>
<link rel="stylesheet" href="../../media/stylesheet.css" />
<script src="../../media/lib/classTree.js"></script>
<script language="javascript" type="text/javascript">
var imgPlus = new Image();
var imgMinus = new Image();
imgPlus.src = "../../media/images/plus.png";
imgMinus.src = "../../media/images/minus.png";
function showNode(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
var oImg = document.layers["img" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
var oImg = document.all["img" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
var oImg = document.getElementById("img" + Node);
break;
}
oImg.src = imgMinus.src;
oTable.style.display = "block";
}
function hideNode(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
var oImg = document.layers["img" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
var oImg = document.all["img" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
var oImg = document.getElementById("img" + Node);
break;
}
oImg.src = imgPlus.src;
oTable.style.display = "none";
}
function nodeIsVisible(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
break;
}
return (oTable && oTable.style.display == "block");
}
function toggleNodeVisibility(Node){
if (nodeIsVisible(Node)){
hideNode(Node);
}else{
showNode(Node);
}
}
</script>
</head>
<body>
<div class="page-body">
<h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/Gdata/App/Extension/Updated.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Zend Framework</p>
<p class="description"><p>LICENSE</p><p>This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.</p></p>
<ul class="tags">
<li><span class="field">version:</span> $Id: Updated.php 20096 2010-01-06 02:05:09Z bkarwin $</li>
<li><span class="field">copyright:</span> Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)</li>
<li><span class="field">license:</span> <a href="http://framework.zend.com/license/new-bsd">New BSD License</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
<img src="../../media/images/Class.png"
alt=" class"
title=" class"/>
<a href="../../Zend_Gdata/App/Zend_Gdata_App_Extension_Updated.html">Zend_Gdata_App_Extension_Updated</a>
</td>
<td>
Represents the atom:updated element
</td>
</tr>
</table>
</div>
</div>
<a name="sec-includes"></a>
<div class="info-box">
<div class="info-box-title">Includes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Includes</span>
</div>
<div class="info-box-body">
<a name="_Zend/Gdata/App/Extension_php"><!-- --></a>
<div class="oddrow">
<div>
<img src="../../media/images/Page.png" alt=" " />
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name">'Zend/Gdata/App/Extension.php'</span>)
(line <span class="line-number">27</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">see:</span> <a href="../../Zend_Gdata/App/Zend_Gdata_App_Extension.html">Zend_Gdata_App_Extension</a></li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Wed, 25 Aug 2010 03:44:25 +0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html> | broadinstitute/gdata-cli | lib/gapps/ZendGdata-1.10.8/documentation/api/core/Zend_Gdata/App/_Gdata---App---Extension---Updated.php.html | HTML | mit | 6,213 |
#define VMA_IMPLEMENTATION
#include <vk_mem_alloc.h>
#include "VulkanMemoryAllocator.h"
#include "VulkanUtility.h"
#include "Core/Assertion.h"
namespace cube
{
namespace rapi
{
void VulkanMemoryAllocator::Initialize(VkInstance instance, VkPhysicalDevice GPU, VkDevice device)
{
VkResult res;
VmaAllocatorCreateInfo info = {};
info.instance = instance;
info.physicalDevice = GPU;
info.device = device;
res = vmaCreateAllocator(&info, &mAllocator);
CHECK_VK(res, "Failed to create vulkan memory allocator.");
}
void VulkanMemoryAllocator::Shutdown()
{
}
VulkanAllocation VulkanMemoryAllocator::Allocate(ResourceUsage usage, VkBufferCreateInfo& bufCreateInfo, VkBuffer* pBuf)
{
VmaAllocationCreateInfo createInfo = CreateVmaAllocationCreateInfo(usage);
VmaAllocationInfo allocationInfo;
VmaAllocation allocation;
vmaCreateBuffer(mAllocator, &bufCreateInfo, &createInfo, pBuf, &allocation, &allocationInfo);
VulkanAllocation res;
res.resourceType = VulkanAllocation::ResourceType::Buffer;
res.pResource = pBuf;
UpdateVulkanAllocation(res, allocation, allocationInfo);
return res;
}
VulkanAllocation VulkanMemoryAllocator::Allocate(ResourceUsage usage, VkImageCreateInfo& imageCreateInfo, VkImage* pImage)
{
VmaAllocationCreateInfo createInfo = CreateVmaAllocationCreateInfo(usage);
VmaAllocationInfo allocationInfo;
VmaAllocation allocation;
vmaCreateImage(mAllocator, &imageCreateInfo, &createInfo, pImage, &allocation, &allocationInfo);
VulkanAllocation res;
res.resourceType = VulkanAllocation::ResourceType::Texture;
res.pResource = pImage;
UpdateVulkanAllocation(res, allocation, allocationInfo);
return res;
}
void VulkanMemoryAllocator::Free(VulkanAllocation alloc)
{
switch(alloc.resourceType)
{
case VulkanAllocation::ResourceType::Buffer:
vmaDestroyBuffer(mAllocator, *(VkBuffer*)alloc.pResource, alloc.allocation);
break;
case VulkanAllocation::ResourceType::Texture:
vmaDestroyImage(mAllocator, *(VkImage*)alloc.pResource, alloc.allocation);
break;
default:
ASSERTION_FAILED("Invalid resource type in vulkan allocation. ({})", (int)alloc.resourceType);
break;
}
}
VmaAllocationCreateInfo VulkanMemoryAllocator::CreateVmaAllocationCreateInfo(ResourceUsage usage)
{
VmaAllocationCreateInfo info = {};
switch(usage)
{
case ResourceUsage::Default:
case ResourceUsage::Immutable:
info.usage = VMA_MEMORY_USAGE_GPU_ONLY;
break;
case ResourceUsage::Dynamic:
info.usage = VMA_MEMORY_USAGE_CPU_TO_GPU;
info.flags = VMA_ALLOCATION_CREATE_MAPPED_BIT;
break;
case ResourceUsage::Staging:
info.usage = VMA_MEMORY_USAGE_GPU_TO_CPU;
break;
default:
ASSERTION_FAILED("Invalid resource type {}", (int)usage);
break;
}
return info;
}
void VulkanMemoryAllocator::UpdateVulkanAllocation(VulkanAllocation& allocation, VmaAllocation vmaAllocation, const VmaAllocationInfo& info)
{
allocation.allocator = mAllocator;
allocation.allocation = vmaAllocation;
allocation.pMappedPtr = info.pMappedData;
allocation.size = info.size;
VkMemoryPropertyFlags memFlags;
vmaGetMemoryTypeProperties(mAllocator, info.memoryType, &memFlags);
if((memFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) > 0) {
allocation.isHostVisible = true;
} else {
allocation.isHostVisible = false;
}
}
} // namespace rapi
} // namespace cube
| Cube219/CubeEngine | Source/RenderAPIs/VulkanAPI/VulkanMemoryAllocator.cpp | C++ | mit | 4,378 |
<template name="myworks">
<article class="page container-fluid shine-wrapper">
{{> myworksNav}}
{{> myworksList}}
</article>
</template>
<template name="myworksNav">
<header>
<h3>My works</h3>
</header>
<div class="row-fluid">
<nav class="navtabs">
<ul class="navtabs-list">
<li class="navtabs-item {{mode 'draft'}}">
<a class="navtabs-anchor" href="{{pathFor 'myworks' mode='draft'}}">
작성중<span class="navtabs-count"> {{getPublishedCount 'myDraftCount'}}</span>
</a>
</li>
<li class="navtabs-item {{mode 'post'}}">
<a class="navtabs-anchor" href="{{pathFor 'myworks' mode='post'}}">
발행글<span class="navtabs-count"> {{getPublishedCount 'myPostsListCount'}}</span>
</a>
</li>
</ul>
</nav>
</div>
</template>
<template name="myworksList">
<div class="row-fluid">
<div class="block-group">
<ul class="block-list">
{{#each myworksList}}
{{#if switchMode}}
{{> myworksDraft}}
{{else}}
{{> myworksPost}}
{{/if}}
{{/each}}
{{#if Template.subscriptionsReady}}
<div class="row-fluid">
{{#if hasMore}}
<a class="btn btn-default btn-block load-more">더 보기</a>
{{/if}}
</div>
{{else}}
<div class="loading">{{> listLoading}}</div>
{{/if}}
</ul>
</div>
</div>
</template>
<template name="myworksDraft">
<li class="post-item">
<h3 class="title">
<small><a href="{{pathFor 'categoryView' _id=categoryId}}">{{categoryId}}</a></small>
<a href="{{pathFor 'postWrite' categoryId=categoryId draftId=_id}}">{{title}}</a>
</h3>
<div class="info">
<div class="btn-group pull-right">
<button type="button" id="remove" class="close">×</button>
</div>
<div class="block-meta-wrap">
<span class="post-meth-inline">{{momentFromNow createdAt}}</span>
</div>
</div>
</li>
</template>
<template name="myworksPost">
<li class="post-item">
<h3 class="title">
<small><a href="{{pathFor 'categoryView' _id=categoryId}}">{{categoryId}}</a></small>
<a href="{{pathFor 'postView' _id=_id categoryId=categoryId}}">{{title}}</a>
</h3>
<div class="info">
<div class="block-meta-wrap">
<span class="post-meth-inline">{{momentFromNow createdAt}}</span>
</div>
</div>
</li>
</template> | johnghoonchoi/meteor-shine | apps/front/modules/myworks/client/myworks.html | HTML | mit | 2,485 |
#ifndef VPP_OPENCV_UTILS_HH_
# define VPP_OPENCV_UTILS_HH_
# include <iostream>
# include <regex>
# include <opencv2/highgui/highgui.hpp>
# include <vpp/core/boxNd.hh>
# include <vpp/core/image2d.hh>
inline bool open_videocapture(const char* str, cv::VideoCapture& cap)
{
if (std::regex_match(str, std::regex("[0-9]+")))
cap.open(atoi(str));
else cap.open(str);
if (!cap.isOpened())
{
std::cerr << "Error: Cannot open " << str << std::endl;
return false;
}
return true;
}
inline vpp::box2d videocapture_domain(cv::VideoCapture& cap)
{
return vpp::make_box2d(cap.get(CV_CAP_PROP_FRAME_HEIGHT),
cap.get(CV_CAP_PROP_FRAME_WIDTH));
}
inline vpp::box2d videocapture_domain(const char* f)
{
cv::VideoCapture cap;
open_videocapture(f, cap);
return vpp::make_box2d(cap.get(CV_CAP_PROP_FRAME_HEIGHT),
cap.get(CV_CAP_PROP_FRAME_WIDTH));
}
struct foreach_videoframe
{
foreach_videoframe(const char* f)
{
open_videocapture(f, cap_);
frame_ = vpp::image2d<vpp::vuchar3>(videocapture_domain(cap_));
cvframe_ = to_opencv(frame_);
}
template <typename F>
void operator| (F f)
{
while (cap_.read(cvframe_)) f(frame_);
}
private:
cv::Mat cvframe_;
vpp::image2d<vpp::vuchar3> frame_;
cv::VideoCapture cap_;
};
#endif
| pdebus/MTVMTL | thirdparty/vpp/vpp/utils/opencv_utils.hh | C++ | mit | 1,322 |
import collections
puzzle_input = (0,13,1,8,6,15)
test_inputs = [
([(0,3,6), 10], 0),
([(1,3,2)], 1),
([(2,1,3)], 10),
([(1,2,3)], 27),
([(2,3,1)], 78),
([(3,2,1)], 438),
([(3,1,2)], 1836),
# Expensive Tests
# ([(0,3,6), 30000000], 175594),
# ([(1,3,2), 30000000], 2578),
# ([(2,1,3), 30000000], 3544142),
# ([(1,2,3), 30000000], 261214),
# ([(2,3,1), 30000000], 6895259),
# ([(3,2,1), 30000000], 18),
# ([(3,1,2), 30000000], 362),
]
def iterate(input_, iterations=2020) -> int:
turn = 0
turn_last_spoken = collections.defaultdict(int)
prev_number = None
for value in input_:
turn_last_spoken[prev_number] = turn
prev_number = value
turn += 1
while turn < iterations:
current_number = turn_last_spoken[prev_number]
turn_last_spoken[prev_number] = turn
if current_number != 0:
current_number = turn - current_number
prev_number = current_number
turn += 1
return prev_number
for _input, expected_output in test_inputs:
print("Testing:", *_input, "...")
actual_output = iterate(*_input)
assert actual_output == expected_output, f"Expected: {expected_output}. Actual {actual_output}"
print("Part 1:", iterate(puzzle_input))
print("Part 2:", iterate(puzzle_input, 30000000))
| AustinTSchaffer/DailyProgrammer | AdventOfCode/2020/day_15/solution.py | Python | mit | 1,352 |
import { DomSanitizer } from '@angular/platform-browser';
export declare class IndexTrack {
transform(_x: any): (index: any) => any;
}
export declare class Stringify {
transform(input: any, spaces?: number): string;
}
export declare class ForceArray {
transform(input: any, repeat?: any, repeatValue?: any): any[];
}
export declare class ArrayOfObjects {
transform(input: any, repeat?: number | undefined, repeatValue?: unknown): any[];
}
export declare class SafeUrl {
private domSanitizer;
constructor(domSanitizer: DomSanitizer);
transform(input: any): import("@angular/platform-browser").SafeResourceUrl;
}
export declare class NumberWord {
constructor();
transform(input: any, number: any): string;
}
export declare class EndNumberWord {
constructor();
transform(input: any): "" | "s";
}
export declare class SafeHtml {
private domSanitizer;
constructor(domSanitizer: DomSanitizer);
transform(input: any): import("@angular/platform-browser").SafeHtml;
}
export declare class SafeStyle {
private domSanitizer;
constructor(domSanitizer: DomSanitizer);
transform(input: any): import("@angular/platform-browser").SafeStyle;
}
/** (input>=a && input<=b) || (input>=b && input<=a) */
export declare class Between {
transform(input: any, a: any, b: any): boolean;
}
export declare class ReplaceMaxLength {
transform(input: string, max: number, replacement?: string): string;
}
/** use with bypassSecurityTrustResourceUrl for href */
export declare class TextDownload {
transform(input: string): any;
}
export declare class NumberToPhone {
transform(input: string | number): unknown;
}
export declare class toNumber {
transform(input: string): number;
}
export declare class NumberSuffix {
transform(input: number | string, rtnInput?: any): string;
}
export declare class MarkdownAnchor {
transform(input: string): string;
}
export declare class Capitalize {
transform(input: any): any;
}
export declare class CapitalizeWords {
transform(input: any): any;
}
export declare class Yesno {
transform(input: any): any;
}
export declare class YesNo {
transform(input: any): any;
}
export declare class BooleanPipe {
transform(input: any): boolean;
}
export declare class Bit {
transform(input: any): 0 | 1;
}
export declare class Numbers {
transform(input: any): any;
}
export declare class ADate {
transform(...args: any): any;
}
export declare class AMath {
transform(...args: any): any;
}
export declare class AString {
transform(...args: any): any;
}
export declare class ATime {
transform(...args: any): any;
}
export declare class Ack {
transform(...args: any): any;
}
export declare class Keys {
transform(input: any): any;
}
export declare class TypeofPipe {
transform(input: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
}
export declare class ConsolePipe {
transform(): any;
}
export declare const declarations: (typeof SafeUrl | typeof SafeHtml | typeof SafeStyle | typeof ADate)[];
| AckerApple/ack-angular | pipes.d.ts | TypeScript | mit | 3,095 |
---
title: "Events"
menu:
addons:
weight: 2
---
# Events
Addons hook into mitmproxy's internal mechanisms through events. These are
implemented on addons as methods with a set of well-known names. Many events
receive `Flow` objects as arguments - by modifying these objects, addons can
change traffic on the fly. For instance, here is an addon that adds a response
header with a count of the number of responses seen:
{{< example src="examples/addons/http-add-header.py" lang="py" >}}
## Supported Events
Below is an addon class that implements stubs for all events. We've added
annotations to illustrate the argument types for the various events.
### Generic Events
{{< example src="examples/addons/events.py" lang="py" >}}
### HTTP Events
{{< example src="examples/addons/events-http-specific.py" lang="py" >}}
### WebSocket Events
{{< example src="examples/addons/events-websocket-specific.py" lang="py" >}}
### TCP Events
{{< example src="examples/addons/events-tcp-specific.py" lang="py" >}}
| vhaupert/mitmproxy | docs/src/content/addons-events.md | Markdown | mit | 1,023 |
<?php
namespace Fdr\UserBundle\Form\Type;
//use Symfony\Component\Form\FormBuilder;
//use FOS\UserBundle\Form\Type\RegistrationFormType as BaseType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Doctrine\ORM\EntityRepository;
class RegistrationFormType extends AbstractType
//extends BaseType getParent
{
//public function buildForm(FormBuilder $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options)
{
//parent::buildForm($builder, $options);
$builder->add('nom');
$builder->add('prenom');
$builder->add('matricule',null,array('required'=>false));
$builder->add('tel');
$builder->add('adresse');
$builder->add('plainPassword', 'repeated', array('label'=>false,
'type' => 'password',
'first_options' => array('label' => 'Taper mdp. securisé ','attr'=>array('class'=>'')),
'second_options' => array('label' =>'Confirmation de mdp ','attr'=>array('class'=>'')),
'invalid_message' => 'Les deux mots de passe ne sont pas identiques',
));
$builder->add('email');
$builder->add('cin');
$builder->add('depot',null,array('placeholder'=>'Choisir un depot','attr'=>array('title'=>'Choisir un depot')));
$builder->add("locked",null,array('label'=>'Compte verrouillé','required'=>false));
$builder->add("expired",null,array('label'=>'Compte expiré ','required'=>false));
$builder->add("expiresAt",'datetime', array('date_widget' => "single_text", 'time_widget' => "single_text",'required'=>false));
$builder->add('roles', 'entity', array('required'=>true,
'placeholder'=>'Choisir un rôle',
'mapped'=>false,
'attr'=>array('title'=>'Choisir un rôle'),
'class' => 'FdrAdminBundle:Role',
'query_builder' => function(EntityRepository $er) {
return $er->createQueryBuilder('c');
}));
$builder->add('submit','submit',array('label'=>'Enregistrer','attr'=>array('class'=>'btn btn-default')));
}
public function getName()
{
return 'fdr_user_registration';
}
public function getParent()
{
return 'fos_user_registration';
}
} | ingetat2014/www | src/Fdr/UserBundle/Form/Type/RegistrationFormType.php | PHP | mit | 2,730 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Physics
{
/// <summary>
/// A Distorter that distorts points based on their distance and direction to the world
/// center of gravity as defined by WorldCenterOfGravity.
/// </summary>
[AddComponentMenu("Scripts/MRTK/Core/DistorterGravity")]
public class DistorterGravity : Distorter
{
[SerializeField]
private Vector3 localCenterOfGravity;
public Vector3 LocalCenterOfGravity
{
get { return localCenterOfGravity; }
set { localCenterOfGravity = value; }
}
public Vector3 WorldCenterOfGravity
{
get
{
return transform.TransformPoint(localCenterOfGravity);
}
set
{
localCenterOfGravity = transform.InverseTransformPoint(value);
}
}
[SerializeField]
private Vector3 axisStrength = Vector3.one;
public Vector3 AxisStrength
{
get { return axisStrength; }
set { axisStrength = value; }
}
[Range(0f, 10f)]
[SerializeField]
private float radius = 0.5f;
public float Radius
{
get { return radius; }
set
{
radius = Mathf.Clamp(value, 0f, 10f);
}
}
[SerializeField]
private AnimationCurve gravityStrength = AnimationCurve.EaseInOut(0, 0, 1, 1);
public AnimationCurve GravityStrength
{
get { return gravityStrength; }
set { gravityStrength = value; }
}
/// <inheritdoc />
protected override Vector3 DistortPointInternal(Vector3 point, float strength)
{
Vector3 target = WorldCenterOfGravity;
float normalizedDistance = 1f - Mathf.Clamp01(Vector3.Distance(point, target) / radius);
strength *= gravityStrength.Evaluate(normalizedDistance);
point.x = Mathf.Lerp(point.x, target.x, Mathf.Clamp01(strength * axisStrength.x));
point.y = Mathf.Lerp(point.y, target.y, Mathf.Clamp01(strength * axisStrength.y));
point.z = Mathf.Lerp(point.z, target.z, Mathf.Clamp01(strength * axisStrength.z));
return point;
}
/// <inheritdoc />
protected override Vector3 DistortScaleInternal(Vector3 point, float strength)
{
return point;
}
public void OnDrawGizmos()
{
Gizmos.color = Color.cyan;
Gizmos.DrawSphere(WorldCenterOfGravity, 0.01f);
}
}
} | SystemFriend/HoloLensUnityChan | Assets/MRTK/Core/Utilities/Physics/Distorters/DistorterGravity.cs | C# | mit | 2,822 |
# Termux
[Termux](https://termux.com/) is a terminal emulator and Linux environment for
Android.
## Configuration
Install the [app](https://play.google.com/store/apps/details?id=com.termux) and
the
[CodeBoard](https://play.google.com/store/apps/details?id=com.gazlaws.codeboard&rdid=com.gazlaws.codeboard)
keyboard.
```sh
$ pkg upgrade
$ pkg install git termux-exec
# start a new session for termux-exec
$ mkdir -p ~/code/dguo
$ cd ~/code/dguo
$ git clone https://github.com/dguo/dotfiles.git
$ cd dotfiles
$ ./configure.sh
# start a new session or source ~/.bashrc
```
| dguo/dotfiles | systems/termux/README.md | Markdown | mit | 574 |
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/app.css">
<script src="bower_components/modernizr/modernizr.js"></script>
<script src="bower_components/dustjs-linkedin/dist/dust-full.min.js"></script>
</head>
<body>
<header class="startpage-header">
<div class="inner" id="startpage-header">
</div>
</header>
<div class="startpage-news">
<div class="inner">
<div class="news-container" id="news-col-1"></div>
<div class="news-container" id="news-col-2"></div>
<div class="news-container" id="news-col-3"></div>
</div>
<div class="inner">
<div class="news-container full-width" id="news-row-1"></div>
</div>
<div class="inner">
<div class="news-container full-width" id="news-row-2"></div>
</div>
</div>
<script data-main="js/main" src="bower_components/requirejs/require.js"></script>
</body>
</html> | alexander-heimbuch/rss-page | index.html | HTML | mit | 1,258 |
#pragma once
// MESSAGE ATTITUDE_TARGET PACKING
#define MAVLINK_MSG_ID_ATTITUDE_TARGET 83
MAVPACKED(
typedef struct __mavlink_attitude_target_t {
uint32_t time_boot_ms; /*< Timestamp in milliseconds since system boot*/
float q[4]; /*< Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)*/
float body_roll_rate; /*< Body roll rate in radians per second*/
float body_pitch_rate; /*< Body pitch rate in radians per second*/
float body_yaw_rate; /*< Body yaw rate in radians per second*/
float thrust; /*< Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)*/
uint8_t type_mask; /*< Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 7: reserved, bit 8: attitude*/
}) mavlink_attitude_target_t;
#define MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN 37
#define MAVLINK_MSG_ID_ATTITUDE_TARGET_MIN_LEN 37
#define MAVLINK_MSG_ID_83_LEN 37
#define MAVLINK_MSG_ID_83_MIN_LEN 37
#define MAVLINK_MSG_ID_ATTITUDE_TARGET_CRC 22
#define MAVLINK_MSG_ID_83_CRC 22
#define MAVLINK_MSG_ATTITUDE_TARGET_FIELD_Q_LEN 4
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET { \
83, \
"ATTITUDE_TARGET", \
7, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_attitude_target_t, time_boot_ms) }, \
{ "type_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_attitude_target_t, type_mask) }, \
{ "q", NULL, MAVLINK_TYPE_FLOAT, 4, 4, offsetof(mavlink_attitude_target_t, q) }, \
{ "body_roll_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_attitude_target_t, body_roll_rate) }, \
{ "body_pitch_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_attitude_target_t, body_pitch_rate) }, \
{ "body_yaw_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_attitude_target_t, body_yaw_rate) }, \
{ "thrust", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_attitude_target_t, thrust) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET { \
"ATTITUDE_TARGET", \
7, \
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_attitude_target_t, time_boot_ms) }, \
{ "type_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_attitude_target_t, type_mask) }, \
{ "q", NULL, MAVLINK_TYPE_FLOAT, 4, 4, offsetof(mavlink_attitude_target_t, q) }, \
{ "body_roll_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_attitude_target_t, body_roll_rate) }, \
{ "body_pitch_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_attitude_target_t, body_pitch_rate) }, \
{ "body_yaw_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_attitude_target_t, body_yaw_rate) }, \
{ "thrust", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_attitude_target_t, thrust) }, \
} \
}
#endif
/**
* @brief Pack a attitude_target message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_boot_ms Timestamp in milliseconds since system boot
* @param type_mask Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 7: reserved, bit 8: attitude
* @param q Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)
* @param body_roll_rate Body roll rate in radians per second
* @param body_pitch_rate Body pitch rate in radians per second
* @param body_yaw_rate Body yaw rate in radians per second
* @param thrust Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_attitude_target_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 20, body_roll_rate);
_mav_put_float(buf, 24, body_pitch_rate);
_mav_put_float(buf, 28, body_yaw_rate);
_mav_put_float(buf, 32, thrust);
_mav_put_uint8_t(buf, 36, type_mask);
_mav_put_float_array(buf, 4, q, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN);
#else
mavlink_attitude_target_t packet;
packet.time_boot_ms = time_boot_ms;
packet.body_roll_rate = body_roll_rate;
packet.body_pitch_rate = body_pitch_rate;
packet.body_yaw_rate = body_yaw_rate;
packet.thrust = thrust;
packet.type_mask = type_mask;
mav_array_memcpy(packet.q, q, sizeof(float)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ATTITUDE_TARGET;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_CRC);
}
/**
* @brief Pack a attitude_target message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp in milliseconds since system boot
* @param type_mask Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 7: reserved, bit 8: attitude
* @param q Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)
* @param body_roll_rate Body roll rate in radians per second
* @param body_pitch_rate Body pitch rate in radians per second
* @param body_yaw_rate Body yaw rate in radians per second
* @param thrust Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_attitude_target_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_boot_ms,uint8_t type_mask,const float *q,float body_roll_rate,float body_pitch_rate,float body_yaw_rate,float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 20, body_roll_rate);
_mav_put_float(buf, 24, body_pitch_rate);
_mav_put_float(buf, 28, body_yaw_rate);
_mav_put_float(buf, 32, thrust);
_mav_put_uint8_t(buf, 36, type_mask);
_mav_put_float_array(buf, 4, q, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN);
#else
mavlink_attitude_target_t packet;
packet.time_boot_ms = time_boot_ms;
packet.body_roll_rate = body_roll_rate;
packet.body_pitch_rate = body_pitch_rate;
packet.body_yaw_rate = body_yaw_rate;
packet.thrust = thrust;
packet.type_mask = type_mask;
mav_array_memcpy(packet.q, q, sizeof(float)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ATTITUDE_TARGET;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_CRC);
}
/**
* @brief Encode a attitude_target struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param attitude_target C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_attitude_target_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_attitude_target_t* attitude_target)
{
return mavlink_msg_attitude_target_pack(system_id, component_id, msg, attitude_target->time_boot_ms, attitude_target->type_mask, attitude_target->q, attitude_target->body_roll_rate, attitude_target->body_pitch_rate, attitude_target->body_yaw_rate, attitude_target->thrust);
}
/**
* @brief Encode a attitude_target struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param attitude_target C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_attitude_target_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_attitude_target_t* attitude_target)
{
return mavlink_msg_attitude_target_pack_chan(system_id, component_id, chan, msg, attitude_target->time_boot_ms, attitude_target->type_mask, attitude_target->q, attitude_target->body_roll_rate, attitude_target->body_pitch_rate, attitude_target->body_yaw_rate, attitude_target->thrust);
}
/**
* @brief Send a attitude_target message
* @param chan MAVLink channel to send the message
*
* @param time_boot_ms Timestamp in milliseconds since system boot
* @param type_mask Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 7: reserved, bit 8: attitude
* @param q Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)
* @param body_roll_rate Body roll rate in radians per second
* @param body_pitch_rate Body pitch rate in radians per second
* @param body_yaw_rate Body yaw rate in radians per second
* @param thrust Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_attitude_target_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 20, body_roll_rate);
_mav_put_float(buf, 24, body_pitch_rate);
_mav_put_float(buf, 28, body_yaw_rate);
_mav_put_float(buf, 32, thrust);
_mav_put_uint8_t(buf, 36, type_mask);
_mav_put_float_array(buf, 4, q, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_TARGET, buf, MAVLINK_MSG_ID_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_CRC);
#else
mavlink_attitude_target_t packet;
packet.time_boot_ms = time_boot_ms;
packet.body_roll_rate = body_roll_rate;
packet.body_pitch_rate = body_pitch_rate;
packet.body_yaw_rate = body_yaw_rate;
packet.thrust = thrust;
packet.type_mask = type_mask;
mav_array_memcpy(packet.q, q, sizeof(float)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_TARGET, (const char *)&packet, MAVLINK_MSG_ID_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_CRC);
#endif
}
/**
* @brief Send a attitude_target message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_attitude_target_send_struct(mavlink_channel_t chan, const mavlink_attitude_target_t* attitude_target)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_attitude_target_send(chan, attitude_target->time_boot_ms, attitude_target->type_mask, attitude_target->q, attitude_target->body_roll_rate, attitude_target->body_pitch_rate, attitude_target->body_yaw_rate, attitude_target->thrust);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_TARGET, (const char *)attitude_target, MAVLINK_MSG_ID_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_CRC);
#endif
}
#if MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_attitude_target_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 20, body_roll_rate);
_mav_put_float(buf, 24, body_pitch_rate);
_mav_put_float(buf, 28, body_yaw_rate);
_mav_put_float(buf, 32, thrust);
_mav_put_uint8_t(buf, 36, type_mask);
_mav_put_float_array(buf, 4, q, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_TARGET, buf, MAVLINK_MSG_ID_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_CRC);
#else
mavlink_attitude_target_t *packet = (mavlink_attitude_target_t *)msgbuf;
packet->time_boot_ms = time_boot_ms;
packet->body_roll_rate = body_roll_rate;
packet->body_pitch_rate = body_pitch_rate;
packet->body_yaw_rate = body_yaw_rate;
packet->thrust = thrust;
packet->type_mask = type_mask;
mav_array_memcpy(packet->q, q, sizeof(float)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_TARGET, (const char *)packet, MAVLINK_MSG_ID_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_ATTITUDE_TARGET_CRC);
#endif
}
#endif
#endif
// MESSAGE ATTITUDE_TARGET UNPACKING
/**
* @brief Get field time_boot_ms from attitude_target message
*
* @return Timestamp in milliseconds since system boot
*/
static inline uint32_t mavlink_msg_attitude_target_get_time_boot_ms(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field type_mask from attitude_target message
*
* @return Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 7: reserved, bit 8: attitude
*/
static inline uint8_t mavlink_msg_attitude_target_get_type_mask(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 36);
}
/**
* @brief Get field q from attitude_target message
*
* @return Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)
*/
static inline uint16_t mavlink_msg_attitude_target_get_q(const mavlink_message_t* msg, float *q)
{
return _MAV_RETURN_float_array(msg, q, 4, 4);
}
/**
* @brief Get field body_roll_rate from attitude_target message
*
* @return Body roll rate in radians per second
*/
static inline float mavlink_msg_attitude_target_get_body_roll_rate(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field body_pitch_rate from attitude_target message
*
* @return Body pitch rate in radians per second
*/
static inline float mavlink_msg_attitude_target_get_body_pitch_rate(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Get field body_yaw_rate from attitude_target message
*
* @return Body yaw rate in radians per second
*/
static inline float mavlink_msg_attitude_target_get_body_yaw_rate(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
/**
* @brief Get field thrust from attitude_target message
*
* @return Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)
*/
static inline float mavlink_msg_attitude_target_get_thrust(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 32);
}
/**
* @brief Decode a attitude_target message into a struct
*
* @param msg The message to decode
* @param attitude_target C-struct to decode the message contents into
*/
static inline void mavlink_msg_attitude_target_decode(const mavlink_message_t* msg, mavlink_attitude_target_t* attitude_target)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
attitude_target->time_boot_ms = mavlink_msg_attitude_target_get_time_boot_ms(msg);
mavlink_msg_attitude_target_get_q(msg, attitude_target->q);
attitude_target->body_roll_rate = mavlink_msg_attitude_target_get_body_roll_rate(msg);
attitude_target->body_pitch_rate = mavlink_msg_attitude_target_get_body_pitch_rate(msg);
attitude_target->body_yaw_rate = mavlink_msg_attitude_target_get_body_yaw_rate(msg);
attitude_target->thrust = mavlink_msg_attitude_target_get_thrust(msg);
attitude_target->type_mask = mavlink_msg_attitude_target_get_type_mask(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN? msg->len : MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN;
memset(attitude_target, 0, MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN);
memcpy(attitude_target, _MAV_PAYLOAD(msg), len);
#endif
}
| YKSamgo/AR-Drone | ARDrone/ARDrone/include/common/mavlink_msg_attitude_target.h | C | mit | 17,916 |
#include "questdisplay.h"
#include "../core/global.h"
//QuestLister stuff
QuestLister::QuestLister(int xp, int yp, int wp, int hp) : BasicGUI(xp, yp, wp, hp) {
headerSize = 35;
//-1 due to the header
displayableQuestCount = h / headerSize - 1;
padding = 5;
selectedElementPos = 0;
defaultBGTexture = Global::resourceHandler->getATexture(TT::GUI, "questlistdefaultbg");
headBGTexture = Global::resourceHandler->getATexture(TT::GUI, "questlistheadbg");
selectedBGTexture = Global::resourceHandler->getATexture(TT::GUI, "questlistselectedbg");
questDisplay = NULL;
}
void QuestLister::render() {
//Setting rectangle
SDL_Rect destinationRect = {x, y, w, headerSize};
headBGTexture->render(destinationRect);
ATexture* headerText = Global::resourceHandler->getTextTexture("Active quests", Global::resourceHandler->getColor("iteminfo-desc"), headerSize * 3 / 4);
Dimension d = headerText->getDimensions();
SDL_Rect textDestRect = destinationRect;
textDestRect.x += padding;
textDestRect.y += padding;
textDestRect.w = d.W();
textDestRect.h = d.H();
headerText->render(textDestRect);
for (int i = 0; i < displayableQuestCount; i++) {
destinationRect.y += headerSize;
if (selectedElementPos == i) {
selectedBGTexture->render(destinationRect);
} else {
defaultBGTexture->render(destinationRect);
}
Quest* currentQuest = getQuest(i);
if (currentQuest != NULL) {
ATexture* headerText = Global::resourceHandler->getTextTexture(currentQuest->getName(), Global::resourceHandler->getColor("iteminfo-desc"), headerSize * 2 / 3);
Dimension d = headerText->getDimensions();
textDestRect = destinationRect;
textDestRect.x += padding;
textDestRect.y += padding;
textDestRect.w = d.W();
textDestRect.h = d.H();
headerText->render(textDestRect);
}
}
}
Quest* QuestLister::getQuest(unsigned int index) {
//NULL checking
if (index >= questsToDisplay.size()) {
return NULL;
}
return questsToDisplay[index];
}
int QuestLister::getHeaderSize() {
return headerSize;
}
int QuestLister::getPadding() {
return padding;
}
QuestDisplay* QuestLister::getQuestDisplay() {
return questDisplay;
}
void QuestLister::addQuest(Quest* questToAdd) {
questsToDisplay.push_back(questToAdd);
}
void QuestLister::setPadding(int newPadding) {
padding = newPadding;
}
void QuestLister::setQuestDisplay(QuestDisplay* newQuestDisplay) {
questDisplay = newQuestDisplay;
}
void QuestLister::handleLeftClickEvent(int xp, int yp) {
selectedElementPos = (yp - y) / headerSize - 1;
Quest* currentQuest = getQuest(selectedElementPos);
questDisplay->setQuest(currentQuest);
}
void QuestLister::handleMouseWheelEvent(bool up) {
//TODO implementation
}
//QuestDisplay stuff
QuestDisplay::QuestDisplay(int xp, int yp, int wp, int hp) : BasicGUI(xp, yp, wp, hp) {
currentQuest = NULL;
bgTexture = Global::resourceHandler->getATexture(TT::GUI, "questlistselectedbg");
titleSize = 36;
descSize = 22;
padding = 12;
}
void QuestDisplay::render() {
//Setting rectangle
SDL_Rect destinationRect = {x, y, w, h};
bgTexture->render(destinationRect);
if (currentQuest != NULL) {
SDL_Rect textDestRect;
ATexture* titleText = Global::resourceHandler->getTextTexture(currentQuest->getName(), Global::resourceHandler->getColor("iteminfo-desc"), titleSize);
Dimension d = titleText->getDimensions();
textDestRect = destinationRect;
textDestRect.x += (textDestRect.w - d.W()) / 2;
textDestRect.w = d.W();
textDestRect.h = d.H();
titleText->render(textDestRect);
ATexture* descText = Global::resourceHandler->getTextTexture(currentQuest->getDescription(), Global::resourceHandler->getColor("iteminfo-desc"), descSize);
d = descText->getDimensions();
textDestRect = destinationRect;
textDestRect.x += padding;
textDestRect.y += textDestRect.h / 6;
textDestRect.w = d.W();
textDestRect.h = d.H();
descText->render(textDestRect);
int size = 100;
ATexture* objText = NULL;
ATexture* oText = NULL;
switch(currentQuest->getQuestObjective()) {
case QuestObjective::TALK_WITH_NPC:
objText = Global::resourceHandler->getTextTexture("Talk to:", Global::resourceHandler->getColor("iteminfo-desc"), descSize);
oText = currentQuest->getQOTalkTarget()->texture;
break;
case QuestObjective::KILL_NPC:
objText = Global::resourceHandler->getTextTexture("Kill:", Global::resourceHandler->getColor("iteminfo-desc"), descSize);
oText = currentQuest->getQOKillTarget()->texture;
break;
case QuestObjective::VISIT_STRUCTURE:
objText = Global::resourceHandler->getTextTexture("Visit:", Global::resourceHandler->getColor("iteminfo-desc"), descSize);
oText = currentQuest->getQOStructTarget()->texture;
break;
}
d = objText->getDimensions();
textDestRect = destinationRect;
textDestRect.x += padding;
textDestRect.y += textDestRect.h * 2 / 6;
textDestRect.w = d.W();
textDestRect.h = d.H();
objText->render(textDestRect);
oText->render({x + textDestRect.w + padding * 4, textDestRect.y, size, size});
ATexture* rewardText = Global::resourceHandler->getTextTexture("Reward:", Global::resourceHandler->getColor("iteminfo-desc"), descSize);
d = rewardText->getDimensions();
textDestRect = destinationRect;
textDestRect.x += padding;
textDestRect.y += textDestRect.h * 3 / 6;
textDestRect.w = d.W();
textDestRect.h = d.H();
rewardText->render(textDestRect);
Global::resourceHandler->getATexture(TT::GUI, "gold")->render({x + textDestRect.w + padding * 4, textDestRect.y, size, size});
ATexture* goldText = Global::resourceHandler->getTextTexture(std::to_string(currentQuest->getRewardGold()), Global::resourceHandler->getColor("gold"), descSize * 3);
d = goldText->getDimensions();
textDestRect.x += textDestRect.w + size + padding * 6;
textDestRect.w = d.W();
textDestRect.h = d.H();
goldText->render(textDestRect);
int rowLength = w / size;
//int rows = (int)std::ceil((double)currentQuest->getRewardItemsSize() / rowLength);
for (unsigned int i = 0; i < currentQuest->getRewardItemsSize(); i++) {
destinationRect.x = x + (i % rowLength) * size;
destinationRect.y = y + h * 4 / 6 + ((i / rowLength) * size);
destinationRect.w = size;
destinationRect.h = size;
currentQuest->getRewardItem(i)->render(destinationRect, false);
}
}
}
Quest* QuestDisplay::getQuest() {
return currentQuest;
}
void QuestDisplay::setQuest(Quest* newQuest) {
currentQuest = newQuest;
}
| kovleventer/FoD | src/player/questdisplay.cpp | C++ | mit | 6,449 |
package com.github.gilz688.mifeditor;
import com.github.gilz688.mifeditor.proto.MIEView;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
public class MIEApplication extends Application {
private Stage primaryStage;
private AnchorPane rootLayout;
public static final String APPLICATION_NAME = "MIF Image Editor";
@Override
public void start(Stage primaryStage) {
this.primaryStage = primaryStage;
try {
// Load root layout from fxml file.
FXMLLoader loader = new FXMLLoader();
loader.setLocation(MIEApplication.class
.getResource("view/MIE.fxml"));
rootLayout = (AnchorPane) loader.load();
// Show the scene containing the root layout.
Scene scene = new Scene(rootLayout);
scene.getStylesheets().add(
getClass().getResource("application.css").toExternalForm());
primaryStage.setTitle(APPLICATION_NAME);
primaryStage.setScene(scene);
primaryStage.show();
final MIEView view = (MIEView) loader.getController();
view.setStage(primaryStage);
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}
| gilz688/MIF-ImageEditor | MIFImageEditor/src/main/java/com/github/gilz688/mifeditor/MIEApplication.java | Java | mit | 1,289 |
/*
* ==================================================================================
*
* Filename: poller.h
*
* Description:
*
* Verson: 1.0
* Created: 2016-03-09
* Compiler: g++
*
* Author: Jiewei Wei <weijieweijerry@163.com>
* Company: Sun Yat-sen University
*
* ==================================================================================
*/
#ifndef __LNET_POLLER_H__
#define __LNET_POLLER_H__
#include "lnet.h"
#include <vector>
extern "C" {
struct epoll_event;
}
LNET_NAMESPACE_BEGIN
struct IOEvent;
class Poller {
public:
Poller(IOLoop *loop);
~Poller();
int poll(int timeout, const std::vector<IOEvent*> &ioevents);
int add(int fd, int events);
int mod(int fd, int events);
int del(int fd);
private:
IOLoop *m_loop;
int m_epollFd;
struct epoll_event *m_events;
size_t m_size;
}; /* end of class Poller */
LNET_NAMESPACE_END
#endif /* end of define __LNET_POLLER_H__ */
| JieweiWei/lnet | src/poller.h | C | mit | 1,023 |
# Router
Provides the ability to perform actions based on changes in the URL hash.
```javascript
import {Router} from "estoolbox";
Router.when("/about", () => {
// Show the about route content.
});
Router.when("/person/:username", (route) => {
const username = route.variables.username;
// Show the person content for this user.
});
```
| dbtedman/estoolbox | docs/Router.md | Markdown | mit | 348 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About ShadowCoin</source>
<translation>O ShadowCoin</translation>
</message>
<message>
<location line="+39"/>
<source><b>ShadowCoin</b> version</source>
<translation><b>ShadowCoin</b> wersja</translation>
</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 (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation>
Oprogramowanie eksperymentalne.
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 (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</translation>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Książka Adresowa</translation>
</message>
<message>
<location line="+22"/>
<source>Double-click to edit address or label</source>
<translation>Kliknij dwukrotnie, aby edytować adres lub etykietę</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Utwórz nowy adres</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Skopiuj aktualnie wybrany adres do schowka</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation>Nowy Adres</translation>
</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>Tutaj znajdują się twoje adresy do odbierania wpłat.
Możesz dodać kolejny adres dla każdego wysyłającego aby określić od kogo pochodzi wpłata.</translation>
</message>
<message>
<location line="+60"/>
<source>&Copy Address</source>
<translation>&Kopiuj adres</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>Pokaż &Kod QR</translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a ShadowCoin address</source>
<translation>Podpisz wiadomość by udowodnić, że jesteś właścicielem adresu ShadowCoin</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Podpisz &Wiadomość</translation>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation>Usuń zaznaczony adres z listy</translation>
</message>
<message>
<location line="-14"/>
<source>Verify a message to ensure it was signed with a specified ShadowCoin address</source>
<translation>Zweryfikuj wiadomość, w celu zapewnienia, że została podpisana z określonego adresu ShadowCoin</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>&Zweryfikuj wiadomość</translation>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Usuń</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+65"/>
<source>Copy &Label</source>
<translation>Kopiuj &Etykietę</translation>
</message>
<message>
<location line="+2"/>
<source>&Edit</source>
<translation>&Edytuj</translation>
</message>
<message>
<location line="+250"/>
<source>Export Address Book Data</source>
<translation>Exportuj Książkę Adresową</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Plik *.CSV (rozdzielany przecinkami)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Błąd exportowania</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Nie mogę zapisać do pliku %1</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Etykieta</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(bez etykiety)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Okienko Hasła</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Wpisz hasło</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Nowe hasło</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Powtórz nowe hasło</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>Wprowadź nowe hasło dla portfela.<br/>Proszę użyć hasła składającego się z <b>10 lub więcej losowych znaków</b> lub <b>ośmiu lub więcej słów</b>.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Zaszyfruj portfel</translation>
</message>
<message>
<location line="+7"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Ta operacja wymaga hasła do portfela ażeby odblokować portfel.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Odblokuj portfel</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Ta operacja wymaga hasła do portfela ażeby odszyfrować portfel.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Odszyfruj portfel</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Zmień hasło</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Podaj stare i nowe hasło do portfela.</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Potwierdź szyfrowanie portfela</translation>
</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>Uwaga: Jeśli zaszyfrujesz swój portfel i zgubisz hasło, wtedy<b>UTRACISZ SWOJE MONETY!</b>!</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Jesteś pewien, że chcesz zaszyfrować swój portfel?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>WAŻNE: Wszystkie wykonane wcześniej kopie pliku portfela powinny być zamienione na nowe, szyfrowane pliki. Z powodów bezpieczeństwa, poprzednie kopie nieszyfrowanych plików portfela staną się bezużyteczne jak tylko zaczniesz korzystać z nowego, szyfrowanego portfela.</translation>
</message>
<message>
<location line="+103"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>Uwaga: Klawisz Caps Lock jest włączony</translation>
</message>
<message>
<location line="-133"/>
<location line="+60"/>
<source>Wallet encrypted</source>
<translation>Portfel zaszyfrowany</translation>
</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>Szyfrowanie portfela nie powiodło się</translation>
</message>
<message>
<location line="-56"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Szyfrowanie portfela nie powiodło się z powodu wewnętrznego błędu. Twój portfel nie został zaszyfrowany.</translation>
</message>
<message>
<location line="+7"/>
<location line="+50"/>
<source>The supplied passphrases do not match.</source>
<translation>Podane hasła nie są takie same.</translation>
</message>
<message>
<location line="-38"/>
<source>Wallet unlock failed</source>
<translation>Odblokowanie portfela nie powiodło się</translation>
</message>
<message>
<location line="+1"/>
<location line="+12"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Wprowadzone hasło do odszyfrowania portfela jest niepoprawne.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Odszyfrowanie portfela nie powiodło się</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Hasło portfela zostało pomyślnie zmienione.</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+280"/>
<source>Sign &message...</source>
<translation>Podpisz wiado&mość...</translation>
</message>
<message>
<location line="+242"/>
<source>Synchronizing with network...</source>
<translation>Synchronizacja z siecią...</translation>
</message>
<message>
<location line="-308"/>
<source>&Overview</source>
<translation>P&odsumowanie</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Pokazuje ogólny zarys portfela</translation>
</message>
<message>
<location line="+17"/>
<source>&Transactions</source>
<translation>&Transakcje</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Przeglądaj historię transakcji</translation>
</message>
<message>
<location line="+5"/>
<source>&Address Book</source>
<translation>&Książka Adresowa</translation>
</message>
<message>
<location line="+1"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Edytuj listę przechowywanych adresów i etykiet</translation>
</message>
<message>
<location line="-13"/>
<source>&Receive coins</source>
<translation>&Odbierz monety</translation>
</message>
<message>
<location line="+1"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Pokaż listę adresów do odbierania wpłat</translation>
</message>
<message>
<location line="-7"/>
<source>&Send coins</source>
<translation>&Wyślij monety</translation>
</message>
<message>
<location line="+35"/>
<source>E&xit</source>
<translation>&Zakończ</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Zamknij program</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about ShadowCoin</source>
<translation>Pokaż informacje dotyczące ShadowCoin</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>O &Qt</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Pokazuje informacje o Qt</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Opcje...</translation>
</message>
<message>
<location line="+4"/>
<source>&Encrypt Wallet...</source>
<translation>Zaszyfruj Portf&el</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>Wykonaj kopię zapasową...</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>&Zmień hasło...</translation>
</message>
<message numerus="yes">
<location line="+250"/>
<source>~%n block(s) remaining</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source>
<translation>Pobrano %1 z %2 bloków historii transakcji (%3% gotowe).</translation>
</message>
<message>
<location line="-247"/>
<source>&Export...</source>
<translation>&Exportuj</translation>
</message>
<message>
<location line="-62"/>
<source>Send coins to a ShadowCoin address</source>
<translation>Wyślij monety na adres ShadowCoin</translation>
</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>Zapasowy portfel w innej lokalizacji</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Zmień hasło użyte do szyfrowania portfela</translation>
</message>
<message>
<location line="+10"/>
<source>&Debug window</source>
<translation>&Okno debugowania</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>Otwórz konsolę debugowania i diagnostyki</translation>
</message>
<message>
<location line="-5"/>
<source>&Verify message...</source>
<translation>&Zweryfikuj wiadomość...</translation>
</message>
<message>
<location line="-200"/>
<source>ShadowCoin</source>
<translation>ShadowCoin</translation>
</message>
<message>
<location line="+0"/>
<source>Wallet</source>
<translation>Portfel</translation>
</message>
<message>
<location line="+178"/>
<source>&About ShadowCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>&Pokaż / Ukryj</translation>
</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>&Plik</translation>
</message>
<message>
<location line="+8"/>
<source>&Settings</source>
<translation>P&referencje</translation>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation>Pomo&c</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Pasek zakładek</translation>
</message>
<message>
<location line="+8"/>
<source>Actions toolbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+9"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</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><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><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><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><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><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Up to date</source>
<translation>Aktualny</translation>
</message>
<message>
<location line="+7"/>
<source>Catching up...</source>
<translation>Łapanie bloków...</translation>
</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>Transakcja wysłana</translation>
</message>
<message>
<location line="+1"/>
<source>Incoming transaction</source>
<translation>Transakcja przychodząca</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Data: %1
Kwota: %2
Typ: %3
Adres: %4
</translation>
</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>Portfel jest <b>zaszyfrowany</b> i obecnie <b>niezablokowany</b></translation>
</message>
<message>
<location line="+10"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Portfel jest <b>zaszyfrowany</b> i obecnie <b>zablokowany</b></translation>
</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><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s)</source>
<translation><numerusform>%n godzina</numerusform><numerusform>%n godzin</numerusform><numerusform>%n godzin</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation><numerusform>%n dzień</numerusform><numerusform>%n dni</numerusform><numerusform>%n dni</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>Sieć Alert</translation>
</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>Ilość:</translation>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation>Bajtów:</translation>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation>Kwota:</translation>
</message>
<message>
<location line="+32"/>
<source>Priority:</source>
<translation>Priorytet:</translation>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation>Opłata:</translation>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+551"/>
<source>no</source>
<translation>nie</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation>Po opłacie:</translation>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation>Reszta:</translation>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation>Zaznacz/Odznacz wszystko</translation>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation>Widok drzewa</translation>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation>Widok listy</translation>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation>Kwota</translation>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation>Potwierdzenia</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation>Potwierdzony</translation>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation>Priorytet</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-515"/>
<source>Copy address</source>
<translation>Kopiuj adres</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Kopiuj etykietę</translation>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation>Kopiuj kwotę</translation>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation>Skopiuj ID transakcji</translation>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation>Skopiuj ilość</translation>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation>Skopiuj opłatę</translation>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation>Skopiuj ilość po opłacie</translation>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation>Skopiuj ilość bajtów</translation>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation>Skopiuj priorytet</translation>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation>Skopiuj resztę</translation>
</message>
<message>
<location line="+317"/>
<source>highest</source>
<translation>najwyższa</translation>
</message>
<message>
<location line="+1"/>
<source>high</source>
<translation>wysoka</translation>
</message>
<message>
<location line="+1"/>
<source>medium-high</source>
<translation>średnio wysoki</translation>
</message>
<message>
<location line="+1"/>
<source>medium</source>
<translation>średnia</translation>
</message>
<message>
<location line="+4"/>
<source>low-medium</source>
<translation>średnio niski</translation>
</message>
<message>
<location line="+1"/>
<source>low</source>
<translation>niski</translation>
</message>
<message>
<location line="+1"/>
<source>lowest</source>
<translation>najniższy</translation>
</message>
<message>
<location line="+155"/>
<source>DUST</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>yes</source>
<translation>tak</translation>
</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>(bez etykiety)</translation>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation>reszta z %1 (%2)</translation>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation>(reszta)</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Edytuj adres</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Etykieta</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Adres</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+20"/>
<source>New receiving address</source>
<translation>Nowy adres odbiorczy</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Nowy adres wysyłania</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Edytuj adres odbioru</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Edytuj adres wysyłania</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Wprowadzony adres "%1" już istnieje w książce adresowej.</translation>
</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>Nie można było odblokować portfela.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Tworzenie nowego klucza nie powiodło się.</translation>
</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>Opcje</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>Główne</translation>
</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>Płać prowizję za transakcje</translation>
</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>&Sieć</translation>
</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>Mapuj port używając &UPnP</translation>
</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>Proxy &IP: </translation>
</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>&Port:</translation>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation>Port proxy (np. 9050)</translation>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation>Wersja &SOCKS</translation>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation>SOCKS wersja serwera proxy (np. 5)</translation>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation>&Okno</translation>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Pokazuj tylko ikonę przy zegarku po zminimalizowaniu okna.</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>&Minimalizuj do paska przy zegarku zamiast do paska zadań</translation>
</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>Minimalizuje zamiast zakończyć działanie programu przy zamykaniu okna. Kiedy ta opcja jest włączona, program zakończy działanie po wybieraniu Zamknij w menu.</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>M&inimalizuj przy zamknięciu</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Wyświetlanie</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>Język &Użytkownika:</translation>
</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>&Jednostka pokazywana przy kwocie:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>Wybierz podział jednostki pokazywany w interfejsie oraz podczas wysyłania monet</translation>
</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>&Wyświetlaj adresy w liście transakcji</translation>
</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>&OK</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&Anuluj</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+55"/>
<source>default</source>
<translation>domyślny</translation>
</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>Adres podanego proxy jest nieprawidłowy</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Formularz</translation>
</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>Portfel</translation>
</message>
<message>
<location line="+49"/>
<source>Spendable:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current spendable balance</source>
<translation>Twoje obecne saldo</translation>
</message>
<message>
<location line="+71"/>
<source>Immature:</source>
<translation>Niedojrzały: </translation>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation>Balans wydobycia, który jeszcze nie dojrzał</translation>
</message>
<message>
<location line="+20"/>
<source>Total:</source>
<translation>Wynosi ogółem:</translation>
</message>
<message>
<location line="+16"/>
<source>Your current total balance</source>
<translation>Twoje obecne saldo</translation>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Ostatnie transakcje</b></translation>
</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>desynchronizacja</translation>
</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>Nazwa klienta</translation>
</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>NIEDOSTĘPNE</translation>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation>Wersja klienta</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Informacje</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation>Używana wersja OpenSSL</translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Czas uruchomienia</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Sieć</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>Liczba połączeń</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>Ciąg bloków</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Aktualna liczba bloków</translation>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation>Szacowana ilość bloków</translation>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation>Czas ostatniego bloku</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>&Otwórz</translation>
</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>&Konsola</translation>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation>Data kompilacji</translation>
</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>Plik logowania debugowania</translation>
</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>Wyczyść konsolę</translation>
</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>Użyj strzałek do przewijania historii i <b>Ctrl-L</b> aby wyczyścić ekran</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Wpisz <b>help</b> aby uzyskać listę dostępnych komend</translation>
</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>Wyślij Monety</translation>
</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>Ilość:</translation>
</message>
<message>
<location line="+22"/>
<location line="+35"/>
<source>0</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-19"/>
<source>Bytes:</source>
<translation>Bajtów:</translation>
</message>
<message>
<location line="+51"/>
<source>Amount:</source>
<translation>Kwota:</translation>
</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>Priorytet:</translation>
</message>
<message>
<location line="+19"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Fee:</source>
<translation>Opłata:</translation>
</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>Po opłacie:</translation>
</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>Wyślij do wielu odbiorców na raz</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation>Dodaj Odbio&rce</translation>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>Wyczyść &wszystko</translation>
</message>
<message>
<location line="+28"/>
<source>Balance:</source>
<translation>Saldo:</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>Potwierdź akcję wysyłania</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>Wy&syłka</translation>
</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>Skopiuj ilość</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Kopiuj kwotę</translation>
</message>
<message>
<location line="+1"/>
<source>Copy fee</source>
<translation>Skopiuj opłatę</translation>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation>Skopiuj ilość po opłacie</translation>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation>Skopiuj ilość bajtów</translation>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation>Skopiuj priorytet</translation>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation>Skopiuj resztę</translation>
</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>Potwierdź wysyłanie monet</translation>
</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>Adres odbiorcy jest nieprawidłowy, proszę poprawić</translation>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>Kwota do zapłacenia musi być większa od 0.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>Kwota przekracza twoje saldo.</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>Suma przekracza twoje saldo, gdy doliczymy %1 prowizji transakcyjnej.</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>Znaleziono powtórzony adres, można wysłać tylko raz na każdy adres podczas operacji wysyłania.</translation>
</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>(bez etykiety)</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>Su&ma:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>Zapłać &dla:</translation>
</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>Wprowadź etykietę dla tego adresu by dodać go do książki adresowej</translation>
</message>
<message>
<location line="+9"/>
<source>&Label:</source>
<translation>&Etykieta:</translation>
</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>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Wklej adres ze schowka</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</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>Podpisy - Podpisz / zweryfikuj wiadomość</translation>
</message>
<message>
<location line="+13"/>
<location line="+124"/>
<source>&Sign Message</source>
<translation>Podpi&sz Wiadomość</translation>
</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>Możesz podpisywać wiadomości swoimi adresami aby udowodnić, że jesteś ich właścicielem. Uważaj, aby nie podpisywać niczego co wzbudza Twoje podejrzenia, ponieważ ktoś może stosować phishing próbując nakłonić Cię do ich podpisania. Akceptuj i podpisuj tylko w pełni zrozumiałe komunikaty i wiadomości.</translation>
</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>Alt+A</translation>
</message>
<message>
<location line="-193"/>
<source>Paste address from clipboard</source>
<translation>Wklej adres ze schowka</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation>Wprowadź wiadomość, którą chcesz podpisać, tutaj</translation>
</message>
<message>
<location line="+24"/>
<source>Copy the current signature to the system clipboard</source>
<translation>Kopiuje aktualny podpis do schowka systemowego</translation>
</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>Zresetuj wszystkie pola podpisanej wiadomości</translation>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>Wyczyść &wszystko</translation>
</message>
<message>
<location line="-87"/>
<location line="+70"/>
<source>&Verify Message</source>
<translation>&Zweryfikuj wiadomość</translation>
</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>Wpisz adres podpisu, wiadomość (upewnij się, że dokładnie skopiujesz wszystkie zakończenia linii, spacje, tabulacje itp.) oraz podpis poniżej by sprawdzić wiadomość. Uważaj by nie dodać więcej do podpisu niż do samej podpisywanej wiadomości by uniknąć ataku man-in-the-middle (człowiek pośrodku)</translation>
</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>Resetuje wszystkie pola weryfikacji wiadomości</translation>
</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>Kliknij "Podpisz Wiadomość" żeby uzyskać podpis</translation>
</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>Podany adres jest nieprawidłowy.</translation>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation>Proszę sprawdzić adres i spróbować ponownie.</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation>Wprowadzony adres nie odnosi się do klucza.</translation>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation>Odblokowanie portfela zostało anulowane.</translation>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation>Klucz prywatny dla podanego adresu nie jest dostępny</translation>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation>Podpisanie wiadomości nie powiodło się</translation>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation>Wiadomość podpisana.</translation>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation>Podpis nie może zostać zdekodowany.</translation>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation>Sprawdź podpis i spróbuj ponownie.</translation>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation>Podpis nie odpowiadał streszczeniu wiadomości</translation>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation>Weryfikacja wiadomości nie powiodła się.</translation>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation>Wiadomość zweryfikowana.</translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+19"/>
<source>Open until %1</source>
<translation>Otwórz do %1</translation>
</message>
<message numerus="yes">
<location line="-2"/>
<source>Open for %n block(s)</source>
<translation type="unfinished"><numerusform></numerusform><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>%1/offline</translation>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/niezatwierdzone</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 potwierdzeń</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation>Status</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation><numerusform>, emitowany przez %n węzeł</numerusform><numerusform>, emitowany przez %n węzły</numerusform><numerusform>, emitowany przez %n węzłów</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation>Źródło</translation>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>Wygenerowano</translation>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation>Od</translation>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation>Do</translation>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation>własny adres</translation>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>etykieta</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>Przypisy</translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation><numerusform>potwierdzona przy %n bloku więcej</numerusform><numerusform>potwierdzona przy %n blokach więcej</numerusform><numerusform>potwierdzona przy %n blokach więcej</numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>niezaakceptowane</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>Debet</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>Prowizja transakcji</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>Kwota netto</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Wiadomość</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>Komentarz</translation>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation>ID transakcji</translation>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 50 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>Informacje debugowania</translation>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Transakcja</translation>
</message>
<message>
<location line="+5"/>
<source>Inputs</source>
<translation>Wejścia</translation>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>Kwota</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>prawda</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>fałsz</translation>
</message>
<message>
<location line="-211"/>
<source>, has not been successfully broadcast yet</source>
<translation>, nie został jeszcze pomyślnie wyemitowany</translation>
</message>
<message>
<location line="+35"/>
<source>unknown</source>
<translation>nieznany</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>Szczegóły transakcji</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ten panel pokazuje szczegółowy opis transakcji</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+226"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Typ</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Kwota</translation>
</message>
<message>
<location line="+60"/>
<source>Open until %1</source>
<translation>Otwórz do %1</translation>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Zatwierdzony (%1 potwierdzeń)</translation>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><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>Niepotwierdzone:</translation>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation>Potwierdzanie (%1 z %2 rekomendowanych potwierdzeń)</translation>
</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>Ten blok nie został odebrany przez jakikolwiek inny węzeł i prawdopodobnie nie zostanie zaakceptowany!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Wygenerowano ale nie zaakceptowano</translation>
</message>
<message>
<location line="+42"/>
<source>Received with</source>
<translation>Otrzymane przez</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Odebrano od</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Wysłano do</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Płatność do siebie</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Wydobyto</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(brak)</translation>
</message>
<message>
<location line="+190"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Status transakcji. Najedź na pole, aby zobaczyć liczbę potwierdzeń.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Data i czas odebrania transakcji.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Rodzaj transakcji.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Adres docelowy transakcji.</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Kwota usunięta z lub dodana do konta.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+55"/>
<location line="+16"/>
<source>All</source>
<translation>Wszystko</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Dzisiaj</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>W tym tygodniu</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>W tym miesiącu</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>W zeszłym miesiącu</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>W tym roku</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Zakres...</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>Otrzymane przez</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Wysłano do</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Do siebie</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Wydobyto</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Inne</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Wprowadź adres albo etykietę żeby wyszukać</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Min suma</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Kopiuj adres</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Kopiuj etykietę</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Kopiuj kwotę</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation>Skopiuj ID transakcji</translation>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>Edytuj etykietę</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>Pokaż szczegóły transakcji</translation>
</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>CSV (rozdzielany przecinkami)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Potwierdzony</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Typ</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Etykieta</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Kwota</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>ID</translation>
</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>Zakres:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>do</translation>
</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>Użycie:</translation>
</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>Lista poleceń</translation>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation>Uzyskaj pomoc do polecenia</translation>
</message>
<message>
<location line="+2"/>
<source>Options:</source>
<translation>Opcje:</translation>
</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>Określ plik portfela (w obrębie folderu danych)</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Wskaż folder danych</translation>
</message>
<message>
<location line="+2"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Ustaw rozmiar w megabajtach cache-u bazy danych (domyślnie: 25)</translation>
</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: 42112 or testnet: 42111)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Utrzymuj maksymalnie <n> połączeń z peerami (domyślnie: 125)</translation>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Podłącz się do węzła aby otrzymać adresy peerów i rozłącz</translation>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation>Podaj swój publiczny adres</translation>
</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>Próg po którym nastąpi rozłączenie nietrzymających się zasad peerów (domyślnie: 100)</translation>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Czas w sekundach, przez jaki nietrzymający się zasad peerzy nie będą mogli ponownie się podłączyć (domyślnie: 86400)</translation>
</message>
<message>
<location line="-44"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation>Wystąpił błąd podczas ustawiania portu RPC %u w tryb nasłuchu: %s</translation>
</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>Akceptuj linię poleceń oraz polecenia JSON-RPC</translation>
</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>Uruchom w tle jako daemon i przyjmuj polecenia</translation>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation>Użyj sieci testowej</translation>
</message>
<message>
<location line="-24"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>Akceptuj połączenia z zewnątrz (domyślnie: 1 jeśli nie ustawiono -proxy lub -connect)</translation>
</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>Wystąpił błąd podczas ustawiania portu RPC %u w tryb nasłuchu dla IPv6, korzystam z IPv4: %s</translation>
</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>Ostrzeżenie: -paytxfee jest bardzo duży. To jest prowizja za transakcje, którą płacisz, gdy wysyłasz monety.</translation>
</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>Ostrzeżenie: błąd odczytu wallet.dat! Wszystkie klucze zostały odczytane, ale może brakować pewnych danych transakcji lub wpisów w książce adresowej lub mogą one być nieprawidłowe.</translation>
</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>Ostrzeżenie: Odtworzono dane z uszkodzonego pliku wallet.dat! Oryginalny wallet.dat został zapisany jako wallet.{timestamp}.bak w %s; jeśli twoje saldo lub transakcje są niepoprawne powinieneś odtworzyć kopię zapasową.</translation>
</message>
<message>
<location line="-30"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation>Próbuj odzyskać klucze prywatne z uszkodzonego wallet.dat</translation>
</message>
<message>
<location line="+4"/>
<source>Block creation options:</source>
<translation>Opcje tworzenia bloku:</translation>
</message>
<message>
<location line="-62"/>
<source>Connect only to the specified node(s)</source>
<translation>Łącz tylko do wskazanego węzła</translation>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>Odkryj własny adres IP (domyślnie: 1 kiedy w trybie nasłuchu i brak -externalip )</translation>
</message>
<message>
<location line="+94"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>Próba otwarcia jakiegokolwiek portu nie powiodła się. Użyj -listen=0 jeśli tego chcesz.</translation>
</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>Maksymalny bufor odbioru na połączenie, <n>*1000 bajtów (domyślnie: 5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>Maksymalny bufor wysyłu na połączenie, <n>*1000 bajtów (domyślnie: 1000)</translation>
</message>
<message>
<location line="-16"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>Łącz z węzłami tylko w sieci <net> (IPv4, IPv6 lub Tor)</translation>
</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>Opcje SSL: (odwiedź Bitcoin Wiki w celu uzyskania instrukcji)</translation>
</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>Wyślij informację/raport do konsoli zamiast do pliku debug.log.</translation>
</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>Ustaw minimalny rozmiar bloku w bajtach (domyślnie: 0)</translation>
</message>
<message>
<location line="-29"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>Zmniejsz plik debug.log przy starcie programu (domyślnie: 1 jeśli nie użyto -debug)</translation>
</message>
<message>
<location line="-42"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>Wskaż czas oczekiwania bezczynności połączenia w milisekundach (domyślnie: 5000)</translation>
</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>Używaj UPnP do mapowania portu nasłuchu (domyślnie: 0)</translation>
</message>
<message>
<location line="-1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>Używaj UPnP do mapowania portu nasłuchu (domyślnie: 1 gdy nasłuchuje)</translation>
</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>Nazwa użytkownika dla połączeń JSON-RPC</translation>
</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>Uwaga: Ta wersja jest przestarzała, aktualizacja wymagana!</translation>
</message>
<message>
<location line="-48"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat uszkodzony, odtworzenie się nie powiodło</translation>
</message>
<message>
<location line="-54"/>
<source>Password for JSON-RPC connections</source>
<translation>Hasło do połączeń JSON-RPC</translation>
</message>
<message>
<location line="-84"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=shadowcoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "ShadowCoin Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Find peers using internet relay chat (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>Przyjmuj połączenia JSON-RPC ze wskazanego adresu IP</translation>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Wysyłaj polecenia do węzła działającego na <ip> (domyślnie: 127.0.0.1)</translation>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Wykonaj polecenie kiedy najlepszy blok ulegnie zmianie (%s w komendzie zastanie zastąpione przez hash bloku)</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Wykonaj polecenie, kiedy transakcja portfela ulegnie zmianie (%s w poleceniu zostanie zastąpione przez TxID)</translation>
</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>Zaktualizuj portfel do najnowszego formatu.</translation>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Ustaw rozmiar puli kluczy na <n> (domyślnie: 100)</translation>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Przeskanuj blok łańcuchów żeby znaleźć zaginione transakcje portfela</translation>
</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>Użyj OpenSSL (https) do połączeń JSON-RPC</translation>
</message>
<message>
<location line="+1"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Plik certyfikatu serwera (domyślnie: server.cert)</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Klucz prywatny serwera (domyślnie: server.pem)</translation>
</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>Ta wiadomość pomocy</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>Nie można przywiązać %s na tym komputerze (bind returned error %d, %s)</translation>
</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>Zezwól -addnode, -seednode i -connect na łączenie się z serwerem DNS</translation>
</message>
<message>
<location line="+122"/>
<source>Loading addresses...</source>
<translation>Wczytywanie adresów...</translation>
</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>Błąd ładowania wallet.dat: Uszkodzony portfel</translation>
</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>Błąd ładowania wallet.dat</translation>
</message>
<message>
<location line="-16"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Nieprawidłowy adres -proxy: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Nieznana sieć w -onlynet: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation>Nieznana wersja proxy w -socks: %i</translation>
</message>
<message>
<location line="+4"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>Nie można uzyskać adresu -bind: '%s'</translation>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>Nie można uzyskać adresu -externalip: '%s'</translation>
</message>
<message>
<location line="-24"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Nieprawidłowa kwota dla -paytxfee=<amount>: '%s'</translation>
</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>Nieprawidłowa kwota</translation>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation>Niewystarczające środki</translation>
</message>
<message>
<location line="-34"/>
<source>Loading block index...</source>
<translation>Ładowanie indeksu bloku...</translation>
</message>
<message>
<location line="-103"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Dodaj węzeł do łączenia się and attempt to keep the connection open</translation>
</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>Wczytywanie portfela...</translation>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation>Nie można dezaktualizować portfela</translation>
</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>Nie można zapisać domyślnego adresu</translation>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation>Ponowne skanowanie...</translation>
</message>
<message>
<location line="+5"/>
<source>Done loading</source>
<translation>Wczytywanie zakończone</translation>
</message>
<message>
<location line="-167"/>
<source>To use the %s option</source>
<translation>Aby użyć opcji %s</translation>
</message>
<message>
<location line="+14"/>
<source>Error</source>
<translation>Błąd</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>Musisz ustawić rpcpassword=<hasło> w pliku configuracyjnym:
%s
Jeżeli plik nie istnieje, utwórz go z uprawnieniami właściciela-tylko-do-odczytu.</translation>
</message>
</context>
</TS> | hansacoin/hansacoin | src/qt/locale/bitcoin_pl.ts | TypeScript | mit | 119,674 |
The PDF includes all problems from the 2012 SoCal Regional ICPC.
We're only doing problem six this week! That's the one entitled "The Perks of Planning Ahead."
<a href="http://socalcontest.org/current/index.shtml" target="_blank">SoCal ICPC official website</a>
| acm-csuf/icpc | 2012-12-6-The_Perks_of_Planning_Ahead/notes.md | Markdown | mit | 263 |
#pragma once
#include "afxwin.h"
#include "CM5/ListCtrlEx.h"
#include "CM5/CStatic/staticex.h"
// CBoatMonitorViewer form view
class CBoatMonitorViewer : public CFormView
{
DECLARE_DYNCREATE(CBoatMonitorViewer)
public:
CBoatMonitorViewer(); // protected constructor used by dynamic creation
virtual ~CBoatMonitorViewer();
public:
enum { IDD = IDD_DIALOG_BOATMONITOR_VIEW };
#ifdef _DEBUG
virtual void AssertValid() const;
#ifndef _WIN32_WCE
virtual void Dump(CDumpContext& dc) const;
#endif
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
public:
void Fresh();
virtual void OnInitialUpdate();
CComboBox m_combox_zigbee;
CComboBox m_combox_channel;
CComboBox m_combox_brandrate;
ListCtrlEx::CListCtrlEx m_zigbee_list;
void Initial_List();
};
| temcocontrols/T3000_Building_Automation_System | T3000/BoatMonitorViewer.h | C | mit | 832 |
var axios = require('axios')
module.exports = function (app) {
app.get('/context_all.jsonld', function (req, res) {
axios.get(app.API_URL + 'context_all.jsonld')
.then(function (response) {
res.type('application/ld+json')
res.status(200).send(JSON.stringify(response.data, null, 2))
})
.catch(function (response) {
res.type('application/ld+json')
res.status(500).send('{}')
})
return
})
// other routes..
}
| nypl-registry/browse | routes/context.js | JavaScript | mit | 477 |
module Githu3
class Tag < Githu3::Resource
end
end
| sbellity/githu3 | lib/githu3/tag.rb | Ruby | mit | 55 |
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);
};
import { Component } from '@angular/core';
import { SettingsService } from "../../shared/service/settings.service";
import { DataService } from "../../shared/service/data.service";
var SettingsComponent = (function () {
function SettingsComponent(settingsService, dataService) {
this.settingsService = settingsService;
this.dataService = dataService;
// Do stuff
}
SettingsComponent.prototype.save = function () {
this.settingsService.save();
this.dataService.getParameterNames();
};
return SettingsComponent;
}());
SettingsComponent = __decorate([
Component({
selector: 'my-home',
templateUrl: 'settings.component.html',
styleUrls: ['settings.component.scss']
}),
__metadata("design:paramtypes", [SettingsService, DataService])
], SettingsComponent);
export { SettingsComponent };
//# sourceMappingURL=settings.component.js.map | Ragingart/TRage | src/app/page/settings/settings.component.js | JavaScript | mit | 1,673 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Reflection;
using System.Runtime.Serialization;
using System.Web.Http;
using System.Web.Http.Description;
using System.Xml.Serialization;
using Newtonsoft.Json;
namespace Betabit.Lora.Nuget.EventHub.Areas.HelpPage.ModelDescriptions
{
/// <summary>
/// Generates model descriptions for given types.
/// </summary>
public class ModelDescriptionGenerator
{
// Modify this to support more data annotation attributes.
private readonly IDictionary<Type, Func<object, string>> AnnotationTextGenerator = new Dictionary<Type, Func<object, string>>
{
{ typeof(RequiredAttribute), a => "Required" },
{ typeof(RangeAttribute), a =>
{
RangeAttribute range = (RangeAttribute)a;
return String.Format(CultureInfo.CurrentCulture, "Range: inclusive between {0} and {1}", range.Minimum, range.Maximum);
}
},
{ typeof(MaxLengthAttribute), a =>
{
MaxLengthAttribute maxLength = (MaxLengthAttribute)a;
return String.Format(CultureInfo.CurrentCulture, "Max length: {0}", maxLength.Length);
}
},
{ typeof(MinLengthAttribute), a =>
{
MinLengthAttribute minLength = (MinLengthAttribute)a;
return String.Format(CultureInfo.CurrentCulture, "Min length: {0}", minLength.Length);
}
},
{ typeof(StringLengthAttribute), a =>
{
StringLengthAttribute strLength = (StringLengthAttribute)a;
return String.Format(CultureInfo.CurrentCulture, "String length: inclusive between {0} and {1}", strLength.MinimumLength, strLength.MaximumLength);
}
},
{ typeof(DataTypeAttribute), a =>
{
DataTypeAttribute dataType = (DataTypeAttribute)a;
return String.Format(CultureInfo.CurrentCulture, "Data type: {0}", dataType.CustomDataType ?? dataType.DataType.ToString());
}
},
{ typeof(RegularExpressionAttribute), a =>
{
RegularExpressionAttribute regularExpression = (RegularExpressionAttribute)a;
return String.Format(CultureInfo.CurrentCulture, "Matching regular expression pattern: {0}", regularExpression.Pattern);
}
},
};
// Modify this to add more default documentations.
private readonly IDictionary<Type, string> DefaultTypeDocumentation = new Dictionary<Type, string>
{
{ typeof(Int16), "integer" },
{ typeof(Int32), "integer" },
{ typeof(Int64), "integer" },
{ typeof(UInt16), "unsigned integer" },
{ typeof(UInt32), "unsigned integer" },
{ typeof(UInt64), "unsigned integer" },
{ typeof(Byte), "byte" },
{ typeof(Char), "character" },
{ typeof(SByte), "signed byte" },
{ typeof(Uri), "URI" },
{ typeof(Single), "decimal number" },
{ typeof(Double), "decimal number" },
{ typeof(Decimal), "decimal number" },
{ typeof(String), "string" },
{ typeof(Guid), "globally unique identifier" },
{ typeof(TimeSpan), "time interval" },
{ typeof(DateTime), "date" },
{ typeof(DateTimeOffset), "date" },
{ typeof(Boolean), "boolean" },
};
private Lazy<IModelDocumentationProvider> _documentationProvider;
public ModelDescriptionGenerator(HttpConfiguration config)
{
if (config == null)
{
throw new ArgumentNullException("config");
}
_documentationProvider = new Lazy<IModelDocumentationProvider>(() => config.Services.GetDocumentationProvider() as IModelDocumentationProvider);
GeneratedModels = new Dictionary<string, ModelDescription>(StringComparer.OrdinalIgnoreCase);
}
public Dictionary<string, ModelDescription> GeneratedModels { get; private set; }
private IModelDocumentationProvider DocumentationProvider
{
get
{
return _documentationProvider.Value;
}
}
public ModelDescription GetOrCreateModelDescription(Type modelType)
{
if (modelType == null)
{
throw new ArgumentNullException("modelType");
}
Type underlyingType = Nullable.GetUnderlyingType(modelType);
if (underlyingType != null)
{
modelType = underlyingType;
}
ModelDescription modelDescription;
string modelName = ModelNameHelper.GetModelName(modelType);
if (GeneratedModels.TryGetValue(modelName, out modelDescription))
{
if (modelType != modelDescription.ModelType)
{
throw new InvalidOperationException(
String.Format(
CultureInfo.CurrentCulture,
"A model description could not be created. Duplicate model name '{0}' was found for types '{1}' and '{2}'. " +
"Use the [ModelName] attribute to change the model name for at least one of the types so that it has a unique name.",
modelName,
modelDescription.ModelType.FullName,
modelType.FullName));
}
return modelDescription;
}
if (DefaultTypeDocumentation.ContainsKey(modelType))
{
return GenerateSimpleTypeModelDescription(modelType);
}
if (modelType.IsEnum)
{
return GenerateEnumTypeModelDescription(modelType);
}
if (modelType.IsGenericType)
{
Type[] genericArguments = modelType.GetGenericArguments();
if (genericArguments.Length == 1)
{
Type enumerableType = typeof(IEnumerable<>).MakeGenericType(genericArguments);
if (enumerableType.IsAssignableFrom(modelType))
{
return GenerateCollectionModelDescription(modelType, genericArguments[0]);
}
}
if (genericArguments.Length == 2)
{
Type dictionaryType = typeof(IDictionary<,>).MakeGenericType(genericArguments);
if (dictionaryType.IsAssignableFrom(modelType))
{
return GenerateDictionaryModelDescription(modelType, genericArguments[0], genericArguments[1]);
}
Type keyValuePairType = typeof(KeyValuePair<,>).MakeGenericType(genericArguments);
if (keyValuePairType.IsAssignableFrom(modelType))
{
return GenerateKeyValuePairModelDescription(modelType, genericArguments[0], genericArguments[1]);
}
}
}
if (modelType.IsArray)
{
Type elementType = modelType.GetElementType();
return GenerateCollectionModelDescription(modelType, elementType);
}
if (modelType == typeof(NameValueCollection))
{
return GenerateDictionaryModelDescription(modelType, typeof(string), typeof(string));
}
if (typeof(IDictionary).IsAssignableFrom(modelType))
{
return GenerateDictionaryModelDescription(modelType, typeof(object), typeof(object));
}
if (typeof(IEnumerable).IsAssignableFrom(modelType))
{
return GenerateCollectionModelDescription(modelType, typeof(object));
}
return GenerateComplexTypeModelDescription(modelType);
}
// Change this to provide different name for the member.
private static string GetMemberName(MemberInfo member, bool hasDataContractAttribute)
{
JsonPropertyAttribute jsonProperty = member.GetCustomAttribute<JsonPropertyAttribute>();
if (jsonProperty != null && !String.IsNullOrEmpty(jsonProperty.PropertyName))
{
return jsonProperty.PropertyName;
}
if (hasDataContractAttribute)
{
DataMemberAttribute dataMember = member.GetCustomAttribute<DataMemberAttribute>();
if (dataMember != null && !String.IsNullOrEmpty(dataMember.Name))
{
return dataMember.Name;
}
}
return member.Name;
}
private static bool ShouldDisplayMember(MemberInfo member, bool hasDataContractAttribute)
{
JsonIgnoreAttribute jsonIgnore = member.GetCustomAttribute<JsonIgnoreAttribute>();
XmlIgnoreAttribute xmlIgnore = member.GetCustomAttribute<XmlIgnoreAttribute>();
IgnoreDataMemberAttribute ignoreDataMember = member.GetCustomAttribute<IgnoreDataMemberAttribute>();
NonSerializedAttribute nonSerialized = member.GetCustomAttribute<NonSerializedAttribute>();
ApiExplorerSettingsAttribute apiExplorerSetting = member.GetCustomAttribute<ApiExplorerSettingsAttribute>();
bool hasMemberAttribute = member.DeclaringType.IsEnum ?
member.GetCustomAttribute<EnumMemberAttribute>() != null :
member.GetCustomAttribute<DataMemberAttribute>() != null;
// Display member only if all the followings are true:
// no JsonIgnoreAttribute
// no XmlIgnoreAttribute
// no IgnoreDataMemberAttribute
// no NonSerializedAttribute
// no ApiExplorerSettingsAttribute with IgnoreApi set to true
// no DataContractAttribute without DataMemberAttribute or EnumMemberAttribute
return jsonIgnore == null &&
xmlIgnore == null &&
ignoreDataMember == null &&
nonSerialized == null &&
(apiExplorerSetting == null || !apiExplorerSetting.IgnoreApi) &&
(!hasDataContractAttribute || hasMemberAttribute);
}
private string CreateDefaultDocumentation(Type type)
{
string documentation;
if (DefaultTypeDocumentation.TryGetValue(type, out documentation))
{
return documentation;
}
if (DocumentationProvider != null)
{
documentation = DocumentationProvider.GetDocumentation(type);
}
return documentation;
}
private void GenerateAnnotations(MemberInfo property, ParameterDescription propertyModel)
{
List<ParameterAnnotation> annotations = new List<ParameterAnnotation>();
IEnumerable<Attribute> attributes = property.GetCustomAttributes();
foreach (Attribute attribute in attributes)
{
Func<object, string> textGenerator;
if (AnnotationTextGenerator.TryGetValue(attribute.GetType(), out textGenerator))
{
annotations.Add(
new ParameterAnnotation
{
AnnotationAttribute = attribute,
Documentation = textGenerator(attribute)
});
}
}
// Rearrange the annotations
annotations.Sort((x, y) =>
{
// Special-case RequiredAttribute so that it shows up on top
if (x.AnnotationAttribute is RequiredAttribute)
{
return -1;
}
if (y.AnnotationAttribute is RequiredAttribute)
{
return 1;
}
// Sort the rest based on alphabetic order of the documentation
return String.Compare(x.Documentation, y.Documentation, StringComparison.OrdinalIgnoreCase);
});
foreach (ParameterAnnotation annotation in annotations)
{
propertyModel.Annotations.Add(annotation);
}
}
private CollectionModelDescription GenerateCollectionModelDescription(Type modelType, Type elementType)
{
ModelDescription collectionModelDescription = GetOrCreateModelDescription(elementType);
if (collectionModelDescription != null)
{
return new CollectionModelDescription
{
Name = ModelNameHelper.GetModelName(modelType),
ModelType = modelType,
ElementDescription = collectionModelDescription
};
}
return null;
}
private ModelDescription GenerateComplexTypeModelDescription(Type modelType)
{
ComplexTypeModelDescription complexModelDescription = new ComplexTypeModelDescription
{
Name = ModelNameHelper.GetModelName(modelType),
ModelType = modelType,
Documentation = CreateDefaultDocumentation(modelType)
};
GeneratedModels.Add(complexModelDescription.Name, complexModelDescription);
bool hasDataContractAttribute = modelType.GetCustomAttribute<DataContractAttribute>() != null;
PropertyInfo[] properties = modelType.GetProperties(BindingFlags.Public | BindingFlags.Instance);
foreach (PropertyInfo property in properties)
{
if (ShouldDisplayMember(property, hasDataContractAttribute))
{
ParameterDescription propertyModel = new ParameterDescription
{
Name = GetMemberName(property, hasDataContractAttribute)
};
if (DocumentationProvider != null)
{
propertyModel.Documentation = DocumentationProvider.GetDocumentation(property);
}
GenerateAnnotations(property, propertyModel);
complexModelDescription.Properties.Add(propertyModel);
propertyModel.TypeDescription = GetOrCreateModelDescription(property.PropertyType);
}
}
FieldInfo[] fields = modelType.GetFields(BindingFlags.Public | BindingFlags.Instance);
foreach (FieldInfo field in fields)
{
if (ShouldDisplayMember(field, hasDataContractAttribute))
{
ParameterDescription propertyModel = new ParameterDescription
{
Name = GetMemberName(field, hasDataContractAttribute)
};
if (DocumentationProvider != null)
{
propertyModel.Documentation = DocumentationProvider.GetDocumentation(field);
}
complexModelDescription.Properties.Add(propertyModel);
propertyModel.TypeDescription = GetOrCreateModelDescription(field.FieldType);
}
}
return complexModelDescription;
}
private DictionaryModelDescription GenerateDictionaryModelDescription(Type modelType, Type keyType, Type valueType)
{
ModelDescription keyModelDescription = GetOrCreateModelDescription(keyType);
ModelDescription valueModelDescription = GetOrCreateModelDescription(valueType);
return new DictionaryModelDescription
{
Name = ModelNameHelper.GetModelName(modelType),
ModelType = modelType,
KeyModelDescription = keyModelDescription,
ValueModelDescription = valueModelDescription
};
}
private EnumTypeModelDescription GenerateEnumTypeModelDescription(Type modelType)
{
EnumTypeModelDescription enumDescription = new EnumTypeModelDescription
{
Name = ModelNameHelper.GetModelName(modelType),
ModelType = modelType,
Documentation = CreateDefaultDocumentation(modelType)
};
bool hasDataContractAttribute = modelType.GetCustomAttribute<DataContractAttribute>() != null;
foreach (FieldInfo field in modelType.GetFields(BindingFlags.Public | BindingFlags.Static))
{
if (ShouldDisplayMember(field, hasDataContractAttribute))
{
EnumValueDescription enumValue = new EnumValueDescription
{
Name = field.Name,
Value = field.GetRawConstantValue().ToString()
};
if (DocumentationProvider != null)
{
enumValue.Documentation = DocumentationProvider.GetDocumentation(field);
}
enumDescription.Values.Add(enumValue);
}
}
GeneratedModels.Add(enumDescription.Name, enumDescription);
return enumDescription;
}
private KeyValuePairModelDescription GenerateKeyValuePairModelDescription(Type modelType, Type keyType, Type valueType)
{
ModelDescription keyModelDescription = GetOrCreateModelDescription(keyType);
ModelDescription valueModelDescription = GetOrCreateModelDescription(valueType);
return new KeyValuePairModelDescription
{
Name = ModelNameHelper.GetModelName(modelType),
ModelType = modelType,
KeyModelDescription = keyModelDescription,
ValueModelDescription = valueModelDescription
};
}
private ModelDescription GenerateSimpleTypeModelDescription(Type modelType)
{
SimpleTypeModelDescription simpleModelDescription = new SimpleTypeModelDescription
{
Name = ModelNameHelper.GetModelName(modelType),
ModelType = modelType,
Documentation = CreateDefaultDocumentation(modelType)
};
GeneratedModels.Add(simpleModelDescription.Name, simpleModelDescription);
return simpleModelDescription;
}
}
} | kpnlora/LoRaClient | examples/Betabit EventHub Example/Betabit.Lora.Nuget.EventHub/Betabit.Lora.Nuget.EventHub/Areas/HelpPage/ModelDescriptions/ModelDescriptionGenerator.cs | C# | mit | 19,100 |
<?php
\Larakit\StaticFiles\Manager::package('larakit/sf-grid')
->cssPackage('lk-grid.css')
->setSourceDir('public'); | larakit/sf-grid | init.php | PHP | mit | 124 |
package containerservice
// 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"
)
// MaintenanceConfigurationsClient is the the Container Service Client.
type MaintenanceConfigurationsClient struct {
BaseClient
}
// NewMaintenanceConfigurationsClient creates an instance of the MaintenanceConfigurationsClient client.
func NewMaintenanceConfigurationsClient(subscriptionID string) MaintenanceConfigurationsClient {
return NewMaintenanceConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewMaintenanceConfigurationsClientWithBaseURI creates an instance of the MaintenanceConfigurationsClient 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 NewMaintenanceConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) MaintenanceConfigurationsClient {
return MaintenanceConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate sends the create or update request.
// Parameters:
// resourceGroupName - the name of the resource group.
// resourceName - the name of the managed cluster resource.
// configName - the name of the maintenance configuration.
// parameters - the maintenance configuration to create or update.
func (client MaintenanceConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, configName string, parameters MaintenanceConfiguration) (result MaintenanceConfiguration, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationsClient.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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
{Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
return result, validation.NewError("containerservice.MaintenanceConfigurationsClient", "CreateOrUpdate", err.Error())
}
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, configName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request")
return
}
resp, err := client.CreateOrUpdateSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "CreateOrUpdate", resp, "Failure sending request")
return
}
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "CreateOrUpdate", resp, "Failure responding to request")
return
}
return
}
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client MaintenanceConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, configName string, parameters MaintenanceConfiguration) (*http.Request, error) {
pathParameters := map[string]interface{}{
"configName": autorest.Encode("path", configName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"resourceName": autorest.Encode("path", resourceName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-10-01"
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.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", 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 MaintenanceConfigurationsClient) 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 MaintenanceConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result MaintenanceConfiguration, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Delete sends the delete request.
// Parameters:
// resourceGroupName - the name of the resource group.
// resourceName - the name of the managed cluster resource.
// configName - the name of the maintenance configuration.
func (client MaintenanceConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, configName string) (result autorest.Response, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationsClient.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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
{Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
return result, validation.NewError("containerservice.MaintenanceConfigurationsClient", "Delete", err.Error())
}
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, configName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Delete", nil, "Failure preparing request")
return
}
resp, err := client.DeleteSender(req)
if err != nil {
result.Response = resp
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Delete", resp, "Failure sending request")
return
}
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Delete", resp, "Failure responding to request")
return
}
return
}
// DeletePreparer prepares the Delete request.
func (client MaintenanceConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, configName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"configName": autorest.Encode("path", configName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"resourceName": autorest.Encode("path", resourceName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", 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 MaintenanceConfigurationsClient) 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 MaintenanceConfigurationsClient) 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
}
// Get sends the get request.
// Parameters:
// resourceGroupName - the name of the resource group.
// resourceName - the name of the managed cluster resource.
// configName - the name of the maintenance configuration.
func (client MaintenanceConfigurationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, configName string) (result MaintenanceConfiguration, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationsClient.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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
{Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
return result, validation.NewError("containerservice.MaintenanceConfigurationsClient", "Get", err.Error())
}
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, configName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Get", nil, "Failure preparing request")
return
}
resp, err := client.GetSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Get", resp, "Failure responding to request")
return
}
return
}
// GetPreparer prepares the Get request.
func (client MaintenanceConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, configName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"configName": autorest.Encode("path", configName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"resourceName": autorest.Encode("path", resourceName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-10-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.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", 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 MaintenanceConfigurationsClient) 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 MaintenanceConfigurationsClient) GetResponder(resp *http.Response) (result MaintenanceConfiguration, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListByManagedCluster sends the list by managed cluster request.
// Parameters:
// resourceGroupName - the name of the resource group.
// resourceName - the name of the managed cluster resource.
func (client MaintenanceConfigurationsClient) ListByManagedCluster(ctx context.Context, resourceGroupName string, resourceName string) (result MaintenanceConfigurationListResultPage, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationsClient.ListByManagedCluster")
defer func() {
sc := -1
if result.mclr.Response.Response != nil {
sc = result.mclr.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: resourceName,
Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
{Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
{Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
return result, validation.NewError("containerservice.MaintenanceConfigurationsClient", "ListByManagedCluster", err.Error())
}
result.fn = client.listByManagedClusterNextResults
req, err := client.ListByManagedClusterPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "ListByManagedCluster", nil, "Failure preparing request")
return
}
resp, err := client.ListByManagedClusterSender(req)
if err != nil {
result.mclr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "ListByManagedCluster", resp, "Failure sending request")
return
}
result.mclr, err = client.ListByManagedClusterResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "ListByManagedCluster", resp, "Failure responding to request")
return
}
if result.mclr.hasNextLink() && result.mclr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
}
// ListByManagedClusterPreparer prepares the ListByManagedCluster request.
func (client MaintenanceConfigurationsClient) ListByManagedClusterPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"resourceName": autorest.Encode("path", resourceName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-10-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.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// ListByManagedClusterSender sends the ListByManagedCluster request. The method will close the
// http.Response Body if it receives an error.
func (client MaintenanceConfigurationsClient) ListByManagedClusterSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByManagedClusterResponder handles the response to the ListByManagedCluster request. The method always
// closes the http.Response Body.
func (client MaintenanceConfigurationsClient) ListByManagedClusterResponder(resp *http.Response) (result MaintenanceConfigurationListResult, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// listByManagedClusterNextResults retrieves the next set of results, if any.
func (client MaintenanceConfigurationsClient) listByManagedClusterNextResults(ctx context.Context, lastResults MaintenanceConfigurationListResult) (result MaintenanceConfigurationListResult, err error) {
req, err := lastResults.maintenanceConfigurationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "listByManagedClusterNextResults", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListByManagedClusterSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "listByManagedClusterNextResults", resp, "Failure sending next results request")
}
result, err = client.ListByManagedClusterResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "listByManagedClusterNextResults", resp, "Failure responding to next results request")
}
return
}
// ListByManagedClusterComplete enumerates all values, automatically crossing page boundaries as required.
func (client MaintenanceConfigurationsClient) ListByManagedClusterComplete(ctx context.Context, resourceGroupName string, resourceName string) (result MaintenanceConfigurationListResultIterator, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationsClient.ListByManagedCluster")
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.ListByManagedCluster(ctx, resourceGroupName, resourceName)
return
}
| Azure/azure-sdk-for-go | services/containerservice/mgmt/2021-10-01/containerservice/maintenanceconfigurations.go | GO | mit | 19,659 |
'use strict';
import React from 'react-native'
import {
AppRegistry,
Component,
Navigator,
ToolbarAndroid,
View,
} from 'react-native';
import globalStyle, { colors } from './globalStyle';
class NavBar extends Component {
onClickBackToHome() {
this.props.navigator.push({
name: 'home',
sceneConfig: Navigator.SceneConfigs.FloatFromLeft,
});
}
getToolbarActions(route) {
const actionsByRoute = {
'home': [],
'boop-view': [{
title: 'Back',
show: 'always'
}],
}
if (actionsByRoute[route.name]) {
return actionsByRoute[route.name];
}
return [];
}
render() {
const { navigator } = this.props;
const currentRoute = navigator.getCurrentRoutes()[navigator.getCurrentRoutes().length - 1];
const toolbarActions = this.getToolbarActions(currentRoute);
return (
<ToolbarAndroid
style={globalStyle.toolbar}
title='boop'
titleColor={colors.darkTheme.text1}
actions={toolbarActions}
onActionSelected={this.onClickBackToHome.bind(this)}
/>
);
}
};
AppRegistry.registerComponent('NavBar', () => NavBar);
export default NavBar;
| kmjennison/boop | components/NavBar.js | JavaScript | mit | 1,192 |
<?php
namespace App;
use App\models\User;
use Illuminate\Database\Eloquent\Model;
class InstDepartment extends Model
{
public static function get_departments_by_inst_id($id)
{
$departments = InstDepartment::where('institution_id', $id)->get();
return $departments;
}
public static function get_departments_by_inst_id_with_faculty($id)
{
$departments = InstDepartment::where('institution_id', $id)->get();
$iterator = 0;
foreach ($departments as $department)
{
$users = UserDept::get_user_objects_by_dept_id($department['id']);
$departments[$iterator]['users'] = $users;
$dept_head = User::get_user_by_id($department['dept_head_id']);
$departments[$iterator]['head'] = $dept_head;
$iterator++;
}
return $departments;
}
public static function get_all_departments()
{
$departments = InstDepartment::all();
return $departments;
}
public static function get_all_departments_with_faculty()
{
$departments = InstDepartment::all();
$iterator = 0;
foreach ($departments as $department)
{
$users = UserDept::get_users_by_dept_id($department['id']);
$departments[$iterator]['users'] = $users;
$iterator++;
}
return $departments;
}
public static function add_department($input)
{
// dd($input);
$department = new InstDepartment;
$department->institution_id = $input['institution_id'];
$department->department_name = $input['dept_name'];
$department->dept_head_id = $input['dept_head_id'];
$department->save();
}
public static function remove_department($input)
{
$department = InstDepartment::find($input['department_id']);
$department->delete();
}
public static function update_department($input)
{
$department = InstDepartment::find($input['department_id']);
$department->institution_id = $input['institution_id'];
$department->department_name = $input['dept_name'];
$department->dept_head_id = $input['dept_head_id'];
$department->save();
}
public static function update_department_faculty($input)
{
if($input['action'] == 'delete')
{
$user_dept = UserDept::find('id', $input['user_dept_id']);
$user_dept->delete();
}
if($input['action'] == 'insert')
{
$user_dept = new UserDept();
$user_dept->user_id = $input['user_id'];
$user_dept->department_id = $input['dept_id'];
$user_dept->save();
}
}
}
| Webnician/EduForum | app/InstDepartment.php | PHP | mit | 2,871 |
# Copyright (c) 2015 Jean Dias
require 'test_helper'
class PublicidadesControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
end
| jeanmfdias/blog-initial | test/controllers/publicidades_controller_test.rb | Ruby | mit | 171 |
class CreateTakedowns < ActiveRecord::Migration[5.0]
def change
create_table :takedowns do |t|
t.integer :linked_account_id, null: false
t.timestamps
end
end
end
| bountysource/core | db/migrate/20171126185423_create_takedowns.rb | Ruby | mit | 186 |
/* Copyright (c) 2002-2010 Dovecot authors, see the included COPYING file */
/* @UNSAFE: whole file */
#include "lib.h"
#include "ioloop.h"
#include "write-full.h"
#include "network.h"
#include "sendfile-util.h"
#include "istream.h"
#include "istream-internal.h"
#include "ostream-internal.h"
#include <unistd.h>
#include <sys/stat.h>
#ifdef HAVE_SYS_UIO_H
# include <sys/uio.h>
#endif
/* try to keep the buffer size within 4k..128k. ReiserFS may actually return
128k as optimal size. */
#define DEFAULT_OPTIMAL_BLOCK_SIZE IO_BLOCK_SIZE
#define MAX_OPTIMAL_BLOCK_SIZE (128*1024)
#define IS_STREAM_EMPTY(fstream) \
((fstream)->head == (fstream)->tail && !(fstream)->full)
#define MAX_SSIZE_T(size) \
((size) < SSIZE_T_MAX ? (size_t)(size) : SSIZE_T_MAX)
struct file_ostream {
struct ostream_private ostream;
int fd;
struct io *io;
uoff_t buffer_offset;
uoff_t real_offset;
unsigned char *buffer; /* ring-buffer */
size_t buffer_size, optimal_block_size;
size_t head, tail; /* first unsent/unused byte */
unsigned int full:1; /* if head == tail, is buffer empty or full? */
unsigned int file:1;
unsigned int flush_pending:1;
unsigned int socket_cork_set:1;
unsigned int no_socket_cork:1;
unsigned int no_sendfile:1;
unsigned int autoclose_fd:1;
};
static void stream_send_io(struct file_ostream *fstream);
static void stream_closed(struct file_ostream *fstream)
{
if (fstream->io != NULL)
io_remove(&fstream->io);
if (fstream->autoclose_fd && fstream->fd != -1) {
if (close(fstream->fd) < 0) {
i_error("file_ostream.close(%s) failed: %m",
o_stream_get_name(&fstream->ostream.ostream));
}
}
fstream->fd = -1;
fstream->ostream.ostream.closed = TRUE;
}
static void o_stream_file_close(struct iostream_private *stream)
{
struct file_ostream *fstream = (struct file_ostream *)stream;
/* flush output before really closing it */
o_stream_flush(&fstream->ostream.ostream);
stream_closed(fstream);
}
static void o_stream_file_destroy(struct iostream_private *stream)
{
struct file_ostream *fstream = (struct file_ostream *)stream;
i_free(fstream->buffer);
}
static size_t file_buffer_get_used_size(struct file_ostream *fstream)
{
if (fstream->head == fstream->tail)
return fstream->full ? fstream->buffer_size : 0;
else if (fstream->head < fstream->tail) {
/* ...HXXXT... */
return fstream->tail - fstream->head;
} else {
/* XXXT...HXXX */
return fstream->tail +
(fstream->buffer_size - fstream->head);
}
}
static void update_buffer(struct file_ostream *fstream, size_t size)
{
size_t used;
if (IS_STREAM_EMPTY(fstream) || size == 0)
return;
if (fstream->head < fstream->tail) {
/* ...HXXXT... */
used = fstream->tail - fstream->head;
i_assert(size <= used);
fstream->head += size;
} else {
/* XXXT...HXXX */
used = fstream->buffer_size - fstream->head;
if (size > used) {
size -= used;
i_assert(size <= fstream->tail);
fstream->head = size;
} else {
fstream->head += size;
}
fstream->full = FALSE;
}
if (fstream->head == fstream->tail)
fstream->head = fstream->tail = 0;
if (fstream->head == fstream->buffer_size)
fstream->head = 0;
}
static void o_stream_socket_cork(struct file_ostream *fstream)
{
if (fstream->ostream.corked && !fstream->socket_cork_set) {
if (!fstream->no_socket_cork) {
if (net_set_cork(fstream->fd, TRUE) < 0)
fstream->no_socket_cork = TRUE;
else
fstream->socket_cork_set = TRUE;
}
}
}
static int o_stream_lseek(struct file_ostream *fstream)
{
off_t ret;
if (fstream->real_offset == fstream->buffer_offset)
return 0;
ret = lseek(fstream->fd, (off_t)fstream->buffer_offset, SEEK_SET);
if (ret < 0) {
fstream->ostream.ostream.stream_errno = errno;
return -1;
}
if (ret != (off_t)fstream->buffer_offset) {
fstream->ostream.ostream.stream_errno = EINVAL;
return -1;
}
fstream->real_offset = fstream->buffer_offset;
return 0;
}
static ssize_t o_stream_writev(struct file_ostream *fstream,
const struct const_iovec *iov, int iov_size)
{
ssize_t ret, ret2;
size_t size, sent;
bool partial;
int i;
o_stream_socket_cork(fstream);
if (iov_size == 1) {
if (!fstream->file ||
fstream->real_offset == fstream->buffer_offset) {
ret = write(fstream->fd, iov->iov_base, iov->iov_len);
if (ret > 0)
fstream->real_offset += ret;
} else {
ret = pwrite(fstream->fd, iov->iov_base, iov->iov_len,
fstream->buffer_offset);
}
partial = ret != (ssize_t)iov->iov_len;
} else {
if (o_stream_lseek(fstream) < 0)
return -1;
sent = 0; partial = FALSE;
while (iov_size > IOV_MAX) {
size = 0;
for (i = 0; i < IOV_MAX; i++)
size += iov[i].iov_len;
ret = writev(fstream->fd, (const struct iovec *)iov,
IOV_MAX);
if (ret != (ssize_t)size) {
partial = TRUE;
break;
}
fstream->real_offset += ret;
fstream->buffer_offset += ret;
sent += ret;
iov += IOV_MAX;
iov_size -= IOV_MAX;
}
if (iov_size <= IOV_MAX) {
size = 0;
for (i = 0; i < iov_size; i++)
size += iov[i].iov_len;
ret = writev(fstream->fd, (const struct iovec *)iov,
iov_size);
partial = ret != (ssize_t)size;
}
if (ret > 0) {
fstream->real_offset += ret;
ret += sent;
} else if (!fstream->file && sent > 0) {
/* return what we managed to get sent */
ret = sent;
}
}
if (ret < 0) {
if (errno == EAGAIN || errno == EINTR)
return 0;
fstream->ostream.ostream.stream_errno = errno;
stream_closed(fstream);
return -1;
}
if (unlikely(ret == 0 && fstream->file)) {
/* assume out of disk space */
fstream->ostream.ostream.stream_errno = ENOSPC;
stream_closed(fstream);
return -1;
}
fstream->buffer_offset += ret;
if (partial && fstream->file) {
/* we failed to write everything to a file. either we ran out
of disk space or we're writing to NFS. try to write the
rest to resolve this. */
size = ret;
while (iov_size > 0 && size >= iov->iov_len) {
size -= iov->iov_len;
iov++;
iov_size--;
}
i_assert(iov_size > 0);
if (size == 0)
ret2 = o_stream_writev(fstream, iov, iov_size);
else {
/* write the first iov separately */
struct const_iovec new_iov;
new_iov.iov_base =
CONST_PTR_OFFSET(iov->iov_base, size);
new_iov.iov_len = iov->iov_len - size;
ret2 = o_stream_writev(fstream, &new_iov, 1);
if (ret2 > 0) {
i_assert((size_t)ret2 == new_iov.iov_len);
/* write the rest */
if (iov_size > 1) {
ret += ret2;
ret2 = o_stream_writev(fstream, iov + 1,
iov_size - 1);
}
}
}
if (ret2 <= 0)
return ret2;
ret += ret2;
}
return ret;
}
/* returns how much of vector was used */
static int o_stream_fill_iovec(struct file_ostream *fstream,
struct const_iovec iov[2])
{
if (IS_STREAM_EMPTY(fstream))
return 0;
if (fstream->head < fstream->tail) {
iov[0].iov_base = fstream->buffer + fstream->head;
iov[0].iov_len = fstream->tail - fstream->head;
return 1;
} else {
iov[0].iov_base = fstream->buffer + fstream->head;
iov[0].iov_len = fstream->buffer_size - fstream->head;
if (fstream->tail == 0)
return 1;
else {
iov[1].iov_base = fstream->buffer;
iov[1].iov_len = fstream->tail;
return 2;
}
}
}
static int buffer_flush(struct file_ostream *fstream)
{
struct const_iovec iov[2];
int iov_len;
ssize_t ret;
iov_len = o_stream_fill_iovec(fstream, iov);
if (iov_len > 0) {
ret = o_stream_writev(fstream, iov, iov_len);
if (ret < 0)
return -1;
update_buffer(fstream, ret);
}
return IS_STREAM_EMPTY(fstream) ? 1 : 0;
}
static void o_stream_file_cork(struct ostream_private *stream, bool set)
{
struct file_ostream *fstream = (struct file_ostream *)stream;
int ret;
if (stream->corked != set && !stream->ostream.closed) {
if (set && fstream->io != NULL)
io_remove(&fstream->io);
else if (!set) {
/* buffer flushing might close the stream */
ret = buffer_flush(fstream);
if (fstream->io == NULL &&
(ret == 0 || fstream->flush_pending) &&
!stream->ostream.closed) {
fstream->io = io_add(fstream->fd, IO_WRITE,
stream_send_io, fstream);
}
}
if (fstream->socket_cork_set) {
i_assert(!set);
if (net_set_cork(fstream->fd, FALSE) < 0)
fstream->no_socket_cork = TRUE;
fstream->socket_cork_set = FALSE;
}
stream->corked = set;
}
}
static int o_stream_file_flush(struct ostream_private *stream)
{
struct file_ostream *fstream = (struct file_ostream *) stream;
return buffer_flush(fstream);
}
static void
o_stream_file_flush_pending(struct ostream_private *stream, bool set)
{
struct file_ostream *fstream = (struct file_ostream *) stream;
fstream->flush_pending = set;
if (set && !stream->corked && fstream->io == NULL) {
fstream->io = io_add(fstream->fd, IO_WRITE,
stream_send_io, fstream);
}
}
static size_t get_unused_space(const struct file_ostream *fstream)
{
if (fstream->head > fstream->tail) {
/* XXXT...HXXX */
return fstream->head - fstream->tail;
} else if (fstream->head < fstream->tail) {
/* ...HXXXT... */
return (fstream->buffer_size - fstream->tail) + fstream->head;
} else {
/* either fully unused or fully used */
return fstream->full ? 0 : fstream->buffer_size;
}
}
static size_t o_stream_file_get_used_size(const struct ostream_private *stream)
{
const struct file_ostream *fstream =
(const struct file_ostream *)stream;
return fstream->buffer_size - get_unused_space(fstream);
}
static int o_stream_file_seek(struct ostream_private *stream, uoff_t offset)
{
struct file_ostream *fstream = (struct file_ostream *)stream;
if (offset > OFF_T_MAX || !fstream->file) {
stream->ostream.stream_errno = EINVAL;
return -1;
}
if (buffer_flush(fstream) < 0)
return -1;
stream->ostream.offset = offset;
fstream->buffer_offset = offset;
return 1;
}
static void o_stream_grow_buffer(struct file_ostream *fstream, size_t bytes)
{
size_t size, new_size, end_size;
size = nearest_power(fstream->buffer_size + bytes);
if (size > fstream->ostream.max_buffer_size) {
/* limit the size */
size = fstream->ostream.max_buffer_size;
} else if (fstream->ostream.corked) {
/* try to use optimal buffer size with corking */
new_size = I_MIN(fstream->optimal_block_size,
fstream->ostream.max_buffer_size);
if (new_size > size)
size = new_size;
}
if (size <= fstream->buffer_size)
return;
fstream->buffer = i_realloc(fstream->buffer,
fstream->buffer_size, size);
if (fstream->tail <= fstream->head && !IS_STREAM_EMPTY(fstream)) {
/* move head forward to end of buffer */
end_size = fstream->buffer_size - fstream->head;
memmove(fstream->buffer + size - end_size,
fstream->buffer + fstream->head, end_size);
fstream->head = size - end_size;
}
fstream->full = FALSE;
fstream->buffer_size = size;
}
static void stream_send_io(struct file_ostream *fstream)
{
struct ostream *ostream = &fstream->ostream.ostream;
int ret;
/* Set flush_pending = FALSE first before calling the flush callback,
and change it to TRUE only if callback returns 0. That way the
callback can call o_stream_set_flush_pending() again and we don't
forget it even if flush callback returns 1. */
fstream->flush_pending = FALSE;
o_stream_ref(ostream);
if (fstream->ostream.callback != NULL)
ret = fstream->ostream.callback(fstream->ostream.context);
else
ret = o_stream_file_flush(&fstream->ostream);
if (ret == 0)
fstream->flush_pending = TRUE;
if (!fstream->flush_pending && IS_STREAM_EMPTY(fstream)) {
if (fstream->io != NULL) {
/* all sent */
io_remove(&fstream->io);
}
} else if (!fstream->ostream.ostream.closed) {
/* Add the IO handler if it's not there already. Callback
might have just returned 0 without there being any data
to be sent. */
if (fstream->io == NULL) {
fstream->io = io_add(fstream->fd, IO_WRITE,
stream_send_io, fstream);
}
}
o_stream_unref(&ostream);
}
static size_t o_stream_add(struct file_ostream *fstream,
const void *data, size_t size)
{
size_t unused, sent;
int i;
unused = get_unused_space(fstream);
if (unused < size)
o_stream_grow_buffer(fstream, size-unused);
sent = 0;
for (i = 0; i < 2 && sent < size && !fstream->full; i++) {
unused = fstream->tail >= fstream->head ?
fstream->buffer_size - fstream->tail :
fstream->head - fstream->tail;
if (unused > size-sent)
unused = size-sent;
memcpy(fstream->buffer + fstream->tail,
CONST_PTR_OFFSET(data, sent), unused);
sent += unused;
fstream->tail += unused;
if (fstream->tail == fstream->buffer_size)
fstream->tail = 0;
if (fstream->head == fstream->tail)
fstream->full = TRUE;
}
if (sent != 0 && fstream->io == NULL &&
!fstream->ostream.corked && !fstream->file) {
fstream->io = io_add(fstream->fd, IO_WRITE, stream_send_io,
fstream);
}
return sent;
}
static ssize_t o_stream_file_sendv(struct ostream_private *stream,
const struct const_iovec *iov,
unsigned int iov_count)
{
struct file_ostream *fstream = (struct file_ostream *)stream;
size_t size, total_size, added, optimal_size;
unsigned int i;
ssize_t ret = 0;
for (i = 0, size = 0; i < iov_count; i++)
size += iov[i].iov_len;
total_size = size;
if (size > get_unused_space(fstream) && !IS_STREAM_EMPTY(fstream)) {
if (o_stream_file_flush(stream) < 0)
return -1;
}
optimal_size = I_MIN(fstream->optimal_block_size,
fstream->ostream.max_buffer_size);
if (IS_STREAM_EMPTY(fstream) &&
(!stream->corked || size >= optimal_size)) {
/* send immediately */
ret = o_stream_writev(fstream, iov, iov_count);
if (ret < 0)
return -1;
size = ret;
while (size > 0 && iov_count > 0 && size >= iov[0].iov_len) {
size -= iov[0].iov_len;
iov++;
iov_count--;
}
if (iov_count == 0)
i_assert(size == 0);
else {
added = o_stream_add(fstream,
CONST_PTR_OFFSET(iov[0].iov_base, size),
iov[0].iov_len - size);
ret += added;
if (added != iov[0].iov_len - size) {
/* buffer full */
stream->ostream.offset += ret;
return ret;
}
iov++;
iov_count--;
}
}
/* buffer it, at least partly */
for (i = 0; i < iov_count; i++) {
added = o_stream_add(fstream, iov[i].iov_base, iov[i].iov_len);
ret += added;
if (added != iov[i].iov_len)
break;
}
stream->ostream.offset += ret;
i_assert((size_t)ret <= total_size);
i_assert((size_t)ret == total_size || !fstream->file);
return ret;
}
static size_t
o_stream_file_update_buffer(struct file_ostream *fstream,
const void *data, size_t size, size_t pos)
{
size_t avail, copy_size;
if (fstream->head < fstream->tail) {
/* ...HXXXT... */
i_assert(pos < fstream->tail);
avail = fstream->tail - pos;
} else {
/* XXXT...HXXX */
avail = fstream->buffer_size - pos;
}
copy_size = I_MIN(size, avail);
memcpy(fstream->buffer + pos, data, copy_size);
data = CONST_PTR_OFFSET(data, copy_size);
size -= copy_size;
if (size > 0 && fstream->head >= fstream->tail) {
/* wraps to beginning of the buffer */
copy_size = I_MIN(size, fstream->tail);
memcpy(fstream->buffer, data, copy_size);
size -= copy_size;
}
return size;
}
static int
o_stream_file_write_at(struct ostream_private *stream,
const void *data, size_t size, uoff_t offset)
{
struct file_ostream *fstream = (struct file_ostream *)stream;
size_t used, pos, skip, left;
/* update buffer if the write overlaps it */
used = file_buffer_get_used_size(fstream);
if (used > 0 &&
fstream->buffer_offset < offset + size &&
fstream->buffer_offset + used > offset) {
if (fstream->buffer_offset <= offset) {
/* updating from the beginning */
skip = 0;
} else {
skip = fstream->buffer_offset - offset;
}
pos = (fstream->head + offset + skip - fstream->buffer_offset) %
fstream->buffer_size;
left = o_stream_file_update_buffer(fstream,
CONST_PTR_OFFSET(data, skip), size - skip, pos);
if (left > 0) {
/* didn't write all of it */
if (skip > 0) {
/* we also have to write a prefix. don't
bother with two syscalls, just write all
of it in one pwrite(). */
} else {
/* write only the suffix */
unsigned int update_count = size - left;
data = CONST_PTR_OFFSET(data, update_count);
size -= update_count;
offset += update_count;
}
} else if (skip == 0) {
/* everything done */
return 0;
} else {
/* still have to write prefix */
size = skip;
}
}
/* we couldn't write everything to the buffer. flush the buffer
and pwrite() the rest. */
if (o_stream_file_flush(stream) < 0)
return -1;
if (pwrite_full(fstream->fd, data, size, offset) < 0) {
stream->ostream.stream_errno = errno;
stream_closed(fstream);
return -1;
}
return 0;
}
static off_t io_stream_sendfile(struct ostream_private *outstream,
struct istream *instream, int in_fd)
{
struct file_ostream *foutstream = (struct file_ostream *)outstream;
const struct stat *st;
uoff_t start_offset;
uoff_t in_size, offset, send_size, v_offset;
ssize_t ret;
st = i_stream_stat(instream, TRUE);
if (st == NULL) {
outstream->ostream.stream_errno = instream->stream_errno;
return -1;
}
in_size = st->st_size;
o_stream_socket_cork(foutstream);
/* flush out any data in buffer */
if ((ret = buffer_flush(foutstream)) <= 0)
return ret;
if (o_stream_lseek(foutstream) < 0)
return -1;
start_offset = v_offset = instream->v_offset;
do {
offset = instream->real_stream->abs_start_offset + v_offset;
send_size = in_size - v_offset;
ret = safe_sendfile(foutstream->fd, in_fd, &offset,
MAX_SSIZE_T(send_size));
if (ret <= 0) {
if (ret == 0 || errno == EINTR || errno == EAGAIN) {
ret = 0;
break;
}
outstream->ostream.stream_errno = errno;
if (errno != EINVAL) {
/* close only if error wasn't because
sendfile() isn't supported */
stream_closed(foutstream);
}
break;
}
v_offset += ret;
foutstream->real_offset += ret;
foutstream->buffer_offset += ret;
outstream->ostream.offset += ret;
} while ((uoff_t)ret != send_size);
i_stream_seek(instream, v_offset);
if (ret == 0) {
/* we should be at EOF, verify it by reading instream */
(void)i_stream_read(instream);
}
return ret < 0 ? -1 : (off_t)(instream->v_offset - start_offset);
}
static off_t io_stream_copy_backwards(struct ostream_private *outstream,
struct istream *instream, uoff_t in_size)
{
struct file_ostream *foutstream = (struct file_ostream *)outstream;
uoff_t in_start_offset, in_offset, in_limit, out_offset;
const unsigned char *data;
size_t buffer_size, size, read_size;
ssize_t ret;
i_assert(IS_STREAM_EMPTY(foutstream));
/* figure out optimal buffer size */
buffer_size = instream->real_stream->buffer_size;
if (buffer_size == 0 || buffer_size > foutstream->buffer_size) {
if (foutstream->optimal_block_size > foutstream->buffer_size) {
o_stream_grow_buffer(foutstream,
foutstream->optimal_block_size -
foutstream->buffer_size);
}
buffer_size = foutstream->buffer_size;
}
in_start_offset = instream->v_offset;
in_offset = in_limit = in_size;
out_offset = outstream->ostream.offset + (in_offset - in_start_offset);
while (in_offset > in_start_offset) {
if (in_offset - in_start_offset <= buffer_size)
read_size = in_offset - in_start_offset;
else
read_size = buffer_size;
in_offset -= read_size;
out_offset -= read_size;
for (;;) {
i_assert(in_offset <= in_limit);
i_stream_seek(instream, in_offset);
read_size = in_limit - in_offset;
(void)i_stream_read_data(instream, &data, &size,
read_size-1);
if (size >= read_size) {
size = read_size;
if (instream->mmaped) {
/* we'll have to write it through
buffer or the file gets corrupted */
i_assert(size <=
foutstream->buffer_size);
memcpy(foutstream->buffer, data, size);
data = foutstream->buffer;
}
break;
}
/* buffer too large probably, try with smaller */
read_size -= size;
in_offset += read_size;
out_offset += read_size;
buffer_size -= read_size;
}
in_limit -= size;
ret = pwrite_full(foutstream->fd, data, size, out_offset);
if (ret < 0) {
/* error */
outstream->ostream.stream_errno = errno;
return -1;
}
i_stream_skip(instream, size);
}
outstream->ostream.offset += in_size - in_start_offset;
return (off_t) (in_size - in_start_offset);
}
static off_t io_stream_copy_stream(struct ostream_private *outstream,
struct istream *instream, bool same_stream)
{
struct file_ostream *foutstream = (struct file_ostream *)outstream;
const struct stat *st;
off_t in_abs_offset, ret;
if (same_stream) {
/* copying data within same fd. we'll have to be careful with
seeks and overlapping writes. */
st = i_stream_stat(instream, TRUE);
if (st == NULL) {
outstream->ostream.stream_errno = instream->stream_errno;
return -1;
}
i_assert(instream->v_offset <= (uoff_t)st->st_size);
in_abs_offset = instream->real_stream->abs_start_offset +
instream->v_offset;
ret = (off_t)outstream->ostream.offset - in_abs_offset;
if (ret == 0) {
/* copying data over itself. we don't really
need to do that, just fake it. */
return st->st_size - instream->v_offset;
}
if (ret > 0 && st->st_size > ret) {
/* overlapping */
i_assert(instream->seekable);
return io_stream_copy_backwards(outstream, instream,
st->st_size);
}
}
return io_stream_copy(&outstream->ostream, instream,
foutstream->optimal_block_size);
}
static off_t o_stream_file_send_istream(struct ostream_private *outstream,
struct istream *instream)
{
struct file_ostream *foutstream = (struct file_ostream *)outstream;
bool same_stream;
int in_fd;
off_t ret;
in_fd = !instream->readable_fd ? -1 : i_stream_get_fd(instream);
if (!foutstream->no_sendfile && in_fd != -1 &&
in_fd != foutstream->fd && instream->seekable) {
ret = io_stream_sendfile(outstream, instream, in_fd);
if (ret >= 0 || outstream->ostream.stream_errno != EINVAL)
return ret;
/* sendfile() not supported (with this fd), fallback to
regular sending. */
outstream->ostream.stream_errno = 0;
foutstream->no_sendfile = TRUE;
}
same_stream = i_stream_get_fd(instream) == foutstream->fd;
return io_stream_copy_stream(outstream, instream, same_stream);
}
static struct file_ostream *
o_stream_create_fd_common(int fd, bool autoclose_fd)
{
struct file_ostream *fstream;
fstream = i_new(struct file_ostream, 1);
fstream->fd = fd;
fstream->autoclose_fd = autoclose_fd;
fstream->optimal_block_size = DEFAULT_OPTIMAL_BLOCK_SIZE;
fstream->ostream.iostream.close = o_stream_file_close;
fstream->ostream.iostream.destroy = o_stream_file_destroy;
fstream->ostream.cork = o_stream_file_cork;
fstream->ostream.flush = o_stream_file_flush;
fstream->ostream.flush_pending = o_stream_file_flush_pending;
fstream->ostream.get_used_size = o_stream_file_get_used_size;
fstream->ostream.seek = o_stream_file_seek;
fstream->ostream.sendv = o_stream_file_sendv;
fstream->ostream.write_at = o_stream_file_write_at;
fstream->ostream.send_istream = o_stream_file_send_istream;
return fstream;
}
static void fstream_init_file(struct file_ostream *fstream)
{
struct stat st;
fstream->no_sendfile = TRUE;
if (fstat(fstream->fd, &st) < 0)
return;
if ((uoff_t)st.st_blksize > fstream->optimal_block_size) {
/* use the optimal block size, but with a reasonable limit */
fstream->optimal_block_size =
I_MIN(st.st_blksize, MAX_OPTIMAL_BLOCK_SIZE);
}
if (S_ISREG(st.st_mode)) {
fstream->no_socket_cork = TRUE;
fstream->file = TRUE;
}
}
struct ostream *
o_stream_create_fd(int fd, size_t max_buffer_size, bool autoclose_fd)
{
struct file_ostream *fstream;
struct ostream *ostream;
off_t offset;
fstream = o_stream_create_fd_common(fd, autoclose_fd);
fstream->ostream.max_buffer_size = max_buffer_size;
ostream = o_stream_create(&fstream->ostream);
offset = lseek(fd, 0, SEEK_CUR);
if (offset >= 0) {
ostream->offset = offset;
fstream->real_offset = offset;
fstream->buffer_offset = offset;
fstream_init_file(fstream);
} else {
if (net_getsockname(fd, NULL, NULL) < 0) {
fstream->no_sendfile = TRUE;
fstream->no_socket_cork = TRUE;
}
}
if (max_buffer_size == 0)
fstream->ostream.max_buffer_size = fstream->optimal_block_size;
return ostream;
}
struct ostream *
o_stream_create_fd_file(int fd, uoff_t offset, bool autoclose_fd)
{
struct file_ostream *fstream;
struct ostream *ostream;
if (offset == (uoff_t)-1)
offset = lseek(fd, 0, SEEK_CUR);
fstream = o_stream_create_fd_common(fd, autoclose_fd);
fstream_init_file(fstream);
fstream->ostream.max_buffer_size = fstream->optimal_block_size;
fstream->real_offset = offset;
fstream->buffer_offset = offset;
ostream = o_stream_create(&fstream->ostream);
ostream->offset = offset;
return ostream;
}
| via/dovecot-clouddb | src/lib/ostream-file.c | C | mit | 24,954 |
IF OBJECT_ID('LoggerBase.Layout_ApplicationName') IS NOT NULL
SET NOEXEC ON
GO
CREATE FUNCTION LoggerBase.Layout_ApplicationName()
RETURNS NVARCHAR(256)
AS
BEGIN
RETURN NULL
END
GO
SET NOEXEC OFF
GO
/*********************************************************************************************
FUNCTION LoggerBase.Layout_ApplicationName
Date: 02/15/2019
Author: Jerome Pion
Description: Gets the name application name of the connecting context.
**********************************************************************************************/
ALTER FUNCTION LoggerBase.Layout_ApplicationName()
RETURNS NVARCHAR(256)
AS
BEGIN
RETURN APP_NAME()
END | jbpion/log4mssql | log4mssql/LoggerBase/Functions/Layout_ApplicationName.sql | SQL | mit | 695 |
<!DOCTYPE html>
<html lang="en">
<head>
<title>jsTester</title>
<link rel="stylesheet" type="text/css" href="../public/stylesheets/style.css" />
</head>
<body>
<h1>jsTester</h1>
<div id='jsTesterLog'></div>
<script type='text/javascript' src='../public/javascripts/jsTester.js'></script>
<script type='text/javascript' src='./factors.js'></script>
</body>
</html>
| rawright/jsTester | test/index.html | HTML | mit | 398 |
package fpr9.com.nbalivefeed.entities;
/**
* Created by FranciscoPR on 07/11/16.
*/
public class RecordContainer {
private String id;
private Record record;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Record getRecord() {
return record;
}
public void setRecord(Record record) {
this.record = record;
}
}
| FranPR9/NBALIVEFEED | app/src/main/java/fpr9/com/nbalivefeed/entities/RecordContainer.java | Java | mit | 430 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:06 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>Globals (Doctrine)</title>
</head>
<body id="definition" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/dbal/driver/package-summary.html">Package</a></li>
<li class="active">Global</li>
<li><a href="../../../overview-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/dbal/driver/package-globals.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_global">Global</a>
Detail: <a href="#detail_global">Global</a>
</div>
<hr>
<h1>Globals</h1>
<hr>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/dbal/driver/package-summary.html">Package</a></li>
<li class="active">Global</li>
<li><a href="../../../overview-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/dbal/driver/package-globals.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_global">Global</a>
Detail: <a href="#detail_global">Global</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html> | j13k/doctrine1 | lib/api/doctrine/dbal/driver/package-globals.html | HTML | mit | 2,113 |
import React, { Component, PropTypes } from 'react';
import ItemTypes from './ItemTypes';
import { DragSource, DropTarget } from 'react-dnd';
import flow from 'lodash.flow';
function isNullOrUndefined(o) {
return o == null;
}
const cardSource = {
beginDrag(props) {
return {
id: props.id,
index: props.index,
originalIndex: props.index
};
},
endDrag(props, monitor) {
if (props.noDropOutside) {
const { id, index, originalIndex } = monitor.getItem();
const didDrop = monitor.didDrop();
if (!didDrop) {
props.moveCard(isNullOrUndefined(id) ? index : id, originalIndex);
}
}
if (props.endDrag) {
props.endDrag();
}
}
};
const cardTarget = {
hover(props, monitor) {
const { id: dragId, index: dragIndex } = monitor.getItem();
const { id: hoverId, index: hoverIndex } = props;
if (!isNullOrUndefined(dragId)) {
// use id
if (dragId !== hoverId) {
props.moveCard(dragId, hoverIndex);
}
} else {
// use index
if (dragIndex !== hoverIndex) {
props.moveCard(dragIndex, hoverIndex);
// Note: we're mutating the monitor item here!
// Generally it's better to avoid mutations,
// but it's good here for the sake of performance
// to avoid expensive index searches.
monitor.getItem().index = hoverIndex;
}
}
}
};
const propTypes = {
index: PropTypes.number.isRequired,
source: PropTypes.any.isRequired,
createItem: PropTypes.func.isRequired,
moveCard: PropTypes.func.isRequired,
endDrag: PropTypes.func,
isDragging: PropTypes.bool.isRequired,
connectDragSource: PropTypes.func.isRequired,
connectDropTarget: PropTypes.func.isRequired,
noDropOutside: PropTypes.bool
};
class DndCard extends Component {
render() {
const {
id,
index,
source,
createItem,
noDropOutside, // remove from restProps
moveCard, // remove from restProps
endDrag, // remove from restProps
isDragging,
connectDragSource,
connectDropTarget,
...restProps
} = this.props;
if (id === null) {
console.warn('Warning: `id` is null. Set to undefined to get better performance.');
}
const item = createItem(source, isDragging, index);
if (typeof item === 'undefined') {
console.warn('Warning: `createItem` returns undefined. It should return a React element or null.');
}
const finalProps = Object.keys(restProps).reduce((result, k) => {
const prop = restProps[k];
result[k] = typeof prop === 'function' ? prop(isDragging) : prop;
return result;
}, {});
return connectDragSource(connectDropTarget(
<div {...finalProps}>
{item}
</div>
));
}
}
DndCard.propTypes = propTypes;
export default flow(
DropTarget(ItemTypes.DND_CARD, cardTarget, connect => ({
connectDropTarget: connect.dropTarget()
})),
DragSource(ItemTypes.DND_CARD, cardSource, (connect, monitor) => ({
connectDragSource: connect.dragSource(),
isDragging: monitor.isDragging()
}))
)(DndCard);
| jas-chen/react-dnd-card | src/index.js | JavaScript | mit | 3,144 |
<section data-ng-controller="TrainersController" data-ng-init="findOne()">
<div class="page-header">
<h1 data-ng-bind="trainer.name"></h1>
</div>
<div class="pull-right" data-ng-show="((authentication.user) && (authentication.user._id == trainer.user._id))">
<a class="btn btn-primary" href="/#!/trainers/{{trainer._id}}/edit">
<i class="glyphicon glyphicon-edit"></i>
</a>
<a class="btn btn-primary" data-ng-click="remove();">
<i class="glyphicon glyphicon-trash"></i>
</a>
</div>
<small>
<em class="text-muted">
Posted on
<span data-ng-bind="trainer.created | date:'mediumDate'"></span>
by
<span data-ng-bind="trainer.user.displayName"></span>
</em>
</small>
</section>
| H3rN4n/mascoteros | public/modules/trainers/views/view-trainer.client.view.html | HTML | mit | 710 |
using System;
using Microsoft.Hadoop.MapReduce;
namespace MapReduceSamples.Utils
{
public class TestReducerCombinerContext : ReducerCombinerContext
{
public TestReducerCombinerContext(bool isCombiner) : base(isCombiner)
{
}
public override void EmitKeyValue(string key, string value)
{
Console.WriteLine("EmitKeyValue: Key \"{0}\", \"{1}\"", key, value);
}
public override void EmitLine(string line)
{
Console.WriteLine("EmitLine: {0}", line);
}
public override void IncrementCounter(string category, string counterName, int increment)
{
Console.WriteLine(
"IncrementCounter: Category \"{0}\", Counter Name \"{1}\", Increment \"{2}\"",
category,
counterName,
increment);
}
public override void IncrementCounter(string counterName, int increment)
{
Console.WriteLine(
"IncrementCounter: Counter Name \"{0}\", Increment \"{1}\"",
counterName,
increment);
}
public override void IncrementCounter(string counterName)
{
Console.WriteLine(
"IncrementCounter: Counter Name \"{0}\"",
counterName);
}
public override void Log(string message)
{
Console.WriteLine(
"Log: {0}",
message);
}
}
}
| SaschaDittmann/MapReduceSamples | MapReduceSamples/MapReduceSamples.Utils/TestReducerCombinerContext.cs | C# | mit | 1,520 |
#!/usr/bin/env python
import os
import time
import argparse
import tempfile
import PyPDF2
import datetime
from reportlab.pdfgen import canvas
parser = argparse.ArgumentParser("Add signatures to PDF files")
parser.add_argument("pdf", help="The pdf file to annotate")
parser.add_argument("signature", help="The signature file (png, jpg)")
parser.add_argument("--date", action='store_true')
parser.add_argument("--output", nargs='?',
help="Output file. Defaults to input filename plus '_signed'")
parser.add_argument("--coords", nargs='?', default='2x100x100x125x40',
help="Coordinates to place signature. Format: PAGExXxYxWIDTHxHEIGHT. 1x200x300x125x40 means page 1, 200 units horizontally from the bottom left, 300 units vertically from the bottom left, 125 units wide, 40 units tall. Pages count starts at 1 (1-based indexing). Units are pdf-standard units (1/72 inch).")
def _get_tmp_filename(suffix=".pdf"):
with tempfile.NamedTemporaryFile(suffix=".pdf") as fh:
return fh.name
def sign_pdf(args):
#TODO: use a gui or something.... for now, just trial-and-error the coords
page_num, x1, y1, width, height = [int(a) for a in args.coords.split("x")]
page_num -= 1
output_filename = args.output or "{}_signed{}".format(
*os.path.splitext(args.pdf)
)
pdf_fh = open(args.pdf, 'rb')
sig_tmp_fh = None
pdf = PyPDF2.PdfFileReader(pdf_fh)
writer = PyPDF2.PdfFileWriter()
sig_tmp_filename = None
for i in range(0, pdf.getNumPages()):
page = pdf.getPage(i)
if i == page_num:
# Create PDF for signature
sig_tmp_filename = _get_tmp_filename()
c = canvas.Canvas(sig_tmp_filename, pagesize=page.cropBox)
c.drawImage(args.signature, x1, y1, width, height, mask='auto')
if args.date:
c.drawString(x1 + width, y1, datetime.datetime.now().strftime("%Y-%m-%d"))
c.showPage()
c.save()
# Merge PDF in to original page
sig_tmp_fh = open(sig_tmp_filename, 'rb')
sig_tmp_pdf = PyPDF2.PdfFileReader(sig_tmp_fh)
sig_page = sig_tmp_pdf.getPage(0)
sig_page.mediaBox = page.mediaBox
page.mergePage(sig_page)
writer.addPage(page)
with open(output_filename, 'wb') as fh:
writer.write(fh)
for handle in [pdf_fh, sig_tmp_fh]:
if handle:
handle.close()
if sig_tmp_filename:
os.remove(sig_tmp_filename)
def main():
sign_pdf(parser.parse_args())
if __name__ == "__main__":
main()
| yourcelf/signpdf | signpdf.py | Python | mit | 2,594 |
# frozen_string_literal: true
require 'vk/api/responses'
module Vk
module API
class Likes < Vk::Schema::Namespace
module Responses
# @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json
class IsLikedResponse < Vk::Schema::Response
# @return [Object] @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json
attribute :response, API::Types::Coercible::Hash
end
end
end
end
end
| alsemyonov/vk | lib/vk/api/likes/responses/is_liked_response.rb | Ruby | mit | 473 |
<script type="application/ld+json">{
"section":"components",
"title":"Menus Manager",
"sections":[
]
}</script>
<ng-include src="'../../../src/DocBundle/views/parts/content.html'"></ng-include>
| OSW3/odyssey-desktop | src/DocBundle/Views/sections/Components/MenusManager.html | HTML | mit | 211 |
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('sandbox app is running!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
| basp/sandbox | e2e/src/app.e2e-spec.ts | TypeScript | mit | 640 |
## Bookmarks tagged [[css-preprocessor]](https://www.codever.land/search?q=[css-preprocessor])
_<sup><sup>[www.codever.land/bookmarks/t/css-preprocessor](https://www.codever.land/bookmarks/t/css-preprocessor)</sup></sup>_
---
#### [gcss](https://github.com/yosssi/gcss)
_<sup>https://github.com/yosssi/gcss</sup>_
Pure Go CSS Preprocessor.
* **tags**: [go](../tagged/go.md), [css-preprocessor](../tagged/css-preprocessor.md)
* :octocat: **[source code](https://github.com/yosssi/gcss)**
---
#### [go-libsass](https://github.com/wellington/go-libsass)
_<sup>https://github.com/wellington/go-libsass</sup>_
Go wrapper to the 100% Sass compatible libsass project.
* **tags**: [go](../tagged/go.md), [css-preprocessor](../tagged/css-preprocessor.md)
* :octocat: **[source code](https://github.com/wellington/go-libsass)**
---
| Codingpedia/bookmarks | tagged/css-preprocessor.md | Markdown | mit | 825 |
// @license
// Redistribution and use in source and binary forms ...
// Copyright 2012 Carnegie Mellon University. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other materials
// provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ''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 CARNEGIE MELLON UNIVERSITY 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.
//
// The views and conclusions contained in the software and documentation are those of the
// authors and should not be interpreted as representing official policies, either expressed
// or implied, of Carnegie Mellon University.
//
// Author:
// Randy Sargent (randy.sargent@cs.cmu.edu)
"use strict";
var org;
org = org || {};
org.gigapan = org.gigapan || {};
org.gigapan.timelapse = org.gigapan.timelapse || {};
org.gigapan.timelapse.MercatorProjection = function(west, north, east, south, width, height) {
function rawProjectLat(lat) {
return Math.log((1 + Math.sin(lat * Math.PI / 180)) / Math.cos(lat * Math.PI / 180));
}
function rawUnprojectLat(y) {
return (2 * Math.atan(Math.exp(y)) - Math.PI / 2) * 180 / Math.PI;
}
function interpolate(x, fromLow, fromHigh, toLow, toHigh) {
return (x - fromLow) / (fromHigh - fromLow) * (toHigh - toLow) + toLow;
}
this.latlngToPoint = function(latlng) {
var x = interpolate(latlng.lng, west, east, 0, width);
var y = interpolate(rawProjectLat(latlng.lat), rawProjectLat(north), rawProjectLat(south), 0, height);
return {
"x": x,
"y": y
};
};
this.pointToLatlng = function(point) {
var lng = interpolate(point.x, 0, width, west, east);
var lat = rawUnprojectLat(interpolate(point.y, 0, height, rawProjectLat(north), rawProjectLat(south)));
return {
"lat": lat,
"lng": lng
};
};
};
| CI-WATER/tmaps | tmc-1.2.1-linux/timemachine-viewer/js/org/gigapan/timelapse/mercator.js | JavaScript | mit | 2,858 |
describe('gridClassFactory', function() {
var gridClassFactory;
beforeEach(module('ui.grid.ie'));
beforeEach(inject(function(_gridClassFactory_) {
gridClassFactory = _gridClassFactory_;
}));
describe('createGrid', function() {
var grid;
beforeEach( function() {
grid = gridClassFactory.createGrid();
});
it('creates a grid with default properties', function() {
expect(grid).toBeDefined();
expect(grid.id).toBeDefined();
expect(grid.id).not.toBeNull();
expect(grid.options).toBeDefined();
});
});
describe('defaultColumnBuilder', function () {
var grid;
var testSetup = {};
beforeEach(inject(function($rootScope, $templateCache) {
testSetup.$rootScope = $rootScope;
testSetup.$templateCache = $templateCache;
testSetup.col = {};
testSetup.colDef = {};
testSetup.gridOptions = {};
}));
it('column builder with no filters and template has no placeholders', function() {
testSetup.$templateCache.put('ui-grid/uiGridHeaderCell', '<div>a sample header template with no custom_filters</div>');
testSetup.$templateCache.put('ui-grid/uiGridCell', '<div>a sample cell template with no custom_filters</div>');
testSetup.$templateCache.put('ui-grid/uiGridFooterCell', '<div>a sample footer template with no custom_filters</div>');
gridClassFactory.defaultColumnBuilder( testSetup.colDef, testSetup.col, testSetup.gridOptions );
expect(testSetup.col.providedHeaderCellTemplate).toEqual('ui-grid/uiGridHeaderCell');
expect(testSetup.col.providedCellTemplate).toEqual('ui-grid/uiGridCell');
expect(testSetup.col.providedFooterCellTemplate).toEqual('ui-grid/uiGridFooterCell');
testSetup.$rootScope.$digest();
expect(testSetup.col.headerCellTemplate).toEqual('<div>a sample header template with no custom_filters</div>');
expect(testSetup.col.cellTemplate).toEqual('<div>a sample cell template with no custom_filters</div>');
expect(testSetup.col.footerCellTemplate).toEqual('<div>a sample footer template with no custom_filters</div>');
});
it('column builder with no filters and template has placeholders', function() {
testSetup.$templateCache.put('ui-grid/uiGridHeaderCell', '<div>a sample header template with CUSTOM_FILTERS</div>');
testSetup.$templateCache.put('ui-grid/uiGridCell', '<div>a sample cell template with CUSTOM_FILTERS</div>');
testSetup.$templateCache.put('ui-grid/uiGridFooterCell', '<div>a sample footer template with CUSTOM_FILTERS</div>');
gridClassFactory.defaultColumnBuilder( testSetup.colDef, testSetup.col, testSetup.gridOptions );
expect(testSetup.col.providedHeaderCellTemplate).toEqual('ui-grid/uiGridHeaderCell');
expect(testSetup.col.providedCellTemplate).toEqual('ui-grid/uiGridCell');
expect(testSetup.col.providedFooterCellTemplate).toEqual('ui-grid/uiGridFooterCell');
testSetup.$rootScope.$digest();
expect(testSetup.col.headerCellTemplate).toEqual('<div>a sample header template with </div>');
expect(testSetup.col.cellTemplate).toEqual('<div>a sample cell template with </div>');
expect(testSetup.col.footerCellTemplate).toEqual('<div>a sample footer template with </div>');
});
it('column builder with filters and template has placeholders', function() {
testSetup.$templateCache.put('ui-grid/uiGridHeaderCell', '<div>a sample header template with CUSTOM_FILTERS</div>');
testSetup.$templateCache.put('ui-grid/uiGridCell', '<div>a sample cell template with CUSTOM_FILTERS</div>');
testSetup.$templateCache.put('ui-grid/uiGridFooterCell', '<div>a sample footer template with CUSTOM_FILTERS</div>');
testSetup.col.cellFilter = 'customCellFilter';
testSetup.col.headerCellFilter = 'customHeaderCellFilter';
testSetup.col.footerCellFilter = 'customFooterCellFilter';
gridClassFactory.defaultColumnBuilder( testSetup.colDef, testSetup.col, testSetup.gridOptions );
expect(testSetup.col.providedHeaderCellTemplate).toEqual('ui-grid/uiGridHeaderCell');
expect(testSetup.col.providedCellTemplate).toEqual('ui-grid/uiGridCell');
expect(testSetup.col.providedFooterCellTemplate).toEqual('ui-grid/uiGridFooterCell');
testSetup.$rootScope.$digest();
expect(testSetup.col.headerCellTemplate).toEqual('<div>a sample header template with |customHeaderCellFilter</div>');
expect(testSetup.col.cellTemplate).toEqual('<div>a sample cell template with |customCellFilter</div>');
expect(testSetup.col.footerCellTemplate).toEqual('<div>a sample footer template with |customFooterCellFilter</div>');
});
it('column builder with filters and template has no placeholders', function() {
testSetup.$templateCache.put('ui-grid/uiGridHeaderCell', '<div>a sample header template with custom_filters</div>');
testSetup.$templateCache.put('ui-grid/uiGridCell', '<div>a sample cell template with custom_filters</div>');
testSetup.$templateCache.put('ui-grid/uiGridFooterCell', '<div>a sample footer template with custom_filters</div>');
testSetup.col.cellFilter = 'customCellFilter';
testSetup.col.headerCellFilter = 'customHeaderCellFilter';
testSetup.col.footerCellFilter = 'customFooterCellFilter';
gridClassFactory.defaultColumnBuilder( testSetup.colDef, testSetup.col, testSetup.gridOptions );
expect(testSetup.col.providedHeaderCellTemplate).toEqual('ui-grid/uiGridHeaderCell');
expect(testSetup.col.providedCellTemplate).toEqual('ui-grid/uiGridCell');
expect(testSetup.col.providedFooterCellTemplate).toEqual('ui-grid/uiGridFooterCell');
// the code appears to rely on cellTemplate being undefined until properly retrieved (i.e. we cannot
// just push 'ui-grid/uiGridCell' into here, then later replace it with the template body)
expect(testSetup.col.cellTemplate).toEqual(undefined);
testSetup.$rootScope.$digest();
expect(testSetup.col.headerCellTemplate).toEqual('<div>a sample header template with custom_filters</div>');
expect(testSetup.col.cellTemplate).toEqual('<div>a sample cell template with custom_filters</div>');
expect(testSetup.col.footerCellTemplate).toEqual('<div>a sample footer template with custom_filters</div>');
});
it('column builder passes double dollars as parameters to the filters correctly', function() {
testSetup.$templateCache.put('ui-grid/uiGridHeaderCell', '<div>a sample header template with CUSTOM_FILTERS</div>');
testSetup.$templateCache.put('ui-grid/uiGridCell', '<div>a sample cell template with CUSTOM_FILTERS</div>');
testSetup.$templateCache.put('ui-grid/uiGridFooterCell', '<div>a sample footer template with CUSTOM_FILTERS</div>');
testSetup.col.cellFilter = 'customCellFilter:row.entity.$$internalValue';
testSetup.col.headerCellFilter = 'customHeaderCellFilter:row.entity.$$internalValue';
testSetup.col.footerCellFilter = 'customFooterCellFilter:row.entity.$$internalValue';
gridClassFactory.defaultColumnBuilder( testSetup.colDef, testSetup.col, testSetup.gridOptions );
expect(testSetup.col.providedHeaderCellTemplate).toEqual('ui-grid/uiGridHeaderCell');
expect(testSetup.col.providedCellTemplate).toEqual('ui-grid/uiGridCell');
expect(testSetup.col.providedFooterCellTemplate).toEqual('ui-grid/uiGridFooterCell');
testSetup.$rootScope.$digest();
expect(testSetup.col.headerCellTemplate).toEqual('<div>a sample header template with |customHeaderCellFilter:row.entity.$$internalValue</div>');
expect(testSetup.col.cellTemplate).toEqual('<div>a sample cell template with |customCellFilter:row.entity.$$internalValue</div>');
expect(testSetup.col.footerCellTemplate).toEqual('<div>a sample footer template with |customFooterCellFilter:row.entity.$$internalValue</div>');
});
});
}); | domakas/ui-grid | test/unit/core/services/GridClassFactory.spec.js | JavaScript | mit | 8,044 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About GoldDiggerCoin</source>
<translation>Acerca de GoldDiggerCoin</translation>
</message>
<message>
<location line="+39"/>
<source><b>GoldDiggerCoin</b> version</source>
<translation>Versión de <b>GoldDiggerCoin</b></translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://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 (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation>
Este es un software experimental.
Distribuido bajo la licencia MIT/X11, vea el archivo adjunto
COPYING o http://www.opensource.org/licenses/mit-license.php.
Este producto incluye software desarrollado por OpenSSL Project para su uso en
el OpenSSL Toolkit (http://www.openssl.org/) y software criptográfico escrito por
Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation>Copyright</translation>
</message>
<message>
<location line="+0"/>
<source>The GoldDiggerCoin developers</source>
<translation>Los programadores GoldDiggerCoin</translation>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Libreta de direcciones</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>Haga doble clic para editar una dirección o etiqueta</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Crear una nueva dirección</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Copiar la dirección seleccionada al portapapeles del sistema</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation>&Añadir dirección</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your GoldDiggerCoin 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>Estas son sus direcciones GoldDiggerCoin para recibir pagos. Puede utilizar una diferente por cada persona emisora para saber quién le está pagando.</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation>&Copiar dirección</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>Mostrar código &QR </translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a GoldDiggerCoin address</source>
<translation>Firmar un mensaje para demostrar que se posee una dirección GoldDiggerCoin</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>&Firmar mensaje</translation>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation>Borrar de la lista la dirección seleccionada</translation>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation>Exportar a un archivo los datos de esta pestaña</translation>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation>&Exportar</translation>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified GoldDiggerCoin address</source>
<translation>Verificar un mensaje para comprobar que fue firmado con la dirección GoldDiggerCoin indicada</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>&Verificar mensaje</translation>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Eliminar</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your GoldDiggerCoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation>Estas son sus direcciones GoldDiggerCoin para enviar pagos. Compruebe siempre la cantidad y la dirección receptora antes de transferir monedas.</translation>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation>Copiar &etiqueta</translation>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation>&Editar</translation>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation>Enviar &monedas</translation>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>Exportar datos de la libreta de direcciones</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Archivos de columnas separadas por coma (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Error al exportar</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>No se pudo escribir en el archivo %1.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Etiqueta</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Dirección</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(sin etiqueta)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Diálogo de contraseña</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Introducir contraseña</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Nueva contraseña</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Repita la nueva contraseña</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Introduzca la nueva contraseña del monedero.<br/>Por favor elija una con <b>10 o más caracteres aleatorios</b> u <b>ocho o más palabras</b>.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Cifrar el monedero</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Esta operación requiere su contraseña para desbloquear el monedero.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Desbloquear monedero</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Esta operación requiere su contraseña para descifrar el monedero.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Descifrar el monedero</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Cambiar contraseña</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Introduzca la contraseña anterior del monedero y la nueva. </translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Confirmar cifrado del monedero</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR GOLDDIGGERCOINS</b>!</source>
<translation>Atencion: ¡Si cifra su monedero y pierde la contraseña perderá <b>TODOS SUS GOLDDIGGERCOINS</b>!"</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>¿Seguro que desea cifrar su monedero?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>IMPORTANTE: Cualquier copia de seguridad que haya realizado previamente de su archivo de monedero debe reemplazarse con el nuevo archivo de monedero cifrado. Por razones de seguridad, las copias de seguridad previas del archivo de monedero no cifradas serán inservibles en cuanto comience a usar el nuevo monedero cifrado.</translation>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>Aviso: ¡La tecla de bloqueo de mayúsculas está activada!</translation>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>Monedero cifrado</translation>
</message>
<message>
<location line="-56"/>
<source>GoldDiggerCoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your golddiggercoins from being stolen by malware infecting your computer.</source>
<translation>GoldDiggerCoin se cerrará para finalizar el proceso de cifrado. Recuerde que el cifrado de su monedero no puede proteger totalmente sus golddiggercoins de robo por malware que infecte su sistema.</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Ha fallado el cifrado del monedero</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Ha fallado el cifrado del monedero debido a un error interno. El monedero no ha sido cifrado.</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>Las contraseñas no coinciden.</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>Ha fallado el desbloqueo del monedero</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>La contraseña introducida para descifrar el monedero es incorrecta.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Ha fallado el descifrado del monedero</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Se ha cambiado correctamente la contraseña del monedero.</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation>Firmar &mensaje...</translation>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Sincronizando con la red…</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>&Vista general</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Mostrar vista general del monedero</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&Transacciones</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Examinar el historial de transacciones</translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels for sending</source>
<translation>Editar la lista de las direcciones y etiquetas almacenadas</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Mostrar la lista de direcciones utilizadas para recibir pagos</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation>&Salir</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Salir de la aplicación</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about GoldDiggerCoin</source>
<translation>Mostrar información acerca de GoldDiggerCoin</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>Acerca de &Qt</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Mostrar información acerca de Qt</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Opciones...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation>&Cifrar monedero…</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>Copia de &respaldo del monedero...</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>&Cambiar la contraseña…</translation>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation>Importando bloques de disco...</translation>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation>Reindexando bloques en disco...</translation>
</message>
<message>
<location line="-347"/>
<source>Send coins to a GoldDiggerCoin address</source>
<translation>Enviar monedas a una dirección GoldDiggerCoin</translation>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for GoldDiggerCoin</source>
<translation>Modificar las opciones de configuración de GoldDiggerCoin</translation>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation>Copia de seguridad del monedero en otra ubicación</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Cambiar la contraseña utilizada para el cifrado del monedero</translation>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation>Ventana de &depuración</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>Abrir la consola de depuración y diagnóstico</translation>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation>&Verificar mensaje...</translation>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>GoldDiggerCoin</source>
<translation>GoldDiggerCoin</translation>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation>Monedero</translation>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation>&Enviar</translation>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation>&Recibir</translation>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation>&Direcciones</translation>
</message>
<message>
<location line="+22"/>
<source>&About GoldDiggerCoin</source>
<translation>&Acerca de GoldDiggerCoin</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>Mo&strar/ocultar</translation>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation>Mostrar u ocultar la ventana principal</translation>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation>Cifrar las claves privadas de su monedero</translation>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your GoldDiggerCoin addresses to prove you own them</source>
<translation>Firmar mensajes con sus direcciones GoldDiggerCoin para demostrar la propiedad</translation>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified GoldDiggerCoin addresses</source>
<translation>Verificar mensajes comprobando que están firmados con direcciones GoldDiggerCoin concretas</translation>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Archivo</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>&Configuración</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>A&yuda</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Barra de pestañas</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
<message>
<location line="+47"/>
<source>GoldDiggerCoin client</source>
<translation>Cliente GoldDiggerCoin</translation>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to GoldDiggerCoin network</source>
<translation><numerusform>%n conexión activa hacia la red GoldDiggerCoin</numerusform><numerusform>%n conexiones activas hacia la red GoldDiggerCoin</numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation>Ninguna fuente de bloques disponible ...</translation>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation>Se han procesado %1 de %2 bloques (estimados) del historial de transacciones.</translation>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation>Procesados %1 bloques del historial de transacciones.</translation>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation><numerusform>%n día</numerusform><numerusform>%n días</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation>%1 atrás</translation>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation>El último bloque recibido fue generado hace %1.</translation>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation>Las transacciones posteriores a esta aún no están visibles.</translation>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation>Error</translation>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation>Aviso</translation>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation>Información</translation>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation>Esta transacción supera el límite de tamaño. Puede enviarla con una comisión de %1, destinada a los nodos que procesen su transacción para contribuir al mantenimiento de la red. ¿Desea pagar esta comisión?</translation>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation>Actualizado</translation>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation>Actualizando...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation>Confirme la tarifa de la transacción</translation>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation>Transacción enviada</translation>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation>Transacción entrante</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Fecha: %1
Cantidad: %2
Tipo: %3
Dirección: %4
</translation>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation>Gestión de URI</translation>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid GoldDiggerCoin address or malformed URI parameters.</source>
<translation>¡No se puede interpretar la URI! Esto puede deberse a una dirección GoldDiggerCoin inválida o a parámetros de URI mal formados.</translation>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>El monedero está <b>cifrado</b> y actualmente <b>desbloqueado</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>El monedero está <b>cifrado</b> y actualmente <b>bloqueado</b></translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. GoldDiggerCoin can no longer continue safely and will quit.</source>
<translation>Ha ocurrido un error crítico. GoldDiggerCoin ya no puede continuar con seguridad y se cerrará.</translation>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation>Alerta de red</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Editar Dirección</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Etiqueta</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>La etiqueta asociada con esta entrada en la libreta</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Dirección</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>La dirección asociada con esta entrada en la guía. Solo puede ser modificada para direcciones de envío.</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Nueva dirección para recibir</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Nueva dirección para enviar</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Editar dirección de recepción</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Editar dirección de envío</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>La dirección introducida "%1" ya está presente en la libreta de direcciones.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid GoldDiggerCoin address.</source>
<translation>La dirección introducida "%1" no es una dirección GoldDiggerCoin válida.</translation>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>No se pudo desbloquear el monedero.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Ha fallado la generación de la nueva clave.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>GoldDiggerCoin-Qt</source>
<translation>GoldDiggerCoin-Qt</translation>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>versión</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Uso:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation>opciones de la línea de órdenes</translation>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation>Opciones GUI</translation>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation>Establecer el idioma, por ejemplo, "es_ES" (predeterminado: configuración regional del sistema)</translation>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation>Arrancar minimizado</translation>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation>Mostrar pantalla de bienvenida en el inicio (predeterminado: 1)</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Opciones</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>&Principal</translation>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation>Tarifa de transacción opcional por kB que ayuda a asegurar que sus transacciones sean procesadas rápidamente. La mayoría de transacciones son de 1kB.</translation>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation>Comisión de &transacciones</translation>
</message>
<message>
<location line="+31"/>
<source>Automatically start GoldDiggerCoin after logging in to the system.</source>
<translation>Iniciar GoldDiggerCoin automáticamente al encender el sistema.</translation>
</message>
<message>
<location line="+3"/>
<source>&Start GoldDiggerCoin on system login</source>
<translation>&Iniciar GoldDiggerCoin al iniciar el sistema</translation>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation>Restablecer todas las opciones del cliente a las predeterminadas.</translation>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation>&Restablecer opciones</translation>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation>&Red</translation>
</message>
<message>
<location line="+6"/>
<source>Automatically open the GoldDiggerCoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>Abrir automáticamente el puerto del cliente GoldDiggerCoin en el router. Esta opción solo funciona si el router admite UPnP y está activado.</translation>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation>Mapear el puerto usando &UPnP</translation>
</message>
<message>
<location line="+7"/>
<source>Connect to the GoldDiggerCoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation>Conectar a la red GoldDiggerCoin a través de un proxy SOCKS (ej. para conectar con la red Tor)</translation>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation>&Conectar a través de un proxy SOCKS:</translation>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation>Dirección &IP del proxy:</translation>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation>Dirección IP del proxy (ej. 127.0.0.1)</translation>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation>&Puerto:</translation>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation>Puerto del servidor proxy (ej. 9050)</translation>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation>&Versión SOCKS:</translation>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation>Versión del proxy SOCKS (ej. 5)</translation>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation>&Ventana</translation>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Minimizar la ventana a la bandeja de iconos del sistema.</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>&Minimizar a la bandeja en vez de a la barra de tareas</translation>
</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>Minimizar en lugar de salir de la aplicación al cerrar la ventana.Cuando esta opción está activa, la aplicación solo se puede cerrar seleccionando Salir desde el menú.</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>M&inimizar al cerrar</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Interfaz</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>I&dioma de la interfaz de usuario</translation>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting GoldDiggerCoin.</source>
<translation>El idioma de la interfaz de usuario puede establecerse aquí. Este ajuste se aplicará cuando se reinicie GoldDiggerCoin.</translation>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>Mostrar las cantidades en la &unidad:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>Elegir la subdivisión predeterminada para mostrar cantidades en la interfaz y cuando se envían monedas.</translation>
</message>
<message>
<location line="+9"/>
<source>Whether to show GoldDiggerCoin addresses in the transaction list or not.</source>
<translation>Mostrar o no las direcciones GoldDiggerCoin en la lista de transacciones.</translation>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation>&Mostrar las direcciones en la lista de transacciones</translation>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>&Aceptar</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&Cancelar</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation>&Aplicar</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation>predeterminado</translation>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation>Confirme el restablecimiento de las opciones</translation>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation>Algunas configuraciones pueden requerir un reinicio del cliente para que sean efectivas.</translation>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation>¿Quiere proceder?</translation>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation>Aviso</translation>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting GoldDiggerCoin.</source>
<translation>Esta configuración tendrá efecto tras reiniciar GoldDiggerCoin.</translation>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation>La dirección proxy indicada es inválida.</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Desde</translation>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the GoldDiggerCoin network after a connection is established, but this process has not completed yet.</source>
<translation>La información mostrada puede estar desactualizada. Su monedero se sincroniza automáticamente con la red GoldDiggerCoin después de que se haya establecido una conexión , pero este proceso aún no se ha completado.</translation>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation>Saldo:</translation>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation>No confirmado(s):</translation>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation>Monedero</translation>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation>No disponible:</translation>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation>Saldo recién minado que aún no está disponible.</translation>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Movimientos recientes</b></translation>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation>Su saldo actual</translation>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation>Total de las transacciones que faltan por confirmar y que no contribuyen al saldo actual</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation>desincronizado</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start golddiggercoin: click-to-pay handler</source>
<translation>No se pudo iniciar golddiggercoin: manejador de pago-al-clic</translation>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation>Diálogo de códigos QR</translation>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation>Solicitud de pago</translation>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Cuantía:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>Etiqueta:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Mensaje:</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>&Guardar como...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation>Error al codificar la URI en el código QR.</translation>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation>La cantidad introducida es inválida. Compruébela, por favor.</translation>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation>URI esultante demasiado larga. Intente reducir el texto de la etiqueta / mensaje.</translation>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation>Guardar código QR</translation>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation>Imágenes PNG (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>Nombre del cliente</translation>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation>N/D</translation>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation>Versión del cliente</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Información</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation>Utilizando la versión OpenSSL</translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Hora de inicio</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Red</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>Número de conexiones</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation>En la red de pruebas</translation>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>Cadena de bloques</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Número actual de bloques</translation>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation>Bloques totales estimados</translation>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation>Hora del último bloque</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>&Abrir</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation>Opciones de la línea de órdenes</translation>
</message>
<message>
<location line="+7"/>
<source>Show the GoldDiggerCoin-Qt help message to get a list with possible GoldDiggerCoin command-line options.</source>
<translation>Mostrar el mensaje de ayuda de GoldDiggerCoin-Qt que enumera las opciones disponibles de línea de órdenes para GoldDiggerCoin.</translation>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation>&Mostrar</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Consola</translation>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation>Fecha de compilación</translation>
</message>
<message>
<location line="-104"/>
<source>GoldDiggerCoin - Debug window</source>
<translation>GoldDiggerCoin - Ventana de depuración</translation>
</message>
<message>
<location line="+25"/>
<source>GoldDiggerCoin Core</source>
<translation>Núcleo de GoldDiggerCoin</translation>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation>Archivo de registro de depuración</translation>
</message>
<message>
<location line="+7"/>
<source>Open the GoldDiggerCoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation>Abrir el archivo de registro de depuración en el directorio actual de datos. Esto puede llevar varios segundos para archivos de registro grandes.</translation>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation>Borrar consola</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the GoldDiggerCoin RPC console.</source>
<translation>Bienvenido a la consola RPC de GoldDiggerCoin</translation>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>Use las flechas arriba y abajo para navegar por el historial y <b>Control+L</b> para limpiar la pantalla.</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Escriba <b>help</b> para ver un resumen de los comandos disponibles.</translation>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Enviar monedas</translation>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation>Enviar a multiples destinatarios de una vez</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation>Añadir &destinatario</translation>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation>Eliminar todos los campos de las transacciones</translation>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>Limpiar &todo</translation>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation>Saldo:</translation>
</message>
<message>
<location line="+10"/>
<source>123.456 BTC</source>
<translation>123.456 BTC</translation>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Confirmar el envío</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>&Enviar</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> a %2 (%3)</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Confirmar el envío de monedas</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>¿Está seguro de que desea enviar %1?</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation>y</translation>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation>La dirección de recepción no es válida, compruébela de nuevo.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>La cantidad por pagar tiene que ser mayor de 0.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>La cantidad sobrepasa su saldo.</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>El total sobrepasa su saldo cuando se incluye la tasa de envío de %1</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>Se ha encontrado una dirección duplicada. Solo se puede enviar a cada dirección una vez por operación de envío.</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation>Error: ¡Ha fallado la creación de la transacción!</translation>
</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>Error: transacción rechazada. Puede haber ocurrido si alguna de las monedas ya estaba gastada o si ha usado una copia de wallet.dat y las monedas se gastaron en la copia pero no se han marcado así aquí.</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>Envío</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>Ca&ntidad:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>&Pagar a:</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source>
<translation>La dirección a la que enviar el pago (p. ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>Etiquete esta dirección para añadirla a la libreta</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Etiqueta:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation>Elija una dirección de la libreta de direcciones</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Pegar dirección desde portapapeles</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation>Eliminar destinatario</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a GoldDiggerCoin address (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source>
<translation>Introduzca una dirección GoldDiggerCoin (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation>Firmas - Firmar / verificar un mensaje</translation>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation>&Firmar mensaje</translation>
</message>
<message>
<location line="+6"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation>Puede firmar mensajes con sus direcciones para demostrar que las posee. Tenga cuidado de no firmar cualquier cosa vaga, ya que los ataques de phishing pueden tratar de engañarle para suplantar su identidad. Firme solo declaraciones totalmente detalladas con las que usted esté de acuerdo.</translation>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source>
<translation>La dirección con la que firmar el mensaje (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation>Elija una dirección de la libreta de direcciones</translation>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation>Pegar dirección desde portapapeles</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation>Introduzca el mensaje que desea firmar aquí</translation>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation>Firma</translation>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation>Copiar la firma actual al portapapeles del sistema</translation>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this GoldDiggerCoin address</source>
<translation>Firmar el mensaje para demostrar que se posee esta dirección GoldDiggerCoin</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Firmar &mensaje</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation>Limpiar todos los campos de la firma de mensaje</translation>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>Limpiar &todo</translation>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation>&Verificar mensaje</translation>
</message>
<message>
<location line="+6"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation>Introduzca la dirección para la firma, el mensaje (asegurándose de copiar tal cual los saltos de línea, espacios, tabulaciones, etc.) y la firma a continuación para verificar el mensaje. Tenga cuidado de no asumir más información de lo que dice el propio mensaje firmado para evitar fraudes basados en ataques de tipo man-in-the-middle.</translation>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source>
<translation>La dirección con la que se firmó el mensaje (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified GoldDiggerCoin address</source>
<translation>Verificar el mensaje para comprobar que fue firmado con la dirección GoldDiggerCoin indicada</translation>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation>Verificar &mensaje</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation>Limpiar todos los campos de la verificación de mensaje</translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a GoldDiggerCoin address (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source>
<translation>Introduzca una dirección GoldDiggerCoin (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation>Haga clic en "Firmar mensaje" para generar la firma</translation>
</message>
<message>
<location line="+3"/>
<source>Enter GoldDiggerCoin signature</source>
<translation>Introduzca una firma GoldDiggerCoin</translation>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation>La dirección introducida es inválida.</translation>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation>Verifique la dirección e inténtelo de nuevo.</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation>La dirección introducida no corresponde a una clave.</translation>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation>Se ha cancelado el desbloqueo del monedero. </translation>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation>No se dispone de la clave privada para la dirección introducida.</translation>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation>Ha fallado la firma del mensaje.</translation>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation>Mensaje firmado.</translation>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation>No se puede decodificar la firma.</translation>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation>Compruebe la firma e inténtelo de nuevo.</translation>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation>La firma no coincide con el resumen del mensaje.</translation>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation>La verificación del mensaje ha fallado.</translation>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation>Mensaje verificado.</translation>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The GoldDiggerCoin developers</source>
<translation>Los programadores GoldDiggerCoin</translation>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation>Abierto hasta %1</translation>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation>%1/fuera de línea</translation>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/no confirmado</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 confirmaciones</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation>Estado</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation><numerusform>, transmitir a través de %n nodo</numerusform><numerusform>, transmitir a través de %n nodos</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Fecha</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation>Fuente</translation>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>Generado</translation>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation>De</translation>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation>Para</translation>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation>dirección propia</translation>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>etiqueta</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>Crédito</translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation><numerusform>disponible en %n bloque más</numerusform><numerusform>disponible en %n bloques más</numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>no aceptada</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>Débito</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>Comisión de transacción</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>Cantidad neta</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Mensaje</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>Comentario</translation>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation>Identificador de transacción</translation>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation>Las monedas generadas deben esperar 120 bloques antes de que se puedan gastar. Cuando se generó este bloque, se emitió a la red para ser agregado a la cadena de bloques. Si no consigue incorporarse a la cadena, su estado cambiará a "no aceptado" y las monedas no se podrán gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque casi al mismo tiempo que el suyo.</translation>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation>Información de depuración</translation>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Transacción</translation>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation>entradas</translation>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>Cantidad</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>verdadero</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>falso</translation>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation>, todavía no se ha sido difundido satisfactoriamente</translation>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>Abrir para %n bloque más</numerusform><numerusform>Abrir para %n bloques más</numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation>desconocido</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>Detalles de transacción</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Esta ventana muestra información detallada sobre la transacción</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+225"/>
<source>Date</source>
<translation>Fecha</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Tipo</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Dirección</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Cantidad</translation>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>Abrir para %n bloque más</numerusform><numerusform>Abrir para %n bloques más</numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation>Abierto hasta %1</translation>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation>Fuera de línea (%1 confirmaciones)</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation>No confirmado (%1 de %2 confirmaciones)</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Confirmado (%1 confirmaciones)</translation>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation><numerusform>El saldo recién minado estará disponible cuando venza el plazo en %n bloque más</numerusform><numerusform>El saldo recién minado estará disponible cuando venza el plazo en %n bloques más</numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Generado pero no aceptado</translation>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation>Recibido con</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Recibidos de</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Enviado a</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Pago propio</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Minado</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(nd)</translation>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Estado de transacción. Pasa el ratón sobre este campo para ver el número de confirmaciones.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Fecha y hora en que se recibió la transacción.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Tipo de transacción.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Dirección de destino de la transacción.</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Cantidad retirada o añadida al saldo.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation>Todo</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Hoy</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>Esta semana</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Este mes</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Mes pasado</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Este año</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Rango...</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>Recibido con</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Enviado a</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>A usted mismo</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Minado</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Otra</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Introduzca una dirección o etiqueta que buscar</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Cantidad mínima</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Copiar dirección</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Copiar etiqueta</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Copiar cuantía</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation>Copiar identificador de transacción</translation>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>Editar etiqueta</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>Mostrar detalles de la transacción</translation>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation>Exportar datos de la transacción</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Archivos de columnas separadas por coma (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Confirmado</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Fecha</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Tipo</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Etiqueta</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Dirección</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Cantidad</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Error exportando</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>No se pudo escribir en el archivo %1.</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>Rango:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>para</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation>Enviar monedas</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation>&Exportar</translation>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation>Exportar a un archivo los datos de esta pestaña</translation>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation>Respaldo de monedero</translation>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation>Datos de monedero (*.dat)</translation>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation>Ha fallado el respaldo</translation>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation>Se ha producido un error al intentar guardar los datos del monedero en la nueva ubicación.</translation>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation>Se ha completado con éxito la copia de respaldo</translation>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation>Los datos del monedero se han guardado con éxito en la nueva ubicación.</translation>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>GoldDiggerCoin version</source>
<translation>Versión de GoldDiggerCoin</translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation>Uso:</translation>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or golddiggercoind</source>
<translation>Envíar comando a -server o golddiggercoind</translation>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation>Muestra comandos
</translation>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation>Recibir ayuda para un comando
</translation>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation>Opciones:
</translation>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: golddiggercoin.conf)</source>
<translation>Especificar archivo de configuración (predeterminado: golddiggercoin.conf)
</translation>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: golddiggercoind.pid)</source>
<translation>Especificar archivo pid (predeterminado: golddiggercoin.pid)
</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Especificar directorio para los datos</translation>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Establecer el tamaño de caché de la base de datos en megabytes (predeterminado: 25)</translation>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 22556 or testnet: 44556)</source>
<translation>Escuchar conexiones en <puerto> (predeterminado: 22556 o testnet: 44556)</translation>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Mantener como máximo <n> conexiones a pares (predeterminado: 125)</translation>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Conectar a un nodo para obtener direcciones de pares y desconectar</translation>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation>Especifique su propia dirección pública</translation>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>Umbral para la desconexión de pares con mal comportamiento (predeterminado: 100)</translation>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: 86400)</translation>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation>Ha ocurrido un error al configurar el puerto RPC %u para escucha en IPv4: %s</translation>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 22555 or testnet: 44555)</source>
<translation>Escuchar conexiones JSON-RPC en <puerto> (predeterminado: 22555 o testnet:44555)</translation>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Aceptar comandos consola y JSON-RPC
</translation>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Correr como demonio y aceptar comandos
</translation>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation>Usar la red de pruebas
</translation>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>Aceptar conexiones desde el exterior (predeterminado: 1 si no -proxy o -connect)</translation>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=golddiggercoinrpc
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 "GoldDiggerCoin Alert" admin@foo.com
</source>
<translation>%s, debe establecer un valor rpcpassword en el archivo de configuración:
%s
Se recomienda utilizar la siguiente contraseña aleatoria:
rpcuser=golddiggercoinrpc
rpcpassword=%s
(no es necesario recordar esta contraseña)
El nombre de usuario y la contraseña DEBEN NO ser iguales.
Si el archivo no existe, créelo con permisos de archivo de solo lectura.
Se recomienda también establecer alertnotify para recibir notificaciones de problemas.
Por ejemplo: alertnotify=echo %%s | mail -s "GoldDiggerCoin Alert" admin@foo.com
</translation>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation>Ha ocurrido un error al configurar el puerto RPC %u para escuchar mediante IPv6. Recurriendo a IPv4: %s</translation>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation>Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. GoldDiggerCoin is probably already running.</source>
<translation>No se puede bloquear el directorio de datos %s. Probablemente GoldDiggerCoin ya se está ejecutando.</translation>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>¡Error: se ha rechazado la transacción! Esto puede ocurrir si ya se han gastado algunas de las monedas del monedero, como ocurriría si hubiera hecho una copia de wallet.dat y se hubieran gastado monedas a partir de la copia, con lo que no se habrían marcado aquí como gastadas.</translation>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation>¡Error: Esta transacción requiere una comisión de al menos %s debido a su monto, complejidad, o al uso de fondos recién recibidos!</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation>Ejecutar orden cuando se reciba un aviso relevante (%s en cmd se reemplazará por el mensaje)</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation>Establecer el tamaño máximo de las transacciones de alta prioridad/comisión baja en bytes (predeterminado:27000)</translation>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation>Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería.</translation>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation>Aviso: ¡-paytxfee tiene un valor muy alto! Esta es la comisión que pagará si envía una transacción.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation>Aviso: ¡Las transacciones mostradas pueden no ser correctas! Puede necesitar una actualización o bien otros nodos necesitan actualizarse.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong GoldDiggerCoin will not work properly.</source>
<translation>Precaución: Por favor, ¡revise que la fecha y hora de su ordenador son correctas! Si su reloj está mal, GoldDiggerCoin no funcionará correctamente.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation>Aviso: ¡Error al leer wallet.dat! Todas las claves se han leído correctamente, pero podrían faltar o ser incorrectos los datos de transacciones o las entradas de la libreta de direcciones.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation>Aviso: ¡Recuperados datos de wallet.dat corrupto! El wallet.dat original se ha guardado como wallet.{timestamp}.bak en %s; si hubiera errores en su saldo o transacciones, deberá restaurar una copia de seguridad.</translation>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation>Intento de recuperar claves privadas de un wallet.dat corrupto</translation>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation>Opciones de creación de bloques:</translation>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation>Conectar sólo a los nodos (o nodo) especificados</translation>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation>Corrupción de base de datos de bloques detectada.</translation>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>Descubrir dirección IP propia (predeterminado: 1 al escuchar sin -externalip)</translation>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation>¿Quieres reconstruir la base de datos de bloques ahora?</translation>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation>Error al inicializar la base de datos de bloques</translation>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation>Error al inicializar el entorno de la base de datos del monedero %s</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation>Error cargando base de datos de bloques</translation>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation>Error al abrir base de datos de bloques.</translation>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation>Error: ¡Espacio en disco bajo!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation>Error: ¡El monedero está bloqueado; no se puede crear la transacción!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation>Error: error de sistema: </translation>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>Ha fallado la escucha en todos los puertos. Use -listen=0 si desea esto.</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation>No se ha podido leer la información de bloque</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation>No se ha podido leer el bloque</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation>No se ha podido sincronizar el índice de bloques</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation>No se ha podido escribir en el índice de bloques</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation>No se ha podido escribir la información de bloques</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation>No se ha podido escribir el bloque</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation>No se ha podido escribir la información de archivo</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation>No se ha podido escribir en la base de datos de monedas</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation>No se ha podido escribir en el índice de transacciones</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation>No se han podido escribir los datos de deshacer</translation>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation>Encontrar pares mediante búsqueda de DNS (predeterminado: 1 salvo con -connect)</translation>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation>Generar monedas (por defecto: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation>Cuántos bloques comprobar al iniciar (predeterminado: 288, 0 = todos)</translation>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation>Como es de exhaustiva la verificación de bloques (0-4, por defecto 3)</translation>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation>No hay suficientes descriptores de archivo disponibles. </translation>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation>Reconstruir el índice de la cadena de bloques a partir de los archivos blk000??.dat actuales</translation>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation>Establecer el número de hilos para atender las llamadas RPC (predeterminado: 4)</translation>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation>Verificando bloques...</translation>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation>Verificando monedero...</translation>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation>Importa los bloques desde un archivo blk000??.dat externo</translation>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation>Configura el número de hilos para el script de verificación (hasta 16, 0 = auto, <0 = leave that many cores free, por fecto: 0)</translation>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation>Información</translation>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation>Dirección -tor inválida: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation>Inválido por el monto -minrelaytxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation>Inválido por el monto -mintxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation>Mantener índice de transacciones completo (predeterminado: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation>Búfer de recepción máximo por conexión, <n>*1000 bytes (predeterminado: 5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>Búfer de recepción máximo por conexión, , <n>*1000 bytes (predeterminado: 1000)</translation>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation>Aceptar solamente cadena de bloques que concuerde con los puntos de control internos (predeterminado: 1)</translation>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>Conectarse solo a nodos de la red <net> (IPv4, IPv6 o Tor)</translation>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation>Mostrar información de depuración adicional. Implica todos los demás opciones -debug*</translation>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation>Mostrar información de depuración adicional</translation>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp (default: 1)</source>
<translation>Anteponer marca temporal a la información de depuración</translation>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the GoldDiggerCoin Wiki for SSL setup instructions)</source>
<translation>Opciones SSL: (ver la GoldDiggerCoin Wiki para instrucciones de configuración SSL)</translation>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation>Elija la versión del proxy socks a usar (4-5, predeterminado: 5)</translation>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation>Enviar información de trazas/depuración al depurador</translation>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation>Establecer tamaño máximo de bloque en bytes (predeterminado: 250000)</translation>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation>Establecer tamaño mínimo de bloque en bytes (predeterminado: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>Reducir el archivo debug.log al iniciar el cliente (predeterminado: 1 sin -debug)</translation>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation>Transacción falló</translation>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>Especificar el tiempo máximo de conexión en milisegundos (predeterminado: 5000)</translation>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation>Error de sistema: </translation>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation>Monto de la transacción muy pequeño</translation>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation>Montos de transacciones deben ser positivos</translation>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation>Transacción demasiado grande</translation>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>Usar UPnP para asignar el puerto de escucha (predeterminado: 0)</translation>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>Usar UPnP para asignar el puerto de escucha (predeterminado: 1 al escuchar)</translation>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation>Utilizar proxy para conectar a Tor servicios ocultos (predeterminado: igual que -proxy)</translation>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation>Nombre de usuario para las conexiones JSON-RPC
</translation>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation>Aviso</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>Aviso: Esta versión es obsoleta, actualización necesaria!</translation>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation>Necesita reconstruir las bases de datos con la opción -reindex para modificar -txindex</translation>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat corrupto. Ha fallado la recuperación.</translation>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation>Contraseña para las conexiones JSON-RPC
</translation>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>Permitir conexiones JSON-RPC desde la dirección IP especificada
</translation>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Enviar comando al nodo situado en <ip> (predeterminado: 127.0.0.1)
</translation>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Ejecutar un comando cuando cambia el mejor bloque (%s en cmd se sustituye por el hash de bloque)</translation>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation>Actualizar el monedero al último formato</translation>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Ajustar el número de claves en reserva <n> (predeterminado: 100)
</translation>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Volver a examinar la cadena de bloques en busca de transacciones del monedero perdidas</translation>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>Usar OpenSSL (https) para las conexiones JSON-RPC
</translation>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Certificado del servidor (predeterminado: server.cert)
</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Clave privada del servidor (predeterminado: server.pem)
</translation>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation>Cifrados aceptados (predeterminado: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
</translation>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation>Este mensaje de ayuda
</translation>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>No es posible conectar con %s en este sistema (bind ha dado el error %d, %s)</translation>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation>Conectar mediante proxy socks</translation>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Permitir búsquedas DNS para -addnode, -seednode y -connect</translation>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation>Cargando direcciones...</translation>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>Error al cargar wallet.dat: el monedero está dañado</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of GoldDiggerCoin</source>
<translation>Error al cargar wallet.dat: El monedero requiere una versión más reciente de GoldDiggerCoin</translation>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart GoldDiggerCoin to complete</source>
<translation>El monedero ha necesitado ser reescrito. Reinicie GoldDiggerCoin para completar el proceso</translation>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation>Error al cargar wallet.dat</translation>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Dirección -proxy inválida: '%s'</translation>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>La red especificada en -onlynet '%s' es desconocida</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation>Solicitada versión de proxy -socks desconocida: %i</translation>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>No se puede resolver la dirección de -bind: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>No se puede resolver la dirección de -externalip: '%s'</translation>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Cantidad inválida para -paytxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation>Cuantía no válida</translation>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation>Fondos insuficientes</translation>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation>Cargando el índice de bloques...</translation>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Añadir un nodo al que conectarse y tratar de mantener la conexión abierta</translation>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. GoldDiggerCoin is probably already running.</source>
<translation>No es posible conectar con %s en este sistema. Probablemente GoldDiggerCoin ya está ejecutándose.</translation>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation>Tarifa por KB que añadir a las transacciones que envíe</translation>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation>Cargando monedero...</translation>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation>No se puede rebajar el monedero</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation>No se puede escribir la dirección predeterminada</translation>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation>Reexplorando...</translation>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation>Generado pero no aceptado</translation>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation>Para utilizar la opción %s</translation>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation>Error</translation>
</message>
<message>
<location line="-31"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation>Tiene que establecer rpcpassword=<contraseña> en el fichero de configuración: ⏎
%s ⏎
Si el archivo no existe, créelo con permiso de lectura solamente del propietario.</translation>
</message>
</context>
</TS> | golddiggercoin/golddiggercoin | src/qt/locale/bitcoin_es.ts | TypeScript | mit | 120,085 |
#include "../../include/domains/AODeterminization.h"
#include "../../include/domains/DummyAction.h"
AllOutcomesDeterminization::
AllOutcomesDeterminization(mlcore::Problem* problem) {
originalProblem_ = problem;
problem->generateAll();
int s_idx = 0;
for (mlcore::State* s : problem->states()) {
states_.insert(s);
if (s == problem->initialState())
this->s0 = s;
stateIndexMap_[s] = s_idx;
transitionGraph_.push_back(std::unordered_map<int, int>());
allStates_.push_back(s);
s_idx++;
}
int action_idx = 0;
for (mlcore::State* s : problem->states()) {
int s_idx = stateIndexMap_[s];
for (mlcore::Action* a : problem->actions()) {
if (!problem->applicable(s, a))
continue;
for (auto& successor : problem->transition(s, a)) {
int s_prime_idx = stateIndexMap_[successor.su_state];
transitionGraph_[s_idx][action_idx] = s_prime_idx;
actionCosts_.push_back(problem->cost(s, a));
actions_.push_back(new DummyAction(action_idx));
actionsVector_.push_back(actions_.back());
action_idx++;
}
}
}
}
std::list<mlcore::Action*>
AllOutcomesDeterminization::actions(mlcore::State* s) const {
int s_idx = stateIndexMap_.at(s);
std::list<mlcore::Action*> stateActions;
for (auto& entry : transitionGraph_.at(s_idx)) {
stateActions.push_back(actionsVector_[entry.first]);
}
return stateActions;
}
bool AllOutcomesDeterminization::goal(mlcore::State* s) const {
return originalProblem_->goal(s);
}
std::list<mlcore::Successor>
AllOutcomesDeterminization::transition(mlcore::State* s, mlcore::Action* a) {
int s_idx = stateIndexMap_[s];
DummyAction* dummya = static_cast<DummyAction*>(a);
int s_prime_idx = transitionGraph_[s_idx][dummya->id()];
std::list<mlcore::Successor> successors;
successors.push_back(mlcore::Successor(allStates_[s_prime_idx], 1.0));
return successors;
}
double
AllOutcomesDeterminization::cost(mlcore::State* s, mlcore::Action* a) const {
DummyAction* dummya = static_cast<DummyAction*>(a);
return actionCosts_[dummya->id()];
}
bool AllOutcomesDeterminization::
applicable(mlcore::State* s, mlcore::Action* a) const {
int s_idx = stateIndexMap_.at(s);
DummyAction* dummya = static_cast<DummyAction*>(a);
return transitionGraph_.at(s_idx).count(dummya->id()) > 0;
}
| luisenp/mdp-lib | src/domains/AODeterminization.cpp | C++ | mit | 2,532 |
<?php
namespace BigD\ThemeBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
*/
class Configuration implements ConfigurationInterface
{
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('theme');
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for
// more information on that topic.
return $treeBuilder;
}
}
| matudelatower/BigD | src/BigD/ThemeBundle/DependencyInjection/Configuration.php | PHP | mit | 870 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="fr">
<head>
<!-- Generated by javadoc (1.8.0_121) on Fri Mar 30 17:39:20 CEST 2018 -->
<title>F-Index</title>
<meta name="date" content="2018-03-30">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="F-Index";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-5.html">Prev Letter</a></li>
<li><a href="index-7.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-files/index-6.html" target="_top">Frames</a></li>
<li><a href="index-6.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>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="contentContainer"><a href="index-1.html">A</a> <a href="index-2.html">B</a> <a href="index-3.html">C</a> <a href="index-4.html">D</a> <a href="index-5.html">E</a> <a href="index-6.html">F</a> <a href="index-7.html">G</a> <a href="index-8.html">I</a> <a href="index-9.html">L</a> <a href="index-10.html">M</a> <a href="index-11.html">P</a> <a href="index-12.html">R</a> <a href="index-13.html">S</a> <a href="index-14.html">T</a> <a href="index-15.html">V</a> <a name="I:F">
<!-- -->
</a>
<h2 class="title">F</h2>
<dl>
<dt><a href="../interfaceGraphique/FenetreConfiguration.html" title="class in interfaceGraphique"><span class="typeNameLink">FenetreConfiguration</span></a> - Class in <a href="../interfaceGraphique/package-summary.html">interfaceGraphique</a></dt>
<dd>
<div class="block">Classe FenetreConfiguration</div>
</dd>
<dt><span class="memberNameLink"><a href="../interfaceGraphique/FenetreConfiguration.html#fentePiece--">fentePiece()</a></span> - Method in class interfaceGraphique.<a href="../interfaceGraphique/FenetreConfiguration.html" title="class in interfaceGraphique">FenetreConfiguration</a></dt>
<dd>
<div class="block">Permet de savoir si l'on a choisit d'avoir une fente a piece uniquement</div>
</dd>
<dt><span class="memberNameLink"><a href="../coeur/Controleur.html#fentePresente--">fentePresente()</a></span> - Method in class coeur.<a href="../coeur/Controleur.html" title="class in coeur">Controleur</a></dt>
<dd>
<div class="block">Permet de savoir si au moins une fente est presente sur le distributeur</div>
</dd>
<dt><span class="memberNameLink"><a href="../coeur/GraphiqueACoeur.html#fentePresente--">fentePresente()</a></span> - Method in interface coeur.<a href="../coeur/GraphiqueACoeur.html" title="interface in coeur">GraphiqueACoeur</a></dt>
<dd>
<div class="block">Communique si il y a au moins une fente presente sur le distributeur</div>
</dd>
<dt><span class="memberNameLink"><a href="../coeur/GraphiqueACoeurImpl.html#fentePresente--">fentePresente()</a></span> - Method in class coeur.<a href="../coeur/GraphiqueACoeurImpl.html" title="class in coeur">GraphiqueACoeurImpl</a></dt>
<dd> </dd>
<dt><span class="memberNameLink"><a href="../stockage/CoeurAStockage.html#fentePresente--">fentePresente()</a></span> - Method in interface stockage.<a href="../stockage/CoeurAStockage.html" title="interface in stockage">CoeurAStockage</a></dt>
<dd>
<div class="block">Permet de savoir si au moins une fente est presente sur le distributeur</div>
</dd>
<dt><span class="memberNameLink"><a href="../stockage/CoeurAStockageImpl.html#fentePresente--">fentePresente()</a></span> - Method in class stockage.<a href="../stockage/CoeurAStockageImpl.html" title="class in stockage">CoeurAStockageImpl</a></dt>
<dd> </dd>
<dt><a href="../interfaceGraphique/FPass10Trajets.html" title="class in interfaceGraphique"><span class="typeNameLink">FPass10Trajets</span></a> - Class in <a href="../interfaceGraphique/package-summary.html">interfaceGraphique</a></dt>
<dd>
<div class="block">Classe FPass10Trajets</div>
</dd>
<dt><span class="memberNameLink"><a href="../interfaceGraphique/FPass10Trajets.html#FPass10Trajets-double-double-">FPass10Trajets(double, double)</a></span> - Constructor for class interfaceGraphique.<a href="../interfaceGraphique/FPass10Trajets.html" title="class in interfaceGraphique">FPass10Trajets</a></dt>
<dd> </dd>
</dl>
<a href="index-1.html">A</a> <a href="index-2.html">B</a> <a href="index-3.html">C</a> <a href="index-4.html">D</a> <a href="index-5.html">E</a> <a href="index-6.html">F</a> <a href="index-7.html">G</a> <a href="index-8.html">I</a> <a href="index-9.html">L</a> <a href="index-10.html">M</a> <a href="index-11.html">P</a> <a href="index-12.html">R</a> <a href="index-13.html">S</a> <a href="index-14.html">T</a> <a href="index-15.html">V</a> </div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-5.html">Prev Letter</a></li>
<li><a href="index-7.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-files/index-6.html" target="_top">Frames</a></li>
<li><a href="index-6.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>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| AllanDubrulle/distributeur_tickets | Implementation/ML-TheoDaix,AllanDubrulle,VictorVerhoye-implementation/Documentation/Javadoc/index-files/index-6.html | HTML | mit | 7,569 |
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace Flarum\Post;
/**
* @property array $content
*/
abstract class AbstractEventPost extends Post
{
/**
* Unserialize the content attribute from the database's JSON value.
*
* @param string $value
* @return array
*/
public function getContentAttribute($value)
{
return json_decode($value, true);
}
/**
* Serialize the content attribute to be stored in the database as JSON.
*
* @param string $value
*/
public function setContentAttribute($value)
{
$this->attributes['content'] = json_encode($value);
}
}
| flarum/core | src/Post/AbstractEventPost.php | PHP | mit | 783 |
var searchData=
[
['setdebugflags',['setDebugFlags',['../dwarfDbgDebugInfo_8c.html#ab42dd1f5e0f83cb14eed0902aa036a95',1,'dwarfDbgDebugInfo.c']]],
['showchildren',['showChildren',['../dwarfDbgDieInfo_8c.html#a7e7301f838fc67cbb4555c6c250c2dc0',1,'dwarfDbgDieInfo.c']]],
['showcontents',['showContents',['../dwarfDbgLocationInfo_8c.html#af177f930f13d0122065173a8bfbd0317',1,'dwarfDbgLocationInfo.c']]],
['showdieentries',['showDieEntries',['../dwarfDbgDieInfo_8c.html#a01c1ab81a588e24d9d82a9aa8ace1a09',1,'dwarfDbgDieInfo.c']]],
['showsiblings',['showSiblings',['../dwarfDbgDieInfo_8c.html#a6d210b422753428ebf1edc2694a5563f',1,'dwarfDbgDieInfo.c']]]
];
| apwiede/nodemcu-firmware | docs/dwarfDbg/search/functions_8.js | JavaScript | mit | 660 |
/*Owner & Copyrights: Vance King Saxbe. A.*//*Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxbe@yahoo.com. Development teams from Power Dominion Enterprise, Precieux Consulting. Project sponsored by GoldSax Foundation, GoldSax Group and executed by GoldSax Manager.*/
$stream = file_get_contents('HITEJINROLAST.txt');
$avgp = "21500.00";
$high = "21750.00";
$low = "21250.00";
echo "&L=".$stream."&N=HITEJINRO&";
$temp = file_get_contents("HITEJINROTEMP.txt", "r");
if ($stream != $temp ) {
$mhigh = ($avgp + $high)/2;
$mlow = ($avgp + $low)/2;
$llow = ($low - (($avgp - $low)/2));
$hhigh = ($high + (($high - $avgp)/2));
$diff = $stream - $temp;
$diff = number_format($diff, 2, '.', '');
$avgp = number_format($avgp, 2, '.', '');
if ( $stream > $temp ) {
if ( ($stream > $mhigh ) && ($stream < $high)) { echo "&sign=au" ; }
if ( ($stream < $mlow ) && ($stream > $low)) { echo "&sign=ad" ; }
if ( $stream < $llow ) { echo "&sign=as" ; }
if ( $stream > $hhigh ) { echo "&sign=al" ; }
if ( ($stream < $hhigh) && ($stream > $high)) { echo "&sign=auu" ; }
if ( ($stream > $llow) && ($stream < $low)) { echo "&sign=add" ; }
//else { echo "&sign=a" ; }
$filedish = fopen("C:\wamp\www\malert.txt", "a+");
$write = fputs($filedish, "HITEJINRO:".$stream. ":Moving up:".$diff.":".$high.":".$low.":".$avgp."\r\n");
fclose( $filedish );}
if ( $stream < $temp ) {
if ( ($stream >$mhigh) && ($stream < $high)) { echo "&sign=bu" ; }
if ( ($stream < $mlow) && ($stream > $low)) { echo "&sign=bd" ; }
if ( $stream < $llow ) { echo "&sign=bs" ; }
if ( $stream > $hhigh ) { echo "&sign=bl" ; }
if ( ($stream < $hhigh) && ($stream > $high)) { echo "&sign=buu" ; }
if ( ($stream > $llow) && ($stream < $low)) { echo "&sign=bdd" ; }
// else { echo "&sign=b" ; }
$filedish = fopen("C:\wamp\www\malert.txt", "a+");
$write = fputs($filedish, "HITEJINRO:".$stream. ":Moving down:".$diff.":".$high.":".$low.":".$avgp."\r\n");
fclose( $filedish );}
$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$time = date('h:i:s',$new_time);
$filename= 'HITEJINRO.txt';
$file = fopen($filename, "a+" );
fwrite( $file, $stream.":".$time."\r\n" );
fclose( $file );
if (($stream > $mhigh ) && ($temp<= $mhigh ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$time = date('h:i:s',$new_time);
$risk = ($stream - $low) * (200000/$stream);
$risk = (int)$risk;
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:".$stream. ":Approaching:PHIGH:".$high.":Buy Cost:".$risk."\r\n");
fclose( $filedash );
}
if (($stream < $mhigh ) && ($temp>= $mhigh ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$risk = ($high - $stream) * (200000/$stream);
$risk = (int)$risk;
$time = date('h:i:s',$new_time);
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:". $stream.":Moving Down:PHIGH:".$high.":short Cost:".$risk."\r\n");
fclose( $filedash );
}
if (($stream > $mlow ) && ($temp<= $mlow ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$time = date('h:i:s',$new_time);
$risk = ($stream - $low) * (200000/$stream);
$risk = (int)$risk;
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:".$stream. ":Moving Up:PLOW:".$low.":Buy Cost:".$risk."\r\n");
fclose( $filedash );
}
if (($stream < $mlow ) && ($temp>= $mlow ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$risk = ($high - $stream) * (200000/$stream);
$risk = (int)$risk;
$time = date('h:i:s',$new_time);
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:". $stream.":Approaching:PLOW:".$low.":short Cost:".$risk."\r\n");
fclose( $filedash );
}
if (($stream > $high ) && ($temp<= $high ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$time = date('h:i:s',$new_time);
$risk = ($stream - $low) * (200000/$stream);
$risk = (int)$risk;
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:".$stream. ":Breaking:PHIGH:".$high.":Buy Cost:".$risk."\r\n");
fclose( $filedash );
}
if (($stream > $hhigh ) && ($temp<= $hhigh ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$time = date('h:i:s',$new_time);
$risk = ($stream - $low) * (200000/$stream);
$risk = (int)$risk;
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:".$stream. ":Moving Beyond:PHIGH:".$high.":Buy Cost:".$risk."\r\n");
fclose( $filedash );
}
if (($stream < $hhigh ) && ($temp>= $hhigh ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$time = date('h:i:s',$new_time);
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:". $stream. ":Coming near:PHIGH:".$high.":Buy Cost:".$risk."\r\n");
fclose( $filedash );
}
if (($stream < $high ) && ($temp>= $high ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$time = date('h:i:s',$new_time);
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:". $stream. ":Retracing:PHIGH:".$high."\r\n");
fclose( $filedash );
}
if (($stream < $llow ) && ($temp>= $llow ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$risk = ($high - $stream) * (200000/$stream);
$risk = (int)$risk;
$time = date('h:i:s',$new_time);
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:". $stream.":Breaking Beyond:PLOW:".$low.":short Cost:".$risk."\r\n");
fclose( $filedash );
}
if (($stream < $low ) && ($temp>= $low ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$risk = ($high - $stream) * (200000/$stream);
$risk = (int)$risk;
$time = date('h:i:s',$new_time);
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:". $stream.":Breaking:PLOW:".$low.":short Cost:".$risk."\r\n");
fclose( $filedash );
}
if (($stream > $llow ) && ($temp<= $llow ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$time = date('h:i:s',$new_time);
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:". $stream.":Coming near:PLOW:".$low.":short Cost:".$risk."\r\n");
fclose( $filedash );
}
if (($stream > $low ) && ($temp<= $low ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$time = date('h:i:s',$new_time);
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:". $stream.":Retracing:PLOW:".$low."\r\n");
fclose( $filedash );
}
if (($stream > $avgp ) && ($temp<= $avgp ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$risk = ($stream - $low) * (200000/$stream);
$risk = (int)$risk;
$avgp = number_format($avgp, 2, '.', '');
$time = date('h:i:s',$new_time);
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:".$stream. ":Sliding up:PAVG:".$avgp.":Buy Cost:".$risk."\r\n");
fclose( $filedash );
}
if (($stream < $avgp ) && ($temp>= $avgp ))
{$my_time = date('h:i:s',time());
$seconds2add = 19800;
$new_time= strtotime($my_time);
$new_time+=$seconds2add;
$risk = ($high - $stream) * (200000/$stream);
$risk = (int)$risk;
$avgp = number_format($avgp, 2, '.', '');
$time = date('h:i:s',$new_time);
$filedash = fopen("C:\wamp\www\alert.txt", "a+");
$wrote = fputs($filedash, "HITEJINRO:".$stream. ":Sliding down:PAVG:".$avgp.":Short Cost:".$risk."\r\n");
fclose( $filedash );
}
}
$filedash = fopen("HITEJINROTEMP.txt", "w");
$wrote = fputs($filedash, $stream);
fclose( $filedash );
//echo "&chg=".$json_output['cp']."&";
?>
/*email to provide support at vancekingsaxbe@powerdominionenterprise.com, businessaffairs@powerdominionenterprise.com, For donations please write to fundraising@powerdominionenterprise.com*/ | VanceKingSaxbeA/KOSPI-Engine | App/HITEJINRO.php | PHP | mit | 9,175 |
import 'reflect-metadata';
import 'rxjs/Rx';
import 'zone.js';
import AppComponent from './components/AppComponent.js';
import { bootstrap } from 'angular2/platform/browser';
bootstrap(AppComponent);
| Scoutlit/realtimeSyncing | webclient/app/app.js | JavaScript | mit | 201 |
#!/usr/bin/python
import pexpect
import sys
import logging
import vt102
import os
import time
def termcheck(child, timeout=0):
time.sleep(0.05)
try:
logging.debug("Waiting for EOF or timeout=%d"%timeout)
child.expect(pexpect.EOF, timeout=timeout)
except pexpect.exceptions.TIMEOUT:
logging.debug("Hit timeout and have %d characters in child.before"%len(child.before))
return child.before
def termkey(child, stream, screen, key, timeout=0):
logging.debug("Sending '%s' to child"%key)
child.send(key)
s = termcheck(child)
logging.debug("Sending child.before text to vt102 stream")
stream.process(child.before)
logging.debug("vt102 screen dump")
logging.debug(screen)
# START LOGGING
logging.basicConfig(filename='menu_demo.log',level=logging.DEBUG)
# SETUP VT102 EMULATOR
#rows, columns = os.popen('stty size', 'r').read().split()
rows, columns = (50,120)
stream=vt102.stream()
screen=vt102.screen((int(rows), int(columns)))
screen.attach(stream)
logging.debug("Setup vt102 with %d %d"%(int(rows),int(columns)))
logging.debug("Starting demo2.py child process...")
child = pexpect.spawn('./demo2.py', maxread=65536, dimensions=(int(rows),int(columns)))
s = termcheck(child)
logging.debug("Sending child.before (len=%d) text to vt102 stream"%len(child.before))
stream.process(child.before)
logging.debug("vt102 screen dump")
logging.debug(screen)
termkey(child, stream, screen, "a")
termkey(child, stream, screen, "1")
logging.debug("Quiting...")
| paulboal/pexpect-curses | demo/demo3.py | Python | mit | 1,476 |
<?php
namespace Outil\ServiceBundle\Param;
use Symfony\Component\HttpKernel\Exception\Exception;
class Param{
// private $mailer;
// private $locale;
// private $minLength;
// public function __construct(\Swift_Mailer $mailer, $locale, $minLength)
// {
// $this->mailer = $mailer;
// $this->locale = $locale;
// $this->minLength = (int) $minLength;
// }
/**
* Vérifie si le texte est un spam ou non
*
* param string $text
* return bool
*/
public function except($text)
{
throw new \Exception('Votre message a été détecté comme spam !');
}
} | junioraby/architec.awardspace.info | src/Outil/ServiceBundle/Param/Param.php | PHP | mit | 605 |
#include "CharTypes.h"
namespace GeneHunter {
bool firstMatchSecond( char c1, char c2 )
{
if ( c1 == c2 ) return true;
if ( c1 == 'U' and c2 == 'T' ) return true;
if ( c1 == 'T' and c2 == 'U' ) return true;
if ( c1 == 'K' and ( c2 == 'G' or c2 == 'T' )) return true;
if ( c1 == 'S' and ( c2 == 'G' or c2 == 'C' )) return true;
if ( c1 == 'R' and ( c2 == 'G' or c2 == 'A' )) return true;
if ( c1 == 'M' and ( c2 == 'A' or c2 == 'C' )) return true;
if ( c1 == 'W' and ( c2 == 'A' or c2 == 'T' )) return true;
if ( c1 == 'Y' and ( c2 == 'T' or c2 == 'C' )) return true;
return false;
}
} // namespace GeneHunter
| BrainTwister/GeneHunter | src/GenomeLib/CharTypes.cpp | C++ | mit | 652 |
using System;
using System.Collections.Generic;
using System.Text;
namespace DesignPatterns.Behavioral.Visitor
{
public class Director : Employee
{
public Director(string name, double income, int vacationDays)
: base(name, income, vacationDays) { }
}
}
| Ysovuka/design-patterns | src/c-sharp/DesignPatterns/Behavioral/Visitor/Director.cs | C# | mit | 289 |
<!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>ARDP: /Developer/school/ardp/build/doc/html/search/classes_2.js File 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">ARDP
 <span id="projectnumber">2.1.3</span>
</div>
<div id="projectbrief">Another RDF Document Parser</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="../../pages.html"><span>Related Pages</span></a></li>
<li><a href="../../annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</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="../../files.html"><span>File List</span></a></li>
<li><a href="../../globals.html"><span>Globals</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="../../dir_4fef79e7177ba769987a8da36c892c5f.html">build</a></li><li class="navelem"><a class="el" href="../../dir_6c89d1ed406002b4e6ebce07fb51a507.html">doc</a></li><li class="navelem"><a class="el" href="../../dir_6d59e61439e3c30df274bbb82d8db25d.html">html</a></li><li class="navelem"><a class="el" href="../../dir_2556a4a0510dd1645ff20abdc7f57c5f.html">search</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">classes_2.js File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a href="../../d7/d02/classes__2_8js_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ad01a7523f103d6242ef9b0451861231e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d8/d3c/util_8h.html#a335628f2e9085305224b4f9cc6e95ed5">var</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d02/classes__2_8js.html#ad01a7523f103d6242ef9b0451861231e">searchData</a></td></tr>
<tr class="separator:ad01a7523f103d6242ef9b0451861231e"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="ad01a7523f103d6242ef9b0451861231e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d8/d3c/util_8h.html#a335628f2e9085305224b4f9cc6e95ed5">var</a> searchData</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">=</div>
<div class="line">[</div>
<div class="line"> [<span class="stringliteral">'cb'</span>,[<span class="stringliteral">'cb'</span>,[<span class="stringliteral">'../structcb.html'</span>,1,<span class="stringliteral">''</span>]]]</div>
<div class="line">]</div>
</div><!-- fragment -->
<p>Definition at line <a class="el" href="../../d7/d02/classes__2_8js_source.html#l00001">1</a> of file <a class="el" href="../../d7/d02/classes__2_8js_source.html">classes_2.js</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Apr 19 2016 02:58:08 for ARDP 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>
| michto01/ardp | doc/html/d7/d02/classes__2_8js.html | HTML | mit | 6,222 |
# simply_smoked
| SeanWitt/SeanWitt.github.io | README.md | Markdown | mit | 18 |
class CreateImages < ActiveRecord::Migration
def change
create_table :images do |t|
t.string :title, :null => false
t.boolean :free_shipping, :null => false, :default => false
t.timestamps
end
end
end
| piggybak/piggybak_free_shipping_by_product | test/dummy/db/migrate/20111231040354_create_images.rb | Ruby | mit | 231 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.