repo_name
stringlengths 4
116
| path
stringlengths 4
379
| size
stringlengths 1
7
| content
stringlengths 3
1.05M
| license
stringclasses 15
values |
---|---|---|---|---|
USStateDept/thecurrent | models/entities/TC_DashboardSource_EntityModel.class.php | 2533 | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of TC_DashboardSource_Entity
*
* @author KottkeDP
*/
class TC_DashboardSource_EntityModel extends THOR_EntityModel{
public function __construct($entity_id = null,
$host_id = null,
THOR_HostModel $host = null,
$is_active = null,
$created_date = null,
$last_edited = null,
$owner = null,
$dashboardsource_priority = null,
$dashboardsource_priority_metaID = null,
TC_DashboardSource_EntityModel $priorVersion = null) {
$validMetadataKeys = array(
'dashboardsource_priority',
'dashboardsource_priority_metaID'
);
$metadata = array();
parent::__construct($entity_id, $host_id, ValidEntityTypes::SOURCE, $host, $is_active, $created_date, $last_edited, $owner, $validMetadataKeys, $metadata, $priorVersion);
$this->set_dashboard_priority($dashboardsource_priority);
$this->set_dashboard_priority_metaID($dashboardsource_priority_metaID);
}
public function get_dashboard_priority()
{
$pairs = $this->get_metadata();
if(array_key_exists('dashboardsource_priority', $pairs))
{
return $pairs['dashboardsource_priority'];
}
else
{
return false;
}
}
public function set_dashboard_priority($dashboardsource_priority)
{
$pairs = $this->get_metadata();
$pairs['dashboardsource_priority'] = $dashboardsource_priority;
$this->set_metadata($pairs);
}
public function get_dashboard_priority_metaID()
{
$pairs = $this->get_metadata();
if(array_key_exists('dashboardsource_priority_metaID', $pairs))
{
return $pairs['dashboardsource_priority_metaID'];
}
else
{
return false;
}
}
public function set_dashboard_priority_metaID($dashboardsource_priority_metaID)
{
$pairs = $this->get_metadata();
$pairs['dashboardsource_priority_metaID'] = $dashboardsource_priority_metaID;
$this->set_metadata($pairs);
}
}
?>
| mit |
plivo/plivo-dotnet | src/Plivo/XML/S.cs | 575 | using dict = System.Collections.Generic.Dictionary<string, string>;
using list = System.Collections.Generic.List<string>;
namespace Plivo.XML
{
public class S : PlivoElement
{
public S(string body)
: base(body)
{
Nestables = new list() {
"Break",
"Cont",
"Emphasis",
"Lang",
"Phoneme",
"Prosody",
"SayAs",
"Sub",
"W"
};
ValidAttributes = new list() {""};
Element.Name = GetType().Name.ToLower();
}
}
} | mit |
EddyVerbruggen/nativescript-plugin-firebase | src/mlkit/custommodel/index.d.ts | 1252 | import { MLKitCameraView, MLKitVisionOptions, MLKitVisionResult } from "../index";
export interface MLKitCustomModelResultValue {
text: string;
confidence: number;
}
export interface MLKitCustomModelResult extends MLKitVisionResult {
result: Array<MLKitCustomModelResultValue>;
}
export type MLKitCustomModelType = "FLOAT32" | "QUANT";
export interface TNSCustomModelInput {
shape: Array<number>,
type: MLKitCustomModelType
}
// see https://firebase.google.com/docs/ml-kit/ios/use-custom-models
export interface MLKitCustomModelOptions extends MLKitVisionOptions {
localModelFile?: string;
labelsFile: string;
/**
* Default 5
*/
maxResults?: number;
modelInput: Array<TNSCustomModelInput>
/**
* Ignoring this for now as we deduct it from the model spec.
*/
// modelOutput?: Array<{
// shape: Array<number>,
// type: MLKitCustomModelType
// }>
/**
* Never got this working, so not supporting it for now.
*/
// cloudModelName?: string;
/**
* Default false
*/
// requireWifiForCloudModelDownload?: boolean;
}
export declare function useCustomModel(options: MLKitCustomModelOptions): Promise<MLKitCustomModelResult>;
export declare class MLKitCustomModel extends MLKitCameraView {
}
| mit |
mpkato/interleaving | interleaving/__init__.py | 460 | from .ranking import BalancedRanking
from .ranking import CreditRanking
from .ranking import ProbabilisticRanking
from .ranking import TeamRanking
from .ranking import PairwisePreferenceRanking
from .balanced import Balanced
from .probabilistic import Probabilistic
from .team_draft import TeamDraft
from .optimized import Optimized
from .roughly_optimized import RoughlyOptimized
from .pairwise_preference import PairwisePreference
from . import simulation
| mit |
miloslavthon/uai628-rezervacni-system | RezervacniSystem.Data.NHibernate/PozadavekNaRegistraciKlientaRepository.cs | 881 | using RezervacniSystem.Domain.Model.Klienti;
using RezervacniSystem.Domain.Model.PozadavkyNaRegistraciKlientu;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RezervacniSystem.Data.NHibernate
{
public class PozadavekNaRegistraciKlientaRepository : DomainObjectRepository<PozadavekNaRegistraciKlienta>, IPozadavekNaRegistraciKlientaRepository
{
public PozadavekNaRegistraciKlienta VratPozadavekDleKlientaAPoskytovatele(int idKlienta, int idPoskytovatele)
{
return Query.Where(p => p.Klient.Id == idKlienta && p.Poskytovatel.Id == idPoskytovatele).SingleOrDefault();
}
public IList<PozadavekNaRegistraciKlienta> NajdiPozadavkyDlePoskytovatele(int idPoskytovatele)
{
return Query.Where(p => p.Poskytovatel.Id == idPoskytovatele).JoinQueryOver<Klient>(p => p.Klient).List();
}
}
}
| mit |
bevacqua/jscharting | bundle/Samples/PHP/Includes/DataEngine.php | 59186 | <?php
//namespace JSCharting; Generates error for php older than 5.3
require_once "DataModel.php";
require_once "MySqlConnection.php";
class DataEngine {
//public members
public $sqlStatement = "";
public $dataFields = "";
public $startDate;
public $endDate;
public $showEmptyElement = FALSE;
public $dateGrouping;
public $storedProcedure = "";
public $chartType = "Combo";
private $sqlParams= array();
private $dataFieldSet = FALSE;
private $xAxisField = "";
private $yAxisField = "";
private $zAxisField = "";
private $xDateTimeField = "";
private $yAxisFieldList = array();
private $xAxisStartField = "";
private $yAxisStartField = "";
private $splitByField = "";
private $nameField = "";
private $bubbleSizeField = "";
private $ganttCompleteField = "";
private $priceField = "";
private $highField = "";
private $lowField = "";
private $openField = "";
private $closeField = "";
private $volumeField = "";
private $urlField = "";
private $urlTargetField = "";
private $toolTipField = "";
private $labelField = "";
private $errorOffsetField = "";
private $errorPlusOffsetField = "";
private $errorHighValueField = "";
private $errorLowValueField = "";
private $errorMinusOffsetField = "";
private $errorPercentField = "";
private $errorPlusPercentField = "";
private $errorMinusPercentField = "";
private $heightField = "";
private $lengthField = "";
private $instanceIDField = "";
private $instanceParentIDField = "";
private $lowerDataFields = "";
private $customFields;
private $currentSeries;
private $linkDB;
private $stmtDB;
private $resultDB;
public function getSeries() {
//date_default_timezone_set('America/Los_Angeles');
//date_default_timezone_set('UTC');
$timezoneSettingBackup = date_default_timezone_get();
if(!empty($this->currentSeries))
{
$this->yAxisField="";
$this->yAxisFieldList= array();
$this->xAxisField="";
$this->zAxisField="";
$this->toolTipField="";
}
$this->setDataFields();
if(!empty($this->highField) )
return $this->getFinancialSeries ();
$this->getDataDB();
if(!$this->resultDB)
return "";
$fieldsInfo = mysqli_fetch_fields($this->resultDB);
$rowCount = mysqli_num_rows($this->resultDB);
if($rowCount < 1){
return "";
}
$localColumnNames = mysqli_fetch_assoc($this->resultDB);
$totalColumns = mysqli_num_fields($this->resultDB);
$xAxisFieldType = 246;//DECIMAL, NUMERIC
//$yAxisFieldType = 246;//DECIMAL, NUMERIC
$zAxisFieldType = 246;//DECIMAL, NUMERIC
$xAxisStartFieldType = 246;//DECIMAL, NUMERIC
$yAxisStartFieldType = 246;//DECIMAL, NUMERIC
$nameFieldType = 253;
$yAxisColumn = -1;
$xAxisColumn = -1;
$zAxisColumn = -1;
$yAxisStartColumn = -1;
$xAxisStartColumn = -1;
$splitByColumn = -1;
$bubbleSizeColumn = -1;
$nameColumn = -1;
$ganttCompleteColumn = -1;
$toolTipColumn = -1;
$labelColumn = -1;
$localxAxisField = "";
$localzAxisField = "";
$localSeriesName = "";
$customFieldsColums = array();
$strJSONCompressed ="";
$totalSeries = count($this->yAxisFieldList);
if ($totalSeries < 1) {
$totalSeries = 1;
}
if(!empty($this->currentSeries))
{
if(substr($this->currentSeries,-1)=="]")
{
$strJSONCompressed = substr($this->currentSeries,0,(strlen($this->currentSeries)-1));
}
else {
$strJSONCompressed = $this->currentSeries;
}
$strJSONCompressed .= ",";
}
else {
$strJSONCompressed ='[';
}
for ($y = 0;$y < $totalSeries;$y++) {
if ($this->dataFieldSet === FALSE) {
if ($totalColumns == 1) {
$yAxisColumn = 0;
$yAxisFieldType = $fieldsInfo[$yAxisColumn]->type;
} else {
$yAxisColumn = 1;
$xAxisColumn = 0;
$yAxisFieldType = $fieldsInfo[$yAxisColumn]->type;
$xAxisFieldType = $fieldsInfo[$xAxisColumn]->type;
}
$localSeriesName = $fieldsInfo[$yAxisColumn]->name;
switch ($this->chartType) {
case "Gantt":
if ($totalColumns > 2) {
$nameColumn = 2;
}
if ($totalColumns > 3) {
$ganttCompleteColumn = 3;
}
break;
case "Bubble":
//$localxAxisField = mysqli_field_name($result, 0);
$localxAxisField = $fieldsInfo[$yAxisColumn]->name;
if ($totalColumns > 2) {
$bubbleSizeColumn = 2;
}
break;
default:
$localxAxisField = $fieldsInfo[$yAxisColumn]->name;
break;
}//end switch
}//end $dataFieldSet
else//if dataFieldSet==true
{
if( count($this->yAxisFieldList)>$y){
$this->yAxisField = $this->yAxisFieldList[$y];
}
$yAxisFieldTemp = explode('=',$this->yAxisField);
if(count($yAxisFieldTemp)>0)
$this->yAxisField =$yAxisFieldTemp[0];
if(count($yAxisFieldTemp)>1)
$localSeriesName=$yAxisFieldTemp[1];
else
$localSeriesName =$yAxisFieldTemp[0];
if(!empty($this->xAxisField))
{
$xAxisColumn = array_search($this->xAxisField,array_keys($localColumnNames));
if($xAxisColumn===FALSE)
die("Could not find field " . $this->xAxisField);
$localxAxisField = $this->xAxisField;
$xAxisFieldType =$fieldsInfo[$xAxisColumn]->type;
//$xAxisFieldType = mysql_field_type($result, $xAxisColumn);
}
if(!empty($this->zAxisField))
{
$zAxisColumn = array_search($this->zAxisField,array_keys($localColumnNames));
if($zAxisColumn===FALSE)
die("Could not find field " . $this->zAxisField);
$localzAxisField = $this->zAxisField;
$zAxisFieldType = $fieldsInfo[$zAxisColumn]->type;
}
if(!empty($this->yAxisField))
{
$yAxisColumn = array_search($this->yAxisField,array_keys($localColumnNames));
if($yAxisColumn===FALSE)
die("Could not find field " . $this->yAxisField);
$yAxisFieldType =$fieldsInfo[$yAxisColumn]->type;
//$yAxisFieldType = mysqli_field_type($result, $yAxisColumn);
}
if(!empty($this->xAxisStartField))
{
$xAxisStartColumn = array_search($this->xAxisStartField,array_keys($localColumnNames));
if($xAxisStartColumn===FALSE)
die("Could not find field " . $this->xAxisStartField);
}
if(!empty($this->yAxisStartField))
{
$yAxisStartColumn = array_search($this->yAxisStartField,array_keys($localColumnNames));
if($yAxisStartColumn===FALSE)
die("Could not find field " . $this->yAxisStartField);
}
if(!empty($this->splitByField))
{
$splitByColumn = array_search($this->splitByField,array_keys($localColumnNames));
if($splitByColumn===FALSE)
die("Could not find field " . $this->splitByField);
$localsplitByField = $this->splitByField;
}
if(!empty($this->bubbleSizeField))
{
$bubbleSizeColumn = array_search($this->bubbleSizeField,array_keys($localColumnNames));
if($bubbleSizeColumn===FALSE)
die("Could not find field " . $this->bubbleSizeField);
}
if(!empty($this->nameField))
{
$nameColumn = array_search($this->nameField,array_keys($localColumnNames));
if($nameColumn===FALSE)
die("Could not find field " . $this->nameField);
}
if(!empty($this->ganttCompleteField))
{
$ganttCompleteColumn = array_search($this->ganttCompleteField,array_keys($localColumnNames));
if($ganttCompleteColumn===FALSE)
die("Could not find field " . $this->ganttCompleteField);
}
if(!empty($this->toolTipField))
{
$toolTipColumn = array_search($this->toolTipField,array_keys($localColumnNames));
if($toolTipColumn===FALSE)
die("Could not find field " . $this->toolTipField);
}
if(!empty($this->labelField))
{
$labelColumn = array_search($this->labelField,array_keys($localColumnNames));
if($labelColumn===FALSE)
die("Could not find field " . $this->labelField);
}
if($this->customFields)
{
foreach ($this->customFields as $key => $value)
{
$customFieldsColum = array_search($key ,array_keys($localColumnNames));
if ($customFieldsColum ===FALSE)
die("Could not find field " . $key);
$customFieldsColums[$customFieldsColum] = $value;
}
}
}//end
$strJSONCompressed .='{"name":"';
if($localSeriesName)
{
$strJSONCompressed .= $localSeriesName;
}
else
{
$strJSONCompressed .=' Series ';
$strJSONCompressed .= strval($y+1);
}
$strJSONCompressed .='","points":';
$strJSON = '[';
mysqli_data_seek($this->resultDB, 0);
$row = mysqli_fetch_row($this->resultDB);
$currentDate = strtotime($row[$xAxisColumn]);
$index =0;
$hour=0;
$daysInMonth=30;
$month=0;
$this->dateGrouping = strtolower($this->dateGrouping);
do {
if(!empty($this->dateGrouping))
{
$strJSON .= '{';
switch($this->dateGrouping)
{
case "day":
if($xAxisColumn>-1)
{
if($xAxisFieldType==12)
{
$dt2 = new DateTime($row[$xAxisColumn]);
$hour = date_format($dt2,"H")+0;
date_time_set($dt2,$hour, 0, 0);
$dt = date_timestamp_get($dt2);
while($hour > $index)
{
$missingdt = ((date('U',($dt-(($hour-$index)*3600))))*1000) ;
$strJSON .= '"x":' . $missingdt . ',';
//$strJSON .= '"x":"' . date('c',($dt-(($hour-$index)*3600))) . '",'; //'c' :ISO 8601 date (added in PHP 5), javascript:yyyy-MM-ddTHH\:mm\:ss.fffffffzzz
$strJSON .= '"y":0.00,';
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
$strJSON .= '{';
$index = $index+1;
}
$index = $index+1;
$strJSON .= '"x":' . (date('U',$dt)*1000) . ',';
//$strJSON .= '"x":"' . date('c',$dt) . '",'; //'c' :ISO 8601 date (added in PHP 5), javascript:yyyy-MM-ddTHH\:mm\:ss.fffffffzzz
}
else
{
$nameColumn = $xAxisColumn;
$xAxisColumn=-1;
}
/*else
{
die("For dateGrouping, xAxis must be 'datetime' type.");
} */
}
if($nameColumn>-1)
{
$curName = $row[$nameColumn];
$hour = intval($curName);
while($hour > $index)
{
$strJSON .= '"name":"' . (string)($index) . '",';
$strJSON .= '"y":0.00,';
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
$strJSON .= '{';
$index = $index+1;
}
$index = $index+1;
$strJSON .= '"name":"' . $curName. '",';
}
break;
case "month":
if($xAxisColumn>-1)
{
if($xAxisFieldType==12)
{
$index = $index+1;
$dt2 = new DateTime($row[$xAxisColumn]);
date_time_set($dt2,0, 0, 0);
$day = date_format($dt2,"d")+0;
$dt = date_timestamp_get($dt2);
if($day > $index)
{
$missingDays = $day-$index;
$dt = $dt - ($missingDays *86400);
}
while($day > $index)
{
$strJSON .= '"x":' . (date('U',$dt)*1000) . ',';
$strJSON .= '"y":0.00,';
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
$strJSON .= '{';
$index = $index+1;
$dt = $dt+ 86400; //(24*60*60);
}
$index = $index+1;
//$strJSON .= '"x":"' . date('c',$dt) . '",'; //'c' :ISO 8601 date (added in PHP 5), javascript:yyyy-MM-ddTHH\:mm\:ss.fffffffzzz
$strJSON .= '"x":' . (date('U',$dt)*1000) . ',';
}
else
{
$nameColumn = $xAxisColumn;
$xAxisColumn=-1;
}
}
if($nameColumn>-1)
{
$index = $index+1;
$curName = $row[$nameColumn];
$day = intval($curName);
while($day > $index)
{
$strJSON .= '"name":"' . (string)($index) . '",';
$strJSON .= '"y":0.00,';
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
$strJSON .= '{';
$index = $index+1;
}
$strJSON .= '"name":"' . $curName. '",';
}
break;
case "year":
if($xAxisColumn>-1)
{
if($xAxisFieldType==12)
{
$index = $index+1;
$dt2 = new DateTime($row[$xAxisColumn]);
$month = date_format($dt2,"m")+0;
$dt = strtotime($row[$xAxisColumn]);
if($month > $index)
{
$missingMonths = $month-$index;
$missingMonths = '-'. $missingMonths . ' month';
$dt = strtotime( $missingMonths ,$dt);
}
while($month > $index)
{
$strJSON .= '"x":' . (date('U',$dt)*1000) . ',';
//$strJSON .= '"x":"' . date('c',$dt) . '",'; //'c' :SO 8601 date (added in PHP 5), javascript:yyyy-MM-ddTHH\:mm\:ss.fffffffzzz
$strJSON .= '"y":0.00,';
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
$strJSON .= '{';
$index = $index+1;
$dt = strtotime( '+1 month' ,$dt);
}
$index = $index+1;
// $strJSON .= '"x":"' . date('c',$dt) . '",'; //'c' :SO 8601 date (added in PHP 5), javascript:yyyy-MM-ddTHH\:mm\:ss.fffffffzzz
$strJSON .= '"x":' . (date('U',$dt)*1000) . ',';
}
else
{
$nameColumn = $xAxisColumn;
$xAxisColumn=-1;
}
}
if($nameColumn>-1)
{
$index = $index+1;
$curName = $row[$nameColumn];
$month = intval($curName);
while($month > $index)
{
$strJSON .= '"name":"' . (string)($index) . '",';
$strJSON .= '"y":0.00,';
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
$strJSON .= '{';
$index = $index+1;
}
$strJSON .= '"name":"' . $curName. '",';
}
break;
default:
die("dategrouping:'" . $this->dateGrouping . "' is not supported. Only Day, Month and Year are supported.");
break;
}
if($yAxisColumn>-1)
{
$strJSON .= '"y":' . $row[$yAxisColumn] . ',';
}
if(count($customFieldsColums)>0)
{
$strJSON .= '"attributes":{';
foreach ($customFieldsColums as $key => $value)
{
$strJSON .= '"' . $value . '":"' . $row[$key] . '",';
}
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
}
if($toolTipColumn>-1)
{
$strJSON .= '"tooltip":"' . $row[$toolTipColumn] . '",';
}
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
}
else
{
//while ($row = mysqli_fetch_row($result)) {
$strJSON .= '{';
if(count($customFieldsColums)>0)
{
$strJSON .= '"attributes":{';
foreach ($customFieldsColums as $key => $value)
{
$strJSON .= '"' . $value . '":"' . $row[$key] . '",';
}
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
}
if($nameColumn>-1)
{
$strJSON .= '"name":"' . $row[$nameColumn]. '",';
}
if($xAxisColumn>-1)
{
if($xAxisFieldType==12)
{
$dt = strtotime($row[$xAxisColumn]);
//$strJSON .= '"x":"' . date('Y-m-d',$dt) . '",';
$strJSON .= '"x":' . (date('U',$dt)*1000) . ',';
}
else if($xAxisFieldType==253)
{
$strJSON .= '"name":"' . $row[$xAxisColumn]. '",';
}
else
{
$strJSON .= '"x":' . $row[$xAxisColumn]. ',';
}
}
if($zAxisColumn>-1)
{
$strJSON .= '"z":' . $row[$zAxisColumn]. ',';
}
if($yAxisColumn>-1)
{
$strJSON .= '"y":' . $row[$yAxisColumn] . ',';
}
if($toolTipColumn>-1)
{
$strJSON .= '"tooltip":"' . $row[$toolTipColumn] . '",';
}
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
}//end dategrouping
} while($row = mysqli_fetch_row($this->resultDB));
//Add empty element at the end if required.
if(!empty($this->dateGrouping))
{
switch($this->dateGrouping)
{
case "day":
$hour = $hour+1;
while($hour <24)
{
$strJSON .= '{';
if($xAxisColumn>-1)
{
$dt = $dt+3600;
$missingdt = ((date('U', $dt))*1000) ;
$strJSON .= '"x":' . $missingdt . ',';
}
else
{
$strJSON .= '"name":"' . (string)($hour) . '",';
}
$strJSON .= '"y":0.00,';
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
$hour = $hour+1;
}
break;
case "month":
if(empty($this->startDate))
{
$this->startDate = $dt2;
}
if(!empty($this->startDate))
{
$daysInMonth= intval(date_format($this->startDate,"t"));
}
$day = $day+1;
while($day <$daysInMonth+1)
{
$strJSON .= '{';
if($xAxisColumn>-1)
{
$dt = $dt+ 86400; //(24*60*60);
$strJSON .= '"x":' . ((date('U', $dt))*1000) . ',';
}
else
{
$strJSON .= '"name":"' . (string)($day) . '",';
}
$strJSON .= '"y":0.00,';
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
$day = $day+1;
}
break;
case "year":
$month = $month+1;
while($month <13)
{
$strJSON .= '{';
if($xAxisColumn>-1)
{
$dt = strtotime( "+1 month" ,$dt);
$strJSON .= '"x":' . (date('U',$dt)*1000) . ',';
//$strJSON .= '"x":"' . date('c',$dt) . '",'; //'c' :SO 8601 date (added in PHP 5), javascript:yyyy-MM-ddTHH\:mm\:ss.fffffffzzz
}
else
{
$strJSON .= '"name":"' . (string)($month) . '",';
}
$strJSON .= '"y":0.00,';
$strJSON = rtrim($strJSON, ',');
$strJSON .= '},';
$month = $month+1;
}
break;
}
}
$strJSON = rtrim($strJSON, ',');
$strJSON .=']';//end points
$pointArray = json_decode($strJSON);
$pointsCompressed = $this->pointsToArray($pointArray);
$strJSONCompressed .= $pointsCompressed;
$strJSONCompressed .='},';//end one series
}//end for
$strJSONCompressed = rtrim($strJSONCompressed , ',');//remove the last , because there is no more series
$strJSONCompressed .=']';//end series
$this->currentSeries = $strJSONCompressed;
$this->clear();
return $strJSONCompressed;
}
public function getArrayData() {
$timezoneSettingBackup = date_default_timezone_get();
$this->getDataDB();
if(!$this->resultDB)
{
return "";
}
$fieldsInfo = mysqli_fetch_fields($this->resultDB);
$rowCount = mysqli_num_rows($this->resultDB);
if($rowCount < 1){
return "";
}
$totalColumns = mysqli_num_fields($this->resultDB);
mysqli_data_seek($this->resultDB, 0);
$row = mysqli_fetch_row($this->resultDB);
$strJSON = '[';
do {
$strJSON .= '[';
for ($col = 0;$col < $totalColumns;$col++) {
switch($fieldsInfo[$col]->type)
{
case 12:
$dt = strtotime($row[$col]);
$strJSON .= (date('U',$dt)*1000) . ',';
break;
case 253:
$strJSON .= '"' . $row[$col]. '",';
break;
default:
$strJSON .= $row[$col]. ',';
break;
}
}
$strJSON = rtrim($strJSON, ',');
$strJSON .= '],';
} while($row = mysqli_fetch_row($this->resultDB));
$strJSON = rtrim($strJSON, ',');
$strJSON .=']';//end points
return $strJSON;
}
public function __call($name, $arguments)
{
if($name=="addParameter")
{
$localParam = array();
if(count($arguments)==3)
{
array_push($localParam,$arguments[0],$arguments[1],$arguments[2]);
}
else if(count($arguments)==2)
{
array_push($localParam,$arguments[0],$arguments[1],"");
}
else
{
$paramType = gettype($arguments[0]);
if($arguments[0] instanceof DateTime)
{
$paramType="datetime";
}
array_push($localParam,$arguments[0],$paramType,"");
}
array_push($this->sqlParams,$localParam);
}
}
private function setDataFields(){
if(empty($this->dataFields))
{
return;
}
//dataTable=null;
$this->dataFieldSet = True;
//intialize the YAxis list
$this->yAxisFieldList = array();
while(strpos($this->dataFields, " =")===true){
$this->dataFields = str_replace(" =", "=", $this->dataFields);
}
$this->lowerDataFields = strtolower($this->dataFields);
$this->tableName = $this->GetDataField("table=");
$this->xAxisField = $this->GetDataField("xaxis=");
if(strlen($this->xAxisField)==0){
$this->xAxisField = $this->GetDataField("xvalue=");
}
$this->zAxisField = $this->GetDataField("zaxis=");
if(strlen($this->zAxisField)==0){
$this->zAxisField = $this->GetDataField("zvalue=");
}
$this->xDateTimeField = $this->GetDataField("xdatetime="); //same as xAxisField but not setting name 5/28/2010
if (!empty($this->xDateTimeField)){
$this->xAxisField = $this->xDateTimeField;
}
$this->yAxisField = $this->GetDataField("yaxis=");
if(strlen($this->yAxisField)>0)
{
array_push($this->yAxisFieldList,$this->yAxisField);
while(strlen($this->yAxisField) > 0)
{
$this->yAxisField = $this->GetDataField("yaxis=");
if(strlen($this->yAxisField) > 0){
array_push($this->yAxisFieldList,$this->yAxisField);
}
else
break;
}
}
else
{
$this->yAxisField = $this->GetDataField("yvalue=");
if(strlen($this->yAxisField)>0)
{
array_push($this->yAxisFieldList,$this->yAxisField);
while(strlen($this->yAxisField) > 0)
{
$this->yAxisField = $this->GetDataField("yvalue=");
if(strlen($this->yAxisField) > 0)
array_push($this->yAxisFieldList,$this->yAxisField);
else
break;
}
}
else
{
$this->yAxisField = $this->GetDataField("volume=");
if(strlen($this->yAxisField)==0)
$this->yAxisField = $this->GetDataField("ganttend=");
if(strlen($this->yAxisField)==0)
$this->yAxisField = $this->GetDataField("ganttenddate=");
if(strlen($this->yAxisField) > 0)
array_push($this->yAxisFieldList,$this->yAxisField);
}
}
$this->xAxisStartField = $this->GetDataField("xvaluestart=");
$this->yAxisStartField = $this->GetDataField("yvaluestart=");
if(strlen($this->yAxisStartField)==0)
$this->yAxisStartField = $this->GetDataField("ganttstart=");
if(strlen($this->yAxisStartField)==0)
$this->yAxisStartField = $this->GetDataField("ganttstartdate=");
$this->nameField = $this->GetDataField("ganttname=");
if(strlen($this->nameField)==0)
$this->nameField = $this->GetDataField("name=");
$this->splitByField = $this->GetDataField("splitby=");
$this->bubbleSizeField = $this->GetDataField("bubblesize=");
if(strlen($this->bubbleSizeField)==0)
$this->bubbleSizeField = $this->GetDataField("bubble=");
$this->ganttCompleteField = $this->GetDataField("ganttcomplete=");
if(strlen($this->ganttCompleteField)==0)
$this->ganttCompleteField = $this->GetDataField("complete=");
$this->priceField = $this->GetDataField("price=");
$this->highField = $this->GetDataField("high=");
$this->lowField = $this->GetDataField("low=");
$this->openField = $this->GetDataField("open=");
$this->closeField = $this->GetDataField("close=");
$this->volumeField = $this->GetDataField("volume=");
$this->urlField = $this->GetDataField("url=");
$this->urlTargetField = $this->GetDataField("urltarget=");
$this->toolTipField = $this->GetDataField("tooltip=");
$this->labelField = $this->GetDataField("labeltemplate=");
$this->errorOffsetField = $this->GetDataField("erroroffset=");
$this->errorPlusOffsetField = $this->GetDataField("errorplusoffset=");
$this->errorHighValueField = $this->GetDataField("errorhighvalue=");
$this->errorLowValueField = $this->GetDataField("errorlowvalue=");
$this->errorMinusOffsetField = $this->GetDataField("errorminusoffset=");
$this->errorPercentField = $this->GetDataField("errorpercent=");
$this->errorPlusPercentField = $this->GetDataField("errorpluspercent=");
$this->errorMinusPercentField = $this->GetDataField("errorminuspercent=");
$this->heightField = $this->GetDataField("height=");
$this->lengthField = $this->GetDataField("length=");
$this->instanceIDField = $this->GetDataField("instanceid=");
$this->instanceParentIDField = $this->GetDataField("instanceparentid=");
if(strlen($this->dataFields)>0)
{
$this->customFields = array();
$ArrayCustomDataFields = explode(',', $this->dataFields);
foreach ($ArrayCustomDataFields as $key => $value)
{
$nameValue = explode('=', $value);
if(count($nameValue)>1)
{
$this->customFields[$nameValue[0]] = $nameValue[1];
}
else
{
$this->customFields[$nameValue[0]] = $nameValue[0];
}
}
}
}
private function getDataField($name)
{ if(empty($this->lowerDataFields))
{
return "";
}
$fieldValue = "";
$len = strlen($name);
$j=-1;
$i = strpos($this->lowerDataFields,$name);
if($i!==False)
{
$i = $i + $len;
$j = strpos($this->lowerDataFields,",",$i);
if($j) //only executes if $j >0
{
while($this->lowerDataFields[$j-1]=='\\')
{
$this->lowerDataFields = substr_replace($this->lowerDataFields,'',$j-1,1);
$this->dataFields = substr_replace($this->dataFields,'',$j-1,1);
$j = strpos($this->lowerDataFields,",",$j+1);
if($j===FALSE)
break;
}
if($j===False)
{
$fieldValue = substr($this->dataFields,$i);
$i= $i - $len;
$this->dataFields =substr_replace($this->dataFields,'',$i,count($this->dataFields)-$i);//remove
$this->lowerDataFields = substr_replace($this->lowerDataFields,'',$i,count($this->lowerDataFields)-$i);
}
else
{
$fieldValue = substr($this->dataFields,$i,$j-$i);
$start=$i-$len;
$this->dataFields = substr_replace($this->dataFields,'',$start,$j-$start+1);
$this->lowerDataFields = substr_replace($this->lowerDataFields,'',$start,$j-$start+1);
}
}
else
{//this is last entry without "," in field's name
$fieldValue = substr($this->dataFields,$i);
$i=$i-$len;
$this->dataFields = substr_replace($this->dataFields,'',$i,strlen($this->dataFields)-$i);
$this->lowerDataFields = substr_replace($this->lowerDataFields,'',$i,strlen($this->lowerDataFields)-$i);
}
$this->dataFields = trim($this->dataFields);
$this->lowerDataFields =trim($this->lowerDataFields);
}
return $fieldValue;
}
private function getFinancialSeries() {
$this->getDataDB();
if(!$this->resultDB)
return "";
$fieldsInfo = mysqli_fetch_fields($this->resultDB);
$rowCount = mysqli_num_rows($this->resultDB);
if($rowCount < 1){
return "";
}
$localColumnNames = mysqli_fetch_assoc($this->resultDB);
$totalColumns = mysqli_num_fields($this->resultDB);
$sc = array();
$fromDate;
$toDate;
$cursorDate;
$cursorDate2;
$dt;
$yValue;
$priceValue=0;
$yValueDt;
$ht;
$numberOfElements=0;
$cf ="en-US";
$yAxisColumn=-1;
$xAxisColumn=-1;
$openColumn=-1;
$closeColumn=-1;
$highColumn=-1;
$lowColumn=-1;
$volumeColumn=-1;
$priceColumn=-1;
$errorOffsetColumn=-1;
$errorPlusOffsetColumn=-1;
$errorHighValueColumn=-1;
$errorLowValueColumn=-1;
$errorMinusOffsetColumn=-1;
$errorPercentColumn=-1;
$errorPlusPercentColumn=-1;
$errorMinusPercentColumn=-1;
$localxAxisField="";
$localSeriesName="";
$strJSONCompressed ="";
//$tableName = mysql_field_table($result,0);
$tableName = $fieldsInfo[0]->table;
if($tableName)
{
$localSeriesName = $tableName;
}
if ($this->dataFieldSet === FALSE)
{
if($totalColumns >2)
{
$xAxisColumn=0;
$yAxisColumn=1;
$localxAxisField =$fieldsInfo[$xAxisColumn]->name;
$priceColumn = 2;
}
else//2 fields
{
$xAxisColumn=0;
$priceColumn = 1;
$localxAxisField =$fieldsInfo[$xAxisColumn]->name;
}
}
else//dataFieldSet is TRUE
{
if($totalSeries>0)
$yAxisField=$this->yAxisFieldList[0];
if(!empty($this->xAxisField))
{
$xAxisColumn = array_search($this->xAxisField,array_keys($localColumnNames));
if($xAxisColumn===FALSE)
die("Could not find field " . $this->xAxisField);
$localxAxisField = $this->xAxisField;
$xAxisFieldType = $fieldsInfo[$xAxisColumn]->type;
}
if(!empty($this->yAxisField))
{
$yAxisColumn = array_search($this->yAxisField,array_keys($localColumnNames));
if($yAxisColumn===FALSE)
die("Could not find field " . $this->yAxisField);
}
if(!empty($this->priceField))
{
$priceColumn = array_search($this->priceField,array_keys($localColumnNames));
if($priceColumn<0)
die("Could not find field " . $this->priceField);
}
if(!empty($this->openField))
{
$openColumn = array_search($this->openField,array_keys($localColumnNames));
if($openColumn<0)
die("Could not find field " . $this->openField);
}
if(!empty($this->closeField))
{
$closeColumn = array_search($this->closeField,array_keys($localColumnNames));
if(closeColumn<0)
die("Could not find field " . $this->closeField);
}
if(!empty($this->lowField))
{
$lowColumn = array_search($this->lowField,array_keys($localColumnNames));
if($lowColumn<0)
die("Could not find field " . $this->lowField);
}
if(!empty($this->highField))
{
$highColumn = array_search($this->highField,array_keys($localColumnNames));
if($highColumn<0)
die("Could not find field " . $this->highField);
}
if(!empty($this->volumeField))
{
$volumeColumn = array_search($this->volumeField,array_keys($localColumnNames));
if($volumeColumn<0)
die("Could not find field " . $this->volumeField);
}
if(!empty($this->errorOffsetField))
{
$errorOffsetColumn = array_search($this->errorOffsetField,array_keys($localColumnNames));
if($errorOffsetColumn<0)
die("Could not find field " . $this->errorOffsetField);
}
if(!empty($this->errorPlusOffsetField))
{
$errorPlusOffsetColumn = array_search($this->errorPlusOffsetField,array_keys($localColumnNames));
if($errorPlusOffsetColumn<0)
die("Could not find field " . $this->errorPlusOffsetField);
}
if(!empty($this->errorHighValueField))
{
$errorHighValueColumn = array_search($this->errorHighValueField,array_keys($localColumnNames));
if($errorHighValueColumn<0)
die("Could not find field " . $this->errorHighValueField);
}
if(!empty($this->errorLowValueField))
{
$errorLowValueColumn = array_search($this->errorLowValueField,array_keys($localColumnNames));
if($errorLowValueColumn<0)
die("Could not find field " . $this->errorLowValueField);
}
if(!empty($this->errorMinusOffsetField))
{
$errorMinusOffsetColumn = array_search($this->errorMinusOffsetField,array_keys($localColumnNames));
if($errorMinusOffsetColumn<0)
die("Could not find field " . $this->errorMinusOffsetField);
}
if(!empty($this->errorPercentField))
{
$errorPercentColumn = array_search($this->errorPercentField,array_keys($localColumnNames));
if($errorPercentColumn<0)
die("Could not find field " . $this->errorPercentField);
}
if(!empty($this->errorPlusPercentField))
{
$errorPlusPercentColumn = array_search($this->errorPlusPercentField,array_keys($localColumnNames));
if($errorPlusPercentColumn<0)
die("Could not find field " . $this->errorPlusPercentField);
}
if(!empty($this->errorMinusPercentField))
{
$errorMinusPercentColumn = array_search($this->errorMinusPercentField,array_keys($localColumnNames));
if($errorMinusPercentColumn<0)
die("Could not find field " . $this->errorMinusPercentField);
}
}//end of dataFieldSet
if(!empty($this->currentSeries))
{
if(substr($this->currentSeries,-1)=="]")
{
$strJSONCompressed = substr($this->currentSeries,0,(strlen($this->currentSeries)-1));
}
else {
$strJSONCompressed = $this->currentSeries;
}
$strJSONCompressed .= ",";
}
else {
$strJSONCompressed ='[';
}
$strJSON = '[';
$lowerDateGrouping = strtolower($this->dateGrouping);
switch($lowerDateGrouping){
case "months":
if($xAxisFieldType!= 12)
{
die(" Invalid SQL statement. When using 'DateGrouping' the xAxis field in the SQL statement must be of type DateTime. Please check the field type and return order from your database. Data order expected: xAxis, yAxis. You can also use the dataFields property to map to any field name / order. ");
break;
}
$monthIndex=-1;
$ser = new Series('ser 1');
$singleElement;
mysqli_data_seek($this->resultDB, 0);
$row = mysqli_fetch_row($this->resultDB);
do
{
if($yAxisColumn>-1)
{
if(empty($row[$yAxisColumn]))
$yValue = 0;
else
$yValue = floatval($row[$yAxisColumn]);
}
if($priceColumn>-1)
{
if(empty($row[$priceColumn]))
$priceValue = 0;
else
$priceValue = floatval($row[$priceColumn]);
}
$cursorDate = strtotime($row[$xAxisColumn]);
$monthsCurrent = date('Y',$cursorDate) + date('m',$cursorDate);
if($monthIndex != $monthsCurrent){
if(!empty($singleElement))
{
array_push($ser->Elements,$singleElement);
}
$monthIndex = $monthsCurrent;
if(!empty($priceValue))
{
$singleElement = new Element('',$cursorDate,$priceValue,$priceValue,$priceValue,$priceValue);
}
else
{
$singleElement = new Element();
$singleElement->xValue= $cursorDate;
}
//SF.trickleDefaults($singleElement,ser.defaultElement);
if(!empty($yValue))
$singleElement->volume = $yValue;
}
else{
if(!empty($priceValue))
{
if($singleElement->low > $priceValue)
$singleElement->low = $priceValue;
if($singleElement->high < $priceValue)
$singleElement->high = $priceValue;
$singleElement->close = $priceValue;
}
if(!empty($yValue))
{
if(empty($singleElement->volume)) {
$singleElement->volume = $yValue;
}
else {
$singleElement->volume = $singleElement->volume + $yValue;
}
}
}
}while($row = mysqli_fetch_row($this->resultDB));
if($singleElement != FALSE)
{
array_push($ser->Elements,$singleElement);
}
array_push($sc, $ser);
break;
default:
$ser = new Series();
if(!empty($localSeriesName))
{
$ser->name = $localSeriesName;
}
array_push($sc,$ser);
mysqli_data_seek($this->resultDB, 0);
$row = mysqli_fetch_row($this->resultDB);
do
{
$singleElement = new Element();
if($yAxisColumn>-1){
if(empty($row[$yAxisColumn]))
$singleElement->volume = NULL;
else
$singleElement->volume = floatval($row[$yAxisColumn]);
}
if($xAxisColumn>-1)
{
if(empty($row[$xAxisColumn]))
$singleElement->xValue = NULL;
else
$singleElement->xValue = strtotime($row[$xAxisColumn]);
}
if($priceColumn>-1)
{
if(empty($row[$priceColumn]))
$singleElement->close = NULL;
else
$singleElement->close = floatval($row[$priceColumn]);
}
if($openColumn>-1)
{
if(empty($row[$openColumn]))
$singleElement->open = NULL;
else
$singleElement->open = floatval($row[$openColumn]);
}
if($closeColumn>-1)
{
if(empty($row[$closeColumn]))
$singleElement->close= NULL;
else
$singleElement->close = floatval($row[$closeColumn]);
}
if($lowColumn>-1)
{
if(empty($row[$lowColumn]))
$singleElement->low= NULL;
else
$singleElement->low = floatval($row[$lowColumn]);
}
if($highColumn>-1)
{
if(empty($row[$highColumn]))
$singleElement->high= NULL;
else
$singleElement->high = floatval($row[$highColumn]);
}
if($errorOffsetColumn>-1)
{
if(!empty($row[$errorOffsetColumn]))
$singleElement->errorOffset = floatval($row[$errorOffsetColumn]);
}
if($errorPlusOffsetColumn>-1)
{
if(!empty($row[$errorPlusOffsetColumn]))
$singleElement->errorPlusOffset = floatval($row[$errorPlusOffsetColumn]);
}
if($errorHighValueColumn>-1)
{
if(!empty($row[$errorHighValueColumn]))
$singleElement->errorHighValue = floatval($row[$errorHighValueColumn]);
}
if($errorLowValueColumn>-1)
{
if(!empty($row[$errorLowValueColumn]))
$singleElement->errorLowValue = floatval($row[$errorLowValueColumn]);
}
if($errorMinusOffsetColumn>-1)
{
if(!empty($row[$errorMinusOffsetColumn]))
$singleElement->errorMinusOffset = floatval($row[$errorMinusOffsetColumn]);
}
if($errorPercentColumn>-1)
{
if(!empty($row[$errorPercentColumn]))
$singleElement->errorPercent = floatval($row[$errorPercentColumn]);
}
if($errorPlusPercentColumn>-1)
{
if(!empty($row[$errorPlusPercentColumn]))
$singleElement->errorPlusPercent = floatval($row[$errorPlusPercentColumn]);
}
if($errorMinusPercentColumn>-1)
{
if(!empty($row[$errorMinusPercentColumn]))
$singleElement->errorMinusPercent = floatval($row[$errorMinusPercentColumn]);
}
array_push($ser->Elements,$singleElement);
}while($row = mysqli_fetch_row($this->resultDB));
break;
}//end of switch($lowerDateGrouping
$scCount = count($sc);
if(!empty($this->currentSeries))
{
if(substr($this->currentSeries,-1)=="]")
{
$strJSON = substr($this->currentSeries,0,(strlen($this->currentSeries)-1));
}
else {
$strJSON = $this->currentSeries;
}
$strJSON .= ",";
}
else {
$strJSON ='[';
}
if ($scCount> 0)
{
for($s=0;$s < count($sc); $s++)
{
$strJSONCompressed .='{"name":"';
if($sc[$s]->name)
{
$strJSONCompressed .= $sc[$s]->name;
}
else
{
$strJSONCompressed .= ' Series ' . strval( $s+1);
}
if($elem->volume)
{
}
else
{
$strJSONCompressed .= '","points":';
}
for($el=0;$el<count($sc[$s]->Elements); $el++)
{
$elem = $sc[$s]->Elements[$el];
$dt2 = $elem->xValue;
if($elem->volume)
{ //point object for NavigatorMultiY (seriestype: 'ohlc' doesn't work,
//Array
//$strJSON .= '[ ' . (date('U',$elem->xValue)*1000) . ',' . $elem->open . ',' . $elem->high . ',' . $elem->low . ',' . $elem->close . ',' . $elem->volume . '],';
$strJSON .= '{"x":' . (date('U',$elem->xValue)*1000) . ',"open":' . $elem->open . ',"high":' . $elem->high . ',"low":' . $elem->low . ',"close":' . $elem->close . ',"volume":' . $elem->volume. '},';
}
else{
$strJSON .= '{"x":' . (date('U',$elem->xValue)*1000) . ',"open":' . $elem->open . ',"high":' . $elem->high . ',"low":' . $elem->low . ',"close":' . $elem->close. '},';
}
}
//$strJSON = rtrim($strJSON, ',');
//$strJSON .= ']}';
}
$strJSON = rtrim($strJSON, ',');
$strJSON .=']';//end points
if($elem->volume)
{
$strJSONCompressed .= $strJSON;// the above lines replaced this line to use compression
}
else
{
$pointArray = json_decode($strJSON);
$pointsCompressed = $this->pointsToArray($pointArray);
$strJSONCompressed .= $pointsCompressed;
}
$strJSONCompressed .='},';//end one series
}//end for
$strJSONCompressed = rtrim($strJSONCompressed , ',');//remove the last , because there is no more series
$strJSONCompressed .=']';//end series
$this->currentSeries = $strJSONCompressed;
$this->clear();
return $strJSONCompressed;
}
private function pointsToArray($points) {
$template = "\"JSC.pointsFromArray('%FIELDS%',[%ARR%])\"";
$firstPoint = current($points);
$secondPoint = next($points);
$fields = $this->getPropNamesRecur($firstPoint);
$pntArrTxt = '';
$pntArr = array();
for ($i = 0, $iLen = count($points); $i < $iLen; $i++) {
$obj = $points[$i];
$fldArr = array();
for ($f = 0, $fLen = count($fields); $f < $fLen; $f++) {
$fVal = $this->evalPath($obj, $fields[$f]);// obj[fields[f]];
if ( gettype($fVal) === 'string') {
array_push($fldArr, '\'' . $fVal . '\'');
}
/*else if ( gettype($fVal) === 'object') {
array_push($fldArr, '');
}*/
else if (gettype($fVal) === 'array'){ //if (array_pop($fVal) != NULL) { // This means if fVal is an array
array_push($fldArr, json_decode($fVal));
} else {
array_push($fldArr, $fVal);
}
}
array_push($pntArr, '[' . join(',', $fldArr) . ']');
}
$pntArrTxt .= implode(',', $pntArr);
$resultStr = str_replace('%FIELDS%', join(',', $fields),$template);
$resultStr = str_replace('%ARR%', $pntArrTxt,$resultStr);
return $resultStr;
}
function is_assoc($array) {
return ($array !== array_values($array));
}
private function getPropNames($obj) {
$myKeys = array();
for ($i = 0;$i<count($obj); $i++)
{
array_push($myKeys,$obj[$i]);
}
return $myKeys; //['a','b','c'];
}
private function getPropNamesRecur($obj) {
$myKeys = array();
//for (myKeys[i++] in obj);
foreach ($obj as $key => $value)
{
if(gettype($value)=='object')
{
$arr = $this->getPropNamesRecur($value);
foreach ($arr as $key2 => $value2)
{
$a3 = $key . '.' . $value2;
array_push($myKeys,$a3);
}
}
else
{
array_push($myKeys,$key);
}
}
foreach ($obj as $key => $value) {
$a2 = gettype($value);
if ($a2 ==='object2') {
$arr = $this->getPropNamesRecur($value);
$arrLen = count($arr);
$index =0;
$i = array_search($key,$myKeys);
foreach ($arr as $key2 => $value2)
{
$a3 = $key . '.' . $value2;
//array_push($myKeys[$i],$a3);
if($index>0)
{
//$myKeys[$i] .= ', ' . $a3;
array_push($myKeys,$a3);
}
else
{
$myKeys[$i] = $a3;
}
$index = $index+1;
//array_push($myKeys[$i],$value);
}
}
else if ($a2 ==='array') {
$i = array_search($key,$myKeys);
$origValue = $myKeys[$i];
//$myKeys[$i] = $myKeys[$i]. '[n]';
$arr = $this->getPropNamesRecur2(current($value));
$myKeys[$i] = array();
array_push($myKeys[$i],$origValue);
foreach ($arr as $key => $value)
{
//$myKeys[$i] = $myKeys[$i]. $value . ',' ;
array_push($myKeys[$i],$value);
}
//rtrim($myKeys[$i], ",");
//$myKeys[$i] = $myKeys[$i]. '}' ;
}
}
return $myKeys; //['a','b','c'];
}
private function getPropNamesRecur2($obj) {
$myKeys = array();
//for (myKeys[i++] in obj);
foreach ($obj as $key => $value)
{
array_push($myKeys,$key);
}
foreach ($obj as $key => $value) {
$a2 = gettype($value);
if ($a2 ==='object') {
$arr = $this->getPropNamesRecur2($value);
$a3 = $key . '.' . $arr[0];
$i = array_search($key,$myKeys);
$myKeys[$i] = $a3;
}
else if ($a2 ==='array') {
//$i = array_search($key,$myKeys);
//$myKeys[//$i] = $myKeys[$i]. '[n]';
////$arr = $this->getPropNamesRecur($value);
//$a3 = $key . '.' . $arr[0];
}
}
return $myKeys; //['a','b','c'];
}
private function magic($obj, $var, $value = NULL)
{
if($value == NULL)
{
return $obj->$var;
}
else
{
$obj->$var = $value;
}
}
private function evalPath($root, $path) {
if ($root && $path) {
$steps = explode('.',$path);
$curStep = $root;
$stpI = 0;
$stpLen;
$step;
for ($stpLen = count($steps); $stpI < $stpLen; $stpI++)
/*for (stpI in steps)*/ {
$step = $steps[$stpI];
$value = $this->magic($curStep,$step,NULL);
if ($value!==NULL) {
$curStep = $value;
}
else {
return NULL;
}
}
return $curStep;
}
return NULL;
}
private function getDataDB()
{
if(!empty($this->startDate))
{
$this->sqlStatement = str_ireplace("#StartDate#","'" . date_format($this->startDate, 'Y-m-d H:i:s') . "'",$this->sqlStatement);
}
if(!empty($this->endDate))
{
$this->sqlStatement = str_ireplace("#EndDate#","'" . date_format($this->endDate, 'Y-m-d H:i:s') . "'",$this->sqlStatement);
}
$this->linkDB = ConnectToMySql();
$this->stmtDB = mysqli_stmt_init($this->linkDB);
$countParams = count($this->sqlParams);
if(!empty($this->storedProcedure))
{
$storedProcedureCall = $this->storedProcedure;
if (0 !== strpos(strtolower($this->storedProcedure), 'call ')) {
$storedProcedureCall = "call " . $storedProcedureCall . "(";
}
for( $i=0;$i<$countParams;$i++)
{
$storedProcedureCall .= "?,";
}
$storedProcedureCall = rtrim($storedProcedureCall, ',');
$storedProcedureCall .= ")";
if (mysqli_stmt_prepare($this->stmtDB, $storedProcedureCall)) {
/* Bind parameters. Types: s = string, i = integer, d = double, b = blob */
$a_params = array();
$param_type = '';
foreach ($this->sqlParams as $key => $value)
{
if(is_numeric($value[0]))
{
$a_params[] = $value[0];
$param_type .= "d";
}
else if($value[0] instanceof DateTime)
{
$param_dt = date_format($value[0], 'Y-m-d H:i:s');
$a_params[] = $param_dt;
$param_type .= "s";
}
else
{
$a_params[] = $value[0];
$param_type .= "s";
}
}
call_user_func_array('mysqli_stmt_bind_param', array_merge (array($this->stmtDB, $param_type), $this->refValues($a_params)));
/* execute query */
mysqli_stmt_execute($this->stmtDB);
$this->resultDB = mysqli_stmt_get_result($this->stmtDB) or die($this->stmtDB->error) ;
}
else
{
die('Sql error: ' . $this->stmtDB->error);
}
}
else
{
if (mysqli_stmt_prepare($this->stmtDB, $this->sqlStatement)) {
if($countParams>0)
{
$a_params = array();
$param_type = '';
foreach ($this->sqlParams as $key => $value)
{
if(is_numeric($value[0]))
{
$a_params[] = $value[0];
$param_type .= "d";
}
else if($value[0] instanceof DateTime)
{
$param_dt = date_format($value[0], 'Y-m-d H:i:s');
$a_params[] = $param_dt;
$param_type .= "s";
}
else
{
$a_params[] = $value[0];
$param_type .= "s";
}
}
call_user_func_array('mysqli_stmt_bind_param', array_merge (array($this->stmtDB, $param_type), $this->refValues($a_params)));
}
/* execute query */
mysqli_stmt_execute($this->stmtDB);
$this->resultDB = mysqli_stmt_get_result($this->stmtDB) or die($this->stmtDB->error) ;
}
else
{
die('Sql error: ' . $this->stmtDB->error);
}
}
}
private function clear()
{
// Free the resources associated with the result set
// This is done automatically at the end of the script
mysqli_free_result($this->resultDB);
mysqli_stmt_close($this->stmtDB);
/* close connection */
mysqli_close($this->linkDB);
//clear
$this->sqlStatement="";
$this->storedProcedure="";
$this->startDate = NULL;
$this->endDate = NULL;
$this->dataFields="";
$this->dataFieldSet=FALSE;
$this->dateGrouping="";
$this->sqlParams = array();
}
private function refValues($arr){
if (strnatcmp(phpversion(),'5.3') >= 0) //Reference is required for PHP 5.3+
{
$refs = array();
foreach($arr as $key => $value)
$refs[$key] = &$arr[$key];
return $refs;
}
return $arr;
}
}//end DataEngine class
?> | mit |
hyonholee/azure-sdk-for-net | sdk/resources/Azure.Management.Resources/src/Generated/Models/ApplicationLockLevel.cs | 482 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
namespace Azure.Management.Resources.Models
{
/// <summary> The managed application lock level. </summary>
public enum ApplicationLockLevel
{
/// <summary> CanNotDelete. </summary>
CanNotDelete,
/// <summary> ReadOnly. </summary>
ReadOnly,
/// <summary> None. </summary>
None
}
}
| mit |
mjafin/bcbio-nextgen | bcbio/distributed/objectstore.py | 21006 | """
Manage pushing and pulling files from an object store like
Amazon Web Services S3.
"""
# pylint: disable=redefined-builtin
import abc
import collections
import os
import re
import subprocess
import sys
import time
import zlib
try:
import azure
from azure import storage as azure_storage
except ImportError:
azure, azure_storage = None, None
import boto
import six
from bcbio.distributed.transaction import file_transaction
from bcbio import utils
SUPPORTED_REMOTES = ("s3://",)
BIODATA_INFO = {"s3": "s3://biodata/prepped/{build}/{build}-{target}.tar.gz"}
REGIONS_NEWPERMS = {"s3": ["eu-central-1"]}
@six.add_metaclass(abc.ABCMeta)
class FileHandle(object):
"""Contract class for the file handle."""
def __init__(self):
self._iter = self._line_iter()
def __enter__(self):
"""Define what the context manager should do at the beginning
of the block created by the with statement.
"""
return self
def __exit__(self, *args):
"""Define what the context manager should do after its block
has been executed (or terminates).
"""
self.close()
def __iter__(self):
"""Return the iterator for the current file."""
return self
def _line_iter(self):
"""Storage manager file iterator splits by buffer size instead
of by newline. This wrapper puts them back into lines.
From mrjob: https://github.com/Yelp/mrjob/blob/master/mrjob/util.py
"""
buf = ""
search_offset = 0
for chunk in self._chunk_iter():
buf += chunk
start = 0
while True:
end = buf.find("\n", start + search_offset) + 1
if end: # if find() returned -1, end would be 0
yield buf[start:end]
start = end
# reset the search offset
search_offset = 0
else:
# this will happen eventually
buf = buf[start:]
# set search offset so we do not need to scan this part
# of the buffer again
search_offset = len(buf)
break
if buf:
yield buf + '\n'
@abc.abstractmethod
def _chunk_iter(self):
"""Chunk iterator over the received file."""
pass
@abc.abstractmethod
def read(self, size=sys.maxint):
"""Read at most size bytes from the file (less if the read hits EOF
before obtaining size bytes).
"""
pass
@abc.abstractmethod
def next(self):
"""Return the next item from the container."""
pass
@abc.abstractmethod
def close(self):
"""Close the file handle."""
pass
class S3Handle(FileHandle):
"""File object for the Amazon S3 files."""
def __init__(self, key):
super(S3Handle, self).__init__()
self._key = key
if self._key.name.endswith(".gz"):
decompress = zlib.decompressobj(16 | zlib.MAX_WBITS)
self._decompress = decompress.decompress
else:
self._decompress = lambda value: value
def _chunk_iter(self):
"""Iterator over the S3 file."""
for chunk in self._key:
yield self._decompress(chunk)
def read(self, size=sys.maxint):
"""Read at most size bytes from the file (less if the read hits EOF
before obtaining size bytes).
"""
return self._key.read(size)
def next(self):
"""Return the next item from the container."""
return self._iter.next()
def close(self):
"""Close the file handle."""
self._key.close(fast=True)
class BlobHandle(FileHandle):
"""File object for the Azure Blob files."""
def __init__(self, blob_service, container, blob, chunk_size):
super(BlobHandle, self).__init__()
self._blob_service = blob_service
self._container_name = container
self._blob_name = blob
self._chunk_size = chunk_size
self._blob_properties = {}
self._pointer = 0
if blob.endswith(".gz"):
decompress = zlib.decompressobj(16 | zlib.MAX_WBITS)
self._decompress = decompress.decompress
else:
self._decompress = lambda value: value
@property
def blob_properties(self):
"""Returns all user-defined metadata, standard HTTP properties,
and system properties for the blob.
"""
if not self._blob_properties:
self._blob_properties = self._blob_service.get_blob_properties(
container_name=self._container_name,
blob_name=self._blob_name)
return self._blob_properties
def _chunk_offsets(self):
"""Iterator over chunk offests."""
index = 0
blob_size = self.blob_properties.get('content-length')
while index < blob_size:
yield index
index = index + self._chunk_size
def _chunk_iter(self):
"""Iterator over the blob file."""
for chunk_offset in self._chunk_offsets():
yield self._download_chunk(chunk_offset=chunk_offset,
chunk_size=self._chunk_size)
def _download_chunk_with_retries(self, chunk_offset, chunk_size,
retries=3, retry_wait=1):
"""Reads or downloads the received blob from the system."""
while True:
try:
chunk = self._download_chunk(chunk_offset, chunk_size)
except azure.WindowsAzureError:
if retries > 0:
retries = retries - 1
time.sleep(retry_wait)
else:
raise
else:
return chunk
def _download_chunk(self, chunk_offset, chunk_size):
"""Reads or downloads the received blob from the system."""
range_id = 'bytes={0}-{1}'.format(
chunk_offset, chunk_offset + chunk_size - 1)
return self._blob_service.get_blob(
container_name=self._container_name,
blob_name=self._blob_name,
x_ms_range=range_id)
def read(self, size=sys.maxint):
"""Read at most size bytes from the file (less if the read hits EOF
before obtaining size bytes).
"""
blob_size = int(self.blob_properties.get('content-length'))
if self._pointer < blob_size:
chunk = self._download_chunk_with_retries(
chunk_offset=self._pointer, chunk_size=size)
self._pointer += size
return chunk
def next(self):
"""Return the next item from the container."""
return self._iter.next()
def close(self):
"""Close the file handle."""
pass
@six.add_metaclass(abc.ABCMeta)
class StorageManager(object):
"""The contract class for all the storage managers."""
@abc.abstractmethod
def check_resource(self, resource):
"""Check if the received resource can be processed by
the current storage manager.
"""
pass
@abc.abstractmethod
def parse_remote(self, filename):
"""Parse a remote filename in order to obtain information
related to received resource.
"""
pass
@abc.abstractmethod
def connect(self, resource):
"""Return a connection object pointing to the endpoint
associated to the received resource.
"""
pass
@abc.abstractmethod
def download(self, filename, input_dir, dl_dir=None):
"""Download the resource from the storage."""
pass
@abc.abstractmethod
def list(self, path):
"""Return a list containing the names of the entries in the directory
given by path. The list is in arbitrary order.
"""
pass
@abc.abstractmethod
def open(self, filename):
"""Provide a handle-like object for streaming."""
pass
class AmazonS3(StorageManager):
"""Amazon Simple Storage Service (Amazon S3) Manager."""
_DEFAULT_REGION = "us-east-1"
_REMOTE_FILE = collections.namedtuple(
"RemoteFile", ["store", "bucket", "key", "region"])
_S3_FILE = "s3://%(bucket)s%(region)s/%(key)s"
def __init__(self):
super(AmazonS3, self).__init__()
@classmethod
def parse_remote(cls, filename):
"""Parses a remote filename into bucket and key information.
Handles S3 with optional region name specified in key:
BUCKETNAME@REGIONNAME/KEY
"""
parts = filename.split("//")[-1].split("/", 1)
bucket, key = parts if len(parts) == 2 else (parts[0], None)
if bucket.find("@") > 0:
bucket, region = bucket.split("@")
else:
region = None
return cls._REMOTE_FILE("s3", bucket, key, region)
@classmethod
def _cl_aws_cli(cls, file_info, region):
"""Command line required for download using the standard AWS
command line interface.
"""
s3file = cls._S3_FILE % {"bucket": file_info.bucket,
"key": file_info.key,
"region": ""}
command = [os.path.join(os.path.dirname(sys.executable), "aws"),
"s3", "cp", "--region", region, s3file]
return (command, "awscli")
@staticmethod
def _cl_gof3r(file_info, region):
"""Command line required for download using gof3r."""
command = ["gof3r", "get", "--no-md5",
"-k", file_info.key,
"-b", file_info.bucket]
if region != "us-east-1":
command += ["--endpoint=s3-%s.amazonaws.com" % region]
return (command, "gof3r")
@classmethod
def _download_cl(cls, filename):
"""Provide potentially streaming download from S3 using gof3r
or the AWS CLI.
Selects the correct endpoint for non us-east support:
http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
In eu-central-1 gof3r does not support new AWS signatures,
so we fall back to the standard AWS commandline interface:
https://github.com/rlmcpherson/s3gof3r/issues/45
"""
file_info = cls.parse_remote(filename)
region = cls.get_region(filename)
if region in REGIONS_NEWPERMS["s3"]:
return cls._cl_aws_cli(file_info, region)
else:
return cls._cl_gof3r(file_info, region)
@classmethod
def get_region(cls, resource=None):
"""Retrieve region from standard environmental variables
or file name.
More information of the following link: http://goo.gl/Vb9Jky
"""
if resource:
resource_info = cls.parse_remote(resource)
if resource_info.region:
return resource_info.region
return os.environ.get("AWS_DEFAULT_REGION", cls._DEFAULT_REGION)
@classmethod
def check_resource(cls, resource):
"""Check if the received resource can be processed by
the current storage manager.
"""
if resource and resource.startswith("s3://"):
return True
return False
@classmethod
def connect(cls, resource):
"""Connect to this Region's endpoint.
Returns a connection object pointing to the endpoint associated
to the received resource.
"""
return boto.s3.connect_to_region(cls.get_region(resource))
@classmethod
def download(cls, filename, input_dir, dl_dir=None):
"""Provide potentially streaming download from S3 using gof3r
or the AWS CLI.
"""
file_info = cls.parse_remote(filename)
if not dl_dir:
dl_dir = os.path.join(input_dir, file_info.bucket,
os.path.dirname(file_info.key))
utils.safe_makedir(dl_dir)
out_file = os.path.join(dl_dir, os.path.basename(file_info.key))
if not utils.file_exists(out_file):
with file_transaction({}, out_file) as tx_out_file:
command, prog = cls._download_cl(filename)
if prog == "gof3r":
command.extend(["-p", tx_out_file])
elif prog == "awscli":
command.extend([tx_out_file])
else:
raise NotImplementedError(
"Unexpected download program %s" % prog)
subprocess.check_call(command)
return out_file
@classmethod
def cl_input(cls, filename, unpack=True, anonpipe=True):
"""Return command line input for a file, handling streaming
remote cases.
"""
command, prog = cls._download_cl(filename)
if prog == "awscli":
command.append("-")
command = " ".join(command)
if filename.endswith(".gz") and unpack:
command = "%(command)s | gunzip -c" % {"command": command}
if anonpipe:
command = "<(%(command)s)" % {"command": command}
return command
@classmethod
def list(cls, path):
"""Return a list containing the names of the entries in the directory
given by path. The list is in arbitrary order.
"""
file_info = cls.parse_remote(path)
connection = cls.connect(path)
bucket = connection.get_bucket(file_info.bucket)
region = "@%s" % file_info.region if file_info.region else ""
output = []
for key in bucket.get_all_keys(prefix=file_info.key):
output.append(cls._S3_FILE % {"bucket": file_info.bucket,
"key": key.name,
"region": region})
return output
@classmethod
def open(cls, filename):
"""Return a handle like object for streaming from S3."""
file_info = cls.parse_remote(filename)
connection = cls.connect(filename)
try:
s3_bucket = connection.get_bucket(file_info.bucket)
except boto.exception.S3ResponseError as error:
# if we don't have bucket permissions but folder permissions,
# try without validation
if error.status == 403:
s3_bucket = connection.get_bucket(file_info.bucket,
validate=False)
else:
raise
s3_key = s3_bucket.get_key(file_info.key)
if s3_key is None:
raise ValueError("Did not find S3 key: %s" % filename)
return S3Handle(s3_key)
class AzureBlob(StorageManager):
"""Azure Blob storage service manager."""
_BLOB_FILE = ("https://{storage}.blob.core.windows.net/"
"{container}/{blob}")
_REMOTE_FILE = collections.namedtuple(
"RemoteFile", ["store", "storage", "container", "blob"])
_URL_FORMAT = re.compile(r'http.*\/\/(?P<storage>[^.]+)[^/]+\/'
r'(?P<container>[^/]+)\/*(?P<blob>.*)')
_BLOB_CHUNK_DATA_SIZE = 4 * 1024 * 1024
def __init__(self):
super(AzureBlob, self).__init__()
@classmethod
def check_resource(cls, resource):
"""Check if the received resource can be processed by
the current storage manager.
"""
return cls._URL_FORMAT.match(resource or "")
@classmethod
def parse_remote(cls, filename):
"""Parses a remote filename into blob information."""
blob_file = cls._URL_FORMAT.search(filename)
return cls._REMOTE_FILE("blob",
storage=blob_file.group("storage"),
container=blob_file.group("container"),
blob=blob_file.group("blob"))
@classmethod
def connect(cls, resource):
"""Returns a connection object pointing to the endpoint
associated to the received resource.
"""
file_info = cls.parse_remote(resource)
return azure_storage.BlobService(file_info.storage)
@classmethod
def download(cls, filename, input_dir, dl_dir=None):
"""Download the resource from the storage."""
file_info = cls.parse_remote(filename)
if not dl_dir:
dl_dir = os.path.join(input_dir, file_info.container,
os.path.dirname(file_info.blob))
utils.safe_makedir(dl_dir)
out_file = os.path.join(dl_dir, os.path.basename(file_info.blob))
if not utils.file_exists(out_file):
with file_transaction({}, out_file) as tx_out_file:
blob_service = cls.connect(filename)
blob_service.get_blob_to_path(
container_name=file_info.container,
blob_name=file_info.blob,
file_path=tx_out_file)
return out_file
@classmethod
def list(cls, path):
"""Return a list containing the names of the entries in the directory
given by path. The list is in arbitrary order.
"""
output = []
path_info = cls.parse_remote(path)
blob_service = azure_storage.BlobService(path_info.storage)
try:
blob_enum = blob_service.list_blobs(path_info.container)
except azure.WindowsAzureMissingResourceError:
return output
for item in blob_enum:
output.append(cls._BLOB_FILE.format(storage=path_info.storage,
container=path_info.container,
blob=item.name))
return output
@classmethod
def open(cls, filename):
"""Provide a handle-like object for streaming."""
file_info = cls.parse_remote(filename)
blob_service = cls.connect(filename)
return BlobHandle(blob_service=blob_service,
container=file_info.container,
blob=file_info.blob,
chunk_size=cls._BLOB_CHUNK_DATA_SIZE)
class ArvadosKeep:
"""Files stored in Arvados Keep. Partial implementation, integration in bcbio-vm.
"""
@classmethod
def check_resource(self, resource):
return resource.startswith("keep:")
@classmethod
def download(self, filename, input_dir, dl_dir=None):
return None
def _get_storage_manager(resource):
"""Return a storage manager which can process this resource."""
for manager in (AmazonS3, AzureBlob, ArvadosKeep):
if manager.check_resource(resource):
return manager()
raise ValueError("Unexpected object store %(resource)s" %
{"resource": resource})
def is_remote(fname):
"""Check if the received file is recognised by one of
the available storage managers.
"""
try:
_get_storage_manager(fname)
except ValueError:
return False
return True
def file_exists_or_remote(fname):
"""Check if a file exists or is accessible remotely."""
if is_remote(fname):
return True
else:
return utils.file_exists(fname)
def default_region(fname):
"""Return the default region for the received resource.
Note:
This feature is available only for AmazonS3 storage manager.
"""
manager = _get_storage_manager(fname)
if hasattr(manager, "get_region"):
return manager.get_region()
raise NotImplementedError("Unexpected object store %s" % fname)
def connect(filename):
"""Returns a connection object pointing to the endpoint associated
to the received resource.
"""
manager = _get_storage_manager(filename)
return manager.connect(filename)
def download(fname, input_dir, dl_dir=None):
"""Download the resource from the storage."""
try:
manager = _get_storage_manager(fname)
except ValueError:
return fname
return manager.download(fname, input_dir, dl_dir)
def cl_input(fname, unpack=True, anonpipe=True):
"""Return command line input for a file, handling streaming
remote cases.
"""
try:
manager = _get_storage_manager(fname)
except ValueError:
return fname
return manager.cl_input(fname, unpack, anonpipe)
def list(remote_dirname):
"""Return a list containing the names of the entries in the directory
given by path. The list is in arbitrary order.
"""
manager = _get_storage_manager(remote_dirname)
return manager.list(remote_dirname)
def open(fname):
"""Provide a handle-like object for streaming."""
manager = _get_storage_manager(fname)
return manager.open(fname)
def parse_remote(fname):
"""Parses a remote filename in order to obtain information
related to received resource.
"""
manager = _get_storage_manager(fname)
return manager.parse_remote(fname)
| mit |
chanan/AsyncOps | module/app/asyncOps/services/BasicOperation.java | 561 | package asyncOps.services;
/**
* Created by Chanan on 4/19/2014.
*/
public abstract class BasicOperation extends OperationBase {
public BasicOperation(String message, String username, String group) {
super(message, username, group);
}
@Override
public boolean doCheck() {
if(isComplete()) return true;
boolean b = check();
if(b) setComplete(true);
return b;
}
@Override
public int getPercentComplete() {
return isComplete() ? 100 : 0;
}
public abstract boolean check();
} | mit |
ksoichiro/gitlabhq | app/helpers/diff_helper.rb | 5402 | # encoding: utf-8
module DiffHelper
def diff_view
params[:view] == 'parallel' ? 'parallel' : 'inline'
end
def allowed_diff_size
if diff_hard_limit_enabled?
Commit::DIFF_HARD_LIMIT_FILES
else
Commit::DIFF_SAFE_FILES
end
end
def allowed_diff_lines
if diff_hard_limit_enabled?
Commit::DIFF_HARD_LIMIT_LINES
else
Commit::DIFF_SAFE_LINES
end
end
def safe_diff_files(diffs)
lines = 0
safe_files = []
diffs.first(allowed_diff_size).each do |diff|
lines += diff.diff.lines.count
break if lines > allowed_diff_lines
safe_files << Gitlab::Diff::File.new(diff)
end
safe_files
end
def diff_hard_limit_enabled?
# Enabling hard limit allows user to see more diff information
if params[:force_show_diff].present?
true
else
false
end
end
def generate_line_code(file_path, line)
Gitlab::Diff::LineCode.generate(file_path, line.new_pos, line.old_pos)
end
def parallel_diff(diff_file, index)
lines = []
skip_next = false
# Building array of lines
#
# [
# left_type, left_line_number, left_line_content, left_line_code,
# right_line_type, right_line_number, right_line_content, right_line_code
# ]
#
diff_file.diff_lines.each do |line|
full_line = line.text
type = line.type
line_code = generate_line_code(diff_file.file_path, line)
line_new = line.new_pos
line_old = line.old_pos
next_line = diff_file.next_line(line.index)
if next_line
next_line_code = generate_line_code(diff_file.file_path, next_line)
next_type = next_line.type
next_line = next_line.text
end
if type == 'match' || type.nil?
# line in the right panel is the same as in the left one
line = [type, line_old, full_line, line_code, type, line_new, full_line, line_code]
lines.push(line)
elsif type == 'old'
if next_type == 'new'
# Left side has text removed, right side has text added
line = [type, line_old, full_line, line_code, next_type, line_new, next_line, next_line_code]
lines.push(line)
skip_next = true
elsif next_type == 'old' || next_type.nil?
# Left side has text removed, right side doesn't have any change
# No next line code, no new line number, no new line text
line = [type, line_old, full_line, line_code, next_type, nil, " ", nil]
lines.push(line)
end
elsif type == 'new'
if skip_next
# Change has been already included in previous line so no need to do it again
skip_next = false
next
else
# Change is only on the right side, left side has no change
line = [nil, nil, " ", line_code, type, line_new, full_line, line_code]
lines.push(line)
end
end
end
lines
end
def unfold_bottom_class(bottom)
(bottom) ? 'js-unfold-bottom' : ''
end
def unfold_class(unfold)
(unfold) ? 'unfold js-unfold' : ''
end
def diff_line_content(line)
if line.blank?
" "
else
line
end
end
def line_comments
@line_comments ||= @line_notes.select(&:active?).group_by(&:line_code)
end
def organize_comments(type_left, type_right, line_code_left, line_code_right)
comments_left = comments_right = nil
unless type_left.nil? && type_right == 'new'
comments_left = line_comments[line_code_left]
end
unless type_left.nil? && type_right.nil?
comments_right = line_comments[line_code_right]
end
[comments_left, comments_right]
end
def inline_diff_btn
params_copy = params.dup
params_copy[:view] = 'inline'
# Always use HTML to handle case where JSON diff rendered this button
params_copy.delete(:format)
link_to url_for(params_copy), id: "inline-diff-btn", class: (diff_view == 'inline' ? 'btn active' : 'btn') do
'インライン'
end
end
def parallel_diff_btn
params_copy = params.dup
params_copy[:view] = 'parallel'
# Always use HTML to handle case where JSON diff rendered this button
params_copy.delete(:format)
link_to url_for(params_copy), id: "parallel-diff-btn", class: (diff_view == 'parallel' ? 'btn active' : 'btn') do
'Side-by-side'
end
end
def submodule_link(blob, ref, repository = @repository)
tree, commit = submodule_links(blob, ref, repository)
commit_id = if commit.nil?
blob.id[0..10]
else
link_to "#{blob.id[0..10]}", commit
end
[
content_tag(:span, link_to(truncate(blob.name, length: 40), tree)),
'@',
content_tag(:span, commit_id, class: 'monospace'),
].join(' ').html_safe
end
def commit_for_diff(diff)
if diff.deleted_file
first_commit = @first_commit || @commit
first_commit.parent || @first_commit
else
@commit
end
end
def diff_file_html_data(project, diff_commit, diff_file)
{
blob_diff_path: namespace_project_blob_diff_path(project.namespace, project,
tree_join(diff_commit.id, diff_file.file_path))
}
end
def editable_diff?(diff)
!diff.deleted_file && @merge_request && @merge_request.source_project
end
end
| mit |
ryanseys/escape-from-mouseville | MonsterTest.java | 719 | /**
* To Test the Class Monster
*
* @author Ryan Seys
* @version 1.0
*/
public class MonsterTest extends junit.framework.TestCase
{
/**
* Default constructor for test class MonsterTest
*/
public MonsterTest()
{
}
public void testMonsterWin()
{
Mouseville mousevil1 = new Mouseville();
Player player1 = mousevil1.getPlayer();
player1.moveUp();
player1.moveUp();
player1.moveUp();
player1.moveLeft();
player1.moveLeft();
assertEquals(true, mousevil1.hasMonster(0, 0));
java.util.ArrayList<Monster> arrayLis1 = mousevil1.getMonsters();
Monster monster1 = (Monster)arrayLis1.get(0);
monster1.move();
monster1.move();
assertEquals(true, mousevil1.hasLost());
}
} | mit |
MindBuffer/nannou | generative_design/oscillation_figures/m_2_3_01.rs | 4999 | // M_2_3_01
//
// Generative Gestaltung – Creative Coding im Web
// ISBN: 978-3-87439-902-9, First Edition, Hermann Schmidt, Mainz, 2018
// Benedikt Groß, Hartmut Bohnacker, Julia Laub, Claudius Lazzeroni
// with contributions by Joey Lee and Niels Poldervaart
// Copyright 2018
//
// http://www.generative-gestaltung.de
//
// 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.
/**
* draws an amplitude modulated oscillator
*
* KEYS
* a : toggle draw info signal
* c : toggle draw carrier signal
* 1/2 : info signal frequency -/+
* arrow left/right : info signal phi -/+
* 7/8 : carrier signal frequency -/+ (modulation frequency)
* s : save png
*/
use nannou::prelude::*;
fn main() {
nannou::app(model).update(update).run();
}
struct Model {
point_count: usize,
freq: f32,
phi: f32,
mod_freq: f32,
draw_frequency: bool,
draw_modulation: bool,
}
fn model(app: &App) -> Model {
let _window = app
.new_window()
.size(1000, 400)
.view(view)
.key_pressed(key_pressed)
.build()
.unwrap();
Model {
point_count: 1000,
freq: 2.0,
phi: 0.0,
mod_freq: 12.0,
draw_frequency: true,
draw_modulation: true,
}
}
fn update(app: &App, model: &mut Model, _update: Update) {
model.point_count = app.window_rect().w() as usize;
}
fn view(app: &App, model: &Model, frame: Frame) {
// Begin drawing
let draw = app.draw();
let win = app.window_rect();
draw.background().color(WHITE);
// draw oscillator with freq and phi
if model.draw_frequency {
let vertices = (0..=model.point_count)
.map(|i| {
let angle = map_range(i, 0, model.point_count, 0.0, TAU);
let mut y = (angle * model.freq + deg_to_rad(model.phi)).sin();
y *= win.h() / 4.0;
pt2(win.left() + i as f32, y)
})
.enumerate()
.map(|(_i, p)| {
let rgba = rgba(0.0, 0.0, 0.0, 1.0);
(p, rgba)
});
draw.polyline().weight(1.0).points_colored(vertices);
}
// draw oscillator with mod_freq
if model.draw_modulation {
let vertices = (0..=model.point_count)
.map(|i| {
let angle = map_range(i, 0, model.point_count, 0.0, TAU);
let mut y = (angle * model.mod_freq).cos();
y *= win.h() / 4.0;
pt2(win.left() + i as f32, y)
})
.enumerate()
.map(|(_i, p)| {
let rgba = rgba(0.0, 0.5, 0.64, 0.5);
(p, rgba)
});
draw.polyline().weight(1.0).points_colored(vertices);
}
// draw both combined
if model.draw_modulation {
let vertices = (0..=model.point_count)
.map(|i| {
let angle = map_range(i, 0, model.point_count, 0.0, TAU);
let info = (angle * model.freq + deg_to_rad(model.phi)).sin();
let carrier = (angle * model.mod_freq).cos();
let mut y = info * carrier;
y *= win.h() / 4.0;
pt2(win.left() + i as f32, y)
})
.enumerate()
.map(|(_i, p)| {
let rgba = rgba(0.30, 1.0, 0.64, 0.75);
(p, rgba)
});
draw.polyline().weight(3.0).points_colored(vertices);
}
// Write the result of our drawing to the window's frame.
draw.to_frame(app, &frame).unwrap();
}
fn key_pressed(app: &App, model: &mut Model, key: Key) {
match key {
Key::Key1 => {
model.freq -= 1.0;
}
Key::Key2 => {
model.freq += 1.0;
}
Key::Key7 => {
model.mod_freq -= 1.0;
}
Key::Key8 => {
model.mod_freq += 1.0;
}
Key::A => {
model.draw_frequency = !model.draw_frequency;
}
Key::C => {
model.draw_modulation = !model.draw_modulation;
}
Key::Left => {
model.phi -= 15.0;
}
Key::Right => {
model.phi += 15.0;
}
Key::S => {
app.main_window()
.capture_frame(app.exe_name().unwrap() + ".png");
}
_other_key => {}
}
model.freq = model.freq.max(1.0);
model.mod_freq = model.mod_freq.max(1.0);
}
| mit |
qegabbe/SimpleCMock | lib/com.github.uchang_nos.c_helper.src/pointer/Address.java | 161 | package com.github.uchan_nos.c_helper.pointer;
/**
* ポインタ変数が指すアドレス値を表す基底クラス.
*/
public abstract class Address {
}
| mit |
codepreneur/github-explorer | client/app/routes/user.js | 176 | import Ember from 'ember';
export default Ember.Route.extend({
model: function (params) {
return Ember.$.getJSON("https://api.github.com/users/" + params.login);
}
});
| mit |
trustify/oroplatform | src/Oro/Bundle/ChartBundle/Resources/public/js/app/components/horizontal_bar-chart-component.js | 3914 | define(function(require) {
'use strict';
var BarChartComponent;
var Flotr = require('flotr2');
var numberFormatter = require('orolocale/js/formatter/number');
var BaseChartComponent = require('orochart/js/app/components/base-chart-component');
/**
* @class orochart.app.components.BarChartComponent
* @extends orochart.app.components.BaseChartComponent
* @exports orochart/app/components/horizontal_bar-char-component
*/
BarChartComponent = BaseChartComponent.extend({
/**
* Draw chart
*
* @overrides
*/
draw: function() {
var intValue;
var maxValue = 0;
var $chart = this.$chart;
var data = this.data;
var options = this.options;
var settings = this.options.settings;
var formatter = options.data_schema.value.formatter;
var yNumber = 0;
var chartData = [];
var yLabels = [];
var chartOptions;
for (var i in data.reverse()) {
if (!data.hasOwnProperty(i)) {
continue;
}
intValue = parseInt(data[i].value);
maxValue = Math.max(intValue, maxValue);
chartData.push([intValue, yNumber++]);
yLabels.push(data[i].label);
}
chartOptions = {
data: chartData,
color: settings.chartColors[0],
markers: {
show: true,
position: 'mr',
labelFormatter: function(data) {
if (formatter) {
return numberFormatter[formatter](data.x);
} else {
return data.x;
}
}
}
};
Flotr.draw($chart.get(0),
[chartOptions],
{
colors: settings.chartColors,
fontColor: settings.chartFontColor,
fontSize: settings.chartFontSize,
bars: {
show: true,
horizontal: true,
shadowSize: 0,
barWidth: 0.5
},
mouse: {
track: true,
relative: true,
position: 'se',
trackFormatter: function(data) {
var xValue;
if (formatter) {
xValue = numberFormatter[formatter](data.x);
return numberFormatter[formatter](data.x);
} else {
xValue = data.x;
}
return yLabels[parseInt(data.y)] + ': ' + xValue;
}
},
xaxis: {
min: 0,
max: maxValue * 1.2, // to make visible label above the highest bar
tickFormatter: function(y) {
if (formatter) {
return numberFormatter.formatCurrency(y);
} else {
return y;
}
}
},
yaxis: {
tickFormatter: function(x) {
return yLabels[parseInt(x)];
}
},
grid: {
horizontalLines: false
}
}
);
}
});
return BarChartComponent;
});
| mit |
dngoins/RoomAliveToolkit | ProCamCalibration/ProjectionMappingSample/ProjectiveTexturingShader.cs | 6859 | using SharpDX;
using SharpDX.D3DCompiler;
using SharpDX.Direct3D11;
using SharpDX.DXGI;
using System.IO;
using System.Runtime.InteropServices;
using Device = SharpDX.Direct3D11.Device;
namespace RoomAliveToolkit
{
public class ProjectiveTexturingShader
{
public const int depthImageWidth = 512;
public const int depthImageHeight = 424;
public const int colorImageWidth = 1920;
public const int colorImageHeight = 1080;
public ProjectiveTexturingShader(Device device)
{
var shaderByteCode = new ShaderBytecode(File.ReadAllBytes("Content/DepthAndProjectiveTexture.cso"));
vertexShader = new VertexShader(device, shaderByteCode);
geometryShader = new GeometryShader(device, new ShaderBytecode(File.ReadAllBytes("Content/DepthAndColorGS.cso")));
pixelShader = new PixelShader(device, new ShaderBytecode(File.ReadAllBytes("Content/DepthAndColorPS.cso")));
// depth stencil state
var depthStencilStateDesc = new DepthStencilStateDescription()
{
IsDepthEnabled = true,
DepthWriteMask = DepthWriteMask.All,
DepthComparison = Comparison.LessEqual,
IsStencilEnabled = false,
};
depthStencilState = new DepthStencilState(device, depthStencilStateDesc);
// rasterizer states
var rasterizerStateDesc = new RasterizerStateDescription()
{
CullMode = CullMode.None,
FillMode = FillMode.Solid,
IsDepthClipEnabled = true,
IsFrontCounterClockwise = true,
IsMultisampleEnabled = true,
};
rasterizerState = new RasterizerState(device, rasterizerStateDesc);
// constant buffer
var constantBufferDesc = new BufferDescription()
{
Usage = ResourceUsage.Dynamic,
BindFlags = BindFlags.ConstantBuffer,
SizeInBytes = Constants.size,
CpuAccessFlags = CpuAccessFlags.Write,
StructureByteStride = 0,
OptionFlags = 0,
};
constantBuffer = new SharpDX.Direct3D11.Buffer(device, constantBufferDesc);
// user view sampler state
var colorSamplerStateDesc = new SamplerStateDescription()
{
Filter = Filter.MinMagMipLinear,
AddressU = TextureAddressMode.Border,
AddressV = TextureAddressMode.Border,
AddressW = TextureAddressMode.Border,
//BorderColor = new SharpDX.Color4(0.5f, 0.5f, 0.5f, 1.0f),
BorderColor = new SharpDX.Color4(0, 0, 0, 1.0f),
};
colorSamplerState = new SamplerState(device, colorSamplerStateDesc);
vertexInputLayout = new InputLayout(device, shaderByteCode.Data, new[]
{
new InputElement("SV_POSITION", 0, Format.R32G32B32A32_Float, 0, 0),
});
}
// protip: compile shader with /Fc; output gives exact layout
// hlsl matrices are stored column major
// variables are stored on 4-component boundaries; inc. matrix columns
// size is a multiple of 16
[StructLayout(LayoutKind.Explicit, Size = Constants.size)]
public unsafe struct Constants
{
public const int size = 128;
[FieldOffset(0)]
public fixed float userWorldViewProjection[16];
[FieldOffset(64)]
public fixed float projectorWorldViewProjection[16];
};
public unsafe void SetConstants(DeviceContext deviceContext, SharpDX.Matrix userWorldViewProjection, SharpDX.Matrix projectorWorldViewProjection)
{
Constants constants = new Constants();
for (int i = 0, col = 0; col < 4; col++)
for (int row = 0; row < 4; row++)
{
constants.userWorldViewProjection[i] = userWorldViewProjection[row, col];
constants.projectorWorldViewProjection[i] = projectorWorldViewProjection[row, col];
i++;
}
DataStream dataStream;
deviceContext.MapSubresource(constantBuffer, MapMode.WriteDiscard, SharpDX.Direct3D11.MapFlags.None, out dataStream);
dataStream.Write<Constants>(constants);
deviceContext.UnmapSubresource(constantBuffer, 0);
}
public void Render(DeviceContext deviceContext, ShaderResourceView depthImageTextureRV, ShaderResourceView colorImageTextureRV, SharpDX.Direct3D11.Buffer vertexBuffer, RenderTargetView renderTargetView, DepthStencilView depthStencilView, Viewport viewport)
{
deviceContext.InputAssembler.InputLayout = vertexInputLayout;
deviceContext.InputAssembler.PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.TriangleList;
deviceContext.InputAssembler.SetVertexBuffers(0, new VertexBufferBinding(vertexBuffer, VertexPosition.SizeInBytes, 0)); // bytes per vertex
deviceContext.OutputMerger.SetTargets(depthStencilView, renderTargetView);
deviceContext.OutputMerger.DepthStencilState = depthStencilState;
deviceContext.Rasterizer.State = rasterizerState;
deviceContext.Rasterizer.SetViewport(viewport);
deviceContext.VertexShader.Set(vertexShader);
deviceContext.VertexShader.SetShaderResource(0, depthImageTextureRV);
deviceContext.VertexShader.SetConstantBuffer(0, constantBuffer);
deviceContext.GeometryShader.Set(geometryShader);
deviceContext.PixelShader.Set(pixelShader);
deviceContext.PixelShader.SetShaderResource(0, colorImageTextureRV);
deviceContext.PixelShader.SetSampler(0, colorSamplerState);
deviceContext.Draw((depthImageWidth - 1) * (depthImageHeight - 1) * 6, 0);
deviceContext.VertexShader.SetShaderResource(0, null); // to avoid warnings when these are later set as render targets
deviceContext.PixelShader.SetShaderResource(0, null);
}
struct VertexPosition
{
public SharpDX.Vector4 position;
static public int SizeInBytes { get { return 4 * 4; } }
}
VertexShader vertexShader;
GeometryShader geometryShader;
PixelShader pixelShader;
DepthStencilState depthStencilState;
RasterizerState rasterizerState;
SharpDX.Direct3D11.Buffer constantBuffer;
SamplerState colorSamplerState;
InputLayout vertexInputLayout;
}
}
| mit |
rightjs/rightjs-ui | src/lightbox/lightbox/pager.js | 1883 | /**
* Processes the link-groups showing things in a single Lightbox
*
* Copyright (C) 2010 Nikolay Nemshilov
*/
var Pager = {
/**
* Checks and shows the pager links on the dialog
*
* @param Dialog dialog
* @param String url-address
* @return void
*/
show: function(dialog, url) {
if (dialog.options.group) {
this.dialog = dialog;
this.links = this.find(dialog.options.group);
this.link = this.links.first(function(link) {
return link.get('href') === url;
});
var index = this.links.indexOf(this.link), size = this.links.length;
dialog.prevLink[size && index > 0 ? 'show' : 'hide']();
dialog.nextLink[size && index < size - 1 ? 'show' : 'hide']();
} else {
this.dialog = null;
}
},
/**
* Shows the prev link
*
* @return void
*/
prev: function() {
if (this.dialog && !this.timer) {
var id = this.links.indexOf(this.link),
link = this.links[id - 1];
if (link) {
this.dialog.load(link);
this.timeout();
}
}
},
/**
* Shows the next link
*
* @return void
*/
next: function() {
if (this.dialog && !this.timer) {
var id = this.links.indexOf(this.link),
link = this.links[id + 1];
if (link) {
this.dialog.load(link);
this.timeout();
}
}
},
// private
// finding the links list
find: function(group) {
return $$('a').filter(function(link) {
var data = link.get('data-lightbox');
var rel = link.get('rel');
return (data && new Function("return "+ data)().group === group) ||
(rel && rel.indexOf('lightbox['+ group + ']') > -1);
});
},
// having a little nap to prevent ugly quick scrolling
timeout: function() {
this.timer = R(function() {
Pager.timer = null;
}).delay(300);
}
};
| mit |
Frannsoft/FrannHammer | src/Implementation/FrannHammer.WebScraping/Moves/PropertyResolvers/UltimateBaseDamageResolver.cs | 5367 | using FrannHammer.Domain.Contracts;
using HtmlAgilityPack;
using System.Linq;
namespace FrannHammer.WebScraping.Moves
{
public class Smash4BaseDamageResolver
{
public string GetRawValue(HtmlNode node) => node.InnerText;
}
public class UltimateBaseDamageResolver
{
public string GetRawValue(HtmlNode node)
{
string basedmg = string.Empty;
var normalBaseDamageNode = node.SelectSingleNode("./div[@class = 'tooltip']");
if (normalBaseDamageNode != null)
{
string normalBaseDamage = normalBaseDamageNode.FirstChild.InnerText;
if (normalBaseDamageNode.FirstChild.NextSibling != null && !normalBaseDamageNode.FirstChild.NextSibling.InnerText.Contains("1v1"))
{
var allSpans = normalBaseDamageNode.SelectNodes("./span");
var numberSpans = allSpans.Where(sp =>
{
return int.TryParse(sp.InnerText, out int res);
});
foreach (var numberSpan in normalBaseDamage.EndsWith("/") ? numberSpans : numberSpans.Skip(1))
{
if (normalBaseDamage.EndsWith("/"))
{
normalBaseDamage += numberSpan.InnerText;
}
else
{
normalBaseDamage += "/" + numberSpan.InnerText;
}
}
//handling ground/air only moves which have a slightly different dom (but only for those two values)
//normalBaseDamage += normalBaseDamageNode.FirstChild.NextSibling.InnerText;
//if (normalBaseDamageNode.FirstChild.NextSibling.NextSibling != null)
//{
// var groundAirOnlyIndicatorNode = normalBaseDamageNode.FirstChild.NextSibling.NextSibling;
// if (groundAirOnlyIndicatorNode != null && groundAirOnlyIndicatorNode.InnerText == "/")
// {
// normalBaseDamage += groundAirOnlyIndicatorNode.InnerText;
// normalBaseDamage += normalBaseDamageNode.FirstChild.NextSibling.NextSibling.NextSibling.InnerText;
// }
//}
}
string oneVoneBaseDamage = normalBaseDamageNode.LastChild.InnerText;
basedmg = normalBaseDamage + "|" + oneVoneBaseDamage;
}
else
{
basedmg = node.InnerText;
}
return basedmg;
}
}
public class Smash4HitboxResolver
{
public string Resolve(HtmlNode node) => node.InnerText;
}
public class UltimateHitboxResolver
{
public string Resolve(HtmlNode node)
{
string data = string.Empty;
var allContentInHitboxNode = node.SelectSingleNode("./div[@class = 'tooltip']");
if (allContentInHitboxNode != null)
{
string hitboxData = allContentInHitboxNode.FirstChild.InnerText;
string remainingData = allContentInHitboxNode.LastChild.InnerText;
data = hitboxData + "|" + remainingData;
}
else
{
data = node.InnerText;
}
return data;
}
}
public class CommonAutocancelParameterResolver
{
public string Resolve(HtmlNode node)
{
string autoCancel = node.InnerText.Replace(">", ">").Replace("<", "<");
return autoCancel;
}
}
/// <summary>
/// Covers getting hitbox and base damage data.
/// </summary>
public class CommonMoveParameterResolver
{
private readonly Games _game;
public CommonMoveParameterResolver(Games game)
{
_game = game;
}
public IMove Resolve(HtmlNodeCollection nodes, IMove move)
{
switch (_game)
{
case Games.Smash4:
{
ResolveUsingSmash4(nodes, move);
break;
}
case Games.Ultimate:
{
move.HitboxActive = new UltimateHitboxResolver().Resolve(nodes[1]);
move.BaseDamage = new UltimateBaseDamageResolver().GetRawValue(nodes[3]);
move.Game = Games.Ultimate;
break;
}
default:
{
ResolveUsingSmash4(nodes, move);
break;
}
}
return move;
}
private IMove ResolveUsingSmash4(HtmlNodeCollection nodes, IMove move)
{
move.HitboxActive = new Smash4HitboxResolver().Resolve(nodes[1]);
move.BaseDamage = new Smash4BaseDamageResolver().GetRawValue(nodes[3]);
move.Game = Games.Smash4;
return move;
}
}
}
| mit |
bijanfallah/OI_CCLM | src/run_octave.py | 10043 | # run octave from python (IO code )
# This code will run the IO code and produce the plots for RMSE and save the out put data
# Created by Bijan Fallah
# [email protected]
# -----------------------------------------------------------------------------------
# DO not change any line here, it will be changed automatically by the io_scrpt.sh!!
# -----------------------------------------------------------------------------------
from oct2py import octave
import pandas as pd
import csv
from sklearn.metrics import mean_squared_error
import matplotlib.pyplot as plt
import numpy as np
from RMSE_MAPS_INGO import read_data_from_mistral as rdfm
from CCLM_OUTS import Plot_CCLM
import cartopy.crs as ccrs
#from Plot_RMSE_SPREAD_main import plot_rmse_spread as prs
# ============================================= NAMELIST ==========================================
SEAS='DJF'
NN=1000#number of observations should be read from previous funcions!!!!
month_length=20
SEAS='DJF'
Vari = 'T_2M'
buffer=20
timesteps=10 # number of the seasons (years)
start_time=0
#name_2 = 'member_relax_3_big_00_' + Vari + '_ts_splitseas_1979_2015_' + SEAS + '.nc'
name_2 = 'tg_0.44deg_rot_v15.0_' + SEAS + '_1979_2015_remapbil.nc'
member=0
DIR="path_oi"
DIR_exp="path_dir"+"/"
# =================================================================================================
octave.run(DIR+"run_IO.m") # Running the Octave Interface from python!
# -------------------------------------------------------------------------------------------------
LAT = pd.read_csv(DIR_exp+"Trash/LAT.csv", header=None)
LON = pd.read_csv(DIR_exp+"Trash/LON.csv", header=None)
Forecast_3 = np.array(pd.read_csv(DIR_exp+'Trash/SEASON_MEAN1' + '_' + SEAS + '.csv', header=None))#Reading the Forecast values
t_f = np.zeros((month_length,Forecast_3.shape[0],Forecast_3.shape[1]))
for month in range(0, month_length):# Reading the ensemble forecast for each month!
t_f[month,:,:] = pd.read_csv(DIR_exp+'Trash/SEASON_MEAN' + str(month) + '_' + SEAS + '.csv', header=None)
t_f = np.array(t_f)
## add correction to forecast :
# declare zero matrix which will be filled
result_IO = np.zeros((month_length,Forecast_3.shape[0],Forecast_3.shape[1]))
result = np.zeros((Forecast_3.shape[0],Forecast_3.shape[1]))
for i in range(0,month_length):
fil=DIR + 'fi' + str(member) + str(i) +'.csv'
result=np.array(list(csv.reader(open(fil,"rb"),delimiter=','))).astype('float')
result_IO[i,:,:] = np.squeeze(t_f[i,:,:]) + result
# plot differences
pdf_name= 'last_m100_l20_'+str(member)+'.pdf'
#t_o, lat_o, lon_o, rlat_o, rlon_o =rdfm(dir='/work/bb1029/b324045/work5/03/member_relax_3_big_00/post/', # the observation (default run without shifting)
# name=name_2,
# var=Vari)
#t_o, lat_o, lon_o, rlat_o, rlon_o =rdfm(dir='NETCDFS_CCLM/03/member_relax_3_big_00/post/', # the observation (default run without shifting)
# name=name_2,
# var=Vari)
t_o, lat_o, lon_o, rlat_o, rlon_o =rdfm(dir='/NETCDFS_CCLM/eobs/', # the observation (default run without shifting)
name=name_2,
var=Vari)
dext_lon = t_o.shape[2] - (2 * buffer)
dext_lat = t_o.shape[1] - (2 * buffer)
start_lon=(buffer+4)
start_lat=(buffer-4)
##TODO: make it a function:
#def f(x):
# if x==-9999:
# return float('NaN')
# else:
# return x
#f2 = np.vectorize(f)
#t_o= f2(t_o)
#t_o=t_o.squeeze()
#t_o = t_o.data
#t_o[np.isnan(t_o)] = np.nanmean(t_o)
##end todo
#t_o[t_o<-900]=float('NaN')
#t_o[np.isnan(t_o)]=float(0.0)
forecast = result_IO
obs = t_o[0:month_length, buffer:buffer + dext_lat, buffer:buffer + dext_lon]
RMSE=np.zeros((forecast.shape[1],forecast.shape[2]))
RMSE_TIME_SERIES=np.zeros(forecast.shape[0])
RMSE_TIME_SERIES_Forecast=np.zeros(forecast.shape[0])
for i in range(0,forecast.shape[1]):
for j in range(0,forecast.shape[2]):
forecast_resh=np.squeeze(forecast[:,i,j])
obs_resh=np.squeeze(obs[:,i,j])
if (np.isnan(obs_resh).any()== False) and (np.isinf(obs_resh).any() == False) and (np.isnan(forecast_resh).any()== False) and (np.isinf(forecast_resh).any()== False):
RMSE[i,j] = mean_squared_error(obs_resh, forecast_resh) ** 0.5 # Calculating the RMSEs for each grid point
else:
RMSE[i,j] = float('NaN')
#TODO: --------------------------------------- modify here!!!!!!!
for i in range(0,forecast.shape[0]):
forecast_resh_ts=np.squeeze(forecast[i,:,:])
obs_resh_ts=np.squeeze(obs[i,:,:])
forecast_resh_ts[obs_resh_ts==float(0.0)]=float(0.0)
if (np.isnan(obs_resh_ts).any() == False) and (np.isinf(obs_resh_ts).any() == False) and (np.isnan(forecast_resh_ts).any()== False) and (np.isinf(forecast_resh_ts).any() == False):
RMSE_TIME_SERIES[i] = mean_squared_error(obs_resh_ts, forecast_resh_ts) ** 0.5 #Calculating RMSEs for each month for Analysis
else:
RMSE_TIME_SERIES[i] = float('NaN')
for i in range(0,forecast.shape[0]):
forecast_orig_ts=np.squeeze(t_f[i,:,:])
obs_resh_ts=np.squeeze(obs[i,:,:])
forecast_orig_ts[obs_resh_ts==float(0.0)]=float(0.0)
if (np.isnan(obs_resh_ts).any() == False) and (np.isinf(obs_resh_ts).any() == False) and (np.isnan(forecast_orig_ts).any()== False) and (np.isinf(forecast_orig_ts).any() == False):
RMSE_TIME_SERIES_Forecast[i] = mean_squared_error(obs_resh_ts, forecast_orig_ts) ** 0.5 #Calculating RMSEs for each month for forecast
else:
RMSE_TIME_SERIES_Forecast[i] = float('NaN')
# END TODO
fig = plt.figure('1')
fig.set_size_inches(14, 10)
rp = ccrs.RotatedPole(pole_longitude=-165.0,# this number comes from int2clm settings
pole_latitude=46.0,# this number comes from int2clm settings
globe=ccrs.Globe(semimajor_axis=6370000,
semiminor_axis=6370000))
pc = ccrs.PlateCarree()
ax = plt.axes(projection=rp)
ax.coastlines('50m', linewidth=0.8)
if SEAS[0] == "D":
# v = np.linspace(0, .8, 9, endpoint=True)# the limits of the colorbar for winter
v = np.linspace(0, 3.2, 9, endpoint=True)
else:
# v = np.linspace(0, .8, 9, endpoint=True)# the limits of the colorbar for other seasons
v = np.linspace(0, 3.2, 9, endpoint=True)
# Write the RMSE mean of the member in a file
import csv
from itertools import izip
names=DIR_exp+'Trash/'+'RMSE_'+pdf_name+str(member)+'.csv'
with open(names, 'wb') as f:
writer = csv.writer(f)
writer.writerow([NN,np.mean(RMSE)])
lats_f1=lat_o[buffer:buffer + dext_lat, buffer:buffer + dext_lon]
lons_f1=lon_o[buffer:buffer + dext_lat, buffer:buffer + dext_lon]
cs=plt.contourf(lons_f1, lats_f1, RMSE,v, transform=ccrs.PlateCarree(), cmap=plt.cm.terrain)
cb = plt.colorbar(cs)
cb.set_label('RMSE [K]', fontsize=20)
cb.ax.tick_params(labelsize=20)
ax.gridlines()
ax.text(-45.14, 15.24, r'$45\degree N$',
fontsize=15)
ax.text(-45.14, 35.73, r'$60\degree N$',
fontsize=15)
ax.text(-45.14, -3.73, r'$30\degree N$',
fontsize=15)
ax.text(-45.14, -20.73, r'$15\degree N$',
fontsize=15)
ax.text(-19.83, -35.69, r'$0\degree $',
fontsize=15)
ax.text(15.106, -35.69, r'$20\degree E$',
fontsize=15)
plt.hlines(y=min(rlat_o), xmin=min(rlon_o), xmax=max(rlon_o), color='black',linestyles= 'dashed', linewidth=2)
plt.hlines(y=max(rlat_o), xmin=min(rlon_o), xmax=max(rlon_o), color='black',linestyles= 'dashed', linewidth=2)
plt.vlines(x=min(rlon_o), ymin=min(rlat_o), ymax=max(rlat_o), color='black',linestyles= 'dashed', linewidth=2)
plt.vlines(x=max(rlon_o), ymin=min(rlat_o), ymax=max(rlat_o), color='black',linestyles= 'dashed', linewidth=2)
plt.hlines(y=min(rlat_o[buffer:-buffer]), xmin=min(rlon_o[buffer:-buffer]), xmax=max(rlon_o[buffer:-buffer]), color='black', linewidth=4)
plt.hlines(y=max(rlat_o[buffer:-buffer]), xmin=min(rlon_o[buffer:-buffer]), xmax=max(rlon_o[buffer:-buffer]), color='black', linewidth=4)
plt.vlines(x=min(rlon_o[buffer:-buffer]), ymin=min(rlat_o[buffer:-buffer]), ymax=max(rlat_o[buffer:-buffer]), color='black', linewidth=4)
plt.vlines(x=max(rlon_o[buffer:-buffer]), ymin=min(rlat_o[buffer:-buffer]), ymax=max(rlat_o[buffer:-buffer]), color='black', linewidth=4)
Plot_CCLM(dir_mistral='/NETCDFS_CCLM/eobs/',name=name_2,bcolor='black',var=Vari,flag='FALSE',color_map='TRUE', alph=1, grids='FALSE', grids_color='red', rand_obs='TRUE', NN=NN)
xs, ys, zs = rp.transform_points(pc,
np.array([-17, 105.0]),# Adjust for other domains!
np.array([3, 60])).T # Adjust for other domains!
ax.set_xlim(xs)
ax.set_ylim(ys)
plt.ylim([min(rlat_o[buffer:-buffer]),max(rlat_o[buffer:-buffer])])
plt.xlim([min(rlon_o[buffer:-buffer]),max(rlon_o[buffer:-buffer])])
#prs(PDF=DIR_exp+'Trash/'+pdf_name,vari="RMSE",VAL=RMSE,x=forecast.shape[1],y=forecast.shape[2])
plt.savefig(DIR_exp+'Trash/'+pdf_name)
plt.close()
# RMSE time-series
fig = plt.figure('2')
fig.set_size_inches(14, 10)
#plt.plot(RMSE_TIME_SERIES, 'o-', c='green')
#plt.xlabel('$time$', size=35)
plt.ylabel('$RMSE$', size=35)
plt.title('Boxplot of seasonal RMSEs averaged over the domain', size=30 , y=1.02)
#plt.ylim([0,.45])
names=DIR_exp+'Trash/'+pdf_name+str(member)+'_Analysis.csv'
with open(names, 'wb') as f:
writer = csv.writer(f)
writer.writerow(RMSE_TIME_SERIES)
#names_1 = '/home/fallah/Documents/DATA_ASSIMILATION/Bijan/CODES/CCLM/Python_Codes/historical_runs_yearly/src/TEMP/Figure08_RMSE_T_2M.pdf_Forecast.csv'
#fore = np.array(list(csv.reader(open(names_1,"rb"),delimiter=','))).astype('float')
plt.boxplot([RMSE_TIME_SERIES,RMSE_TIME_SERIES_Forecast.transpose(), ])
plt.xticks([1, 2], ['$Analysis$', '$Forecast$'], size=35)
#plt.ylim([0,.45])
plt.savefig(DIR_exp+'Trash/'+pdf_name + str(member)+'_ts.pdf')
plt.close()
| mit |
RelistenNet/RelistenApi | RelistenApi/Services/Data/SetlistSongService.cs | 7618 | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Dapper;
using Relisten.Api.Models;
namespace Relisten.Data
{
public class SetlistSongService : RelistenDataServiceBase
{
public SetlistSongService(DbService db) : base(db) { }
public async Task<IEnumerable<SetlistSong>> ForUpstreamIdentifiers(Artist artist,
IEnumerable<string> upstreamIds)
{
return await db.WithConnection(con => con.QueryAsync<SetlistSong>(@"
SELECT
s.*
, a.uuid as artist_uuid
FROM
setlist_songs s
JOIN artists a on s.artist_id = a.id
WHERE
s.artist_id = @artistId
AND s.upstream_identifier = ANY(@upstreamIds)
", new {artistId = artist.id, upstreamIds = upstreamIds.ToList()}));
}
public async Task<IEnumerable<SetlistSong>> AllForArtist(Artist artist)
{
return await db.WithConnection(con => con.QueryAsync<SetlistSong>(@"
SELECT
s.*
, a.uuid as artist_uuid
FROM
setlist_songs s
JOIN artists a on s.artist_id = a.id
WHERE
s.artist_id = @artistId
", new {artistId = artist.id}));
}
public async Task<SetlistSongWithShows> ForIdWithShows(Artist artist, int id)
{
SetlistSongWithShows bigSong = null;
await db.WithConnection(con =>
con.QueryAsync<SetlistSongWithShows, Show, VenueWithShowCount, Tour, Era, Year, SetlistSongWithShows>(@"
SELECT
s.*
, a.uuid as artist_uuid
, shows.*
, a.uuid as artist_uuid
, cnt.max_updated_at as most_recent_source_updated_at
, cnt.source_count
, cnt.has_soundboard_source
, v.*, t.*, e.*, y.*
FROM
setlist_songs s
LEFT JOIN setlist_songs_plays p ON p.played_setlist_song_id = s.id
LEFT JOIN setlist_shows set_shows ON set_shows.id = p.played_setlist_show_id
JOIN shows ON shows.date = set_shows.date AND shows.artist_id = s.artist_id
LEFT JOIN venues v ON shows.venue_id = v.id
LEFT JOIN tours t ON shows.tour_id = t.id
LEFT JOIN eras e ON shows.era_id = e.id
LEFT JOIN years y ON shows.year_id = y.id
JOIN artists a ON a.id = shows.artist_id
INNER JOIN (
SELECT
src.show_id,
MAX(src.updated_at) as max_updated_at,
COUNT(*) as source_count,
BOOL_OR(src.is_soundboard) as has_soundboard_source
FROM
sources src
GROUP BY
src.show_id
) cnt ON cnt.show_id = shows.id
WHERE
s.artist_id = @artistId
AND s.id = @songId
ORDER BY shows.date
",
(song, show, venue, tour, era, year) =>
{
if (bigSong == null)
{
bigSong = song;
bigSong.shows = new List<Show>();
}
show.venue = venue;
show.tour = tour;
show.era = era;
show.year = year;
bigSong.shows.Add(show);
return song;
},
new {artistId = artist.id, songId = id}));
return bigSong;
}
public async Task<IEnumerable<SetlistSongWithPlayCount>> AllForArtistWithPlayCount(Artist artist)
{
return await db.WithConnection(con => con.QueryAsync<SetlistSongWithPlayCount>(@"
SELECT
s.*, a.uuid as artist_uuid, shows.shows_played_at
FROM
setlist_songs s
LEFT JOIN (
SELECT
s_inner.id as setlist_song_id
, COUNT(shows.id) as shows_played_at
FROM
setlist_songs s_inner
LEFT JOIN setlist_songs_plays p ON p.played_setlist_song_id = s_inner.id
LEFT JOIN setlist_shows set_shows ON set_shows.id = p.played_setlist_show_id
LEFT JOIN shows shows ON shows.date = set_shows.date AND shows.artist_id = s_inner.artist_id
GROUP BY
s_inner.id
) shows ON shows.setlist_song_id = s.id
JOIN artists a ON a.id = s.artist_id
WHERE
s.artist_id = @id
ORDER BY s.name
", new {artist.id}));
}
public async Task<IEnumerable<SetlistSong>> InsertAll(Artist artist, IEnumerable<SetlistSong> songs)
{
/*if (song.id != 0)
{
return await db.WithConnection(con => con.QuerySingleAsync<SetlistSong>(@"
UPDATE
setlist_songs
SET
artist_id = @artist_id,
name = @name,
slug = @slug,
upstream_identifier = @upstream_identifier,
updated_at = @updated_at
WHERE
id = @id
RETURNING *
", song));
}*/
return await db.WithConnection(async con =>
{
var inserted = new List<SetlistSong>();
foreach (var song in songs)
{
var p = new
{
song.id,
song.artist_id,
song.name,
song.slug,
song.upstream_identifier,
song.updated_at
};
inserted.Add(await con.QuerySingleAsync<SetlistSong>(@"
INSERT INTO
setlist_songs
(
artist_id,
name,
slug,
upstream_identifier,
updated_at,
uuid
)
VALUES
(
@artist_id,
@name,
@slug,
@upstream_identifier,
@updated_at,
md5(@artist_id || '::setlist_song::' || @upstream_identifier)::uuid
)
RETURNING *
", p));
}
return inserted;
});
}
}
}
| mit |
TeaLang/tea | builtin/dist/core.php | 61 | <?php
#public
interface IView {
// no any
}
// program end
| mit |
snakamura/q3 | q3/qm/src/ui/tabwindow.cpp | 21649 | /*
* $Id$
*
* Copyright(C) 1998-2008 Satoshi Nakamura
*
*/
#ifdef QMTABWINDOW
#pragma warning(disable:4786)
#include <qmaccount.h>
#include <qmapplication.h>
#include <qmfilenames.h>
#include <qmfolder.h>
#include <qsmenu.h>
#include <qsuiutil.h>
#include "folderimage.h"
#include "resourceinc.h"
#include "tabwindow.h"
#include "uimanager.h"
#include "uiutil.h"
#include "../model/dataobject.h"
#include "../uimodel/tabmodel.h"
using namespace qm;
using namespace qs;
/****************************************************************************
*
* TabWindowImpl
*
*/
class qm::TabWindowImpl :
public NotifyHandler,
public TabModelHandler,
public DefaultFolderHandler
{
public:
enum {
ID_TABCTRL = 1100
};
enum {
WM_TABWINDOW_MESSAGEADDED = WM_APP + 1501,
WM_TABWINDOW_MESSAGEREMOVED = WM_APP + 1502,
WM_TABWINDOW_MESSAGEREFRESHED = WM_APP + 1503,
WM_TABWINDOW_MESSAGECHANGED = WM_APP + 1504,
};
public:
typedef std::vector<std::pair<Folder*, int> > FolderList;
public:
void layoutChildren();
void layoutChildren(int cx,
int cy);
void postUpdateMessage(UINT uMsg,
Folder* pFolder);
void handleUpdateMessage(LPARAM lParam);
void reloadProfiles(bool bInitialize);
public:
virtual LRESULT onNotify(NMHDR* pnmhdr,
bool* pbHandled);
public:
virtual void itemAdded(const TabModelEvent& event);
virtual void itemRemoved(const TabModelEvent& event);
virtual void itemChanged(const TabModelEvent& event);
virtual void itemMoved(const TabModelEvent& event);
virtual void currentChanged(const TabModelEvent& event);
public:
virtual void messageAdded(const FolderMessageEvent& event);
virtual void messageRemoved(const FolderMessageEvent& event);
virtual void messageRefreshed(const FolderEvent& event);
virtual void unseenCountChanged(const FolderEvent& event);
virtual void folderRenamed(const FolderEvent& event);
private:
LRESULT onSelChange(NMHDR* pnmhdr,
bool* pbHandled);
private:
void getChildRect(RECT* pRect);
void update(Folder* pFolder);
void update(int nItem);
void resetHandlers(Folder* pOldFolder,
Folder* pNewFolder);
wstring_ptr getTitle(const TabItem* pItem) const;
private:
int getAccountImage(const Account* pAccount) const;
int getFolderImage(const Folder* pFolder) const;
public:
TabWindow* pThis_;
TabCtrlWindow* pTabCtrl_;
HWND hwnd_;
TabModel* pTabModel_;
const FolderImage* pFolderImage_;
Profile* pProfile_;
bool bShowTab_;
bool bShowAllCount_;
bool bShowUnseenCount_;
bool bCreated_;
bool bLayouting_;
FolderList listHandledFolder_;
Folder* volatile pUpdatingFolder_;
};
void qm::TabWindowImpl::layoutChildren()
{
RECT rect;
pThis_->getClientRect(&rect);
layoutChildren(rect.right, rect.bottom);
}
void qm::TabWindowImpl::layoutChildren(int cx,
int cy)
{
bLayouting_ = true;
RECT rect;
getChildRect(&rect);
pTabCtrl_->setWindowPos(0, 0, 0, cx, rect.top, SWP_NOMOVE | SWP_NOZORDER);
Window(hwnd_).setWindowPos(0, rect.left, rect.top,
rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER);
bLayouting_ = false;
}
void qm::TabWindowImpl::postUpdateMessage(UINT uMsg,
Folder* pFolder)
{
if (InterlockedExchangePointer(reinterpret_cast<void* volatile*>(&pUpdatingFolder_), pFolder) == pFolder)
return;
if (!pThis_->postMessage(uMsg, 0, reinterpret_cast<LPARAM>(pFolder)))
InterlockedExchangePointer(reinterpret_cast<void* volatile*>(&pUpdatingFolder_), 0);
}
void qm::TabWindowImpl::handleUpdateMessage(LPARAM lParam)
{
InterlockedExchangePointer(reinterpret_cast<void* volatile*>(&pUpdatingFolder_), 0);
update(reinterpret_cast<Folder*>(lParam));
}
void qm::TabWindowImpl::reloadProfiles(bool bInitialize)
{
bool bShowTab = pProfile_->getInt(L"TabWindow", L"Show") != 0;
bShowAllCount_ = pProfile_->getInt(L"TabWindow", L"ShowAllCount") != 0;
bShowUnseenCount_ = pProfile_->getInt(L"TabWindow", L"ShowUnseenCount") != 0;
if (!bInitialize) {
if (bShowTab != pThis_->isShowTab())
pThis_->setShowTab(bShowTab);
}
else {
bShowTab_ = bShowTab;
}
if (!bInitialize) {
pTabCtrl_->reloadProfiles();
for (int n = 0; n < TabCtrl_GetItemCount(pTabCtrl_->getHandle()); ++n)
update(n);
layoutChildren();
}
}
LRESULT qm::TabWindowImpl::onNotify(NMHDR* pnmhdr,
bool* pbHandled)
{
BEGIN_NOTIFY_HANDLER()
HANDLE_NOTIFY(TCN_SELCHANGE, ID_TABCTRL, onSelChange)
END_NOTIFY_HANDLER()
return NotifyHandler::onNotify(pnmhdr, pbHandled);
}
void qm::TabWindowImpl::itemAdded(const TabModelEvent& event)
{
int nItem = event.getItem();
const TabItem* pItem = event.getNewItem();
std::pair<Account*, Folder*> p(pItem->get());
wstring_ptr wstrName(getTitle(pItem));
W2T(wstrName.get(), ptszName);
TCITEM item = {
TCIF_TEXT | TCIF_IMAGE | TCIF_PARAM,
0,
0,
const_cast<LPTSTR>(ptszName),
0,
p.second ? getFolderImage(p.second) : getAccountImage(p.first),
reinterpret_cast<LPARAM>(pItem)
};
TabCtrl_InsertItem(pTabCtrl_->getHandle(), nItem, &item);
resetHandlers(0, p.second);
if (pTabModel_->getCount() == 1 || pTabCtrl_->isMultiline())
layoutChildren();
}
void qm::TabWindowImpl::itemRemoved(const TabModelEvent& event)
{
int nItem = event.getItem();
const TabItem* pItem = event.getOldItem();
std::pair<Account*, Folder*> p(pItem->get());
TabCtrl_DeleteItem(pTabCtrl_->getHandle(), nItem);
resetHandlers(p.second, 0);
if (pTabModel_->getCount() == 0 || pTabCtrl_->isMultiline())
layoutChildren();
}
void qm::TabWindowImpl::itemChanged(const TabModelEvent& event)
{
int nItem = event.getItem();
const TabItem* pOldItem = event.getOldItem();
std::pair<Account*, Folder*> pOld(pOldItem->get());
const TabItem* pNewItem = event.getNewItem();
std::pair<Account*, Folder*> pNew(pNewItem->get());
update(nItem);
resetHandlers(pOld.second, pNew.second);
if (pTabCtrl_->isMultiline())
layoutChildren();
}
void qm::TabWindowImpl::itemMoved(const TabModelEvent& event)
{
int nItem = event.getItem();
TabCtrl_DeleteItem(pTabCtrl_->getHandle(), nItem);
int nAmount = event.getAmount();
const TabItem* pItem = pTabModel_->getItem(nItem + nAmount);
std::pair<Account*, Folder*> p(pItem->get());
wstring_ptr wstrName(getTitle(pItem));
W2T(wstrName.get(), ptszName);
TCITEM item = {
TCIF_TEXT | TCIF_IMAGE | TCIF_PARAM,
0,
0,
const_cast<LPTSTR>(ptszName),
0,
p.second ? getFolderImage(p.second) : getAccountImage(p.first),
reinterpret_cast<LPARAM>(pItem)
};
TabCtrl_InsertItem(pTabCtrl_->getHandle(), nItem + nAmount, &item);
TabCtrl_SetCurSel(pTabCtrl_->getHandle(), pTabModel_->getCurrent());
if (pTabCtrl_->isMultiline())
layoutChildren();
}
void qm::TabWindowImpl::currentChanged(const TabModelEvent& event)
{
int nItem = pTabModel_->getCurrent();
if (nItem != -1 && TabCtrl_GetCurSel(pTabCtrl_->getHandle()) != nItem)
TabCtrl_SetCurSel(pTabCtrl_->getHandle(), nItem);
}
void qm::TabWindowImpl::messageAdded(const FolderMessageEvent& event)
{
postUpdateMessage(WM_TABWINDOW_MESSAGEADDED, event.getFolder());
}
void qm::TabWindowImpl::messageRemoved(const FolderMessageEvent& event)
{
postUpdateMessage(WM_TABWINDOW_MESSAGEREMOVED, event.getFolder());
}
void qm::TabWindowImpl::messageRefreshed(const FolderEvent& event)
{
postUpdateMessage(WM_TABWINDOW_MESSAGEREFRESHED, event.getFolder());
}
void qm::TabWindowImpl::unseenCountChanged(const FolderEvent& event)
{
postUpdateMessage(WM_TABWINDOW_MESSAGECHANGED, event.getFolder());
}
void qm::TabWindowImpl::folderRenamed(const FolderEvent& event)
{
update(event.getFolder());
}
LRESULT qm::TabWindowImpl::onSelChange(NMHDR* pnmhdr,
bool* pbHandled)
{
int nItem = TabCtrl_GetCurSel(pTabCtrl_->getHandle());
pTabModel_->setCurrent(nItem);
return 0;
}
void qm::TabWindowImpl::getChildRect(RECT* pRect)
{
RECT rect;
pThis_->getClientRect(&rect);
*pRect = rect;
if (bShowTab_ && TabCtrl_GetItemCount(pTabCtrl_->getHandle()) != 0) {
pTabCtrl_->setWindowPos(HWND_BOTTOM, 0, 0, rect.right, rect.bottom, SWP_NOMOVE);
TabCtrl_AdjustRect(pTabCtrl_->getHandle(), FALSE, &rect);
pRect->top = rect.top - 4;
}
}
void qm::TabWindowImpl::update(Folder* pFolder)
{
assert(pFolder);
int nCount = pTabModel_->getCount();
for (int n = 0; n < nCount; ++n) {
const TabItem* pItem = pTabModel_->getItem(n);
if (pItem->get().second == pFolder)
update(n);
}
}
void qm::TabWindowImpl::update(int nItem)
{
const TabItem* pItem = pTabModel_->getItem(nItem);
std::pair<Account*, Folder*> p(pItem->get());
wstring_ptr wstrName(getTitle(pItem));
W2T(wstrName.get(), ptszName);
TCITEM item = {
TCIF_TEXT | TCIF_IMAGE | TCIF_PARAM,
0,
0,
const_cast<LPTSTR>(ptszName),
0,
p.second ? getFolderImage(p.second) : getAccountImage(p.first),
reinterpret_cast<LPARAM>(pItem)
};
TabCtrl_SetItem(pTabCtrl_->getHandle(), nItem, &item);
}
void qm::TabWindowImpl::resetHandlers(Folder* pOldFolder,
Folder* pNewFolder)
{
if (pOldFolder) {
FolderList::iterator it = std::find_if(
listHandledFolder_.begin(), listHandledFolder_.end(),
boost::bind(&FolderList::value_type::first, _1) == pOldFolder);
assert(it != listHandledFolder_.end());
if (--(*it).second == 0) {
pOldFolder->removeFolderHandler(this);
listHandledFolder_.erase(it);
}
}
if (pNewFolder) {
FolderList::iterator it = std::find_if(
listHandledFolder_.begin(), listHandledFolder_.end(),
boost::bind(&FolderList::value_type::first, _1) == pNewFolder);
if (it != listHandledFolder_.end()) {
++(*it).second;
}
else {
pNewFolder->addFolderHandler(this);
listHandledFolder_.push_back(std::make_pair(pNewFolder, 1));
}
}
}
wstring_ptr qm::TabWindowImpl::getTitle(const TabItem* pItem) const
{
const WCHAR* pwszLock = pItem->isLocked() ? L"*" : L"";
const WCHAR* pwszTitle = pItem->getTitle();
std::pair<Account*, Folder*> p(pItem->get());
if (p.first) {
if (pwszTitle) {
return concat(pwszTitle, pwszLock);
}
else {
Account* pAccount = p.first;
ConcatW c[] = {
{ L"[", 1 },
{ pAccount->getName(), -1 },
{ L"]", 1 },
{ pwszLock, -1 }
};
return concat(c, countof(c));
}
}
else {
Folder* pFolder = p.second;
WCHAR wsz[64] = L"";
if (bShowAllCount_ && bShowUnseenCount_)
_snwprintf(wsz, countof(wsz), L" (%d/%d)",
pFolder->getUnseenCount(), pFolder->getCount());
else if (bShowAllCount_)
_snwprintf(wsz, countof(wsz), L" (%d)", pFolder->getCount());
else if (bShowUnseenCount_)
_snwprintf(wsz, countof(wsz), L" (%d)", pFolder->getUnseenCount());
if (pwszTitle) {
return concat(pwszTitle, wsz, pwszLock);
}
else {
ConcatW c[] = {
{ L"[", 1 },
{ pFolder->getAccount()->getName(), -1 },
{ L"] ", 2 },
{ pFolder->getName(), -1 },
{ wsz, -1 },
{ pwszLock, -1 }
};
return concat(c, countof(c));
}
}
}
int qm::TabWindowImpl::getAccountImage(const Account* pAccount) const
{
if (!pAccount)
return 0;
return pFolderImage_->getAccountImage(pAccount, false, false);
}
int qm::TabWindowImpl::getFolderImage(const Folder* pFolder) const
{
return pFolderImage_->getFolderImage(pFolder,
pFolder->getCount() != 0, pFolder->getUnseenCount() != 0, false);
}
/****************************************************************************
*
* TabWindow
*
*/
qm::TabWindow::TabWindow(TabModel* pTabModel,
Profile* pProfile) :
WindowBase(true),
pImpl_(0)
{
pImpl_ = new TabWindowImpl();
pImpl_->pThis_ = this;
pImpl_->pTabCtrl_ = 0;
pImpl_->hwnd_ = 0;
pImpl_->pTabModel_ = pTabModel;
pImpl_->pProfile_ = pProfile;
pImpl_->bShowTab_ = true;
pImpl_->bShowAllCount_ = true;
pImpl_->bShowUnseenCount_ = true;
pImpl_->reloadProfiles(true);
setWindowHandler(this, false);
}
qm::TabWindow::~TabWindow()
{
delete pImpl_;
}
TabModel* qm::TabWindow::getTabModel() const
{
return pImpl_->pTabModel_;
}
bool qm::TabWindow::isShowTab() const
{
return pImpl_->bShowTab_;
}
void qm::TabWindow::setShowTab(bool bShow)
{
if (bShow != pImpl_->bShowTab_) {
pImpl_->bShowTab_ = bShow;
pImpl_->layoutChildren();
}
}
void qm::TabWindow::reloadProfiles()
{
pImpl_->reloadProfiles(false);
}
void qm::TabWindow::save() const
{
pImpl_->pProfile_->setInt(L"TabWindow", L"Show", pImpl_->bShowTab_);
}
void qm::TabWindow::setControl(HWND hwnd)
{
pImpl_->hwnd_ = hwnd;
}
LRESULT qm::TabWindow::windowProc(UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
BEGIN_MESSAGE_HANDLER()
HANDLE_CREATE()
HANDLE_DESTROY()
HANDLE_SIZE()
HANDLE_MESSAGE(TabWindowImpl::WM_TABWINDOW_MESSAGEADDED, onMessageAdded)
HANDLE_MESSAGE(TabWindowImpl::WM_TABWINDOW_MESSAGEREMOVED, onMessageRemoved)
HANDLE_MESSAGE(TabWindowImpl::WM_TABWINDOW_MESSAGEREFRESHED, onMessageRefreshed)
HANDLE_MESSAGE(TabWindowImpl::WM_TABWINDOW_MESSAGECHANGED, onMessageChanged)
END_MESSAGE_HANDLER()
return DefaultWindowHandler::windowProc(uMsg, wParam, lParam);
}
LRESULT qm::TabWindow::onCreate(CREATESTRUCT* pCreateStruct)
{
if (DefaultWindowHandler::onCreate(pCreateStruct) == -1)
return -1;
TabWindowCreateContext* pContext =
reinterpret_cast<TabWindowCreateContext*>(pCreateStruct->lpCreateParams);
pImpl_->pFolderImage_ = pContext->pFolderImage_;
std::auto_ptr<TabCtrlWindow> pTabCtrl(new TabCtrlWindow(
pContext->pAccountManager_, pImpl_->pTabModel_, pImpl_->pProfile_,
pImpl_->pFolderImage_, pContext->pUIManager_->getMenuManager()));
if (!pTabCtrl->create(L"QmTabCtrlWindow", 0,
WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
getHandle(), 0, 0, TabWindowImpl::ID_TABCTRL, 0))
return -1;
pImpl_->pTabCtrl_ = pTabCtrl.release();
pImpl_->pTabModel_->addTabModelHandler(pImpl_);
addNotifyHandler(pImpl_);
pImpl_->bCreated_ = true;
pImpl_->bLayouting_ = false;
return 0;
}
LRESULT qm::TabWindow::onDestroy()
{
removeNotifyHandler(pImpl_);
pImpl_->pTabModel_->removeTabModelHandler(pImpl_);
return DefaultWindowHandler::onDestroy();
}
LRESULT qm::TabWindow::onSize(UINT nFlags,
int cx,
int cy)
{
if (pImpl_->bCreated_ && !pImpl_->bLayouting_ && pImpl_->hwnd_)
pImpl_->layoutChildren(cx, cy);
return DefaultWindowHandler::onSize(nFlags, cx, cy);
}
LRESULT qm::TabWindow::onMessageAdded(WPARAM wParam,
LPARAM lParam)
{
pImpl_->handleUpdateMessage(lParam);
return 0;
}
LRESULT qm::TabWindow::onMessageRemoved(WPARAM wParam,
LPARAM lParam)
{
pImpl_->handleUpdateMessage(lParam);
return 0;
}
LRESULT qm::TabWindow::onMessageRefreshed(WPARAM wParam,
LPARAM lParam)
{
pImpl_->handleUpdateMessage(lParam);
return 0;
}
LRESULT qm::TabWindow::onMessageChanged(WPARAM wParam,
LPARAM lParam)
{
pImpl_->handleUpdateMessage(lParam);
return 0;
}
/****************************************************************************
*
* TabCtrlWindow
*
*/
qm::TabCtrlWindow::TabCtrlWindow(AccountManager* pAccountManager,
TabModel* pTabModel,
Profile* pProfile,
const FolderImage* pFolderImage,
MenuManager* pMenuManager) :
WindowBase(true),
pAccountManager_(pAccountManager),
pTabModel_(pTabModel),
pProfile_(pProfile),
pFolderImage_(pFolderImage),
pMenuManager_(pMenuManager),
hfont_(0)
{
reloadProfiles(true);
setWindowHandler(this, false);
}
qm::TabCtrlWindow::~TabCtrlWindow()
{
}
bool qm::TabCtrlWindow::isMultiline() const
{
return (getStyle() & TCS_MULTILINE) != 0;
}
void qm::TabCtrlWindow::reloadProfiles()
{
reloadProfiles(false);
}
wstring_ptr qm::TabCtrlWindow::getSuperClass()
{
return allocWString(WC_TABCONTROLW);
}
bool qm::TabCtrlWindow::preCreateWindow(CREATESTRUCT* pCreateStruct)
{
if (!DefaultWindowHandler::preCreateWindow(pCreateStruct))
return false;
bool bMultiline = pProfile_->getInt(L"TabWindow", L"Multiline") != 0;
pCreateStruct->style |= TCS_TABS | TCS_FOCUSNEVER |
(bMultiline ? TCS_MULTILINE : TCS_SINGLELINE);
return true;
}
LRESULT qm::TabCtrlWindow::windowProc(UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
BEGIN_MESSAGE_HANDLER()
HANDLE_CONTEXTMENU()
HANDLE_CREATE()
HANDLE_DESTROY()
#if !defined _WIN32_WCE || _WIN32_WCE >= 0x400
HANDLE_MBUTTONDOWN()
HANDLE_MBUTTONUP()
#endif
#if !defined _WIN32_WCE || _WIN32_WCE >= 0x211
HANDLE_MOUSEWHEEL()
#endif
HANDLE_MESSAGE(WM_TABCTRLWINDOW_DESELECTTEMPORARY, onDeselectTemporary)
END_MESSAGE_HANDLER()
return DefaultWindowHandler::windowProc(uMsg, wParam, lParam);
}
LRESULT qm::TabCtrlWindow::onContextMenu(HWND hwnd,
const POINT& pt)
{
POINT ptMenu = UIUtil::getTabCtrlContextMenuPosition(getHandle(), pt);
HMENU hmenu = pMenuManager_->getMenu(L"tab", false, false);
if (hmenu) {
TCHITTESTINFO info = {
{ ptMenu.x, ptMenu.y }
};
screenToClient(&info.pt);
int nItem = TabCtrl_HitTest(getHandle(), &info);
pTabModel_->setTemporary(nItem);
UINT nFlags = TPM_LEFTALIGN | TPM_TOPALIGN;
#ifndef _WIN32_WCE
nFlags |= TPM_LEFTBUTTON | TPM_RIGHTBUTTON;
#endif
::TrackPopupMenu(hmenu, nFlags, ptMenu.x, ptMenu.y, 0, getParentFrame(), 0);
postMessage(TabCtrlWindow::WM_TABCTRLWINDOW_DESELECTTEMPORARY);
}
return 0;
}
LRESULT qm::TabCtrlWindow::onCreate(CREATESTRUCT* pCreateStruct)
{
if (DefaultWindowHandler::onCreate(pCreateStruct) == -1)
return -1;
setFont(hfont_);
HIMAGELIST hImageList = ImageList_Duplicate(pFolderImage_->getImageList());
TabCtrl_SetImageList(getHandle(), hImageList);
pDropTarget_.reset(new DropTarget(getHandle()));
pDropTarget_->setDropTargetHandler(this);
return 0;
}
LRESULT qm::TabCtrlWindow::onDestroy()
{
if (hfont_) {
::DeleteObject(hfont_);
hfont_ = 0;
}
HIMAGELIST hImageList = TabCtrl_SetImageList(getHandle(), 0);
ImageList_Destroy(hImageList);
pDropTarget_.reset(0);
return DefaultWindowHandler::onDestroy();
}
#if !defined _WIN32_WCE || _WIN32_WCE >= 0x400
LRESULT qm::TabCtrlWindow::onMButtonDown(UINT nFlags,
const POINT& pt)
{
return 0;
}
LRESULT qm::TabCtrlWindow::onMButtonUp(UINT nFlags,
const POINT& pt)
{
if (pTabModel_->getCount() > 1) {
TCHITTESTINFO info = {
{ pt.x, pt.y }
};
int nItem = TabCtrl_HitTest(getHandle(), &info);
if (nItem != -1)
pTabModel_->close(nItem);
}
return 0;
}
#endif
#if !defined _WIN32_WCE || _WIN32_WCE >= 0x211
LRESULT qm::TabCtrlWindow::onMouseWheel(UINT nFlags,
short nDelta,
const POINT& pt)
{
#ifdef _WIN32_WCE
# define WHEEL_DELTA 120
#endif
if (pTabModel_->getCount() != 0) {
int nTab = nDelta/WHEEL_DELTA;
int nItem = (pTabModel_->getCurrent() - nTab)%pTabModel_->getCount();
if (nItem < 0)
nItem = pTabModel_->getCount() + nItem;
pTabModel_->setCurrent(nItem);
}
return DefaultWindowHandler::onMouseWheel(nFlags, nDelta, pt);
}
#endif
LRESULT qm::TabCtrlWindow::onDeselectTemporary(WPARAM wParam,
LPARAM lParam)
{
pTabModel_->setTemporary(-1);
return 0;
}
void qm::TabCtrlWindow::dragEnter(const DropTargetDragEvent& event)
{
POINT pt = event.getPoint();
screenToClient(&pt);
ImageList_DragEnter(getHandle(), pt.x, pt.y);
processDragEvent(event);
}
void qm::TabCtrlWindow::dragOver(const DropTargetDragEvent& event)
{
processDragEvent(event);
}
void qm::TabCtrlWindow::dragExit(const DropTargetEvent& event)
{
ImageList_DragLeave(getHandle());
}
void qm::TabCtrlWindow::drop(const DropTargetDropEvent& event)
{
DWORD dwEffect = DROPEFFECT_NONE;
IDataObject* pDataObject = event.getDataObject();
if (FolderDataObject::canPasteFolder(pDataObject)) {
std::pair<Account*, Folder*> p(FolderDataObject::get(pDataObject, pAccountManager_));
if (p.first) {
pTabModel_->open(p.first);
dwEffect = DROPEFFECT_MOVE;
}
else if (p.second) {
pTabModel_->open(p.second);
dwEffect = DROPEFFECT_MOVE;
}
}
event.setEffect(dwEffect);
ImageList_DragLeave(getHandle());
}
void qm::TabCtrlWindow::processDragEvent(const DropTargetDragEvent& event)
{
POINT pt = event.getPoint();
screenToClient(&pt);
DWORD dwEffect = DROPEFFECT_NONE;
IDataObject* pDataObject = event.getDataObject();
if (FolderDataObject::canPasteFolder(pDataObject))
dwEffect = DROPEFFECT_MOVE;
event.setEffect(dwEffect);
ImageList_DragMove(pt.x, pt.y);
}
void qm::TabCtrlWindow::reloadProfiles(bool bInitialize)
{
HFONT hfont = qs::UIUtil::createFontFromProfile(pProfile_,
L"TabWindow", qs::UIUtil::DEFAULTFONT_UI);
if (!bInitialize) {
assert(hfont_);
setFont(hfont);
::DeleteObject(hfont_);
}
hfont_ = hfont;
if (!bInitialize) {
bool bMultiline = pProfile_->getInt(L"TabWindow", L"Multiline") != 0;
if (bMultiline != isMultiline())
setStyle(bMultiline ? TCS_MULTILINE : TCS_SINGLELINE,
TCS_MULTILINE | TCS_SINGLELINE);
invalidate();
}
}
#endif // QMTABWINDOW
| mit |
marcj/php-rest-service | Test/Synthetic/CollectTest.php | 1997 | <?php
namespace Test\Synthetic;
use RestService\Server;
use Test\Controller\MyRoutes;
class CollectTest extends \PHPUnit\Framework\TestCase
{
/**
* @var Server
*/
private $restService;
public function setUp()
{
$this->restService = Server::create('/', new MyRoutes)
->setClient('RestService\\InternalClient')
->collectRoutes();
}
public function testNonPhpDocMethod()
{
$response = $this->restService->simulateCall('/method-without-php-doc', 'get');
$this->assertEquals('{
"status": 200,
"data": "hi"
}', $response);
}
public function testUrlAnnotation()
{
$response = $this->restService->simulateCall('/stats', 'get');
$this->assertEquals('{
"status": 200,
"data": "Stats for 1"
}', $response);
$response = $this->restService->simulateCall('/stats/23', 'get');
$this->assertEquals('{
"status": 200,
"data": "Stats for 23"
}', $response);
}
public function testOwnController()
{
$response = $this->restService->simulateCall('/login', 'post');
$this->assertEquals('{
"status": 400,
"error": "MissingRequiredArgumentException",
"message": "Argument \'username\' is missing."
}', $response);
$response = $this->restService->simulateCall('/login?username=bla', 'post');
$this->assertEquals('{
"status": 400,
"error": "MissingRequiredArgumentException",
"message": "Argument \'password\' is missing."
}', $response);
$response = $this->restService->simulateCall('/login?username=peter&password=pwd', 'post');
$this->assertEquals('{
"status": 200,
"data": true
}', $response);
$response = $this->restService->simulateCall('/login?username=peter&password=pwd', 'get');
$this->assertEquals('{
"status": 400,
"error": "RouteNotFoundException",
"message": "There is no route for \'login\'."
}', $response);
}
}
| mit |
xtrmstep/SwaggerTutorial | BookStoreApiService/SwaggerHelpers/Filters/MarkSecuredMethodsOperationFilter.cs | 1492 | using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
using System.Web.Http.Description;
using System.Web.Http.Filters;
using Swashbuckle.Swagger;
namespace BookStoreApiService.SwaggerHelpers.Filters
{
/// <summary>
/// This filter enforces authorization header to be applied for Swagger requests automatically
/// </summary>
public class MarkSecuredMethodsOperationFilter : IOperationFilter
{
public void Apply(Operation operation, SchemaRegistry schemaRegistry, ApiDescription apiDescription)
{
var filterPipeline = apiDescription.ActionDescriptor.GetFilterPipeline();
// check if authorization is required
var isAuthorized = filterPipeline
.Select(filterInfo => filterInfo.Instance)
.Any(filter => filter is IAuthorizationFilter);
// check if anonymous access is allowed
var allowAnonymous = apiDescription.ActionDescriptor.GetCustomAttributes<AllowAnonymousAttribute>().Any();
if (isAuthorized && !allowAnonymous)
{
if (operation.security == null)
operation.security = new List<IDictionary<string, IEnumerable<string>>>();
var auth = new Dictionary<string, IEnumerable<string>>
{
{"basic", Enumerable.Empty<string>()}
};
operation.security.Add(auth);
}
}
}
} | mit |
Warframe-Community-Developers/warframe-worldstate-parser | lib/CambionCycle.js | 959 | 'use strict';
const WorldstateObject = require('./WorldstateObject.js');
/**
* Represents the current Cambion Drift Fass/Vome Cycle
* @extends {WorldstateObject}
*/
class CambionCycle extends WorldstateObject {
/**
* @param {CetusCycle} cetusCycle Match data from cetus cycle for data
* @param {Object} deps The dependencies object
* @param {TimeDateFunctions} deps.timeDate The time and date functions
*/
constructor(cetusCycle, { timeDate }) {
super({ _id: { $oid: 'cambionCycle0' } }, { timeDate });
({
activation: this.activation,
expiry: this.expiry,
} = cetusCycle);
this.active = cetusCycle.isDay ? 'fass' : 'vome';
this.id = `cambionCycle${this.expiry.getTime()}`;
}
/**
* Get whether or not the event has expired
* @returns {boolean}
*/
getExpired() {
return this.timeDate.fromNow(this.expiry) < 0;
}
}
module.exports = CambionCycle;
| mit |
rjwut/ian | src/main/java/com/walkertribe/ian/protocol/core/ServerHeartbeatPacket.java | 639 | package com.walkertribe.ian.protocol.core;
import com.walkertribe.ian.enums.Origin;
import com.walkertribe.ian.iface.PacketReader;
import com.walkertribe.ian.iface.PacketWriter;
import com.walkertribe.ian.protocol.Packet;
/**
* A packet sent periodically by the server to demonstrate that it's still
* alive.
* @author rjwut
*/
@Packet(origin = Origin.SERVER, type = CorePacketType.HEARTBEAT)
public class ServerHeartbeatPacket extends HeartbeatPacket {
public ServerHeartbeatPacket() {
}
public ServerHeartbeatPacket(PacketReader reader) {
}
@Override
protected void writePayload(PacketWriter writer) {
// no payload
}
}
| mit |
jennieolsson/XChange | xchange-hitbtc/src/test/java/com/xeiam/xchange/hitbtc/HitbtcAdapterTest.java | 5218 | package com.xeiam.xchange.hitbtc;
import static org.fest.assertions.api.Assertions.assertThat;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.junit.Test;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.xeiam.xchange.currency.CurrencyPair;
import com.xeiam.xchange.dto.marketdata.OrderBook;
import com.xeiam.xchange.dto.marketdata.Ticker;
import com.xeiam.xchange.dto.marketdata.Trade;
import com.xeiam.xchange.dto.marketdata.Trades;
import com.xeiam.xchange.dto.meta.ExchangeMetaData;
import com.xeiam.xchange.dto.meta.MarketMetaData;
import com.xeiam.xchange.dto.Order.OrderType;
import com.xeiam.xchange.dto.trade.LimitOrder;
import com.xeiam.xchange.hitbtc.dto.marketdata.HitbtcOrderBook;
import com.xeiam.xchange.hitbtc.dto.marketdata.HitbtcSymbols;
import com.xeiam.xchange.hitbtc.dto.marketdata.HitbtcTicker;
import com.xeiam.xchange.hitbtc.dto.marketdata.HitbtcTime;
import com.xeiam.xchange.hitbtc.dto.marketdata.HitbtcTrades;
import com.xeiam.xchange.hitbtc.dto.meta.HitbtcMetaData;
public class HitbtcAdapterTest {
@Test
public void testAdaptTime() throws IOException {
// Read in the JSON from the example resources
InputStream is = HitbtcAdapterTest.class.getResourceAsStream("/marketdata/example-time-data.json");
// Use Jackson to parse it
ObjectMapper mapper = new ObjectMapper();
HitbtcTime time = mapper.readValue(is, HitbtcTime.class);
Date adaptedTime = HitbtcAdapters.adaptTime(time);
assertThat(adaptedTime.getTime()).isEqualTo(1447130720605L);
}
@Test
public void testAdaptTicker() throws IOException {
// Read in the JSON from the example resources
InputStream is = HitbtcAdapterTest.class.getResourceAsStream("/marketdata/example-ticker-data.json");
// Use Jackson to parse it
ObjectMapper mapper = new ObjectMapper();
HitbtcTicker ticker = mapper.readValue(is, HitbtcTicker.class);
Ticker adaptedTicker = HitbtcAdapters.adaptTicker(ticker, CurrencyPair.BTC_USD);
assertThat(adaptedTicker.getAsk()).isEqualTo("347.76");
assertThat(adaptedTicker.getBid()).isEqualTo("347.21");
assertThat(adaptedTicker.getLow()).isEqualTo("341.41");
assertThat(adaptedTicker.getHigh()).isEqualTo("354.66");
assertThat(adaptedTicker.getLast()).isEqualTo("347.53");
assertThat(adaptedTicker.getVolume()).isEqualTo("462.82");
assertThat(adaptedTicker.getCurrencyPair()).isEqualTo(CurrencyPair.BTC_USD);
}
@Test
public void testAdaptOrderbook() throws IOException {
// Read in the JSON from the example resources
InputStream is = HitbtcAdapterTest.class.getResourceAsStream("/marketdata/example-orderbook-data.json");
// Use Jackson to parse it
ObjectMapper mapper = new ObjectMapper();
HitbtcOrderBook orderBook = mapper.readValue(is, HitbtcOrderBook.class);
OrderBook adaptedOrderBook = HitbtcAdapters.adaptOrderBook(orderBook, CurrencyPair.BTC_USD);
List<LimitOrder> asks = adaptedOrderBook.getAsks();
assertThat(asks.size()).isEqualTo(3);
LimitOrder order = asks.get(0);
assertThat(order.getLimitPrice()).isEqualTo("609.58");
assertThat(order.getTradableAmount()).isEqualTo("1.23");
assertThat(order.getCurrencyPair()).isEqualTo(CurrencyPair.BTC_USD);
}
@Test
public void testAdaptToExchangeMetaData() throws IOException {
// Read in the JSON from the example resources
InputStream is = HitbtcAdapterTest.class.getResourceAsStream("/marketdata/example-symbols-data.json");
// Use Jackson to parse it
ObjectMapper mapper = new ObjectMapper();
HitbtcSymbols symbols = mapper.readValue(is, HitbtcSymbols.class);
ExchangeMetaData adaptedMetaData = HitbtcAdapters.adaptToExchangeMetaData(symbols, new HitbtcMetaData());
Map<CurrencyPair, MarketMetaData> metaDataMap = adaptedMetaData.getMarketMetaDataMap();
assertThat(metaDataMap.size()).isEqualTo(15);
MarketMetaData BTC_USD = metaDataMap.get(CurrencyPair.BTC_USD);
assertThat(BTC_USD.getTradingFee()).isEqualTo("0.001");
assertThat(BTC_USD.getMinimumAmount()).isEqualTo("0.01");
assertThat(BTC_USD.getPriceScale()).isEqualTo(2);
}
@Test
public void testAdaptTrades() throws IOException {
// Read in the JSON from the example resources
InputStream is = HitbtcAdapterTest.class.getResourceAsStream("/marketdata/example-trades-data.json");
// Use Jackson to parse it
ObjectMapper mapper = new ObjectMapper();
HitbtcTrades trades = mapper.readValue(is, HitbtcTrades.class);
Trades adaptedTrades = HitbtcAdapters.adaptTrades(trades, CurrencyPair.BTC_USD);
assertThat(adaptedTrades.getlastID()).isEqualTo(4191471L);
assertThat(adaptedTrades.getTrades()).hasSize(5);
Trade trade = adaptedTrades.getTrades().get(4);
assertThat(trade.getType()).isEqualTo(OrderType.BID);
assertThat(trade.getTradableAmount()).isEqualTo("0.21");
assertThat(trade.getCurrencyPair()).isEqualTo(CurrencyPair.BTC_USD);
assertThat(trade.getPrice()).isEqualTo("347.65");
assertThat(trade.getTimestamp()).isEqualTo(new Date(1447538550006L));
assertThat(trade.getId()).isEqualTo("4191471");
}
}
| mit |
abouthiroppy/sweetpack | test/lib/webpack/build.js | 335 | import test from 'ava';
import build from '../../../lib/webpack/build';
test('fails when the config is empty', async(t) => {
await build({})
.then(() => t.fail())
.catch(() => t.pass());
});
// test('successes when the config is correct', async (t) => {
//
// // [TODO] create tmp
// const config = {
//
// };
// });
| mit |
makcedward/nlpaug | test/profiler.py | 1365 | import nlpaug, transformers, torch, fairseq, nltk
from platform import python_version
import nlpaug.augmenter.audio as naa
import nlpaug.augmenter.char as nac
import nlpaug.augmenter.word as naw
import nlpaug.augmenter.sentence as nas
from pyinstrument import Profiler
profiler = Profiler()
def main():
model_paths = [
# 'distilbert-base-uncased',
'bert-base-uncased',
# 'bert-base-cased',
# 'xlnet-base-cased',
# 'roberta-base',
# 'distilroberta-base'
]
for model_path in model_paths:
print('-----------------:', model_path)
aug = naw.ContextualWordEmbsAug(model_path=model_path)
text = 'The quick brown fox jumps over the lazaaaaaaaaay dog'
augmented_text = aug.augment([text]*2)
# print(augmented_text)
if __name__ == '__main__':
print('python_version:{}'.format(python_version()))
print('nlpaug:{}'.format(nlpaug.__version__))
print('transformers:{}'.format(transformers.__version__))
print('torch:{}'.format(torch.__version__))
print('fairseq:{}'.format(fairseq.__version__))
print('nltk:{}'.format(nltk.__version__))
# yappi.set_clock_type("cpu") # Use set_clock_type("wall") for wall time
# yappi.start()
profiler.start()
main()
profiler.stop()
print(profiler.output_text(unicode=True, color=True))
# yappi.get_func_stats().print_all()
# yappi.get_thread_stats().print_all() | mit |
divotkey/cogaen3-java | Cogaen LWJGL/src/org/cogaen/lwjgl/input/MouseButtonPressedEvent.java | 2284 | /*
-----------------------------------------------------------------------------
Cogaen - Component-based Game Engine V3
-----------------------------------------------------------------------------
This software is developed by the Cogaen Development Team. Please have a
look at our project home page for further details: http://www.cogaen.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Copyright (c) 2010-2011 Roman Divotkey
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 org.cogaen.lwjgl.input;
import org.cogaen.event.Event;
import org.cogaen.name.CogaenId;
public class MouseButtonPressedEvent extends Event {
public static final CogaenId TYPE_ID = new CogaenId("MouseButtonPressed");
private int button;
private double posX;
private double posY;
public MouseButtonPressedEvent(int x, int y, int button) {
this.button = button;
this.posX = x;
this.posY = y;
}
@Override
public CogaenId getTypeId() {
return TYPE_ID;
}
public int getButton() {
return button;
}
public double getPosX() {
return posX;
}
public double getPosY() {
return posY;
}
}
| mit |
jaredgray/draw | app/model/stage.ts | 57 | export class Stage
{
canvas: CanvasDrawingRenderer;
} | mit |
Washi1337/AsmResolver | src/AsmResolver/Utf8String.cs | 20707 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Text;
namespace AsmResolver
{
/// <summary>
/// Represents an immutable UTF-8 encoded string. This class supports preserving invalid UTF-8 code sequences.
/// </summary>
[DebuggerDisplay("{DebugDisplay}")]
public sealed class Utf8String :
IEquatable<Utf8String>,
IEquatable<string>,
IEquatable<byte[]>,
IComparable<Utf8String>,
IEnumerable<char>
{
/// <summary>
/// Represents the empty UTF-8 string.
/// </summary>
public static readonly Utf8String Empty = new(Array.Empty<byte>());
private readonly byte[] _data;
private string? _cachedString;
/// <summary>
/// Creates a new UTF-8 string from the provided raw data.
/// </summary>
/// <param name="data">The raw UTF-8 data.</param>
public Utf8String(byte[] data)
: this(data, 0, data.Length)
{
}
/// <summary>
/// Creates a new UTF-8 string from the provided raw data.
/// </summary>
/// <param name="data">The raw UTF-8 data.</param>
/// <param name="index">The starting index to read from.</param>
/// <param name="count">The number of bytes to read..</param>
public Utf8String(byte[] data, int index, int count)
{
// Copy data to enforce immutability.
_data = new byte[count];
Buffer.BlockCopy(data, index, _data,0, count);
}
/// <summary>
/// Creates a new UTF-8 string from the provided <see cref="System.String"/>.
/// </summary>
/// <param name="value">The string value to encode as UTF-8.</param>
public Utf8String(string value)
{
_data = Encoding.UTF8.GetBytes(value);
_cachedString = value;
}
/// <summary>
/// Gets the string value represented by the UTF-8 bytes.
/// </summary>
public string Value => _cachedString ??= Encoding.UTF8.GetString(_data);
/// <summary>
/// Gets the number of bytes used by the string.
/// </summary>
public int ByteCount => _data.Length;
/// <summary>
/// Gets the number of characters in the string.
/// </summary>
public int Length => _cachedString is null ? Encoding.UTF8.GetCharCount(_data) : Value.Length;
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
internal string DebugDisplay => Value.CreateEscapedString();
/// <summary>
/// Gets a single character in the string.
/// </summary>
/// <param name="index">The character index.</param>
public char this[int index] => Value[index];
/// <summary>
/// Gets the raw UTF-8 bytes of the string.
/// </summary>
/// <returns>The bytes.</returns>
public byte[] GetBytes()
{
byte[] copy = new byte[_data.Length];
GetBytes(copy, 0, copy.Length);
return copy;
}
/// <summary>
/// Obtains the raw UTF-8 bytes of the string, and writes it into the provided buffer.
/// </summary>
/// <param name="buffer">The output buffer to receive the bytes in.</param>
/// <param name="index">The index into the output buffer to start writing at.</param>
/// <param name="length">The number of bytes to write.</param>
/// <returns>The actual number of bytes that were written.</returns>
public int GetBytes(byte[] buffer, int index, int length)
{
length = Math.Min(length, ByteCount);
Buffer.BlockCopy(_data, 0, buffer,index, length);
return length;
}
/// <summary>
/// Gets the underlying byte array of this string.
/// </summary>
/// <remarks>
/// This method should only be used if performance is critical. Modifying the returning array
/// <strong>will</strong> change the internal state of the string.
/// </remarks>
/// <returns>The bytes.</returns>
public byte[] GetBytesUnsafe() => _data;
/// <summary>
/// Produces a new string that is the concatenation of the current string and the provided string.
/// </summary>
/// <param name="other">The other string to append..</param>
/// <returns>The new string.</returns>
public Utf8String Concat(Utf8String? other) => !IsNullOrEmpty(other)
? Concat(other._data)
: this;
/// <summary>
/// Produces a new string that is the concatenation of the current string and the provided string.
/// </summary>
/// <param name="other">The other string to append..</param>
/// <returns>The new string.</returns>
public Utf8String Concat(string? other) => !string.IsNullOrEmpty(other)
? Concat(Encoding.UTF8.GetBytes(other!))
: this;
/// <summary>
/// Produces a new string that is the concatenation of the current string and the provided byte array.
/// </summary>
/// <param name="other">The byte array to append.</param>
/// <returns>The new string.</returns>
public Utf8String Concat(byte[]? other)
{
if (other is null || other.Length == 0)
return this;
byte[] result = new byte[Length + other.Length];
Buffer.BlockCopy(_data, 0, result, 0, _data.Length);
Buffer.BlockCopy(other, 0, result, _data.Length, other.Length);
return result;
}
/// <summary>
/// Gets the zero-based index of the first occurrence of the provided character in the string.
/// </summary>
/// <param name="needle">The character to search.</param>
/// <returns>The index, or -1 if the character is not present.</returns>
public int IndexOf(char needle) => Value.IndexOf(needle);
/// <summary>
/// Gets the zero-based index of the first occurrence of the provided character in the string.
/// </summary>
/// <param name="needle">The character to search.</param>
/// <param name="startIndex">The index to start searching at.</param>
/// <returns>The index, or -1 if the character is not present.</returns>
public int IndexOf(char needle, int startIndex) => Value.IndexOf(needle, startIndex);
/// <summary>
/// Gets the zero-based index of the first occurrence of the provided string in the string.
/// </summary>
/// <param name="needle">The string to search.</param>
/// <returns>The index, or -1 if the string is not present.</returns>
public int IndexOf(string needle) => Value.IndexOf(needle);
/// <summary>
/// Gets the zero-based index of the first occurrence of the provided string in the string.
/// </summary>
/// <param name="needle">The string to search.</param>
/// <param name="startIndex">The index to start searching at.</param>
/// <returns>The index, or -1 if the string is not present.</returns>
public int IndexOf(string needle, int startIndex) => Value.IndexOf(needle, startIndex);
/// <summary>
/// Gets the zero-based index of the first occurrence of the provided string in the string.
/// </summary>
/// <param name="needle">The string to search.</param>
/// <param name="comparison">The comparison algorithm to use.</param>
/// <returns>The index, or -1 if the string is not present.</returns>
public int IndexOf(string needle, StringComparison comparison) => Value.IndexOf(needle, comparison);
/// <summary>
/// Gets the zero-based index of the first occurrence of the provided string in the string.
/// </summary>
/// <param name="needle">The string to search.</param>
/// <param name="startIndex">The index to start searching at.</param>
/// <param name="comparison">The comparison algorithm to use.</param>
/// <returns>The index, or -1 if the string is not present.</returns>
public int IndexOf(string needle, int startIndex, StringComparison comparison) => Value.IndexOf(needle, startIndex, comparison);
/// <summary>
/// Gets the zero-based index of the last occurrence of the provided character in the string.
/// </summary>
/// <param name="needle">The character to search.</param>
/// <returns>The index, or -1 if the character is not present.</returns>
public int LastIndexOf(char needle) => Value.LastIndexOf(needle);
/// <summary>
/// Gets the zero-based index of the last occurrence of the provided character in the string.
/// </summary>
/// <param name="needle">The character to search.</param>
/// <param name="startIndex">The index to start searching at.</param>
/// <returns>The index, or -1 if the character is not present.</returns>
public int LastIndexOf(char needle, int startIndex) => Value.LastIndexOf(needle, startIndex);
/// <summary>
/// Gets the zero-based index of the last occurrence of the provided string in the string.
/// </summary>
/// <param name="needle">The string to search.</param>
/// <returns>The index, or -1 if the string is not present.</returns>
public int LastIndexOf(string needle) => Value.LastIndexOf(needle);
/// <summary>
/// Gets the zero-based index of the first occurrence of the provided string in the string.
/// </summary>
/// <param name="needle">The string to search.</param>
/// <param name="startIndex">The index to start searching at.</param>
/// <returns>The index, or -1 if the string is not present.</returns>
public int LastIndexOf(string needle, int startIndex) => Value.LastIndexOf(needle, startIndex);
/// <summary>
/// Gets the zero-based index of the last occurrence of the provided string in the string.
/// </summary>
/// <param name="needle">The string to search.</param>
/// <param name="comparison">The comparison algorithm to use.</param>
/// <returns>The index, or -1 if the string is not present.</returns>
public int LastIndexOf(string needle, StringComparison comparison) => Value.LastIndexOf(needle, comparison);
/// <summary>
/// Gets the zero-based index of the last occurrence of the provided string in the string.
/// </summary>
/// <param name="needle">The string to search.</param>
/// <param name="startIndex">The index to start searching at.</param>
/// <param name="comparison">The comparison algorithm to use.</param>
/// <returns>The index, or -1 if the string is not present.</returns>
public int LastIndexOf(string needle, int startIndex, StringComparison comparison) => Value.LastIndexOf(needle, startIndex, comparison);
/// <summary>
/// Determines whether the string contains the provided string.
/// </summary>
/// <param name="needle">The string to search.</param>
/// <returns><c>true</c> if the string is present, <c>false</c> otherwise.</returns>
public bool Contains(string needle) => IndexOf(needle) >= 0;
/// <summary>
/// Determines whether the provided string is <c>null</c> or the empty string.
/// </summary>
/// <param name="value">The string to verify.</param>
/// <returns><c>true</c> if the string is <c>null</c> or empty, <c>false</c> otherwise.</returns>
public static bool IsNullOrEmpty([NotNullWhen(false)] Utf8String? value) =>
value is null || value.ByteCount == 0;
/// <summary>
/// Determines whether two strings are considered equal.
/// </summary>
/// <param name="other">The other string.</param>
/// <returns><c>true</c> if the strings are considered equal, <c>false</c> otherwise.</returns>
/// <remarks>
/// This operation performs a byte-level comparison of the two strings.
/// </remarks>
public bool Equals(Utf8String other) => ByteArrayEqualityComparer.Instance.Equals(_data, other._data);
/// <inheritdoc />
/// <remarks>
/// This operation performs a byte-level comparison of the two strings.
/// </remarks>
public bool Equals(byte[] other) => ByteArrayEqualityComparer.Instance.Equals(_data, other);
/// <inheritdoc />
/// <remarks>
/// This operation performs a byte-level comparison of the two strings.
/// </remarks>
public bool Equals(string other) => Value.Equals(other);
/// <inheritdoc />
public int CompareTo(Utf8String other) => ByteArrayEqualityComparer.Instance.Compare(_data, other._data);
/// <inheritdoc />
public IEnumerator<char> GetEnumerator() => Value.GetEnumerator();
/// <inheritdoc />
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
/// <inheritdoc />
/// <remarks>
/// This operation performs a byte-level comparison of the two strings.
/// </remarks>
public override bool Equals(object? obj) => ReferenceEquals(this, obj) || obj is Utf8String other && Equals(other);
/// <inheritdoc />
public override int GetHashCode() => ByteArrayEqualityComparer.Instance.GetHashCode(_data);
/// <inheritdoc />
public override string ToString() => Value;
/// <summary>
/// Converts a <see cref="Utf8String"/> into a <see cref="System.String"/>.
/// </summary>
/// <param name="value">The UTF-8 string value to convert.</param>
/// <returns>The string.</returns>
[return: NotNullIfNotNull("value")]
public static implicit operator string?(Utf8String? value)
{
if (value is null)
return null;
if (value.ByteCount == 0)
return string.Empty;
return value.Value;
}
/// <summary>
/// Converts a <see cref="System.String"/> into an <see cref="Utf8String"/>.
/// </summary>
/// <param name="value">The string value to convert.</param>
/// <returns>The new UTF-8 encoded string.</returns>
[return: NotNullIfNotNull("value")]
public static implicit operator Utf8String?(string? value)
{
if (value is null)
return null;
if (value.Length == 0)
return Empty;
return new Utf8String(value);
}
/// <summary>
/// Converts a raw sequence of bytes into an <see cref="Utf8String"/>.
/// </summary>
/// <param name="data">The raw data to convert.</param>
/// <returns>The new UTF-8 encoded string.</returns>
[return: NotNullIfNotNull("data")]
public static implicit operator Utf8String?(byte[]? data)
{
if (data is null)
return null;
if (data.Length == 0)
return Empty;
return new Utf8String(data);
}
/// <summary>
/// Determines whether two UTF-8 encoded strings are considered equal.
/// </summary>
/// <param name="a">The first string.</param>
/// <param name="b">The second string.</param>
/// <returns><c>true</c> if the strings are considered equal, <c>false</c> otherwise.</returns>
/// <remarks>
/// This operation performs a byte-level comparison of the two strings.
/// </remarks>
public static bool operator ==(Utf8String? a, Utf8String? b)
{
if (ReferenceEquals(a, b))
return true;
if (a is null || b is null)
return false;
return a.Equals(b);
}
/// <summary>
/// Determines whether two UTF-8 encoded strings are not considered equal.
/// </summary>
/// <param name="a">The first string.</param>
/// <param name="b">The second string.</param>
/// <returns><c>true</c> if the strings are not considered equal, <c>false</c> otherwise.</returns>
/// <remarks>
/// This operation performs a byte-level comparison of the two strings.
/// </remarks>
public static bool operator !=(Utf8String? a, Utf8String? b) => !(a == b);
/// <summary>
/// Determines whether an UTF-8 encoded string is considered equal to the provided <see cref="System.String"/>.
/// </summary>
/// <param name="a">The first string.</param>
/// <param name="b">The second string.</param>
/// <returns><c>true</c> if the strings are considered equal, <c>false</c> otherwise.</returns>
/// <remarks>
/// This operation performs a string-level comparison.
/// </remarks>
public static bool operator ==(Utf8String? a, string? b)
{
if (a is null)
return b is null;
return b is not null && a.Equals(b);
}
/// <summary>
/// Determines whether an UTF-8 encoded string is not equal to the provided <see cref="System.String"/>.
/// </summary>
/// <param name="a">The first string.</param>
/// <param name="b">The second string.</param>
/// <returns><c>true</c> if the strings are not considered equal, <c>false</c> otherwise.</returns>
/// <remarks>
/// This operation performs a string-level comparison.
/// </remarks>
public static bool operator !=(Utf8String? a, string? b) => !(a == b);
/// <summary>
/// Determines whether the underlying bytes of an UTF-8 encoded string is equal to the provided byte array.
/// </summary>
/// <param name="a">The UTF-8 string.</param>
/// <param name="b">The byte array.</param>
/// <returns><c>true</c> if the byte arrays are considered equal, <c>false</c> otherwise.</returns>
/// <remarks>
/// This operation performs a byte-level comparison.
/// </remarks>
public static bool operator ==(Utf8String? a, byte[]? b)
{
if (a is null)
return b is null;
return b is not null && a.Equals(b);
}
/// <summary>
/// Determines whether the underlying bytes of an UTF-8 encoded string is not equal to the provided byte array.
/// </summary>
/// <param name="a">The UTF-8 string.</param>
/// <param name="b">The byte array.</param>
/// <returns><c>true</c> if the byte arrays are not considered equal, <c>false</c> otherwise.</returns>
/// <remarks>
/// This operation performs a byte-level comparison.
/// </remarks>
public static bool operator !=(Utf8String? a, byte[]? b) => !(a == b);
/// <summary>
/// Concatenates two UTF-8 encoded strings together.
/// </summary>
/// <param name="a">The first string.</param>
/// <param name="b">The second string.</param>
/// <returns>The newly produced string.</returns>
public static Utf8String operator +(Utf8String? a, Utf8String? b)
{
if (IsNullOrEmpty(a))
return IsNullOrEmpty(b) ? Utf8String.Empty : b;
return a.Concat(b);
}
/// <summary>
/// Concatenates two UTF-8 encoded strings together.
/// </summary>
/// <param name="a">The first string.</param>
/// <param name="b">The second string.</param>
/// <returns>The newly produced string.</returns>
public static Utf8String operator +(Utf8String? a, string? b)
{
if (IsNullOrEmpty(a))
return string.IsNullOrEmpty(b) ? Empty : b!;
return a.Concat(b);
}
/// <summary>
/// Concatenates an UTF-8 encoded string together with a byte array.
/// </summary>
/// <param name="a">The string.</param>
/// <param name="b">The byte array.</param>
/// <returns>The newly produced string.</returns>
public static Utf8String operator +(Utf8String? a, byte[]? b)
{
if (IsNullOrEmpty(a))
return b is null || b.Length == 0 ? Empty : b;
return a.Concat(b);
}
}
}
| mit |
enilu/web-flash | flash-core/src/main/java/cn/enilu/flash/core/listener/CacheListener.java | 1173 | package cn.enilu.flash.core.listener;
import cn.enilu.flash.cache.ConfigCache;
import cn.enilu.flash.cache.DictCache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
/**
* 系统监听器<br>
* 系统启动时加载全局参数(t_sys_cfg标中的数据)到缓存中
*
* @author enilu
* @version 2018-12-23
*/
@Component
public class CacheListener implements CommandLineRunner {
@Autowired
private ConfigCache configCache;
@Autowired
private DictCache dictCache;
private Logger logger = LoggerFactory.getLogger(CacheListener.class);
public void loadCache() {
configCache.cache();
dictCache.cache();
}
@Override
public void run(String... strings) throws Exception {
logger.info(".....................load cache........................");
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
loadCache();
}
});
thread.start();
}
}
| mit |
zg/CSCWebsite | csc_new/pages/models.py | 4991 | from django.db import models
from django.utils.encoding import force_bytes
from django.utils import timezone
# dependent on icalendar package - pip install icalendar
from icalendar import Calendar, Event, vDatetime, LocalTimezone
from datetime import datetime, timedelta
import urllib.request, urllib.error, urllib.parse
import os
from csc_new import settings
import dateutil.rrule as rrule
# Create your models here.
class ExamReview(models.Model):
title = models.CharField(max_length=100)
questions = models.FileField(upload_to="exam_reviews")
answers = models.FileField(upload_to="exam_reviews")
last_modified = models.DateTimeField(auto_now=True)
def __str__(self):
return '%s' % (self.title)
def delete(self, *args, **kwargs):
os.remove(os.path.join(settings.MEDIA_ROOT, str(self.questions)))
os.remove(os.path.join(settings.MEDIA_ROOT, str(self.answers)))
super(ExamReview, self).delete(*args, **kwargs)
class GeneralMeetingSlides(models.Model):
date = models.DateField()
pdf = models.FileField(upload_to="general_meeting_slides", verbose_name="PDF")
class Meta:
verbose_name = "General Meeting Slides"
verbose_name_plural = verbose_name
def __str__(self):
return self.date.__str__()
def delete(self, *args, **kwargs):
# this is broken (the delete doesn't work; the file lingers in MEDIA_ROOT)
os.remove(os.path.join(settings.MEDIA_ROOT, str(self.pdf)))
super(GeneralMeetingSlides, self).delete(*args, **kwargs)
class Photo(models.Model):
title = models.CharField(max_length=100)
desc = models.CharField(max_length=255)
src = models.FileField(upload_to="photos")
def __str__(self):
return self.title
def delete(self, *args, **kwargs):
os.remove(os.path.join(settings.MEDIA_ROOT, str(self.src)))
super(Photo, self).delete(*args, **kwargs)
# RenderableEvent - holds an event
class RenderableEvent(models.Model):
__slots__ = ('summary', 'start_date', 'start_time', 'end_time', 'desc', 'pureTime', 'location')
def __init__(self, summ, sdate, stime, etime, d, stimePure, loc):
self.summary = summ
self.start_date = sdate
self.start_time = stime
self.end_time = etime
self.desc = d
self.pureTime = stimePure
self.location = loc
def __str__(self):
return self.summary + " " + self.start_date + " " + self.start_time + " " + self.end_time + " " + self.location
# RenderableEvents - holds all events
class RenderableEvents(models.Model):
__slots__ = ('events')
def __init__(self):
self.events = []
def getEvents(self):
icalFile = urllib.request.urlopen(
'http://www.google.com/calendar/ical/calendar%40csc.cs.rit.edu/public/basic.ics')
ical = Calendar.from_ical(icalFile.read())
lt = LocalTimezone()
for thing in ical.walk():
eventtime = thing.get('dtstart')
if eventtime != None:
offset = lt.utcoffset(eventtime.dt)
loc = thing.get('location')
if (loc == None) or (loc == "") or (loc == "TBD"):
loc = "TBD"
if thing.name == "VEVENT" and eventtime.dt.replace(tzinfo=None) + offset > datetime.today() - timedelta(
days=1):
event = RenderableEvent(
thing.get('summary'),
(eventtime.dt.replace(tzinfo=None) + offset).strftime("%m/%d/%Y"),
(eventtime.dt.replace(tzinfo=None) + offset).strftime("%I:%M %p"),
(thing.get('dtend').dt.replace(tzinfo=None) + offset).strftime("%I:%M %p"),
thing.get('description'),
(eventtime.dt.replace(tzinfo=None) + offset),
loc)
self.events.append(event)
elif thing.name == "VEVENT" and thing.get('RRULE') is not None:
repeats = list(rrule.rrulestr(thing.get('RRULE').to_ical().decode('unicode_escape'), ignoretz=True,
dtstart=datetime.now()))
if (len(repeats) <= 0):
continue
if(thing.get('summary')=='General Meeting!'):
continue
self.events.append(
RenderableEvent(thing.get('summary'), (repeats[0].replace(tzinfo=None)).strftime("%m/%d/%Y"),
(thing.get('dtstart').dt.replace(tzinfo=None)).strftime("%I:%M %p"),
(thing.get('dtend').dt.replace(tzinfo=None)).strftime("%I:%M %p"),
thing.get('description'),
(repeats[0].replace(tzinfo=None)), loc))
# Sort events by date and time!
self.events = sorted(self.events, key=lambda renderable_event: renderable_event.pureTime)
icalFile.close()
| mit |
AnewG/slim_readcode | tests/RouterTest.php | 8571 | <?php
// DONE
/**
* Slim - a micro PHP 5 framework
*
* @author Josh Lockhart <[email protected]>
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
*
* MIT LICENSE
*
* 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.
*/
class RouterTest extends PHPUnit_Framework_TestCase
{
/**
* Constructor should initialize routes as empty array
*/
public function testConstruct()
{
$router = new \Slim\Router();
$this->assertAttributeEquals(array(), 'routes', $router);
}
/**
* Map should set and return instance of \Slim\Route
*/
public function testMap()
{
$router = new \Slim\Router();
$route = new \Slim\Route('/foo', function() {});
$router->map($route);
$this->assertAttributeContains($route, 'routes', $router);
}
/**
* Named route should be added and indexed by name
*/
public function testAddNamedRoute()
{
$router = new \Slim\Router();
$route = new \Slim\Route('/foo', function () {});
$router->addNamedRoute('foo', $route);
$property = new \ReflectionProperty($router, 'namedRoutes');
$property->setAccessible(true);
$rV = $property->getValue($router);
$this->assertSame($route, $rV['foo']);
}
/**
* Named route should have unique name
*/
public function testAddNamedRouteWithDuplicateKey()
{
$this->setExpectedException('RuntimeException');
$router = new \Slim\Router();
$route = new \Slim\Route('/foo', function () {});
$router->addNamedRoute('foo', $route);
$router->addNamedRoute('foo', $route);
}
/**
* Router should return named route by name, or null if not found
*/
public function testGetNamedRoute()
{
$router = new \Slim\Router();
$route = new \Slim\Route('/foo', function () {});
$property = new \ReflectionProperty($router, 'namedRoutes');
$property->setAccessible(true);
$property->setValue($router, array('foo' => $route));
$this->assertSame($route, $router->getNamedRoute('foo'));
$this->assertNull($router->getNamedRoute('bar'));
}
/**
* Router should determine named routes and cache results
*/
public function testGetNamedRoutes()
{
$router = new \Slim\Router();
$route1 = new \Slim\Route('/foo', function () {});
$route2 = new \Slim\Route('/bar', function () {});
// Init router routes to array
$propertyRouterRoutes = new \ReflectionProperty($router, 'routes');
$propertyRouterRoutes->setAccessible(true);
$propertyRouterRoutes->setValue($router, array($route1, $route2));
// Init router named routes to null
$propertyRouterNamedRoutes = new \ReflectionProperty($router, 'namedRoutes');
$propertyRouterNamedRoutes->setAccessible(true);
$propertyRouterNamedRoutes->setValue($router, null);
// Init route name
$propertyRouteName = new \ReflectionProperty($route2, 'name');
$propertyRouteName->setAccessible(true);
$propertyRouteName->setValue($route2, 'bar');
$namedRoutes = $router->getNamedRoutes();
$this->assertCount(1, $namedRoutes);
$this->assertSame($route2, $namedRoutes['bar']);
}
/**
* Router should detect presence of a named route by name
*/
public function testHasNamedRoute()
{
$router = new \Slim\Router();
$route = new \Slim\Route('/foo', function () {});
$property = new \ReflectionProperty($router, 'namedRoutes');
$property->setAccessible(true);
$property->setValue($router, array('foo' => $route));
$this->assertTrue($router->hasNamedRoute('foo'));
$this->assertFalse($router->hasNamedRoute('bar'));
}
/**
* Router should return current route if set during iteration
*/
public function testGetCurrentRoute()
{
$router = new \Slim\Router();
$route = new \Slim\Route('/foo', function () {});
$property = new \ReflectionProperty($router, 'currentRoute');
$property->setAccessible(true);
$property->setValue($router, $route);
$this->assertSame($route, $router->getCurrentRoute());
}
/**
* Router should return first matching route if current route not set yet by iteration
*/
public function testGetCurrentRouteIfMatchedRoutes()
{
$router = new \Slim\Router();
$route = new \Slim\Route('/foo', function () {});
$propertyMatchedRoutes = new \ReflectionProperty($router, 'matchedRoutes');
$propertyMatchedRoutes->setAccessible(true);
$propertyMatchedRoutes->setValue($router, array($route));
$propertyCurrentRoute = new \ReflectionProperty($router, 'currentRoute');
$propertyCurrentRoute->setAccessible(true);
$propertyCurrentRoute->setValue($router, null);
$this->assertSame($route, $router->getCurrentRoute());
}
/**
* Router should return `null` if current route not set yet and there are no matching routes
*/
public function testGetCurrentRouteIfNoMatchedRoutes()
{
$router = new \Slim\Router();
$propertyMatchedRoutes = new \ReflectionProperty($router, 'matchedRoutes');
$propertyMatchedRoutes->setAccessible(true);
$propertyMatchedRoutes->setValue($router, array());
$propertyCurrentRoute = new \ReflectionProperty($router, 'currentRoute');
$propertyCurrentRoute->setAccessible(true);
$propertyCurrentRoute->setValue($router, null);
$this->assertNull($router->getCurrentRoute());
}
public function testGetMatchedRoutes()
{
$router = new \Slim\Router();
$route1 = new \Slim\Route('/foo', function () {});
$route1 = $route1->via('GET');
$route2 = new \Slim\Route('/foo', function () {});
$route2 = $route2->via('POST');
$route3 = new \Slim\Route('/bar', function () {});
$route3 = $route3->via('PUT');
$routes = new \ReflectionProperty($router, 'routes');
$routes->setAccessible(true);
$routes->setValue($router, array($route1, $route2, $route3));
$matchedRoutes = $router->getMatchedRoutes('GET', '/foo');
$this->assertSame($route1, $matchedRoutes[0]);
}
// Test url for named route
public function testUrlFor()
{
$router = new \Slim\Router();
$route1 = new \Slim\Route('/hello/:first/:last', function () {});
$route1 = $route1->via('GET')->name('hello');
$route2 = new \Slim\Route('/path/(:foo\.:bar)', function () {});
$route2 = $route2->via('GET')->name('regexRoute');
$routes = new \ReflectionProperty($router, 'namedRoutes');
$routes->setAccessible(true);
$routes->setValue($router, array(
'hello' => $route1,
'regexRoute' => $route2
));
$this->assertEquals('/hello/Josh/Lockhart', $router->urlFor('hello', array('first' => 'Josh', 'last' => 'Lockhart')));
$this->assertEquals('/path/Hello.Josh', $router->urlFor('regexRoute', array('foo' => 'Hello', 'bar' => 'Josh')));
}
public function testUrlForIfNoSuchRoute()
{
$this->setExpectedException('RuntimeException');
$router = new \Slim\Router();
$router->urlFor('foo', array('abc' => '123'));
}
}
| mit |
djreimer/mini_cache | lib/mini_cache/data.rb | 424 | # frozen_string_literal: true
module MiniCache
class Data
attr_reader :value
attr_reader :expires_in
def initialize(value, expires_in: nil)
@value = value
@expires_in = expires_in.nil? ? nil : Time.now + expires_in
end
def expired?
!@expires_in.nil? && Time.now > @expires_in
end
def ==(other)
other.is_a?(MiniCache::Data) && @value == other.value
end
end
end
| mit |
erickjth/SurveysAdmin | cache/frontapp/prod/config/modules_survey_config_security.yml.php | 162 | <?php
// auto-generated by sfSecurityConfigHandler
// date: 2011/05/31 16:23:13
$this->security = array (
'all' =>
array (
'is_secure' => false,
),
);
| mit |
MogulMVC/MogulJS | src/ui/MPopup.js | 755 | var MPopup = (function() {
function MPopup(width, height, title) {
if(width == null || width == ''){
width = 400;
}
if(height == null || height == ''){
height = 300;
}
if(title == null || title == ''){
title = 'Popup';
}
// Container
var uiElement = document.createElement('div');
var marginLeft = -1 * width / 2;
// Contents
var uiContents = '\
<div class="MPopup" style="margin-left:' + marginLeft + 'px;width:' + width + 'px">\
<span class="MIconClose"></span>\
<p class="MWidgetTitle">' + title + '</p>\
</div>\
<div class="MModalBGBlack"></div>';
// Put it together
$(uiElement).addClass('MPopupContainer').append(uiContents);
return uiElement;
};
return MPopup;
})();
| mit |
UniDyne/tritiumjs | src/Lang.js | 752 | // Language extensions
Array.implement({
getFirst: function() {
return this.length == 0 ? null : this[0];
},
getLast: function() {
return this.length == 0 ? null : this[this.length - 1];
},
unique: function() {
var a=[];
for(var i=0;i<this.length;i++)if(a.indexOf(this[i])<0)a.push(this[i]);
return a;
}
});
Date.implement({
clone: function() {
return new Date(this.getTime());
},
daysUntil: function (d) {
return Math.ceil((d.getTime() - this.getTime()) / (1000*60*60*24));
},
addDays: function (n) {
this.setDate(this.getDate() + n);
return this;
}
});
String.implement({
fillin: function(obj) {
return Template.execStatic(this, obj);
},
startsWith: function(s) { return (this.match("^"+s)==s); }
});
| mit |
dlcs/elucidate-server | elucidate-server/src/main/java/com/digirati/elucidate/service/query/OAAnnotationService.java | 209 | package com.digirati.elucidate.service.query;
import com.digirati.elucidate.common.model.annotation.oa.OAAnnotation;
public interface OAAnnotationService extends AbstractAnnotationService<OAAnnotation> {
}
| mit |
franciscogonzalez91/EmployeeAdminSoftware | Employee Admin Software V1/BuscarEmpleado.Designer.cs | 4483 | namespace Employee_Admin_Software_V1
{
partial class BuscarEmpleado
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.txtNomApe = new System.Windows.Forms.TextBox();
this.txtNoEmpleado = new System.Windows.Forms.TextBox();
this.dgvEmpleados = new System.Windows.Forms.DataGridView();
((System.ComponentModel.ISupportInitialize)(this.dgvEmpleados)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 44);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(96, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Nombre o Apellido:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 15);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(77, 13);
this.label2.TabIndex = 1;
this.label2.Text = "No. Empleado:";
//
// txtNomApe
//
this.txtNomApe.Location = new System.Drawing.Point(114, 41);
this.txtNomApe.Name = "txtNomApe";
this.txtNomApe.Size = new System.Drawing.Size(100, 20);
this.txtNomApe.TabIndex = 2;
//
// txtNoEmpleado
//
this.txtNoEmpleado.Location = new System.Drawing.Point(114, 12);
this.txtNoEmpleado.Name = "txtNoEmpleado";
this.txtNoEmpleado.Size = new System.Drawing.Size(34, 20);
this.txtNoEmpleado.TabIndex = 1;
this.txtNoEmpleado.TextChanged += new System.EventHandler(this.txtNoEmpleado_TextChanged);
//
// dgvEmpleados
//
this.dgvEmpleados.AllowUserToAddRows = false;
this.dgvEmpleados.AllowUserToDeleteRows = false;
this.dgvEmpleados.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvEmpleados.Location = new System.Drawing.Point(12, 72);
this.dgvEmpleados.Name = "dgvEmpleados";
this.dgvEmpleados.ReadOnly = true;
this.dgvEmpleados.Size = new System.Drawing.Size(274, 74);
this.dgvEmpleados.TabIndex = 3;
//
// BuscarEmpleado
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(298, 158);
this.Controls.Add(this.dgvEmpleados);
this.Controls.Add(this.txtNoEmpleado);
this.Controls.Add(this.txtNomApe);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "BuscarEmpleado";
this.Text = "BuscarEmpleado";
((System.ComponentModel.ISupportInitialize)(this.dgvEmpleados)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtNomApe;
private System.Windows.Forms.TextBox txtNoEmpleado;
private System.Windows.Forms.DataGridView dgvEmpleados;
}
} | mit |
gbtorrance/test | core/src/test/java/org/tdc/config/model/ModelConfigTest.java | 4856 | package org.tdc.config.model;
import static org.assertj.core.api.Assertions.assertThat;
import java.awt.Color;
import java.nio.file.Path;
import java.nio.file.Paths;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.tdc.config.schema.SchemaConfig;
import org.tdc.config.schema.SchemaConfigFactory;
import org.tdc.config.schema.SchemaConfigFactoryImpl;
import org.tdc.util.Addr;
/**
* Unit tests for {@link ModelConfig} and its related classes.
*/
public class ModelConfigTest {
private static Path schemasConfigRoot;
private static SchemaConfigFactory schemaConfigFactory;
private static ModelConfigFactory modelConfigFactory;
private static Addr modelAddr;
@Rule
public final ExpectedException exception = ExpectedException.none();
@BeforeClass
public static void setup() {
schemasConfigRoot = Paths.get("testfiles/TDCFiles/Schemas");
schemaConfigFactory = new SchemaConfigFactoryImpl(schemasConfigRoot);
modelConfigFactory = new ModelConfigFactoryImpl(schemaConfigFactory);
modelAddr = new Addr("/ConfigTest/SchemaConfigTest/ModelConfigTest");
}
@Test
public void testCachingReturnsSameConfig() {
ModelConfig schemaConfig1 = modelConfigFactory.getModelConfig(modelAddr);
ModelConfig schemaConfig2 = modelConfigFactory.getModelConfig(modelAddr);
assertThat(schemaConfig1).isEqualTo(schemaConfig2);
}
@Test
public void testValidConfig() {
ModelConfig modelConfig = modelConfigFactory.getModelConfig(modelAddr);
SchemaConfig schemaConfig = schemaConfigFactory.getSchemaConfig(new Addr("/ConfigTest/SchemaConfigTest"));
assertThat(modelConfig.getSchemaConfig()).isEqualTo(schemaConfig);
assertThat(modelConfig.getAddr()).isEqualTo(modelAddr);
assertThat(modelConfig.getModelConfigRoot()).isEqualTo(schemasConfigRoot.resolve(modelAddr.toString()));
assertThat(modelConfig.getSchemaRootFile()).isEqualTo("SchemaRootFile.xsd");
assertThat(modelConfig.getSchemaRootFileFullPath()).isEqualTo(schemaConfig.getSchemaFilesRoot().resolve("SchemaRootFile.xsd"));
assertThat(modelConfig.getSchemaRootElementName()).isEqualTo("TestRoot");
assertThat(modelConfig.getSchemaRootElementNamespace()).isEqualTo("http://org.tdc/test");
assertThat(modelConfig.getFailOnParserWarning()).isEqualTo(true);
assertThat(modelConfig.getFailOnParserNonFatalError()).isEqualTo(true);
assertThat(modelConfig.getDefaultOccursCount()).isEqualTo(5);
assertThat(modelConfig.hasModelCustomizerConfig()).isEqualTo(true);
ModelCustomizerConfig cust = modelConfig.getModelCustomizerConfig();
assertThat(cust.getFilePath()).isEqualTo(modelConfig.getModelConfigRoot().resolve("Customizer_ConfigTest.xlsx"));
assertThat(cust.getDefaultNodeStyle().getFontName()).isEqualTo("Calibri");
assertThat(cust.getDefaultNodeStyle().getFontHeight()).isEqualTo(11);
assertThat(cust.getParentNodeStyle().getFontName()).isEqualTo("Arial");
assertThat(cust.getParentNodeStyle().getFontHeight()).isEqualTo(12);
assertThat(cust.getParentNodeStyle().getColor()).isEqualTo(new Color(0, 0, 255));
assertThat(cust.getParentNodeStyle().getItalic()).isEqualTo(false);
assertThat(cust.getAttribNodeStyle().getFontName()).isEqualTo("Calibri");
assertThat(cust.getAttribNodeStyle().getFontHeight()).isEqualTo(13);
assertThat(cust.getAttribNodeStyle().getColor()).isEqualTo(new Color(34, 97, 13));
assertThat(cust.getCompositorNodeStyle().getFontName()).isEqualTo("Times New Roman");
assertThat(cust.getCompositorNodeStyle().getFontHeight()).isEqualTo(14);
assertThat(cust.getCompositorNodeStyle().getColor()).isEqualTo(new Color(64, 64, 64));
assertThat(cust.getCompositorNodeStyle().getItalic()).isEqualTo(true);
assertThat(cust.getChoiceMarkerNodeStyle().getFontName()).isEqualTo("Calibri");
assertThat(cust.getChoiceMarkerNodeStyle().getFontHeight()).isEqualTo(15);
assertThat(cust.getChoiceMarkerNodeStyle().getColor()).isEqualTo(new Color(255, 0, 0));
assertThat(cust.getNodeColumnCount()).isEqualTo(12);
assertThat(cust.getNodeColumnWidth()).isEqualTo(500);
assertThat(cust.getAllowMinMaxInvalidOccursCountOverride()).isEqualTo(true);
}
@Test
public void testConfigRootDoesNotExist() {
Addr modelAddrConfigRootDoesNotExist = new Addr("/ConfigTest/SchemaConfigTest/ModelConfigTest_DoesNotExit");
exception.expect(IllegalStateException.class);
exception.expectMessage("ModelConfig root dir does not exist:");
modelConfigFactory.getModelConfig(modelAddrConfigRootDoesNotExist);
}
@Test
public void testConfigXmlDoesNotExist() {
Addr modelAddrConfigXMLMissing = new Addr("/ConfigTest/SchemaConfigTest/ModelConfigTest_ConfigXMLMissing");
exception.expect(IllegalStateException.class);
exception.expectMessage("Unable to locate config file:");
modelConfigFactory.getModelConfig(modelAddrConfigXMLMissing);
}
}
| mit |
fgascon/home-api | index.js | 150 | var server = require('./lib/server'),
routesLoader = require('./lib/routes-loader');
routesLoader(server);
server.start();
require('./lib/logic');
| mit |
kinchan33/a1520mk_exercise4 | lib/a1520mk_exercise4/version.rb | 48 | module A1520mkExercise4
VERSION = "0.1.5"
end
| mit |
alejandrodumas/kodiak | kodiak/__init__.py | 272 | # -*- coding: utf-8 -*-
"""Top-level package for kodiak."""
from __future__ import absolute_import
from kodiak.kodiak_dataframe import KodiakDataFrame
from kodiak.config import *
__author__ = """Ezequiel Erbaro"""
__email__ = '[email protected]'
__version__ = '0.1.0'
| mit |
TaojingCoin-pd/TjcoinV2 | src/qt/bitcoinstrings.cpp | 13614 | #include <QtGlobal>
// Automatically generated by extract_strings.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *bitcoin_strings[] = {
QT_TRANSLATE_NOOP("bitcoin-core", ""
"%s, you must set a rpcpassword in the configuration file:\n"
"%s\n"
"It is recommended you use the following random password:\n"
"rpcuser=TjcoinV2rpc\n"
"rpcpassword=%s\n"
"(you do not need to remember this password)\n"
"The username and password MUST NOT be the same.\n"
"If the file does not exist, create it with owner-readable-only file "
"permissions.\n"
"It is also recommended to set alertnotify so you are notified of problems;\n"
"for example: alertnotify=echo %%s | mail -s \"TjcoinV2 Alert\" [email protected]\n"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:"
"@STRENGTH)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"An error occurred while setting up the RPC port %u for listening on IPv4: %s"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"An error occurred while setting up the RPC port %u for listening on IPv6, "
"falling back to IPv4: %s"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Bind to given address and always listen on it. Use [host]:port notation for "
"IPv6"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Cannot obtain a lock on data directory %s. TjcoinV2 is probably already "
"running."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"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."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Error: This transaction requires a transaction fee of at least %s because of "
"its amount, complexity, or use of recently received funds!"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Execute command when a relevant alert is received (%s in cmd is replaced by "
"message)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Execute command when a wallet transaction changes (%s in cmd is replaced by "
"TxID)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Execute command when the best block changes (%s in cmd is replaced by block "
"hash)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Listen for JSON-RPC connections on <port> (default: 9178 or testnet: 19178)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Number of seconds to keep misbehaving peers from reconnecting (default: "
"86400)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Set maximum size of high-priority/low-fee transactions in bytes (default: "
"27000)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Set the number of script verification threads (up to 16, 0 = auto, <0 = "
"leave that many cores free, default: 0)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"This is a pre-release test build - use at your own risk - do not use for "
"mining or merchant applications"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Unable to bind to %s on this computer. TjcoinV2 is probably already running."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: -paytxfee is set very high! This is the transaction fee you will "
"pay if you send a transaction."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: Displayed transactions may not be correct! You may need to upgrade, "
"or other nodes may need to upgrade."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: Please check that your computer's date and time are correct! If "
"your clock is wrong TjcoinV2 will not work properly."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: error reading wallet.dat! All keys read correctly, but transaction "
"data or address book entries might be missing or incorrect."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"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."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"You must set rpcpassword=<password> in the configuration file:\n"
"%s\n"
"If the file does not exist, create it with owner-readable-only file "
"permissions."),
QT_TRANSLATE_NOOP("bitcoin-core", "Accept command line and JSON-RPC commands"),
QT_TRANSLATE_NOOP("bitcoin-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Add a node to connect to and attempt to keep the connection open"),
QT_TRANSLATE_NOOP("bitcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"),
QT_TRANSLATE_NOOP("bitcoin-core", "Allow JSON-RPC connections from specified IP address"),
QT_TRANSLATE_NOOP("bitcoin-core", "Attempt to recover private keys from a corrupt wallet.dat"),
QT_TRANSLATE_NOOP("bitcoin-core", "TjcoinV2 version"),
QT_TRANSLATE_NOOP("bitcoin-core", "Block creation options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot downgrade wallet"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -bind address: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -externalip address: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot write default address"),
QT_TRANSLATE_NOOP("bitcoin-core", "Connect only to the specified node(s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Connect through socks proxy"),
QT_TRANSLATE_NOOP("bitcoin-core", "Connect to a node to retrieve peer addresses, and disconnect"),
QT_TRANSLATE_NOOP("bitcoin-core", "Corrupted block database detected"),
QT_TRANSLATE_NOOP("bitcoin-core", "Discover own IP address (default: 1 when listening and no -externalip)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Do you want to rebuild the block database now?"),
QT_TRANSLATE_NOOP("bitcoin-core", "Done loading"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error initializing block database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error initializing wallet database environment %s!"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading block database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet corrupted"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet requires newer version of TjcoinV2"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error opening block database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is low!"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error: Wallet locked, unable to create transaction!"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error: system error: "),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to listen on any port. Use -listen=0 if you want this."),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to read block info"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to read block"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to sync block index"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write block index"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write block info"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write block"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write file info"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write to coin database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write transaction index"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write undo data"),
QT_TRANSLATE_NOOP("bitcoin-core", "Fee per KB to add to transactions you send"),
QT_TRANSLATE_NOOP("bitcoin-core", "Find peers using DNS lookup (default: 1 unless -connect)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Generate coins (default: 0)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Get help for a command"),
QT_TRANSLATE_NOOP("bitcoin-core", "How many blocks to check at startup (default: 288, 0 = all)"),
QT_TRANSLATE_NOOP("bitcoin-core", "How thorough the block verification is (0-4, default: 3)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Imports blocks from external blk000??.dat file"),
QT_TRANSLATE_NOOP("bitcoin-core", "Information"),
QT_TRANSLATE_NOOP("bitcoin-core", "Insufficient funds"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -proxy address: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -tor address: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -minrelaytxfee=<amount>: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -mintxfee=<amount>: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount"),
QT_TRANSLATE_NOOP("bitcoin-core", "List commands"),
QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on <port> (default: 9488 or testnet: 19488)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Loading addresses..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Loading block index..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Loading wallet..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Maintain a full transaction index (default: 0)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Maintain at most <n> connections to peers (default: 125)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Not enough file descriptors available."),
QT_TRANSLATE_NOOP("bitcoin-core", "Only accept block chain matching built-in checkpoints (default: 1)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network <net> (IPv4, IPv6 or Tor)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Output extra debugging information. Implies all other -debug* options"),
QT_TRANSLATE_NOOP("bitcoin-core", "Output extra network debugging information"),
QT_TRANSLATE_NOOP("bitcoin-core", "Password for JSON-RPC connections"),
QT_TRANSLATE_NOOP("bitcoin-core", "Prepend debug output with timestamp"),
QT_TRANSLATE_NOOP("bitcoin-core", "Rebuild block chain index from current blk000??.dat files"),
QT_TRANSLATE_NOOP("bitcoin-core", "Rescan the block chain for missing wallet transactions"),
QT_TRANSLATE_NOOP("bitcoin-core", "Rescanning..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Run in the background as a daemon and accept commands"),
QT_TRANSLATE_NOOP("bitcoin-core", "SSL options: (see the TjcoinV2 Wiki for SSL setup instructions)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Select the version of socks proxy to use (4-5, default: 5)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Send command to -server or TjcoinV2d"),
QT_TRANSLATE_NOOP("bitcoin-core", "Send commands to node running on <ip> (default: 127.0.0.1)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to console instead of debug.log file"),
QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to debugger"),
QT_TRANSLATE_NOOP("bitcoin-core", "Server certificate file (default: server.cert)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Server private key (default: server.pem)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set database cache size in megabytes (default: 25)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set key pool size to <n> (default: 100)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set maximum block size in bytes (default: 250000)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set minimum block size in bytes (default: 0)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set the number of threads to service RPC calls (default: 4)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Signing transaction failed"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify configuration file (default: TjcoinV2.conf)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify connection timeout in milliseconds (default: 5000)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify data directory"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify pid file (default: TjcoinV2d.pid)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify your own public address"),
QT_TRANSLATE_NOOP("bitcoin-core", "System error: "),
QT_TRANSLATE_NOOP("bitcoin-core", "This help message"),
QT_TRANSLATE_NOOP("bitcoin-core", "Threshold for disconnecting misbehaving peers (default: 100)"),
QT_TRANSLATE_NOOP("bitcoin-core", "To use the %s option"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amount too small"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amounts must be positive"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction too large"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer (bind returned error %d, %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unknown -socks proxy version requested: %i"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unknown network specified in -onlynet: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Upgrade wallet to latest format"),
QT_TRANSLATE_NOOP("bitcoin-core", "Usage:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Use OpenSSL (https) for JSON-RPC connections"),
QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: 0)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: 1 when listening)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Use proxy to reach tor hidden services (default: same as -proxy)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Use the test network"),
QT_TRANSLATE_NOOP("bitcoin-core", "Username for JSON-RPC connections"),
QT_TRANSLATE_NOOP("bitcoin-core", "Verifying blocks..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Verifying wallet..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart TjcoinV2 to complete"),
QT_TRANSLATE_NOOP("bitcoin-core", "Warning"),
QT_TRANSLATE_NOOP("bitcoin-core", "Warning: This version is obsolete, upgrade required!"),
QT_TRANSLATE_NOOP("bitcoin-core", "You need to rebuild the database using -reindex to change -txindex"),
QT_TRANSLATE_NOOP("bitcoin-core", "wallet.dat corrupt, salvage failed"),
};
| mit |
OpenGestureControl/Desktop | tests/Test-module/main.lua | 1590 | -- Copyright (c) 2017 ICT Group
-- 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.
-- Test module for unit tests
function return_options()
local entries = {};
table.insert(entries, {name = "Test1", icon = "none.png"})
table.insert(entries, {name = "Test2", icon = "none.png"})
table.insert(entries, {name = "Test3", icon = "none.png"})
return entries;
end
function handle(selection)
if selection == "Test1" or selection == "Test2" or selection == "Test3" then
print(selection)
else
error("Unknown selection made")
end
end
| mit |
brunohbrito/Angular-VisualSearch | webpack.config.js | 1370 | var webpack = require("webpack");
var CopyWebpackPlugin = require('copy-webpack-plugin');
var path = require("path");
module.exports = {
entry: {
demoApp: "./example/src/start.ts",
"angular-visual-search": "./src/AngularVisualSearchModuleBuilder.ts"
},
output: {
path: "./example/",
filename: "[name].bundle.js"
},
// Turn on sourcemaps
devtool: '#source-map',
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'],
alias: {
'utils': path.resolve(__dirname, './src/Utils')
}
},
node: {
streams: true
},
watch: true,
// Add minification
plugins: [
new webpack.optimize.DedupePlugin(),
new CopyWebpackPlugin([
{from: './src/views', to: './views'},
{from: './src/angular-visual-search.css', to: "./"},
]),
new webpack.ProvidePlugin({
'angularVisualSearchUtils': 'utils'
})
],
module: {
loaders: [{
test: /\.tsx?$/,
loaders: ['ts-loader'],
exclude: /node_modules/
}
]
},
externals: {
// require("jquery") is external and available
// on the global var jQuery
"angular": "angular",
"angularVisualSearchUtils" : "angularVisualSearchUtils"
},
}; | mit |
xlvector/gocaffe | caffe_test.go | 312 | package gocaffe_test
import (
"github.com/xlvector/gocaffe"
"testing"
)
func TestCaffe(t *testing.T) {
pred := gocaffe.NewCaffePredictor("./examples/car_quick.prototxt", "./examples/car_quick_iter_8000.caffemodel.h5")
t.Log(pred.Predict("./examples/car.png"))
t.Log(pred.Predict("./examples/car.jpg"))
}
| mit |
msanchex/testmasm | protected/models/ComprasDireccionesDespacho.php | 5428 | <?php
/**
* This is the model class for table "t_ComprasDireccionesDespacho".
*
* The followings are the available columns in table 't_ComprasDireccionesDespacho':
* @property integer $idCompra
* @property string $descripcion
* @property string $nombre
* @property string $direccion
* @property string $barrio
* @property string $telefono
* @property string $celular
* @property string $codigoCiudad
* @property string $codigoSector
* @property string $pdvAsignado
* @property string $correoElectronico
*
* The followings are the available model relations:
* @property TCompras $idCompra0
*/
class ComprasDireccionesDespacho extends CActiveRecord {
/**
* @return string the associated database table name
*/
public function tableName() {
return 't_ComprasDireccionesDespacho';
}
/**
* @return array validation rules for model attributes.
*/
public function rules() {
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('idCompra', 'required'),
array('idCompra', 'numerical', 'integerOnly' => true),
array('descripcion, nombre, barrio, telefono, celular', 'length', 'max' => 50),
array('direccion, correoElectronico', 'length', 'max' => 100),
array('codigoCiudad, codigoSector', 'length', 'max' => 10),
array('pdvAsignado', 'length', 'max' => 3),
array('descripcion, nombre, barrio, telefono, celular, direccion, correoElectronico, codigoCiudad, codigoSector, pdvAsignado', 'default', 'value'=>null),
// The following rule is used by search().
// @todo Please remove those attributes that should not be searched.
array('idCompra, descripcion, nombre, direccion, barrio, telefono, celular, codigoCiudad, codigoSector, pdvAsignado, correoElectronico', 'safe', 'on' => 'search'),
);
}
/**
* @return array relational rules.
*/
public function relations() {
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'objCompra' => array(self::BELONGS_TO, 'Compras', 'idCompra'),
'objCiudad' => array(self::BELONGS_TO, 'Ciudad', 'codigoCiudad'),
'objSector' => array(self::BELONGS_TO, 'Sector', 'codigoSector'),
);
}
/**
* @return array customized attribute labels (name=>label)
*/
public function attributeLabels() {
return array(
'idCompra' => 'Id Compra',
'descripcion' => 'Descripcion',
'nombre' => 'Nombre',
'direccion' => 'Direccion',
'barrio' => 'Barrio',
'telefono' => 'Telefono',
'celular' => 'Celular',
'codigoCiudad' => 'Codigo Ciudad',
'codigoSector' => 'Codigo Sector',
'pdvAsignado' => 'Pdv Asignado',
);
}
/**
* Retrieves a list of models based on the current search/filter conditions.
*
* Typical usecase:
* - Initialize the model fields with values from filter form.
* - Execute this method to get CActiveDataProvider instance which will filter
* models according to data in model fields.
* - Pass data provider to CGridView, CListView or any similar widget.
*
* @return CActiveDataProvider the data provider that can return the models
* based on the search/filter conditions.
*/
public function search() {
// @todo Please modify the following code to remove attributes that should not be searched.
$criteria = new CDbCriteria;
$criteria->compare('idCompra', $this->idCompra);
$criteria->compare('descripcion', $this->descripcion, true);
$criteria->compare('nombre', $this->nombre, true);
$criteria->compare('direccion', $this->direccion, true);
$criteria->compare('barrio', $this->barrio, true);
$criteria->compare('telefono', $this->telefono, true);
$criteria->compare('celular', $this->celular, true);
$criteria->compare('codigoCiudad', $this->codigoCiudad, true);
$criteria->compare('codigoSector', $this->codigoSector, true);
$criteria->compare('pdvAsignado', $this->pdvAsignado, true);
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
));
}
/**
* Returns the static model of the specified AR class.
* Please note that you should have this exact method in all your CActiveRecord descendants!
* @param string $className active record class name.
* @return ComprasDireccionesDespacho the static model class
*/
public static function model($className = __CLASS__) {
return parent::model($className);
}
/**
* Metodo que hereda comportamiento de ValidateModelBehavior
* @return void
*/
public function behaviors() {
return array(
'ValidateModelBehavior' => array(
'class' => 'application.components.behaviors.ValidateModelBehavior',
'model' => $this
),
);
}
}
| mit |
adamjmoon/testabul | src/async/ex3-promises/ex3-fixed.js | 792 | import fakeAjax from "../fakeAjax-promise";
export default function () {
// **************************************
// The promise way
let getFile = (file) => fakeAjax(file);
this.start = () => {
"use strict";
return new Promise((resolve) => {
var _output = [];
// request all files at once in "parallel"
// Request all files at once in
// "parallel" via `getFile(..)`.
var p1 = getFile("file1");
var p2 = getFile("file2");
var p3 = getFile("file3");
p1
.then((output) => {_output.push(output);})
.then(function(){
return p2;
})
.then((output) => _output.push(output))
.then(function(){
return p3;
})
.then((output) => _output.push(output))
.then(() => _output.push("Complete!"))
.then(() => resolve(_output));
});
}
}
| mit |
MitchellMintCoins/MortgageCoin | src/qt/locale/bitcoin_tr.ts | 119711 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Mortgagecoin</source>
<translation>Mortgagecoin hakkında</translation>
</message>
<message>
<location line="+39"/>
<source><b>Mortgagecoin</b> version</source>
<translation><b>Mortgagecoin</b> sürüm</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 ([email protected]) and UPnP software written by Thomas Bernard.</source>
<translation>
Bu yazılım deneme safhasındadır.
MIT/X11 yazılım lisansı kapsamında yayınlanmıştır, COPYING dosyasına ya da http://www.opensource.org/licenses/mit-license.php sayfasına bakınız.
Bu ürün OpenSSL projesi tarafından OpenSSL araç takımı (http://www.openssl.org/) için geliştirilen yazılımlar, Eric Young ([email protected]) tarafından hazırlanmış şifreleme yazılımları ve Thomas Bernard tarafından programlanmış UPnP yazılımı içerir.</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation>Telif hakkı</translation>
</message>
<message>
<location line="+0"/>
<source>The Mortgagecoin developers</source>
<translation>Mortgagecoin geliştiricileri</translation>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Adres defteri</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>Adresi ya da etiketi düzenlemek için çift tıklayınız</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Yeni bir adres oluştur</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Şu anda seçili olan adresi panoya kopyala</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation>&Yeni adres</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your Mortgagecoin 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>Bunlar, ödeme almak için Mortgagecoin adresleridir. Kimin ödeme yaptığını izleyebilmek için her ödeme yollaması gereken kişiye değişik bir adres verebilirsiniz.</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation>Adresi &kopyala</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>&QR kodunu göster</translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a Mortgagecoin address</source>
<translation>Bir Mortgagecoin adresinin sizin olduğunu ispatlamak için mesaj imzalayın</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>&Mesaj imzala</translation>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation>Seçili adresi listeden sil</translation>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation>Güncel sekmedeki verileri bir dosyaya aktar</translation>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation>&Dışa aktar</translation>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified Mortgagecoin address</source>
<translation>Belirtilen Mortgagecoin adresi ile imzalandığını doğrulamak için bir mesajı kontrol et</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>Mesaj &kontrol et</translation>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Sil</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your Mortgagecoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation>Bunlar ödeme yapmak için kullanacağınız Mortgagecoin adreslerinizdir. Mortgagecoin yollamadan önce meblağı ve alıcı adresini daima kontrol ediniz.</translation>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation>&Etiketi kopyala</translation>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation>&Düzenle</translation>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation>Bit&coin Gönder</translation>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>Adres defteri verilerini dışa aktar</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Virgülle ayrılmış değerler dosyası (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Dışa aktarımda hata oluştu</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>%1 dosyasına yazılamadı.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Etiket</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(boş etiket)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Parola diyaloğu</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Parolayı giriniz</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Yeni parola</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Yeni parolayı tekrarlayınız</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>Cüzdanınız için yeni parolayı giriniz.<br/>Lütfen <b>10 ya da daha fazla rastgele karakter</b> veya <b>sekiz ya da daha fazla kelime</b> içeren bir parola seçiniz.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Cüzdanı şifrele</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Bu işlem cüzdan kilidini açmak için cüzdan parolanızı gerektirir.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Cüzdan kilidini aç</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Bu işlem, cüzdan şifresini açmak için cüzdan parolasını gerektirir.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Cüzdan şifresini aç</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Parolayı değiştir</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Cüzdan için eski ve yeni parolaları giriniz.</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Cüzdan şifrelenmesini teyit eder</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>!</source>
<translation>Uyarı: Eğer cüzdanınızı şifrelerseniz ve parolanızı kaybederseniz, <b>TÜM BİTCOİNLERİNİZİ KAYBEDERSİNİZ</b>!</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Cüzdanınızı şifrelemek istediğinizden emin misiniz?</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>ÖNEMLİ: Önceden yapmış olduğunuz cüzdan dosyası yedeklemelerinin yeni oluşturulan şifrelenmiş cüzdan dosyası ile değiştirilmeleri gerekir. Güvenlik nedenleriyle yeni, şifrelenmiş cüzdanı kullanmaya başladığınızda eski şifrelenmemiş cüzdan dosyaları işe yaramaz hale gelecektir.</translation>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>Uyarı: Caps Lock tuşu faal durumda!</translation>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>Cüzdan şifrelendi</translation>
</message>
<message>
<location line="-56"/>
<source>Mortgagecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your mortgagecoins from being stolen by malware infecting your computer.</source>
<translation>Şifreleme işlemini tamamlamak için Mortgagecoin şimdi kapanacaktır. Cüzdanınızı şifrelemenin, Mortgagecoinlerinizin bilgisayara bulaşan kötücül bir yazılım tarafından çalınmaya karşı tamamen koruyamayacağını unutmayınız.</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Cüzdan şifrelemesi başarısız oldu</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Dahili bir hata sebebiyle cüzdan şifrelemesi başarısız oldu. Cüzdanınız şifrelenmedi.</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>Girilen parolalar birbirleriyle uyumlu değil.</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>Cüzdan kilidinin açılması başarısız oldu</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Cüzdan şifresinin açılması için girilen parola yanlıştı.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Cüzdan şifresinin açılması başarısız oldu</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Cüzdan parolası başarılı bir şekilde değiştirildi.</translation>
</message>
</context>
<context>
<name>MortgagecoinGUI</name>
<message>
<location filename="../mortgagecoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation>&Mesaj imzala...</translation>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Şebeke ile senkronizasyon...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>&Genel bakış</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Cüzdana genel bakışı göster</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&Muameleler</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Muamele tarihçesini tara</translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Saklanan adres ve etiket listesini düzenle</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Ödeme alma adreslerinin listesini göster</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation>&Çık</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Uygulamadan çık</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about Mortgagecoin</source>
<translation>Mortgagecoin hakkında bilgi göster</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>&Qt hakkında</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Qt hakkında bilgi görüntü</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Seçenekler...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation>Cüzdanı &şifrele...</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>Cüzdanı &yedekle...</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>Parolayı &değiştir...</translation>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation>Bloklar diskten içe aktarılıyor...</translation>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation>Diskteki bloklar yeniden endeksleniyor...</translation>
</message>
<message>
<location line="-347"/>
<source>Send coins to a Mortgagecoin address</source>
<translation>Bir Mortgagecoin adresine Mortgagecoin yolla</translation>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for Mortgagecoin</source>
<translation>Mortgagecoin seçeneklerinin yapılandırmasını değiştir</translation>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation>Cüzdanı diğer bir konumda yedekle</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Cüzdan şifrelemesi için kullanılan parolayı değiştir</translation>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation>&Hata ayıklama penceresi</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>Hata ayıklama ve teşhis penceresini aç</translation>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation>Mesaj &kontrol et...</translation>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>Mortgagecoin</source>
<translation>Mortgagecoin</translation>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation>Cüzdan</translation>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation>&Gönder</translation>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation>&Al</translation>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation>&Adresler</translation>
</message>
<message>
<location line="+22"/>
<source>&About Mortgagecoin</source>
<translation>Mortgagecoin &Hakkında</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>&Göster / Sakla</translation>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation>Ana pencereyi görüntüle ya da sakla</translation>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation>Cüzdanınızın özel anahtarlarını şifrele</translation>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your Mortgagecoin addresses to prove you own them</source>
<translation>Mesajları adreslerin size ait olduğunu ispatlamak için Mortgagecoin adresleri ile imzala</translation>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified Mortgagecoin addresses</source>
<translation>Belirtilen Mortgagecoin adresleri ile imzalandıklarından emin olmak için mesajları kontrol et</translation>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Dosya</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>&Ayarlar</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>&Yardım</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Sekme araç çubuğu</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
<message>
<location line="+47"/>
<source>Mortgagecoin client</source>
<translation>Mortgagecoin istemcisi</translation>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to Mortgagecoin network</source>
<translation><numerusform>Mortgagecoin şebekesine %n faal bağlantı</numerusform><numerusform>Mortgagecoin şebekesine %n faal bağlantı</numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation>Hiçbir blok kaynağı mevcut değil...</translation>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation>Muamele tarihçesinin toplam (tahmini) %2 blokundan %1 blok işlendi.</translation>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation>Muamele tarihçesinde %1 blok işlendi.</translation>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation><numerusform>%n saat</numerusform><numerusform>%n saat</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation><numerusform>%n gün</numerusform><numerusform>%n gün</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation><numerusform>%n hafta</numerusform><numerusform>%n hafta</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation>%1 geride</translation>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation>Son alınan blok %1 evvel oluşturulmuştu.</translation>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation>Bundan sonraki muameleler henüz görüntülenemez.</translation>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation>Hata</translation>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation>Uyarı</translation>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation>Bilgi</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>Bu muamele boyut sınırlarını aşmıştır. Gene de %1 ücret ödeyerek gönderebilirsiniz, ki bu ücret muamelenizi işleyen ve şebekeye yardım eden düğümlere ödenecektir. Ücreti ödemek istiyor musunuz?</translation>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation>Güncel</translation>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation>Aralık kapatılıyor...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation>Muamele ücretini teyit et</translation>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation>Muamele yollandı</translation>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation>Gelen muamele</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Tarih: %1
Miktar: %2
Tür: %3
Adres: %4
</translation>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation>URI yönetimi</translation>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid Mortgagecoin address or malformed URI parameters.</source>
<translation>URI okunamadı! Sebebi geçersiz bir Mortgagecoin adresi veya hatalı URI parametreleri olabilir.</translation>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Cüzdan <b>şifrelenmiştir</b> ve şu anda <b>kilidi açıktır</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Cüzdan <b>şifrelenmiştir</b> ve şu anda <b>kilitlidir</b></translation>
</message>
<message>
<location filename="../mortgagecoin.cpp" line="+111"/>
<source>A fatal error occurred. Mortgagecoin can no longer continue safely and will quit.</source>
<translation>Ciddi bir hata oluştu. Mortgagecoin artık güvenli bir şekilde işlemeye devam edemez ve kapanacaktır.</translation>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation>Şebeke hakkında uyarı</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Adresi düzenle</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Etiket</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>Bu adres defteri unsuru ile ilişkili etiket</translation>
</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>Bu adres defteri unsuru ile ilişkili adres. Bu, sadece gönderi adresi için değiştirilebilir.</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Yeni alım adresi</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Yeni gönderi adresi</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Alım adresini düzenle</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Gönderi adresini düzenle</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Girilen "%1" adresi hâlihazırda adres defterinde mevcuttur.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Mortgagecoin address.</source>
<translation>Girilen "%1" adresi geçerli bir Mortgagecoin adresi değildir.</translation>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Cüzdan kilidi açılamadı.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Yeni anahtar oluşturulması başarısız oldu.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>Mortgagecoin-Qt</source>
<translation>Mortgagecoin-Qt</translation>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>sürüm</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Kullanım:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation>komut satırı seçenekleri</translation>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation>Kullanıcı arayüzü seçenekleri</translation>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation>Lisan belirt, mesela "de_De" (varsayılan: sistem dili)</translation>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation>Küçültülmüş olarak başlat</translation>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation>Başlatıldığında başlangıç ekranını göster (varsayılan: 1)</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Seçenekler</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>&Esas ayarlar</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>Muamelelerin hızlı işlenmesini garantilemeye yardım eden, seçime dayalı kB başı muamele ücreti. Muamelelerin çoğunluğunun boyutu 1 kB'dir.</translation>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation>Muamele ücreti &öde</translation>
</message>
<message>
<location line="+31"/>
<source>Automatically start Mortgagecoin after logging in to the system.</source>
<translation>Sistemde oturum açıldığında Mortgagecoin'i otomatik olarak başlat.</translation>
</message>
<message>
<location line="+3"/>
<source>&Start Mortgagecoin on system login</source>
<translation>Mortgagecoin'i sistem oturumuyla &başlat</translation>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation>İstemcinin tüm seçeneklerini varsayılan değerlere geri al.</translation>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation>Seçenekleri &sıfırla</translation>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation>&Şebeke</translation>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Mortgagecoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>Yönlendiricide Mortgagecoin istemci portlarını otomatik olarak açar. Bu, sadece yönlendiricinizin UPnP desteği bulunuyorsa ve etkinse çalışabilir.</translation>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation>Portları &UPnP kullanarak haritala</translation>
</message>
<message>
<location line="+7"/>
<source>Connect to the Mortgagecoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation>Mortgagecoin şebekesine SOCKS vekil sunucusu vasıtasıyla bağlan (mesela Tor ile bağlanıldığında).</translation>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation>SOCKS vekil sunucusu vasıtasıyla ba&ğlan:</translation>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation>Vekil &İP:</translation>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation>Vekil sunucunun İP adresi (mesela 127.0.0.1)</translation>
</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>Vekil sunucunun portu (mesela 9050)</translation>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation>SOCKS &sürümü:</translation>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation>Vekil sunucunun SOCKS sürümü (mesela 5)</translation>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation>&Pencere</translation>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Küçültüldükten sonra sadece çekmece ikonu göster.</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>İşlem çubuğu yerine sistem çekmecesine &küçült</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>Pencere kapatıldığında uygulamadan çıkmak yerine uygulamayı küçültür. Bu seçenek etkinleştirildiğinde, uygulama sadece menüden çıkış seçildiğinde kapanacaktır.</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>Kapatma sırasında k&üçült</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Görünüm</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>Kullanıcı arayüzü &lisanı:</translation>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Mortgagecoin.</source>
<translation>Kullanıcı arayüzünün dili burada belirtilebilir. Bu ayar Mortgagecoin tekrar başlatıldığında etkinleşecektir.</translation>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>Miktarı göstermek için &birim:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>Mortgagecoin gönderildiğinde arayüzde gösterilecek varsayılan alt birimi seçiniz.</translation>
</message>
<message>
<location line="+9"/>
<source>Whether to show Mortgagecoin addresses in the transaction list or not.</source>
<translation>Muamele listesinde Mortgagecoin adreslerinin gösterilip gösterilmeyeceklerini belirler.</translation>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation>Muamele listesinde adresleri &göster</translation>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>&Tamam</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&İptal</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation>&Uygula</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation>varsayılan</translation>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation>Seçeneklerin sıfırlanmasını teyit et</translation>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation>Bazı ayarların dikkate alınması istemcinin tekrar başlatılmasını gerektirebilir.</translation>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation>Devam etmek istiyor musunuz?</translation>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation>Uyarı</translation>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Mortgagecoin.</source>
<translation>Bu ayarlar Mortgagecoin tekrar başlatıldığında etkinleşecektir.</translation>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation>Girilen vekil sunucu adresi geçersizdir.</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Form</translation>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Mortgagecoin network after a connection is established, but this process has not completed yet.</source>
<translation>Görüntülenen veriler zaman aşımına uğramış olabilir. Bağlantı kurulduğunda cüzdanınız otomatik olarak şebeke ile eşleşir ancak bu işlem henüz tamamlanmamıştır.</translation>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation>Bakiye:</translation>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation>Doğrulanmamış:</translation>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation>Cüzdan</translation>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation>Olgunlaşmamış:</translation>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation>Oluşturulan bakiye henüz olgunlaşmamıştır</translation>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Son muameleler</b></translation>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation>Güncel bakiyeniz</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>Doğrulanması beklenen ve henüz güncel bakiyeye ilâve edilmemiş muamelelerin toplamı</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation>eşleşme dışı</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start mortgagecoin: click-to-pay handler</source>
<translation>Mortgagecoin başlatılamadı: tıkla-ve-öde yöneticisi</translation>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation>QR kodu diyaloğu</translation>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation>Ödeme talebi</translation>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Miktar:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>Etiket:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Mesaj:</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>&Farklı kaydet...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation>URI'nin QR koduna kodlanmasında hata oluştu.</translation>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation>Girilen miktar geçersizdir, kontrol ediniz.</translation>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation>Sonuç URI çok uzun, etiket ya da mesaj metnini kısaltmayı deneyiniz.</translation>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation>QR kodu kaydet</translation>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation>PNG resimleri (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>İstemci ismi</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>Mevcut değil</translation>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation>İstemci sürümü</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Malumat</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation>Kullanılan OpenSSL sürümü</translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Başlama zamanı</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Şebeke</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>Bağlantı sayısı</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation>Testnet üzerinde</translation>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>Blok zinciri</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Güncel blok sayısı</translation>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation>Tahmini toplam blok sayısı</translation>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation>Son blok zamanı</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>&Aç</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation>Komut satırı seçenekleri</translation>
</message>
<message>
<location line="+7"/>
<source>Show the Mortgagecoin-Qt help message to get a list with possible Mortgagecoin command-line options.</source>
<translation>Mevcut Mortgagecoin komut satırı seçeneklerinin listesini içeren Mortgagecoin-Qt yardımını göster.</translation>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation>&Göster</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Konsol</translation>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation>Derleme tarihi</translation>
</message>
<message>
<location line="-104"/>
<source>Mortgagecoin - Debug window</source>
<translation>Mortgagecoin - Hata ayıklama penceresi</translation>
</message>
<message>
<location line="+25"/>
<source>Mortgagecoin Core</source>
<translation>Mortgagecoin Çekirdeği</translation>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation>Hata ayıklama kütük dosyası</translation>
</message>
<message>
<location line="+7"/>
<source>Open the Mortgagecoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation>Güncel veri klasöründen Mortgagecoin hata ayıklama kütük dosyasını açar. Büyük kütük dosyaları için bu birkaç saniye alabilir.</translation>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation>Konsolu temizle</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the Mortgagecoin RPC console.</source>
<translation>Mortgagecoin RPC konsoluna hoş geldiniz.</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>Tarihçede gezinmek için imleç tuşlarını kullanınız, <b>Ctrl-L</b> ile de ekranı temizleyebilirsiniz.</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Mevcut komutların listesi için <b>help</b> yazınız.</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>Mortgagecoin yolla</translation>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation>Birçok alıcıya aynı anda gönder</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation>&Alıcı ekle</translation>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation>Bütün muamele alanlarını kaldır</translation>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>Tümünü &temizle</translation>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation>Bakiye:</translation>
</message>
<message>
<location line="+10"/>
<source>123.456 MTG</source>
<translation>123.456 MTG</translation>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Yollama etkinliğini teyit ediniz</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>G&önder</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> şu adrese: %2 (%3)</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Gönderiyi teyit ediniz</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>%1 göndermek istediğinizden emin misiniz?</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation> ve </translation>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation>Alıcı adresi geçerli değildir, lütfen denetleyiniz.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>Ödeyeceğiniz tutarın sıfırdan yüksek olması gerekir.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>Tutar bakiyenizden yüksektir.</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>Toplam, %1 muamele ücreti ilâve edildiğinde bakiyenizi geçmektedir.</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>Çift adres bulundu, belli bir gönderi sırasında her adrese sadece tek bir gönderide bulunulabilir.</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation>Hata: Muamele oluşturması başarısız oldu!</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>Hata: Muamele reddedildi. Cüzdanınızdaki madenî paraların bazıları zaten harcanmış olduğunda bu meydana gelebilir. Örneğin wallet.dat dosyasının bir kopyasını kullandıysanız ve kopyada para harcandığında ancak burada harcandığı işaretlenmediğinde.</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>Form</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>M&iktar:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>&Şu kişiye öde:</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Ödemenin gönderileceği adres (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</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>Adres defterinize eklemek için bu adrese ilişik bir etiket giriniz</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Etiket:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation>Adres defterinden adres seç</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>Panodan adres yapıştır</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>Bu alıcıyı kaldır</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Mortgagecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Mortgagecoin adresi giriniz (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation>İmzalar - Mesaj İmzala / Kontrol et</translation>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation>Mesaj &imzala</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>Bir adresin sizin olduğunu ispatlamak için adresinizle mesaj imzalayabilirsiniz. Oltalama saldırılarının kimliğinizi imzanızla elde etmeyi deneyebilecekleri için belirsiz hiçbir şey imzalamamaya dikkat ediniz. Sadece ayrıntılı açıklaması olan ve tümüne katıldığınız ifadeleri imzalayınız.</translation>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Mesajın imzalanmasında kullanılacak adres (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation>Adres defterinden bir adres seç</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>Panodan adres yapıştır</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>İmzalamak istediğiniz mesajı burada giriniz</translation>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation>İmza</translation>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation>Güncel imzayı sistem panosuna kopyala</translation>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this Mortgagecoin address</source>
<translation>Bu Mortgagecoin adresinin sizin olduğunu ispatlamak için mesajı imzalayın</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>&Mesajı imzala</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation>Tüm mesaj alanlarını sıfırla</translation>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>Tümünü &temizle</translation>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation>Mesaj &kontrol et</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>İmza için kullanılan adresi, mesajı (satır sonları, boşluklar, sekmeler vs. karakterleri tam olarak kopyaladığınızdan emin olunuz) ve imzayı aşağıda giriniz. Bir ortadaki adam saldırısı tarafından kandırılmaya mâni olmak için imzadan, imzalı mesajın içeriğini aşan bir anlam çıkarmamaya dikkat ediniz.</translation>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Mesajı imzalamak için kullanılmış olan adres (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Mortgagecoin address</source>
<translation>Belirtilen Mortgagecoin adresi ile imzalandığını doğrulamak için mesajı kontrol et</translation>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation>&Mesaj kontrol et</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation>Tüm mesaj kontrolü alanlarını sıfırla</translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Mortgagecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Mortgagecoin adresi giriniz (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation>İmzayı oluşturmak için "Mesaj İmzala" unsurunu tıklayın</translation>
</message>
<message>
<location line="+3"/>
<source>Enter Mortgagecoin signature</source>
<translation>Mortgagecoin imzası gir</translation>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation>Girilen adres geçersizdir.</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>Adresi kontrol edip tekrar deneyiniz.</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation>Girilen adres herhangi bir anahtara işaret etmemektedir.</translation>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation>Cüzdan kilidinin açılması iptal edildi.</translation>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation>Girilen adres için özel anahtar mevcut değildir.</translation>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation>Mesajın imzalanması başarısız oldu.</translation>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation>Mesaj imzalandı.</translation>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation>İmzanın kodu çözülemedi.</translation>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation>İmzayı kontrol edip tekrar deneyiniz.</translation>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation>İmza mesajın hash değeri ile eşleşmedi.</translation>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation>Mesaj doğrulaması başarısız oldu.</translation>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation>Mesaj doğrulandı.</translation>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The Mortgagecoin developers</source>
<translation>Mortgagecoin geliştiricileri</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>%1 değerine dek açık</translation>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation>%1/çevrim dışı</translation>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/doğrulanmadı</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 teyit</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation>Durum</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation><numerusform>, %n düğüm vasıtasıyla yayınlandı</numerusform><numerusform>, %n düğüm vasıtasıyla yayınlandı</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Tarih</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation>Kaynak</translation>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>Oluşturuldu</translation>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation>Gönderen</translation>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation>Alıcı</translation>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation>kendi adresiniz</translation>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>etiket</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>Gider</translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation><numerusform>%n ek blok sonrasında olgunlaşacak</numerusform><numerusform>%n ek blok sonrasında olgunlaşacak</numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>kabul edilmedi</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>Gelir</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>Muamele ücreti</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>Net miktar</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Mesaj</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>Yorum</translation>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation>Muamele tanımlayıcı</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>Oluşturulan Mortgagecoin'lerin harcanabilmelerinden önce 120 blok beklemeleri gerekmektedir. Bu blok, oluşturduğunuzda blok zincirine eklenmesi için ağda yayınlandı. Zincire eklenmesi başarısız olursa, durumu "kabul edilmedi" olarak değiştirilecek ve harcanamayacaktır. Bu, bazen başka bir düğüm sizden birkaç saniye önce ya da sonra blok oluşturursa meydana gelebilir.</translation>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation>Hata ayıklama verileri</translation>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Muamele</translation>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation>Girdiler</translation>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>Miktar</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>doğru</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>yanlış</translation>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation>, henüz başarılı bir şekilde yayınlanmadı</translation>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>%n ilâve blok için açık</numerusform><numerusform>%n ilâve blok için açık</numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation>bilinmiyor</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>Muamele detayları</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Bu pano muamelenin ayrıntılı açıklamasını gösterir</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+225"/>
<source>Date</source>
<translation>Tarih</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Tür</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Miktar</translation>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>%n ilâve blok için açık</numerusform><numerusform>%n ilâve blok için açık</numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation>%1 değerine dek açık</translation>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation>Çevrimdışı (%1 teyit)</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation>Doğrulanmadı (%1 (toplam %2 üzerinden) teyit)</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Doğrulandı (%1 teyit)</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>Madenden çıkarılan bakiye %n ek blok sonrasında olgunlaştığında kullanılabilecektir</numerusform><numerusform>Madenden çıkarılan bakiye %n ek blok sonrasında olgunlaştığında kullanılabilecektir</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>Bu blok başka hiçbir düğüm tarafından alınmamıştır ve muhtemelen kabul edilmeyecektir!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Oluşturuldu ama kabul edilmedi</translation>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation>Şununla alındı</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Alındığı kişi</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Gönderildiği adres</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Kendinize ödeme</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Madenden çıkarılan</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(mevcut değil)</translation>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Muamele durumu. Doğrulama sayısını görüntülemek için imleci bu alanda tutunuz.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Muamelenin alındığı tarih ve zaman.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Muamele türü.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Muamelenin alıcı adresi.</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Bakiyeden alınan ya da bakiyeye eklenen miktar.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation>Hepsi</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Bugün</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>Bu hafta</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Bu ay</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Geçen ay</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Bu sene</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Aralık...</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>Şununla alınan</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Gönderildiği adres</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Kendinize</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Oluşturulan</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Diğer</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Aranacak adres ya da etiket giriniz</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Asgari miktar</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Adresi kopyala</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Etiketi kopyala</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Miktarı kopyala</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation>Muamele kimliğini kopyala</translation>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>Etiketi düzenle</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>Muamele detaylarını göster</translation>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation>Muamele verilerini dışa aktar</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Virgülle ayrılmış değerler dosyası (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Doğrulandı</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Tarih</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Tür</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Etiket</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Miktar</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>Tanımlayıcı</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Dışa aktarımda hata oluştu</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>%1 dosyasına yazılamadı.</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>Aralık:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>ilâ</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation>Mortgagecoin yolla</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation>&Dışa aktar</translation>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation>Güncel sekmedeki verileri bir dosyaya aktar</translation>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation>Cüzdanı yedekle</translation>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation>Cüzdan verileri (*.dat)</translation>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation>Yedekleme başarısız oldu</translation>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation>Cüzdanı değişik bir konuma kaydetmek denenirken bir hata meydana geldi.</translation>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation>Yedekleme başarılı</translation>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation>Cüzdan verileri başarılı bir şekilde yeni konuma kaydedildi.</translation>
</message>
</context>
<context>
<name>mortgagecoin-core</name>
<message>
<location filename="../mortgagecoinstrings.cpp" line="+94"/>
<source>Mortgagecoin version</source>
<translation>Mortgagecoin sürümü</translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation>Kullanım:</translation>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or mortgagecoind</source>
<translation>-server ya da mortgagecoind'ye komut gönder</translation>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation>Komutları listele</translation>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation>Bir komut için yardım al</translation>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation>Seçenekler:</translation>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: mortgagecoin.conf)</source>
<translation>Yapılandırma dosyası belirt (varsayılan: mortgagecoin.conf)</translation>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: mortgagecoind.pid)</source>
<translation>Pid dosyası belirt (varsayılan: mortgagecoind.pid)</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Veri dizinini belirt</translation>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Veritabanı önbellek boyutunu megabayt olarak belirt (varsayılan: 25)</translation>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 17185 or testnet: 117185)</source>
<translation>Bağlantılar için dinlenecek <port> (varsayılan: 17185 ya da testnet: 117185)</translation>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Eşler ile en çok <n> adet bağlantı kur (varsayılan: 125)</translation>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Eş adresleri elde etmek için bir düğüme bağlan ve ardından bağlantıyı kes</translation>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation>Kendi genel adresinizi tanımlayın</translation>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>Aksaklık gösteren eşlerle bağlantıyı kesme sınırı (varsayılan: 100)</translation>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Aksaklık gösteren eşlerle yeni bağlantıları engelleme süresi, saniye olarak (varsayılan: 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>IPv4 üzerinde dinlemek için %u numaralı RPC portunun kurulumu sırasında hata meydana geldi: %s</translation>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 17184 or testnet: 117184)</source>
<translation>JSON-RPC bağlantılarını <port> üzerinde dinle (varsayılan: 17184 veya tesnet: 117184)</translation>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Konut satırı ve JSON-RPC komutlarını kabul et</translation>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Arka planda daemon (servis) olarak çalış ve komutları kabul et</translation>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation>Deneme şebekesini kullan</translation>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>Dışarıdan gelen bağlantıları kabul et (varsayılan: -proxy veya -connect yoksa 1)</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=mortgagecoinrpc
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 "Mortgagecoin Alert" [email protected]
</source>
<translation>%s, şu yapılandırma dosyasında rpc parolası belirtmeniz gerekir:
%s
Aşağıdaki rastgele oluşturulan parolayı kullanmanız tavsiye edilir:
rpcuser=mortgagecoinrpc
rpcpassword=%s
(bu parolayı hatırlamanız gerekli değildir)
Kullanıcı ismi ile parolanın FARKLI olmaları gerekir.
Dosya mevcut değilse, sadece sahibi için okumayla sınırlı izin ile oluşturunuz.
Sorunlar hakkında bildiri almak için alertnotify unsurunu ayarlamanız tavsiye edilir;
mesela: alertnotify=echo %%s | mail -s "Mortgagecoin Alert" [email protected]
</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>IPv6 üzerinde dinlemek için %u numaralı RPC portu kurulurken bir hata meydana geldi, IPv4'e dönülüyor: %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>Belirtilen adrese bağlan ve daima ondan dinle. IPv6 için [makine]:port yazımını kullanınız</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. Mortgagecoin is probably already running.</source>
<translation>%s veri dizininde kilit elde edilemedi. Mortgagecoin muhtemelen hâlihazırda çalışmaktadır.</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>Hata: Muamele reddedildi! Cüzdanınızdaki madenî paraların bazıları zaten harcanmış olduğunda bu meydana gelebilir. Örneğin wallet.dat dosyasının bir kopyasını kullandıysanız ve kopyada para harcandığında ancak burada harcandığı işaretlenmediğinde.</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>Hata: Muamelenin miktarı, karmaşıklığı ya da yakın geçmişte alınan fonların kullanılması nedeniyle bu muamele en az %s tutarında ücret gerektirmektedir!</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation>İlgili bir uyarı alındığında komut çalıştır (komuttaki %s mesaj ile değiştirilecektir)</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Bir cüzdan muamelesi değiştiğinde komutu çalıştır (komuttaki %s TxID ile değiştirilecektir)</translation>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation>Yüksek öncelikli/düşük ücretli muamelelerin boyutunu bayt olarak tanımla (varsayılan: 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>Bu yayın öncesi bir deneme sürümüdür - tüm riski siz üstlenmiş olursunuz - mortgagecoin oluşturmak ya da ticari uygulamalar için kullanmayınız</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>Uyarı: -paytxfee çok yüksek bir değere ayarlanmış! Bu, muamele gönderirseniz ödeyeceğiniz muamele ücretidir.</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>Uyarı: Görüntülenen muameleler doğru olmayabilir! Sizin ya da diğer düğümlerin güncelleme yapması gerekebilir.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Mortgagecoin will not work properly.</source>
<translation>Uyarı: Lütfen bilgisayarınızın tarih ve saatinin doğru olup olmadığını kontrol ediniz! Saatiniz doğru değilse Mortgagecoin gerektiği gibi çalışamaz.</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>Uyarı: wallet.dat dosyasının okunması sırasında bir hata meydana geldi! Tüm anahtarlar doğru bir şekilde okundu, ancak muamele verileri ya da adres defteri unsurları hatalı veya eksik olabilir.</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>Uyarı: wallet.dat bozuk, veriler geri kazanıldı! Özgün wallet.dat, wallet.{zamandamgası}.bak olarak %s klasörüne kaydedildi; bakiyeniz ya da muameleleriniz yanlışsa bir yedeklemeden tekrar yüklemeniz gerekir.</translation>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation>Bozuk bir wallet.dat dosyasından özel anahtarları geri kazanmayı dene</translation>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation>Blok oluşturma seçenekleri:</translation>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation>Sadece belirtilen düğüme veya düğümlere bağlan</translation>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation>Bozuk blok veritabanı tespit edildi</translation>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>Kendi IP adresini keşfet (varsayılan: dinlenildiğinde ve -externalip yoksa 1)</translation>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation>Blok veritabanını şimdi yeniden inşa etmek istiyor musunuz?</translation>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation>Blok veritabanını başlatılırken bir hata meydana geldi</translation>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation>%s cüzdan veritabanı ortamının başlatılmasında hata meydana geldi!</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation>Blok veritabanının yüklenmesinde hata</translation>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation>Blok veritabanının açılışı sırasında hata</translation>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation>Hata: Disk alanı düşük!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation>Hata: Cüzdan kilitli, muamele oluşturulamadı!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation>Hata: sistem hatası:</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>Herhangi bir portun dinlenmesi başarısız oldu. Bunu istiyorsanız -listen=0 seçeneğini kullanınız.</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation>Blok verileri okunamadı</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation>Blok okunamadı</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation>Blok indeksi eşleştirilemedi</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation>Blok indeksi yazılamadı</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation>Blok verileri yazılamadı</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation>Blok yazılamadı</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation>Dosya verileri yazılamadı</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation>Madenî para veritabanına yazılamadı</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation>Muamele indeksi yazılamadı</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation>Geri alma verilerinin yazılamadı</translation>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation>Eşleri DNS araması vasıtasıyla bul (varsayılan: 1, eğer -connect kullanılmadıysa)</translation>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation>Mortgagecoin oluştur (varsayılan: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation>Başlangıçta kontrol edilecek blok sayısı (varsayılan: 288, 0 = hepsi)</translation>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation>Blok kontrolünün ne kadar derin olacağı (0 ilâ 4, varsayılan: 3)</translation>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation>Kafi derecede dosya tanımlayıcıları mevcut değil.</translation>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation>Blok zinciri indeksini güncel blk000??.dat dosyalarından tekrar inşa et</translation>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation>RPC aramaları için iş parçacığı sayısını belirle (varsayılan: 4)</translation>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation>Bloklar kontrol ediliyor...</translation>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation>Cüzdan kontrol ediliyor...</translation>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation>Harici blk000??.dat dosyasından blokları içe aktarır</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>Betik kontrolü iş parçacığı sayısını belirt (azami 16, 0 = otomatik, <0 = bu sayıda çekirdeği boş bırak, varsayılan: 0)</translation>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation>Bilgi</translation>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation>Geçersiz -tor adresi: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation>-minrelaytxfee=<amount> için geçersiz meblağ: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation>-mintxfee=<amount> için geçersiz meblağ: '%s'</translation>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation>Muamelelerin tamamının indeksini tut (varsayılan: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation>Bağlantı başına azami alım tamponu, <n>*1000 bayt (varsayılan: 5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>Bağlantı başına azami yollama tamponu, <n>*1000 bayt (varsayılan: 1000)</translation>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation>Sadece yerleşik kontrol noktalarıyla eşleşen blok zincirini kabul et (varsayılan: 1)</translation>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>Sadece <net> şebekesindeki düğümlere bağlan (IPv4, IPv6 ya da Tor)</translation>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation>İlâve hata ayıklama verileri çıkart. Diğer tüm -debug* seçeneklerini ima eder</translation>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation>İlâve şebeke hata ayıklama verileri çıkart</translation>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation>Hata ayıklama çıktısına tarih ön ekleri ilâve et</translation>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the Mortgagecoin Wiki for SSL setup instructions)</source>
<translation> SSL seçenekleri: (SSL kurulum bilgisi için Mortgagecoin vikisine bakınız)</translation>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation>Kullanılacak socks vekil sunucu sürümünü seç (4-5, varsayılan: 5)</translation>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Trace/hata ayıklama verilerini debug.log dosyası yerine konsola gönder</translation>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation>Hata ayıklayıcıya -debugger- trace/hata ayıklama verileri gönder</translation>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation>Bayt olarak azami blok boyutunu tanımla (varsayılan: 250000)</translation>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation>Bayt olarak asgari blok boyutunu tanımla (varsayılan: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>İstemci başlatıldığında debug.log dosyasını küçült (varsayılan: -debug bulunmadığında 1)</translation>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation>Muamelenin imzalanması başarısız oldu</translation>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>Bağlantı zaman aşım süresini milisaniye olarak belirt (varsayılan: 5000)</translation>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation>Sistem hatası:</translation>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation>Muamele meblağı çok düşük</translation>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation>Muamele tutarının pozitif olması lazımdır</translation>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation>Muamele çok büyük</translation>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>Dinlenecek portu haritalamak için UPnP kullan (varsayılan: 0)</translation>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>Dinlenecek portu haritalamak için UPnP kullan (varsayılan: dinlenildiğinde 1)</translation>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation>Gizli tor servislerine erişmek için vekil sunucu kullan (varsayılan: -proxy ile aynısı)</translation>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation>JSON-RPC bağlantıları için kullanıcı ismi</translation>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation>Uyarı</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>Uyarı: Bu sürüm çok eskidir, güncellemeniz gerekir!</translation>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation>-txindex'i değiştirmek için veritabanlarını -reindex kullanarak yeniden inşa etmeniz gerekir.</translation>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat bozuk, geri kazanım başarısız oldu</translation>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation>JSON-RPC bağlantıları için parola</translation>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>Belirtilen İP adresinden JSON-RPC bağlantılarını kabul et</translation>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Şu <ip> adresinde (varsayılan: 127.0.0.1) çalışan düğüme komut yolla</translation>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>En iyi blok değiştiğinde komutu çalıştır (komut için %s parametresi blok hash değeri ile değiştirilecektir)</translation>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation>Cüzdanı en yeni biçime güncelle</translation>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Anahtar alan boyutunu <n> değerine ayarla (varsayılan: 100)</translation>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Blok zincirini eksik cüzdan muameleleri için tekrar tara</translation>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>JSON-RPC bağlantıları için OpenSSL (https) kullan</translation>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Sunucu sertifika dosyası (varsayılan: server.cert)</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Sunucu özel anahtarı (varsayılan: server.pem)</translation>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation>Kabul edilebilir şifreler (varsayılan: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation>Bu yardım mesajı</translation>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>Bu bilgisayarda %s unsuruna bağlanılamadı. (bind şu hatayı iletti: %d, %s)</translation>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation>Socks vekil sunucusu vasıtasıyla bağlan</translation>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>-addnode, -seednode ve -connect için DNS aramalarına izin ver</translation>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation>Adresler yükleniyor...</translation>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>wallet.dat dosyasının yüklenmesinde hata oluştu: bozuk cüzdan</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of Mortgagecoin</source>
<translation>wallet.dat dosyasının yüklenmesinde hata oluştu: cüzdanın daha yeni bir Mortgagecoin sürümüne ihtiyacı var</translation>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart Mortgagecoin to complete</source>
<translation>Cüzdanın tekrar yazılması gerekiyordu: işlemi tamamlamak için Mortgagecoin'i yeniden başlatınız</translation>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation>wallet.dat dosyasının yüklenmesinde hata oluştu</translation>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Geçersiz -proxy adresi: '%s'</translation>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>-onlynet için bilinmeyen bir şebeke belirtildi: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation>Bilinmeyen bir -socks vekil sürümü talep edildi: %i</translation>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>-bind adresi çözümlenemedi: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>-externalip adresi çözümlenemedi: '%s'</translation>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>-paytxfee=<miktar> için geçersiz miktar: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation>Geçersiz miktar</translation>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation>Yetersiz bakiye</translation>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation>Blok indeksi yükleniyor...</translation>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Bağlanılacak düğüm ekle ve bağlantıyı zinde tutmaya çalış</translation>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. Mortgagecoin is probably already running.</source>
<translation>Bu bilgisayarda %s unsuruna bağlanılamadı. Mortgagecoin muhtemelen hâlihazırda çalışmaktadır.</translation>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation>Yolladığınız muameleler için eklenecek KB başı ücret</translation>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation>Cüzdan yükleniyor...</translation>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation>Cüzdan eski biçime geri alınamaz</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation>Varsayılan adres yazılamadı</translation>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation>Yeniden tarama...</translation>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation>Yükleme tamamlandı</translation>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation>%s seçeneğini kullanmak için</translation>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation>Hata</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>rpcpassword=<parola> şu yapılandırma dosyasında belirtilmelidir:
%s
Dosya mevcut değilse, sadece sahibi için okumayla sınırlı izin ile oluşturunuz.</translation>
</message>
</context>
</TS> | mit |
VKCOM/vk-java-sdk | sdk/src/main/java/com/vk/api/sdk/streaming/actions/StreamingAbstractAction.java | 470 | package com.vk.api.sdk.streaming.actions;
import com.vk.api.sdk.streaming.clients.VkStreamingApiClient;
/**
* Abstract action for Streaming API
*/
public abstract class StreamingAbstractAction {
private VkStreamingApiClient streamingClient;
public StreamingAbstractAction(VkStreamingApiClient streamingClient) {
this.streamingClient = streamingClient;
}
protected VkStreamingApiClient getClient() {
return streamingClient;
}
}
| mit |
Naatan/XenForo-CLI | library/CLI/Xf/Listener.php | 360 | <?php
/**
* XenForo CLI - Listener command (ie. xf listener)
*/
class CLI_Xf_Listener extends CLI {
/**
* @var string Help text
*/
protected $_help = '
Possible commands:
(you can excute these commands with --help to view their instructions)
xf listener ..
- add
- delete
';
public function run()
{
$this->showHelp();
}
} | mit |
jostschmithals/three.js | src/math/Vector3.js | 12371 | import { _Math } from './Math';
import { Matrix4 } from './Matrix4';
import { Quaternion } from './Quaternion';
/**
* @author mrdoob / http://mrdoob.com/
* @author *kile / http://kile.stravaganza.org/
* @author philogb / http://blog.thejit.org/
* @author mikael emtinger / http://gomo.se/
* @author egraether / http://egraether.com/
* @author WestLangley / http://github.com/WestLangley
*/
function Vector3( x, y, z ) {
this.x = x || 0;
this.y = y || 0;
this.z = z || 0;
}
Object.assign( Vector3.prototype, {
isVector3: true,
set: function ( x, y, z ) {
this.x = x;
this.y = y;
this.z = z;
return this;
},
setScalar: function ( scalar ) {
this.x = scalar;
this.y = scalar;
this.z = scalar;
return this;
},
setX: function ( x ) {
this.x = x;
return this;
},
setY: function ( y ) {
this.y = y;
return this;
},
setZ: function ( z ) {
this.z = z;
return this;
},
setComponent: function ( index, value ) {
switch ( index ) {
case 0: this.x = value; break;
case 1: this.y = value; break;
case 2: this.z = value; break;
default: throw new Error( 'index is out of range: ' + index );
}
return this;
},
getComponent: function ( index ) {
switch ( index ) {
case 0: return this.x;
case 1: return this.y;
case 2: return this.z;
default: throw new Error( 'index is out of range: ' + index );
}
},
clone: function () {
return new this.constructor( this.x, this.y, this.z );
},
copy: function ( v ) {
this.x = v.x;
this.y = v.y;
this.z = v.z;
return this;
},
add: function ( v, w ) {
if ( w !== undefined ) {
console.warn( 'THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );
return this.addVectors( v, w );
}
this.x += v.x;
this.y += v.y;
this.z += v.z;
return this;
},
addScalar: function ( s ) {
this.x += s;
this.y += s;
this.z += s;
return this;
},
addVectors: function ( a, b ) {
this.x = a.x + b.x;
this.y = a.y + b.y;
this.z = a.z + b.z;
return this;
},
addScaledVector: function ( v, s ) {
this.x += v.x * s;
this.y += v.y * s;
this.z += v.z * s;
return this;
},
sub: function ( v, w ) {
if ( w !== undefined ) {
console.warn( 'THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );
return this.subVectors( v, w );
}
this.x -= v.x;
this.y -= v.y;
this.z -= v.z;
return this;
},
subScalar: function ( s ) {
this.x -= s;
this.y -= s;
this.z -= s;
return this;
},
subVectors: function ( a, b ) {
this.x = a.x - b.x;
this.y = a.y - b.y;
this.z = a.z - b.z;
return this;
},
multiply: function ( v, w ) {
if ( w !== undefined ) {
console.warn( 'THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.' );
return this.multiplyVectors( v, w );
}
this.x *= v.x;
this.y *= v.y;
this.z *= v.z;
return this;
},
multiplyScalar: function ( scalar ) {
this.x *= scalar;
this.y *= scalar;
this.z *= scalar;
return this;
},
multiplyVectors: function ( a, b ) {
this.x = a.x * b.x;
this.y = a.y * b.y;
this.z = a.z * b.z;
return this;
},
applyEuler: function () {
var quaternion = new Quaternion();
return function applyEuler( euler ) {
if ( ! ( euler && euler.isEuler ) ) {
console.error( 'THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.' );
}
return this.applyQuaternion( quaternion.setFromEuler( euler ) );
};
}(),
applyAxisAngle: function () {
var quaternion = new Quaternion();
return function applyAxisAngle( axis, angle ) {
return this.applyQuaternion( quaternion.setFromAxisAngle( axis, angle ) );
};
}(),
applyMatrix3: function ( m ) {
var x = this.x, y = this.y, z = this.z;
var e = m.elements;
this.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ] * z;
this.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ] * z;
this.z = e[ 2 ] * x + e[ 5 ] * y + e[ 8 ] * z;
return this;
},
applyMatrix4: function ( m ) {
var x = this.x, y = this.y, z = this.z;
var e = m.elements;
this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ];
this.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ];
this.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ];
var w = e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ];
return this.divideScalar( w );
},
applyQuaternion: function ( q ) {
var x = this.x, y = this.y, z = this.z;
var qx = q.x, qy = q.y, qz = q.z, qw = q.w;
// calculate quat * vector
var ix = qw * x + qy * z - qz * y;
var iy = qw * y + qz * x - qx * z;
var iz = qw * z + qx * y - qy * x;
var iw = - qx * x - qy * y - qz * z;
// calculate result * inverse quat
this.x = ix * qw + iw * - qx + iy * - qz - iz * - qy;
this.y = iy * qw + iw * - qy + iz * - qx - ix * - qz;
this.z = iz * qw + iw * - qz + ix * - qy - iy * - qx;
return this;
},
project: function () {
var matrix = new Matrix4();
return function project( camera ) {
matrix.multiplyMatrices( camera.projectionMatrix, matrix.getInverse( camera.matrixWorld ) );
return this.applyMatrix4( matrix );
};
}(),
unproject: function () {
var matrix = new Matrix4();
return function unproject( camera ) {
matrix.multiplyMatrices( camera.matrixWorld, matrix.getInverse( camera.projectionMatrix ) );
return this.applyMatrix4( matrix );
};
}(),
transformDirection: function ( m ) {
// input: THREE.Matrix4 affine matrix
// vector interpreted as a direction
var x = this.x, y = this.y, z = this.z;
var e = m.elements;
this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z;
this.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z;
this.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z;
return this.normalize();
},
divide: function ( v ) {
this.x /= v.x;
this.y /= v.y;
this.z /= v.z;
return this;
},
divideScalar: function ( scalar ) {
return this.multiplyScalar( 1 / scalar );
},
min: function ( v ) {
this.x = Math.min( this.x, v.x );
this.y = Math.min( this.y, v.y );
this.z = Math.min( this.z, v.z );
return this;
},
max: function ( v ) {
this.x = Math.max( this.x, v.x );
this.y = Math.max( this.y, v.y );
this.z = Math.max( this.z, v.z );
return this;
},
clamp: function ( min, max ) {
// This function assumes min < max, if this assumption isn't true it will not operate correctly
this.x = Math.max( min.x, Math.min( max.x, this.x ) );
this.y = Math.max( min.y, Math.min( max.y, this.y ) );
this.z = Math.max( min.z, Math.min( max.z, this.z ) );
return this;
},
clampScalar: function () {
var min = new Vector3();
var max = new Vector3();
return function clampScalar( minVal, maxVal ) {
min.set( minVal, minVal, minVal );
max.set( maxVal, maxVal, maxVal );
return this.clamp( min, max );
};
}(),
clampLength: function ( min, max ) {
var length = this.length();
return this.multiplyScalar( Math.max( min, Math.min( max, length ) ) / length );
},
floor: function () {
this.x = Math.floor( this.x );
this.y = Math.floor( this.y );
this.z = Math.floor( this.z );
return this;
},
ceil: function () {
this.x = Math.ceil( this.x );
this.y = Math.ceil( this.y );
this.z = Math.ceil( this.z );
return this;
},
round: function () {
this.x = Math.round( this.x );
this.y = Math.round( this.y );
this.z = Math.round( this.z );
return this;
},
roundToZero: function () {
this.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x );
this.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y );
this.z = ( this.z < 0 ) ? Math.ceil( this.z ) : Math.floor( this.z );
return this;
},
negate: function () {
this.x = - this.x;
this.y = - this.y;
this.z = - this.z;
return this;
},
dot: function ( v ) {
return this.x * v.x + this.y * v.y + this.z * v.z;
},
// TODO lengthSquared?
lengthSq: function () {
return this.x * this.x + this.y * this.y + this.z * this.z;
},
length: function () {
return Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z );
},
lengthManhattan: function () {
return Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z );
},
normalize: function () {
return this.divideScalar( this.length() );
},
setLength: function ( length ) {
return this.multiplyScalar( length / this.length() );
},
lerp: function ( v, alpha ) {
this.x += ( v.x - this.x ) * alpha;
this.y += ( v.y - this.y ) * alpha;
this.z += ( v.z - this.z ) * alpha;
return this;
},
lerpVectors: function ( v1, v2, alpha ) {
return this.subVectors( v2, v1 ).multiplyScalar( alpha ).add( v1 );
},
cross: function ( v, w ) {
if ( w !== undefined ) {
console.warn( 'THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.' );
return this.crossVectors( v, w );
}
var x = this.x, y = this.y, z = this.z;
this.x = y * v.z - z * v.y;
this.y = z * v.x - x * v.z;
this.z = x * v.y - y * v.x;
return this;
},
crossVectors: function ( a, b ) {
var ax = a.x, ay = a.y, az = a.z;
var bx = b.x, by = b.y, bz = b.z;
this.x = ay * bz - az * by;
this.y = az * bx - ax * bz;
this.z = ax * by - ay * bx;
return this;
},
projectOnVector: function ( vector ) {
var scalar = vector.dot( this ) / vector.lengthSq();
return this.copy( vector ).multiplyScalar( scalar );
},
projectOnPlane: function () {
var v1 = new Vector3();
return function projectOnPlane( planeNormal ) {
v1.copy( this ).projectOnVector( planeNormal );
return this.sub( v1 );
};
}(),
reflect: function () {
// reflect incident vector off plane orthogonal to normal
// normal is assumed to have unit length
var v1 = new Vector3();
return function reflect( normal ) {
return this.sub( v1.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) );
};
}(),
angleTo: function ( v ) {
var theta = this.dot( v ) / ( Math.sqrt( this.lengthSq() * v.lengthSq() ) );
// clamp, to handle numerical problems
return Math.acos( _Math.clamp( theta, - 1, 1 ) );
},
distanceTo: function ( v ) {
return Math.sqrt( this.distanceToSquared( v ) );
},
distanceToSquared: function ( v ) {
var dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z;
return dx * dx + dy * dy + dz * dz;
},
distanceToManhattan: function ( v ) {
return Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ) + Math.abs( this.z - v.z );
},
setFromSpherical: function ( s ) {
var sinPhiRadius = Math.sin( s.phi ) * s.radius;
this.x = sinPhiRadius * Math.sin( s.theta );
this.y = Math.cos( s.phi ) * s.radius;
this.z = sinPhiRadius * Math.cos( s.theta );
return this;
},
setFromCylindrical: function ( c ) {
this.x = c.radius * Math.sin( c.theta );
this.y = c.y;
this.z = c.radius * Math.cos( c.theta );
return this;
},
setFromMatrixPosition: function ( m ) {
return this.setFromMatrixColumn( m, 3 );
},
setFromMatrixScale: function ( m ) {
var sx = this.setFromMatrixColumn( m, 0 ).length();
var sy = this.setFromMatrixColumn( m, 1 ).length();
var sz = this.setFromMatrixColumn( m, 2 ).length();
this.x = sx;
this.y = sy;
this.z = sz;
return this;
},
setFromMatrixColumn: function ( m, index ) {
return this.fromArray( m.elements, index * 4 );
},
equals: function ( v ) {
return ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) );
},
fromArray: function ( array, offset ) {
if ( offset === undefined ) offset = 0;
this.x = array[ offset ];
this.y = array[ offset + 1 ];
this.z = array[ offset + 2 ];
return this;
},
toArray: function ( array, offset ) {
if ( array === undefined ) array = [];
if ( offset === undefined ) offset = 0;
array[ offset ] = this.x;
array[ offset + 1 ] = this.y;
array[ offset + 2 ] = this.z;
return array;
},
fromBufferAttribute: function ( attribute, index, offset ) {
if ( offset !== undefined ) {
console.warn( 'THREE.Vector3: offset has been removed from .fromBufferAttribute().' );
}
this.x = attribute.getX( index );
this.y = attribute.getY( index );
this.z = attribute.getZ( index );
return this;
}
} );
export { Vector3 };
| mit |
GustavoAmerico/IngressosOnline | IngressosOnlineSolution/Views/Ticket.Views.HttpApi/Models/RequestItemModel.cs | 467 | using System;
using Ticket.Core;
namespace Ticket.Views.HttpApi.Models
{
public class RequestItemModel : IRequestItemModel
{
/// <summary>Gets and sends identification from event</summary>
public Guid Id { get; set; }
/// <summary>Gets and sends the price for anuncies</summary>
public decimal Price { get; set; }
/// <summary>Gets and sends count of tickets</summary>
public int Qtd { get; set; }
}
} | mit |
anfema/ember-addon-anfema-blueprints | blueprints/service-test/mocha-0.12-files/tests/unit/__path__/__name__-test.js | 394 | import { expect } from 'chai';
import { describe, it } from 'mocha';
import { setupTest } from 'ember-mocha';
describe('<%= friendlyTestDescription %>', function () {
setupTest('service:<%= dasherizedModuleName %>', {
// needs: ['service:foo'],
});
// Replace this with your real tests.
it('exists', function () {
const service = this.subject();
expect(service).to.be.ok;
});
});
| mit |
NimzyMaina/planner | paging_product.php | 1286 | <?php
// the page where this paging is used
$page_dom = "index.php";
echo "<ul class=\"pagination\">";
// button for first page
if($page>1){
echo "<li><a href='{$page_dom}' title='Go to the first page.'>";
echo "<<";
echo "</a></li>";
}
// count all products in the database to calculate total pages
$total_rows = $product->countAll();
$total_pages = ceil($total_rows / $records_per_page);
// range of links to show
$range = 2;
// display links to 'range of pages' around 'current page'
$initial_num = $page - $range;
$condition_limit_num = ($page + $range) + 1;
for ($x=$initial_num; $x<$condition_limit_num; $x++) {
// be sure '$x is greater than 0' AND 'less than or equal to the $total_pages'
if (($x > 0) && ($x <= $total_pages)) {
// current page
if ($x == $page) {
echo "<li class='active'><a href=\"#\">$x <span class=\"sr-only\">(current)</span></a></li>";
}
// not current page
else {
echo "<li><a href='{$page_dom}?page=$x'>$x</a></li>";
}
}
}
// button for last page
if($page<$total_pages){
echo "<li><a href='" .$page_dom . "?page={$total_pages}' title='Last page is {$total_pages}.'>";
echo ">>";
echo "</a></li>";
}
echo "</ul>";
?> | mit |
sirarsalih/Hackathons | if-finland-hackathon-2014/OpenDataService/ClaimsService.svc.cs | 4887 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Text.RegularExpressions;
using System.Web.UI.WebControls;
using OpenDataService.DataManagement;
using OpenDataService.Helpers;
namespace OpenDataService {
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "ClaimsService" in code, svc and config file together.
// NOTE: In order to launch WCF Test Client for testing this service, please select ClaimsService.svc or ClaimsService.svc.cs at the Solution Explorer and start debugging.
public class ClaimsService : IClaimsService {
public Claim GetClaimById(int id)
{
using (var db = new OpenDataDatabaseEntities())
{
db.Configuration.ProxyCreationEnabled = false;
var claim = db.Claim.Include("Car").Include("Location").FirstOrDefault(cl=>cl.Id == id);
return claim;
}
}
public void WriteLocations(string address, Location uniLocation)
{
using (var db = new OpenDataDatabaseEntities())
{
var rand = new Random();
var claims = db.Claim.Where(cl => cl.MunicipalityClaim.Contains(address));
foreach (var claim in claims)
{
claim.Location.Latitude = uniLocation.Latitude +
(rand.Next(-1, 1)*rand.NextDouble() + rand.Next(-1, 1)*rand.NextDouble())/10;
claim.Location.Longitude = uniLocation.Longitude +
(rand.Next(-1, 1)*rand.NextDouble() + rand.Next(-1, 1)*rand.NextDouble())/
10;
}
db.SaveChanges();
}
}
public IList<Location> GetLocationPacksByData(int skipmultiplier)
{
using (var db = new OpenDataDatabaseEntities()) {
db.Configuration.ProxyCreationEnabled = false;
var locations = db.Location.OrderBy(loc => loc.Id).Skip(200 * skipmultiplier).Take(200).ToList();
return locations;
}
}
public IList<string> GetAddresses()
{
using (var db = new OpenDataDatabaseEntities()) {
var indexes = db.Claim.GroupBy(cl => cl.MunicipalityClaim);
var indexList = indexes.Select(e => e.Key).ToList();
return indexList;
}
}
public IList<int> GetHourlyStatistics(string claimType) {
using (var db = new OpenDataDatabaseEntities())
{
var list = new int[24];
list[0] = db.Claim.Where(cl=> cl.ClaimType.Contains(claimType)).Count(cl => cl.Date.Hour == 24 || cl.Date.Hour == 0);
for (var i = 1; i < 24; i++)
{
list[i] = db.Claim.Where(cl=> cl.ClaimType.Contains(claimType)).Count(cl => cl.Date.Hour == i);
}
return list;
}
}
public IList<int> GetDailyStatistics(string claimType) {
using (var db = new OpenDataDatabaseEntities()) {
var list = new int[7];
var claims = db.Claim.Where(cl => string.IsNullOrEmpty(claimType) || cl.ClaimType.Contains(claimType)).Select(cl => cl.Date).ToArray();
for (var i = 0; i < 7 ; i++) {
list[i] = claims.Count(cl => cl.Date.DayOfWeek == (DayOfWeek)i);
}
return list;
}
}
public Dictionary<string, int> GetAccidentTypesByCoordinates(Location coords, int range)
{
using (var db = new OpenDataDatabaseEntities())
{
var locations = db.Location.ToArray().Where(loc => FormulaHelper.Measure(loc, coords) <= range).Select(e => e.Id).ToArray();
var claims = db.Claim.Where(cl => locations.Contains(cl.LocationId)).GroupBy(claim => claim.ClaimType);
return claims.OrderByDescending(claim => claim.Count()).ToDictionary(claim => claim.Key, claim => claim.Count());
}
}
public IList<Claim> GetClaimsByCoordinates(Location coords, int range) {
using (var db = new OpenDataDatabaseEntities()) {
db.Configuration.ProxyCreationEnabled = false;
var locations = db.Location.ToArray().Where(loc => FormulaHelper.Measure(loc, coords) <= range).Select(e => e.Id).ToArray();
var claims = db.Claim.Where(cl => locations.Contains(cl.LocationId)).ToList();
return claims;
}
}
}
}
| mit |
kohanyirobert/mongoroid | src/main/java/com/github/kohanyirobert/mongoroid/MongoMessageInsert.java | 484 | package com.github.kohanyirobert.mongoroid;
import com.github.kohanyirobert.ebson.BsonDocument;
import java.util.List;
interface MongoMessageInsert extends MongoMessageRequest {
String fullCollectionName();
void fullCollectionName(String fullCollectionName);
List<BsonDocument> documents();
void documents(BsonDocument... documents);
void documents(Iterable<BsonDocument> documents);
boolean continueOnError();
void continueOnError(boolean continueOnError);
}
| mit |
Fabiarm/spsmribbon | Code/1.0.0/dev/CONTROLTEMPLATES/SPS.MRibbon/JS/Settings.js | 20170 | var MRibbonSets = {
InitializeVariables: function () {
MRibbonSets.s_keys = [
"rib_p_edit",
"rib_p_mng",
"rib_p_share",
"rib_p_apprl",
"rib_p_wkf",
"rib_p_acts",
"rib_p_tags",
"rib_wp_edit",
"rib_wp_mng",
"rib_wp_share",
"rib_wp_lsets",
"rib_wp_acts",
"rib_wp_tags",
"rib_df_new",
"rib_df_open",
"rib_df_mng",
"rib_df_share",
"rib_df_copies",
"rib_df_wkf",
"rib_df_tags",
"rib_dl_view_frt",
"rib_dl_view_mng",
"rib_dl_tags",
"rib_dl_share",
"rib_dl_connect",
"rib_dl_cust_libs",
"rib_dl_sets",
"rib_li_new",
"rib_li_acts",
"rib_li_mng",
"rib_li_share",
"rib_li_tags",
"rib_li_wkf",
"rib_ll_view_frt",
"rib_ll_view_mng",
"rib_ll_tags",
"rib_ll_share",
"rib_ll_connect",
"rib_ll_cust_list",
"rib_ll_sets",
"rib_ce_new",
"rib_ce_acts",
"rib_ce_mng",
"rib_ce_tags",
"rib_ce_wkf",
"rib_cc_scope",
"rib_cc_exp",
"rib_cc_view_mng",
"rib_cc_tags",
"rib_cc_share",
"rib_cc_connect",
"rib_cc_cust_list",
"rib_cc_sets"
];
MRibbonSets.b_Property = null;
MRibbonSets.store = null;
MRibbonSets.s_group = null;
MRibbonSets.sel_group = null;
MRibbonSets.allGroups = null;
MRibbonSets.preSave_groups = '{"groups": []}';
MRibbonSets.isRreSave = false;
},
///<summary>Initialize simple data</summary>
InitializeData: function () {
MRibbonSets.InitializeVariables();
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', MRibbonSets.CheckPermissions());
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', MRibbonSets.ReadStore());
},
///<summary>Check matrix of permissions for current user</summary>
CheckPermissions: function () {
$("#divTab").hide();
var ctx = new SP.ClientContext.get_current();
var cWeb = ctx.get_web();
var ob = new SP.BasePermissions();
ob.set(SP.PermissionKind.manageWeb)
ob.set(SP.PermissionKind.managePermissions)
var per = cWeb.doesUserHavePermissions(ob)
ctx.executeQueryAsync(
function () {
if (per.get_value() == true) {
$("#divTab").show();
MRibbonSets.InitData();
}
else {
$("#divTab").hide();
SP.UI.Status.removeAllStatus(true);
var status = SP.UI.Status.addStatus(Res.ss_Msg_AccessDenied_Title, Res.ss_Msg_AccessDenied);
SP.UI.Status.setStatusPriColor(status, 'red');
}
},
null
);
},
///<summary>Initialize UI</summary>
InitData: function () {
$("#spn_page_wrap").html(Res.ss_TH_Actions);
$("#spn_PreSave_Help").html(Res.ss_PreSave_Help);
$("#thPicker").html(Res.ss_TH_Picker);
$("#thGroups").html(Res.ss_TH_Groups);
$("#spn_PickerTitle").html(Res.ss_TD_Picker_Title);
$("#divHelp").html(Res.ss_Help);
},
///<summary>Read property bag 'SPS_MRibbon' for current web</summary>
ReadStore: function () {
MRibbonSets.IsShowChecked(false);
var ctx = new SP.ClientContext.get_current();
var web = ctx.get_web();
this.props = web.get_allProperties();
this.groupCollection = web.get_siteGroups();
ctx.load(web);
ctx.load(this.props);
ctx.load(this.groupCollection, 'Include(Title,Id)');
ctx.executeQueryAsync(Function.createDelegate(this, MRibbonSets.GetPropertySuccess), Function.createDelegate(this, MRibbonSets.GetPropertyFail));
},
GetPropertySuccess: function () {
var isExists = this.props.get_fieldValues()["SPS_MRibbon"];
if (isExists != null) {
MRibbonSets.b_Property = this.props.get_item('SPS_MRibbon');
}
MRibbonSets.allGroups = this.groupCollection;
if (MRibbonSets.b_Property == null) {
MRibbonSets.b_Property = '{"groups": []}';
MRibbonSets.store = '{"groups": []}';
}
else {
MRibbonSets.store = MRibbonSets.b_Property;
}
MRibbonSets.IsShowChecked(false);
MRibbonSets.HideGroup();
MRibbonSets.FillTblGroups();
},
GetPropertyFail: function () {
MRibbonSets.HideGroup();
SP.UI.Status.removeAllStatus(true);
var status = SP.UI.Status.addStatus('', args.get_message() + '\n' + args.get_stackTrace());
SP.UI.Status.setStatusPriColor(status, 'red');
},
///<summary>Save data to property bag 'SPS_MRibbon' for current web</summary>
SaveStore: function () {
var ctx = new SP.ClientContext.get_current();
var web = ctx.get_web();
ctx.load(web);
this.props = web.get_allProperties();
ctx.load(this.props);
if (MRibbonSets.store != null) {
this.props.set_item("SPS_MRibbon", MRibbonSets.store);
}
else {
this.props.set_item("SPS_MRibbon", null);
}
web.update();
ctx.executeQueryAsync(MRibbonSets.AddingSuccess, MRibbonSets.AddingFail);
},
AddingSuccess: function (sender, args) {
window.frameElement.commitPopup('');
},
AddingFail: function (sender, args) {
SP.UI.Status.removeAllStatus(true);
var status = SP.UI.Status.addStatus('', args.get_message() + '\n' + args.get_stackTrace());
SP.UI.Status.setStatusPriColor(status, 'red');
},
///<summary>Event for picker: value changed</summary>
PickerValueChanged: function (topElementId, users) {
//Change value
},
///<summary>Event for picker: control validation</summary>
PickerControlValidate: function (topElementId, users) {
//Validation
},
///<summary>Event for picker: user resolving</summary>
PickerUserResolved: function (topElementId, users) {
MRibbonSets.HideGroup();
var picker = MRibbonPP.GetPPTop(topElementId);
var employees = picker.GetAllUserInfo();
var userInfo = '';
if (employees.length == 1) {
var employee = employees[0];
MRibbonSets.s_group = employee;
MRibbonSets.ShowGroup(employee.Key);
}
else if (employees.length == 0) {
MRibbonSets.IsShowChecked(false);
}
},
///<summary>Show UI 'Add' button for checked sharepoint group</summary>
ShowGroup: function (groupKey) {
$("#btnAddGroup").show();
var jsonData = JSON.parse(MRibbonSets.b_Property);
var jsonStore = JSON.parse(MRibbonSets.store);
if (MRibbonSets.jsonData != null)
for (var i = 0; i < jsonData.groups.length; i++) {
if (jsonData.groups[i].title == groupKey) {
$("#btnAddGroup").hide();
break;
}
}
if (jsonStore != null)
for (var i = 0; i < jsonStore.groups.length; i++) {
if (jsonStore.groups[i].title == groupKey) {
$("#btnAddGroup").hide();
break;
}
}
},
///<summary>Hide UI 'Add' button for checked sharepoint group</summary>
HideGroup: function () {
$("#btnAddGroup").hide();
},
///<summary>Create table with selected charepoint groups</summary>
FillTblGroups: function () {
var pp_id = $("[id$='pplPickerSiteRequestor']").attr("id");
document.getElementById('tbl_selGroups').innerHTML = '';
var text = '';
var jsonData = JSON.parse(MRibbonSets.store);
if (jsonData != null) {
for (var i = 0; i < jsonData.groups.length; i++) {
text += '<div style="border-bottom: 1px solid #ababab; padding: 3px;"><div class="th-space space1 pointer"><span id="' + jsonData.groups[i].key + '_preSave" style="display:none;"><img src="/_layouts/15/images/SPS.MRibbon/refresh.png" /></span></div>' +
'<div style="display: inline-block; position: relative;width:100px;vertical-align: top;"><a href="#" class="ms-heroCommandLink" onclick="MRibbonPP.AddOneInPP(\'' + jsonData.groups[i].title + '\',\'' + pp_id + '\');MRibbonSets.HideGroup();MRibbonSets.FillChecked(\'' + jsonData.groups[i].key + '\');">' +
jsonData.groups[i].title +
'</a></div>' +
'<div class="th-space space3 pointer">' +
'<img class="small-add" src="/_layouts/15/images/spcommon.png" onclick="MRibbonPP.AddOneInPP(\'' + jsonData.groups[i].title + '\',\'' + pp_id + '\');MRibbonSets.HideGroup();MRibbonSets.FillChecked(\'' + jsonData.groups[i].key + '\');" />' +
'</div>' +
'<div class="th-space space3 pointer">' +
'<img class="small-rmv" src="/_layouts/15/images/spcommon.png" onclick="MRibbonSets.RemoveChecked(\'' + jsonData.groups[i].key + '\');" /></div>' +
'</div>';
}
}
if (jsonData.groups.length == 0)
document.getElementById('tbl_selGroups').innerHTML = '<span class="th-space space1 pointer" style="overflow: hidden;">' +
'<img class="small-wrn" src="/_layouts/15/images/spcommon.png" />' +
'</span> ' +
'<span style="overflow: hidden; display: inline-block; position: relative;">' + Res.ss_TH_NoGroups + '</span>';
else {
document.getElementById('tbl_selGroups').innerHTML = text;
MRibbonSets.CheckPreSave();
}
},
///<summary>Add new sharepoint group to list</summary>
AddNewGroup: function () {
var jsonData = JSON.parse(MRibbonSets.b_Property);
var jsonStore = JSON.parse(MRibbonSets.store);
var isExists = false;
for (var i = 0; i < jsonData.groups.length; i++) {
if (jsonData.groups[i].title == MRibbonSets.s_group.Key) {
isExists = true;
}
}
if (isExists == false) {
var key = null;
var groupEnumerator = MRibbonSets.allGroups.getEnumerator();
while (groupEnumerator.moveNext()) {
var oGroup = groupEnumerator.get_current();
if (oGroup.get_title() == MRibbonSets.s_group.Key) {
key = oGroup.get_id();
break;
}
}
if (key != null) {
if (isExists == false) {
jsonStore['groups'].push({
"key": "" + key + "",
"title": "" + MRibbonSets.s_group.Key + "",
"rib_inact": false,
"rib_p_edit": false,
"rib_p_mng": false,
"rib_p_share": false,
"rib_p_apprl": false,
"rib_p_wkf": false,
"rib_p_acts": false,
"rib_p_tags": false,
"rib_wp_edit": false,
"rib_wp_mng": false,
"rib_wp_share": false,
"rib_wp_lsets": false,
"rib_wp_acts": false,
"rib_wp_tags": false,
"rib_df_new": false,
"rib_df_open": false,
"rib_df_mng": false,
"rib_df_share": false,
"rib_df_copies": false,
"rib_df_wkf": false,
"rib_df_tags": false,
"rib_dl_view_frt": false,
"rib_dl_view_mng": false,
"rib_dl_tags": false,
"rib_dl_share": false,
"rib_dl_connect": false,
"rib_dl_cust_libs": false,
"rib_dl_sets": false,
"rib_li_new": false,
"rib_li_acts": false,
"rib_li_mng": false,
"rib_li_share": false,
"rib_li_tags": false,
"rib_li_wkf": false,
"rib_ll_view_frt": false,
"rib_ll_view_mng": false,
"rib_ll_tags": false,
"rib_ll_share": false,
"rib_ll_connect": false,
"rib_ll_cust_list": false,
"rib_ll_sets": false,
"rib_ce_new": false,
"rib_ce_acts": false,
"rib_ce_mng": false,
"rib_ce_tags": false,
"rib_ce_wkf": false,
"rib_cc_scope": false,
"rib_cc_exp": false,
"rib_cc_view_mng": false,
"rib_cc_tags": false,
"rib_cc_share": false,
"rib_cc_connect": false,
"rib_cc_cust_list": false,
"rib_cc_sets": false
});
MRibbonSets.store = JSON.stringify(jsonStore);
MRibbonSets.AddPreSave(key);
MRibbonSets.HideGroup();
MRibbonSets.FillTblGroups();
MRibbonSets.CheckPreSave();
}
}
}
},
///<summary>Check/Uncheck categories of Ribbon for selected sharepoint group</summary>
FillChecked: function (groupKey) {
MRibbonSets.sel_group = groupKey;
var jsonStore = JSON.parse(MRibbonSets.store);
var isExists = false;
MRibbonSets.ClearChecked();
for (var i = 0; i < jsonStore.groups.length; i++) {
if (jsonStore.groups[i].key == groupKey) {
var group = jsonStore.groups[i];
for (var index = 0; index < MRibbonSets.s_keys.length; index++) {
if (group[MRibbonSets.s_keys[index]] != null) {
var id = MRibbonSets.s_keys[index];
document.getElementById(id).checked = group[MRibbonSets.s_keys[index]];
}
}
var preSave_Id = "#" + groupKey + "_preSave";
MRibbonSets.CheckPreSave();
break;
}
}
MRibbonSets.AutosizeDialog();
MRibbonSets.IsShowChecked(true);
},
///<summary>Remove selected sharepoint group from list</summary>
RemoveChecked: function (groupKey) {
var flag = confirm(Res.ss_Msg_Remove_Title);
if (flag == true) {
var jsonStore = JSON.parse(MRibbonSets.store);
var pos = null;
for (var i = 0; i < jsonStore.groups.length; i++) {
if (jsonStore.groups[i].key == groupKey) {
pos = i;
break;
}
}
if (pos != null) {
jsonStore.groups.splice(pos, 1);
}
MRibbonSets.store = JSON.stringify(jsonStore);
MRibbonSets.RemovePreSave(groupKey);
MRibbonSets.FillTblGroups();
MRibbonSets.IsShowChecked(false);
}
},
///<summary>Uncheck all categories of Ribbon</summary>
ClearChecked: function () {
for (var i = 0; i < MRibbonSets.s_keys.length; i++) {
var id = "'" + MRibbonSets.s_keys[i] + "'";
if (document.getElementById(id) != null)
document.getElementById(id).checked = false;
}
MRibbonSets.IsShowChecked(false);
},
///<summary>Pre save check/uncheck categories of Ribbon for selected sharepoint group</summary>
SaveChecked: function () {
var jsonStore = JSON.parse(MRibbonSets.store);
if (jsonStore != null) {
for (var i = 0; i < jsonStore.groups.length; i++) {
if (jsonStore.groups[i].key == MRibbonSets.sel_group) {
for (var index = 0; index < MRibbonSets.s_keys.length; index++) {
var id = MRibbonSets.s_keys[index];
jsonStore.groups[i][MRibbonSets.s_keys[index]] = document.getElementById(id).checked;
}
var preSave_Id = "#" + jsonStore.groups[i].key + "_preSave";
MRibbonSets.AddPreSave(jsonStore.groups[i].key);
MRibbonSets.CheckPreSave();
break;
}
}
MRibbonSets.store = JSON.stringify(jsonStore);
SP.UI.Notify.addNotification(Res.ss_Msg_SaveTempory);
}
},
///<summary>Make autosize modal popup</summary>
AutosizeDialog: function () {
var dlg = SP.UI.ModalDialog.get_childDialog();
if (dlg != null) {
dlg.autoSize();
}
},
///<summary>Show/not show help description and tabs with categories of Ribbon</summary>
IsShowChecked: function (flag) {
if (flag == false) {
$("#divRibTabs").hide();
$("#divHelp").show();
}
else {
$("#divRibTabs").show();
$("#divHelp").hide();
}
MRibbonSets.AutosizeDialog();
},
///<summary>Save tempory changes for all sharepoint group of the list. Save in JSON format</summary>
AddPreSave: function (key) {
var jsnPreSave = JSON.parse(MRibbonSets.preSave_groups);
if (jsnPreSave != null) {
var isExists = false;
for (var i = 0; i < jsnPreSave.groups.length; i++)
if (jsnPreSave.groups[i].key == key)
isExists = true;
if (isExists == false) {
MRibbonSets.isRreSave = true;
jsnPreSave['groups'].push({ "key": "" + key + "" });
}
MRibbonSets.preSave_groups = JSON.stringify(jsnPreSave);
}
},
///<summary>Remove all pre-save changes</summary>
RemovePreSave: function (key) {
var jsnPreSave = JSON.parse(MRibbonSets.preSave_groups);
var pos = null;
if (jsnPreSave != null)
for (var i = 0; i < jsnPreSave.groups.length; i++)
if (jsnPreSave.groups[i].key == key) {
pos = i;
break;
}
if (pos != null) {
MRibbonSets.isRreSave = true;
jsnPreSave.groups.splice(pos, 1);
}
MRibbonSets.preSave_groups = JSON.stringify(jsnPreSave);
},
///<summary>Check tempory changes for current session</summary>
IsPreSave: function (key) {
var jsnPreSave = JSON.parse(MRibbonSets.preSave_groups);
if (jsnPreSave != null) {
for (var i = 0; i < jsnPreSave.groups.length; i++) {
if (jsnPreSave.groups[i].key == key) {
return true;
}
}
}
return false;
},
///<summary>Check tempory data changes for sharepoint groups in the list</summary>
CheckPreSave: function () {
var jsnPreSave = JSON.parse(MRibbonSets.preSave_groups);
if (jsnPreSave != null) {
for (var i = 0; i < jsnPreSave.groups.length; i++) {
var preSave_Id = "#" + jsnPreSave.groups[i].key + "_preSave";
$(preSave_Id).show();
}
}
},
///<summary>Close modal popup</summary>
Close: function () {
if (MRibbonSets.isRreSave == true) {
var flag = confirm(Res.ss_Msg_Close_Title);
if (flag == true) {
MRibbonSets.SaveChecked();
MRibbonSets.SaveStore();
}
}
window.frameElement.cancelPopUp();
}
}
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', MRibbonSets.InitializeData); | mit |
MTASZTAKI/ApertusVR | plugins/languageAPI/jsAPI/3rdParty/nodejs/10.1.0/source/test/parallel/test-child-process-fork-closed-channel-segfault.js | 2115 | 'use strict';
const common = require('../common');
// Before https://github.com/nodejs/node/pull/2847 a child process trying
// (asynchronously) to use the closed channel to it's creator caused a segfault.
const assert = require('assert');
const cluster = require('cluster');
const net = require('net');
if (!cluster.isMaster) {
// Exit on first received handle to leave the queue non-empty in master
process.on('message', function() {
process.exit(1);
});
return;
}
const server = net
.createServer(function(s) {
if (common.isWindows) {
s.on('error', function(err) {
// Prevent possible ECONNRESET errors from popping up
if (err.code !== 'ECONNRESET') throw err;
});
}
setTimeout(function() {
s.destroy();
}, 100);
})
.listen(0, function() {
const worker = cluster.fork();
function send(callback) {
const s = net.connect(server.address().port, function() {
worker.send({}, s, callback);
});
// https://github.com/nodejs/node/issues/3635#issuecomment-157714683
// ECONNREFUSED or ECONNRESET errors can happen if this connection is
// still establishing while the server has already closed.
// EMFILE can happen if the worker __and__ the server had already closed.
s.on('error', function(err) {
if (
err.code !== 'ECONNRESET' &&
err.code !== 'ECONNREFUSED' &&
err.code !== 'EMFILE'
) {
throw err;
}
});
}
worker.process.once(
'close',
common.mustCall(function() {
// Otherwise the crash on `channel.fd` access may happen
assert.strictEqual(worker.process.channel, null);
server.close();
})
);
worker.on('online', function() {
send(function(err) {
assert.ifError(err);
send(function(err) {
// Ignore errors when sending the second handle because the worker
// may already have exited.
if (err && err.message !== 'Channel closed') {
throw err;
}
});
});
});
});
| mit |
takuya-takeuchi/Demo | Xamarin.Forms.Portable2/Xamarin.Forms.Portable2/Xamarin.Forms.Portable2/Views/MainPage.xaml.cs | 327 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Xamarin.Forms.Portable2.Views
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
}
}
| mit |
guatebus/partyplanner | src/Party/Bundle/PublicBundle/Tests/Controller/DefaultControllerTest.php | 408 | <?php
namespace Party\Bundle\PublicBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/hello/Fabien');
$this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
}
}
| mit |
d1str0/CoinAlert-Server | main.go | 2624 | package main
import (
"fmt"
"gopkg.in/mgo.v2"
"html/template"
"log"
"net/http"
"time"
)
const version = "0.0.1"
const templateDir = "templates/*"
// Must be able to compile all template files.
const url = "localhost"
const database = "coinalert"
const devices_collection = "devices"
const alerts_collection = "alerts"
func main() {
fmt.Printf("Starting CoinAlert version %s\n", version)
session, err := mgo.Dial(url)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Connected to MongoDB\n")
price := &Price{}
price.Current, err = CurrentPrice()
if err != nil {
log.Fatal(err)
}
fmt.Printf("Initial price for BTC: %s\n", price.Current)
go priceUpdate(price)
register := http.HandlerFunc(registerHandler(session))
currentPrice := http.HandlerFunc(currentPriceHandler(price))
alexa := http.HandlerFunc(alexaHandler(price))
// API Routes
http.Handle("/api/register", PostHandler(register)) // To handle all new application loads
http.Handle("/api/current", GetHandler(currentPrice)) // Returns current price of BTC in USD
http.Handle("/api/alexa", PostHandler(AlexaSkillHandler(alexa))) // Returns current price of BTC in USD
var templates = template.Must(template.ParseGlob(templateDir))
// Web Routes
http.HandleFunc("/", HomeHandler(price, templates)) // Display landing page... eventually.
http.HandleFunc("/resources/", includeHandler) // Loads css/js/etc. straight through.
srv := &http.Server{
ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second,
Addr: ":8080",
}
// log.Fatal(srv.ListenAndServeTLS("cert.pem", "key.pem"))
log.Fatal(srv.ListenAndServe())
}
// Return the home page.
func HomeHandler(price *Price, templates *template.Template) func(w http.ResponseWriter, r *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
fmt.Printf("%q\n", r)
err := templates.ExecuteTemplate(w, "main", price)
if err != nil {
log.Fatal(err)
}
return
}
}
// For resource files like js, images, etc.
// Just a straight through file server.
func includeHandler(w http.ResponseWriter, r *http.Request) {
filename := r.URL.Path[1:]
http.ServeFile(w, r, filename)
}
func priceUpdate(price *Price) {
ticker := time.NewTicker(5 * time.Second)
// Keep trying until we're timed out or got a result or got an error
for {
select {
// Got a timeout! fail with a timeout error
case <-ticker.C:
p, err := CurrentPrice()
if err != nil {
fmt.Printf("Error getting current price: %s\n", err.Error())
} else {
price.Current = p
fmt.Printf("Price updated to $%s\n", p)
}
}
}
}
| mit |
ddegirmenci/hexgrid | hexgrid/__init__.py | 5846 | from collections import namedtuple
import math
from enum import Enum
from itertools import combinations
class Direction(Enum):
East = (1, 0)
NorthEast = (1, -1)
NorthWest = (0, -1)
West = (-1, 0)
SouthWest = (-1, 1)
SouthEast = (0, 1)
class Hex(namedtuple("Hex", ["q", "r"])):
def __add__(self, other):
return Hex(self.q + other.q, self.r + other.r)
def __sub__(self, other):
return Hex(self.q - other.q, self.r - other.r)
def __abs__(self):
return (abs(self.q) + abs(self.r) + abs(self.s)) // 2
@property
def s(self):
return -self.q - self.r
def neighbors(self):
for d in Direction:
yield self.neighbor(d)
def scale(self, scale):
return Hex(self.q * scale, self.r * scale)
def rotate_counterclockwise(self):
return Hex(-self.s, -self.q)
def rotate_clockwise(self):
return Hex(-self.r, -self.s)
def neighbor(self, direction: Direction):
return self + Hex(*direction.value)
def round(self):
q = int(round(self.q))
r = int(round(self.r))
s = int(round(self.s))
q_diff = abs(q - self.q)
r_diff = abs(r - self.r)
s_diff = abs(s - self.s)
if q_diff > r_diff and q_diff > s_diff:
q = -r - s
else:
if r_diff < s_diff:
s = -q - r
r = -q - s
return Hex(q, r)
def path(self, other):
n = Hex.distance(self, other)
a_nudge = Hex(self.q + 0.000001, self.r + 0.000001)
b_nudge = Hex(other.q + 0.000001, other.r + 0.000001)
results = []
step = 1.0 / max(n, 1)
for i in range(0, n + 1):
results.append(Hex.lerp(a_nudge, b_nudge, step * i).round())
return results
@staticmethod
def distance(a: 'Hex', b: 'Hex'):
return abs(a - b)
@staticmethod
def lerp(a, b, t: float):
return Hex(a.q * (1 - t) + b.q * t, a.r * (1 - t) + b.r * t)
@staticmethod
def spiral():
h = Hex(0, 0)
radius = 0
yield h
while True:
radius += 1
h = h.neighbor(direction=Direction.SouthWest)
for d in Direction:
for i in range(radius):
yield h
h = h.neighbor(direction=d)
# hex_diagonals = [Hex(2, -1), Hex(1, -2), Hex(-1, -1), Hex(-2, 1), Hex(-1, 2),
# Hex(1, 1)]
# def hex_diagonal_neighbor(hex, direction):
# return hex + hex_diagonals[direction]
class Edge(namedtuple('Edge', ['h1', 'h2'])):
def __eq__(self, other):
return set(self) == set(other)
def __hash__(self):
return hash(self.h1) * hash(self.h2)
def neighbors(self):
h3, h4 = set(self.h1.neighbors()).intersection(self.h2.neighbors())
return [Edge(self.h1, h3),
Edge(self.h1, h4),
Edge(self.h2, h3),
Edge(self.h2, h4)]
class Vertex(namedtuple('Vertex', ['h1', 'h2', 'h3'])):
def __eq__(self, other):
return set(self) == set(other)
def __hash__(self):
return hash(self.h1) * hash(self.h2) * hash(self.h3)
def neighbors(self):
h4 = set(self.h1.neighbors()).intersection(self.h2.neighbors()) - {self.h3}
h5 = set(self.h1.neighbors()).intersection(self.h3.neighbors()) - {self.h2}
h6 = set(self.h2.neighbors()).intersection(self.h3.neighbors()) - {self.h1}
return [Vertex(self.h1, self.h2, h4),
Vertex(self.h1, self.h3, h5),
Vertex(self.h2, self.h3, h6)]
def edges(self):
return map(Edge, combinations(self, 2))
OffsetCoord = namedtuple("OffsetCoord", ["col", "row"])
EVEN = 1
ODD = -1
def qoffset_from_cube(offset, h):
col = h.q
row = h.r + (h.q + offset * (h.q & 1)) // 2
return OffsetCoord(col, row)
def qoffset_to_cube(offset, h):
q = h.col
r = h.row - (h.col + offset * (h.col & 1)) // 2
return Hex(q, r)
def roffset_from_cube(offset, h):
col = h.q + (h.r + offset * (h.r & 1)) // 2
row = h.r
return OffsetCoord(col, row)
def roffset_to_cube(offset, h):
q = h.col - (h.row + offset * (h.row & 1)) // 2
r = h.row
return Hex(q, r)
Orientation = namedtuple("Orientation", ["f0", "f1", "f2", "f3", "b0", "b1", "b2", "b3",
"start_angle"])
Layout = namedtuple("Layout", ["orientation", "size", "origin"])
layout_pointy = Orientation(math.sqrt(3.0), math.sqrt(3.0) / 2.0, 0.0, 3.0 / 2.0,
math.sqrt(3.0) / 3.0, -1.0 / 3.0, 0.0, 2.0 / 3.0, 0.5)
layout_flat = Orientation(3.0 / 2.0, 0.0, math.sqrt(3.0) / 2.0, math.sqrt(3.0), 2.0 / 3.0, 0.0,
-1.0 / 3.0, math.sqrt(3.0) / 3.0, 0.0)
class Point(namedtuple("Point", ["x", "y"])):
pass
def hex_to_pixel(layout, h):
m = layout.orientation
size = layout.size
origin = layout.origin
x = (m.f0 * h.q + m.f1 * h.r) * size.x
y = (m.f2 * h.q + m.f3 * h.r) * size.y
return Point(x + origin.x, y + origin.y)
def pixel_to_hex(layout, p):
m = layout.orientation
size = layout.size
origin = layout.origin
pt = Point((p.x - origin.x) / size.x, (p.y - origin.y) / size.y)
q = m.b0 * pt.x + m.b1 * pt.y
r = m.b2 * pt.x + m.b3 * pt.y
return Hex(q, r)
def hex_corner_offset(layout, corner):
m = layout.orientation
size = layout.size
angle = 2.0 * math.pi * (m.start_angle - corner) / 6
return Point(size.x * math.cos(angle), size.y * math.sin(angle))
def polygon_corners(layout, h):
corners = []
center = hex_to_pixel(layout, h)
for i in range(0, 6):
offset = hex_corner_offset(layout, i)
corners.append(Point(center.x + offset.x, center.y + offset.y))
return corners
| mit |
sevenfate/model-builder | src/test/java/de/microtema/model/builder/order/PurchaseItemBuilderTest.java | 680 | package de.microtema.model.builder.order;
import de.microtema.model.builder.ModelBuilder;
import de.microtema.model.builder.ModelBuilderFactory;
import org.junit.Test;
import static org.junit.Assert.assertNotNull;
public class PurchaseItemBuilderTest {
ModelBuilder<PurchaseItem> sut = ModelBuilderFactory.createBuilder(PurchaseItem.class);
@Test
public void min() {
PurchaseItem min = sut.max();
assertNotNull(min);
assertNotNull(min.getGiftWrap());
assertNotNull(min.getPartNumber());
assertNotNull(min.getProductName());
assertNotNull(min.getQuantity());
assertNotNull(min.getLocalDateTime());
}
}
| mit |
YanPes/DearGoogle | website/js/mapboxRoutes.js | 5587 | // MAPBOX SETUP
mapboxgl.accessToken = 'pk.eyJ1IjoicmV0dGljaG1hbm4iLCJhIjoiY2o0Z29hZ2lyMDUxeDMzcmthM2p3dWl2MCJ9.K1aZmsG6jyUNgTPfnQiw0g';
var map = new mapboxgl.Map({
container: 'map', // container id
style: 'mapbox://styles/rettichmann/cj4iej0o861jl2rnpswt7sjao', //stylesheet location
center: [-73.993, 40.722], // starting position
zoom: 14.0,
interactive: false // starting zoom
});
// Create a popup, but don't add it to the map yet.
var popup = new mapboxgl.Popup({ closeButton: false, closeOnClick: false})
map.on('load', function() {
// Add a layer showing the places.
map.addLayer({
"id": "normalroutepic",
"type": "symbol",
"source": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {
"description": '<img width="250px" src="img/map/houston.jpg"/>',
"icon": "attraction"
},
"geometry": {
"type": "Point",
"coordinates": [-73.985, 40.722]
}
}]
}
},
"layout": {
"icon-image": "{icon}-15",
"icon-allow-overlap": true,
"icon-size": 2
}
});
map.addLayer({
"id": "altroutepics",
"type": "symbol",
"source": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {
"description": '<img width="250px" src="img/map/thompson.jpg"/>',
"icon": "attraction"
},
"geometry": {
"type": "Point",
"coordinates": [-74.000, 40.7242]
}
}, {
"type": "Feature",
"properties": {
"description": '<img width="250px" src="img/map/hesterstr.png"/>',
"icon": "attraction"
},
"geometry": {
"type": "Point",
"coordinates": [-73.998, 40.7182]
}
}]
}
},
"layout": {
"icon-image": "{icon}-15",
"icon-allow-overlap": true,
"icon-size": 2,
"visibility": "none"
}
});
})
// MAPBOX INTERACTION
$("#btn-map-1").click(function () {
$('#btn-map-1').addClass("set-primary-color");
$('#btn-map-2').removeClass("set-primary-color");
map.setPaintProperty("routes-google", "line-color", "#2196F3");
map.setPaintProperty("routes-google", "line-width", 4.48);
map.setPaintProperty("routes-alt", "line-color", "#ccc");
map.setPaintProperty("routes-alt", "line-width", 2.75);
map.setLayoutProperty("normalroutepic", "visibility", "visible");
map.setLayoutProperty("altroutepics", "visibility", "none");
map.moveLayer("routes-alt", "routes-google");
});
$("#btn-map-2").click(function () {
$('#btn-map-2').addClass("set-primary-color");
$('#btn-map-1').removeClass("set-primary-color");
map.setPaintProperty("routes-alt", "line-color", "#2196F3");
map.setPaintProperty("routes-alt", "line-width", 4.48);
map.setPaintProperty("routes-google", "line-color", "#ccc");
map.setPaintProperty("routes-google", "line-width", 2.75);
map.setLayoutProperty("normalroutepic", "visibility", "none");
map.setLayoutProperty("altroutepics", "visibility", "visible");
map.moveLayer("routes-google", "routes-alt");
});
map.on('mouseenter', 'normalroutepic', function(e) {
// Change the cursor style as a UI indicator.
map.getCanvas().style.cursor = 'pointer';
// Populate the popup and set its coordinates
// based on the feature found.
popup.setLngLat(e.features[0].geometry.coordinates)
.setHTML(e.features[0].properties.description)
.addTo(map);
});
map.on('mouseleave', 'normalroutepic', function() {
map.getCanvas().style.cursor = '';
popup.remove();
});
map.on('mouseenter', 'altroutepics', function(e) {
// Change the cursor style as a UI indicator.
map.getCanvas().style.cursor = 'pointer';
// Populate the popup and set its coordinates
// based on the feature found.
popup.setLngLat(e.features[0].geometry.coordinates)
.setHTML(e.features[0].properties.description)
.addTo(map);
});
map.on('mouseleave', 'altroutepics', function() {
map.getCanvas().style.cursor = '';
popup.remove();
});
/*
map.on('mouseenter', 'routes-google-hover', function(e) {
// Change the cursor style as a UI indicator.
map.getCanvas().style.cursor = 'pointer';
// Populate the popup and set its coordinates
// based on the feature found.
popup.setLngLat(e.lngLat)
//.setHTML(e.properties.title)
.setHTML('<img width="250px" src="https://media.giphy.com/media/3o6wrklnyPBQaZBvj2/giphy.gif"/>')
.addTo(map);
});
map.on('mouseleave', 'routes-google', function() {
map.getCanvas().style.cursor = '';
popup.remove();
});
*/
| mit |
Microsoft/ProjectOxford-ClientSDK | Face/Android/ClientLibrary/lib/src/main/java/com/microsoft/projectoxford/face/contract/Glasses.java | 1645 | //
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services
//
// Microsoft Cognitive Services (formerly Project Oxford) GitHub:
// https://github.com/Microsoft/ProjectOxford-ClientSDK/
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// 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.microsoft.projectoxford.face.contract;
/**
* Glasses types
*/
public enum Glasses {
NoGlasses, Sunglasses, ReadingGlasses, SwimmingGoggles
}
| mit |
xuan6/admin_dashboard_local_dev | node_modules/react-icons-kit/md/ic_email.js | 308 | "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var ic_email = exports.ic_email = { "viewBox": "0 0 24 24", "children": [{ "name": "path", "attribs": { "d": "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z" } }] }; | mit |
vimeo/psalm | src/Psalm/Node/Expr/BinaryOp/VirtualGreater.php | 206 | <?php
declare(strict_types=1);
namespace Psalm\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp\Greater;
use Psalm\Node\VirtualNode;
class VirtualGreater extends Greater implements VirtualNode
{
}
| mit |
matiasleidemer/lotus-bookshelf | spec/web/views/books/new_spec.rb | 765 | require 'spec_helper'
require_relative '../../../../apps/web/views/books/new'
class NewBookParams < Lotus::Action::Params
param :book do
param :title, presence: true
param :author, presence: true
end
end
describe Web::Views::Books::New do
let(:params) { NewBookParams.new({}) }
let(:exposures) { Hash[params: params] }
let(:template) { Lotus::View::Template.new('apps/web/templates/books/new.html.erb') }
let(:view) { Web::Views::Books::New.new(template, exposures) }
let(:rendered) { view.render }
it 'displays list of errors when params contains errors' do
params.valid? # trigger validations
rendered.must_include('There was a problem with your submission')
rendered.must_include('title is required')
end
end
| mit |
jotatoledo/cqrs_web_api | CQRSExample.WebAPI/App_Start/UnityConfig.cs | 5165 | using System;
using Microsoft.Practices.Unity;
using CQRSExample.Data.Sql.StarterDb;
using MediatR;
using System.Reflection;
using System.Linq;
namespace CQRSExample.WebAPI.App_Start
{
internal static class IUnityContainerExtensionsMediatR
{
public static IUnityContainer RegisterMediator(this IUnityContainer container, LifetimeManager lifetimeManager)
{
return container.RegisterType<IMediator, Mediator>(lifetimeManager)
.RegisterInstance<SingleInstanceFactory>(t => container.IsRegistered(t) ? container.Resolve(t) : null)
.RegisterInstance<MultiInstanceFactory>(t => container.IsRegistered(t) ? container.ResolveAll(t) : new object[0]);
}
public static IUnityContainer RegisterMediatorHandlers(this IUnityContainer container, Assembly assembly)
{
return container.RegisterTypesImplementingType(assembly, typeof(IRequestHandler<>))
.RegisterTypesImplementingType(assembly, typeof(IRequestHandler<,>))
.RegisterTypesImplementingType(assembly, typeof(IAsyncRequestHandler<>))
.RegisterTypesImplementingType(assembly, typeof(IAsyncRequestHandler<,>))
.RegisterTypesImplementingType(assembly, typeof(INotificationHandler<>))
.RegisterTypesImplementingType(assembly, typeof(IAsyncNotificationHandler<>));
}
/// <summary>
/// Register all implementations of a given type for provided assembly.
/// </summary>
public static IUnityContainer RegisterTypesImplementingType(this IUnityContainer container, Assembly assembly, Type type)
{
foreach (var implementation in assembly.GetTypes().Where(t => t.GetInterfaces().Any(implementation => IsSubclassOfRawGeneric(type, implementation))))
{
var interfaces = implementation.GetInterfaces();
foreach (var @interface in interfaces)
container.RegisterType(@interface, implementation);
}
return container;
}
private static bool IsSubclassOfRawGeneric(Type generic, Type toCheck)
{
while (toCheck != null && toCheck != typeof(object))
{
var currentType = toCheck.IsGenericType ? toCheck.GetGenericTypeDefinition() : toCheck;
if (generic == currentType)
return true;
toCheck = toCheck.BaseType;
}
return false;
}
}
internal static class IocExtensions
{
public static void BindInRequestScope<T1, T2>(this IUnityContainer container) where T2 : T1
{
container.RegisterType<T1, T2>(new PerRequestLifetimeManager());
}
public static void BindInRequestScope<T1, T2>(this IUnityContainer container, InjectionConstructor constructor) where T2 : T1
{
container.RegisterType<T1, T2>(new PerRequestLifetimeManager(), constructor);
}
public static void BindInSingletonScope<T1, T2>(this IUnityContainer container) where T2 : T1
{
container.RegisterType<T1, T2>(new ContainerControlledLifetimeManager());
}
}
/// <summary>
/// Specifies the Unity configuration for the main container.
/// </summary>
public class UnityConfig
{
private static Lazy<IUnityContainer> container = new Lazy<IUnityContainer>(() =>
{
var container = new UnityContainer();
return RegisterTypes(container)
.RegisterMediator(new HierarchicalLifetimeManager())
.RegisterMediatorHandlers(Assembly.Load("CQRSExample.Domain.Plants"))
.RegisterMediatorHandlers(Assembly.Load("CQRSExample.Domain.Workcenters"))
.RegisterMediatorHandlers(Assembly.Load("CQRSExample.Domain.MaterialNumbers"));
});
/// <summary>
/// Gets the configured Unity container.
/// </summary>
public static IUnityContainer GetConfiguredContainer()
{
return container.Value;
}
/// <summary>Registers the type mappings with the Unity container.</summary>
/// <param name="container">The unity container to configure.</param>
/// <remarks>There is no need to register concrete types such as controllers or API controllers (unless you want to
/// change the defaults), as Unity allows resolving a concrete type even if it was not previously registered.</remarks>
public static IUnityContainer RegisterTypes(IUnityContainer container)
{
// EF context
container.RegisterType<StarterDbEntities>(new PerRequestLifetimeManager());
// AutoMapper instance, one per application.
var mapperConfig = AutoMapperConfig.GetMapperConfiguration();
var mapper = mapperConfig.CreateMapper();
container.RegisterInstance(mapper)
.RegisterInstance(mapperConfig);
return container;
}
}
} | mit |
humweb/push-notify | tests/AuthManagerTest.php | 1318 | <?php
namespace Humweb\PushNotify\Tests;
use Humweb\PushNotify\Auth;
use Humweb\PushNotify\Auth\BaseAuth;
use Humweb\PushNotify\Auth\Sentinel;
use Humweb\PushNotify\Tests\Stubs\SentinelAuth;
class AuthManagerTest extends TestCase
{
protected $manager;
/**
* Setup the test environment.
*/
public function setUp()
{
parent::setUp();
$this->manager = new Auth($this->app);
}
/**
* @test
*/
public function it_creates_laravel_driver()
{
$auth = $this->manager->driver('laravel');
$this->assertInstanceOf('Humweb\PushNotify\Auth\BaseAuth', $auth);
}
/**
* @test
*/
public function it_sets_and_gets_default_driver()
{
$this->manager->setDefaultDriver('laravel');
$auth = $this->manager->driver();
$this->assertEquals('laravel', $this->manager->getDefaultDriver());
$this->assertInstanceOf('Humweb\PushNotify\Auth\BaseAuth', $auth);
}
/**
* @test
*/
public function it_creates_sentinel_driver()
{
$this->app->singleton('sentinel', function () {
return new SentinelAuth();
});
$auth = $this->manager->driver('sentinel');
$this->assertInstanceOf('Humweb\PushNotify\Auth\Sentinel', $auth);
}
}
| mit |
cstallings1/phase-0 | week-4/errors.rb | 8634 | # Analyze the Errors
# I worked on this challenge [by myself].
# I spent [1] hour 10 min. on this challenge.
# --- error -------------------------------------------------------
# cartmans_phrase = "Screw you guys " + "I'm going home."
# This error was analyzed in the README file.
# --- error -------------------------------------------------------
# def cartman_hates(thing)
# while true
# puts "What's there to hate about #{thing}?"
# end
# end
# This is a tricky error. The line number may throw you off.
# 1. What is the name of the file with the error?
# The name of the file is errors.rb
# 2. What is the line number where the error occurs?
# Line number 170
# 3. What is the type of error message?
# This error is a syntax error.
# 4. What additional information does the interpreter provide about this type of error?
# It was expecting the word "end".
# 5. Where is the error in the code?
# The error is after line 15 where there should be an 'end' to the while loop.
# 6. Why did the interpreter give you this error?
# Ruby requires you to specify when to end an action. This includes adding 'end' to methods, loops, etc.
# --- error -------------------------------------------------------
# south_park
# 1. What is the line number where the error occurs?
# The error is in line number 36.
# 2. What is the type of error message?
# It's a NameError.
# 3. What additional information does the interpreter provide about this type of error?
# It tells us that 'south_park' is an undefined local variable or method, it was never defined in the program.
# 4. Where is the error in the code?
# The error is in line 36, 'south_park' needs to be defined as a variable or method. It could also be deleted if it's not needed.
# 5. Why did the interpreter give you this error?
# Ruby doesn't allow words to be included in the program if they aren't assigned to anything. This helps to keep the code logical and organized.
# --- error -------------------------------------------------------
# def cartman()
# end
# 1. What is the line number where the error occurs?
# Line number 51.
# 2. What is the type of error message?
# It's called a NoMethodError.
# 3. What additional information does the interpreter provide about this type of error?
# It explains that 'carman()' is not a valid method, it is missing the 'def' and 'end' that would make it a valid method.
# 4. Where is the error in the code?
# The error is line 51 and 52 where you add 'def' in line 51 and 'end' on line 52.
# 5. Why did the interpreter give you this error?
# Ruby only allows method to be written a certain way, they must include 'def' and 'end' at the very least.
# --- error -------------------------------------------------------
# def cartmans_phrase
# puts "I'm not fat; I'm big-boned!"
# end
# cartmans_phrase
# 1. What is the line number where the error occurs?
# Line number 67.
# 2. What is the type of error message?
# It's an ArgumentError.
# 3. What additional information does the interpreter provide about this type of error?
# The method doesn't take any parameters but when the method is called on line 71 it's providing an argument.
# 4. Where is the error in the code?
# The error is in line 67 or 71. You could either add a parameter to the method or remove the argument when the method is called on line 71.
# 5. Why did the interpreter give you this error?
# Ruby requeires the number of arguments in the method to match the number of parameters in the corresponding method.
# --- error -------------------------------------------------------
# def cartman_says(offensive_message)
# puts offensive_message
# end
# cartman_says("Respect my authoritah!")
# 1. What is the line number where the error occurs?
# Line number 86.
# 2. What is the type of error message?
# It's an ArgumentError.
# 3. What additional information does the interpreter provide about this type of error?
# This time the method expects one argument to be passed to it, but no arguments are passed when the method is called in line 90.
# 4. Where is the error in the code?
# There error is either in line 86 or 90, you could remove the parameter from the method or add an argument when the method is called on line 90.
# 5. Why did the interpreter give you this error?
# It's the same reason as before just reversed. The number of parameters in a method and arguments passed much match.
# --- error -------------------------------------------------------
# def cartmans_lie(lie, name)
# puts "#{lie}, #{name}!"
# end
# cartmans_lie('A meteor the size of the earth is about to hit Wyoming!', 'Kyle')
# 1. What is the line number where the error occurs?
# Line number 107.
# 2. What is the type of error message?
# It's an ArgumentError.
# 3. What additional information does the interpreter provide about this type of error?
# Again it's the wrong number of arguments, one agrument was provided when the method expected two.
# 4. Where is the error in the code?
# The error is in line 111 where it's missing the second argument or in line 107 where you could remove the last parameter.
# 5. Why did the interpreter give you this error?
# The number of parameters did not match the number of arguments passed.
# --- error -------------------------------------------------------
# "Respect my authoritay!" * 5
# 1. What is the line number where the error occurs?
# Line 126.
# 2. What is the type of error message?
# It's a TypeError.
# 3. What additional information does the interpreter provide about this type of error?
# We are trying to multiply the Fixnum 5 by a string, this isn't possible.
# 4. Where is the error in the code?
# The error is line 126 where we need to change the order of the Fixnum and string. We can multiply the string by 5 if we change the order.
# 5. Why did the interpreter give you this error?
# Ruby reads left to right which would be the same as taking the number 5 multiplied by a string which isn't possible.
# --- error -------------------------------------------------------
# amount_of_kfc_left = 0/20
# 1. What is the line number where the error occurs?
# Line number 141.
# 2. What is the type of error message?
# It's a ZeroDivisionError.
# 3. What additional information does the interpreter provide about this type of error?
# It's telling us there is an issue with dividing by zero.
# 4. Where is the error in the code?
# The error is in line 141, 20 divided by 0 is infinity so we would need to make the equation valid, we could change it to '0/20'.
# 5. Why did the interpreter give you this error?
# Ruby performs math like a calculator. If you type '20/0' into a calculator you will get an error becuase it can't display infinity as a number; this is essentially what Ruby is doing.
# --- error -------------------------------------------------------
# require_relative "cartmans_essay.md"
# 1. What is the line number where the error occurs?
# Line 157.
# 2. What is the type of error message?
# It's a require_relative load error.
# 3. What additional information does the interpreter provide about this type of error?
# The error message is telling us we can't load the "cartmans_essay.md" file because it doesn't exist in the relative file path we gave it.
# 4. Where is the error in the code?
# The error is due to the fact that we don't have a file called "cartmans_essay.md" to load. We would have to add a file with that name to our current directory or remove this line altogether to get rid of the error.
# 5. Why did the interpreter give you this error?
# We told the program to require a file that doesn't exist and the interpreter is letting us know this. It can't load a file that isn't there.
# --- REFLECTION -------------------------------------------------------
# Write your reflection below as a comment.
=begin
-Which error was the most difficult to read?
The first error was most difficult to read because the line number it provided as the issue was the last line of the program. I understand why but it's not as straight forward as other errors.
-How did you figure out what the issue with the error was?
The error message mentioned the method name so I knew I should be inspecting the method looking for a syntax error.
-Were you able to determine why each error message happened based on the code?
Yes, I was able to figure out why each error happened.
-When you encounter errors in your future code, what process will you follow to help you debug?
I'll start with reading the error message and just figure out what it's trying to tell me, then I'll go to the line given in the error message and start there looking for the error.
=end
| mit |
uniquoooo/CSManager | src/Manager/Migrations/Maps.php | 1752 | <?php
/*
* This file is apart of the CSManager project.
*
* Copyright (c) 2016 David Cole <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the LICENSE file.
*/
namespace Manager\Migrations;
class Maps
{
/**
* Runs the migrations.
*
* @param Blueprint $table
*
* @return void
*/
public function up($table)
{
$table->increments('id');
$table->integer('match_id')->unsigned();
$table->foreign('match_id')->references('id')
->on('matches')
->onDelete('cascade');
$table->string('map')->default('de_dust2');
$table->integer('score_a')->default(0);
$table->integer('score_b')->default(0);
$table->integer('current_round')->default(0);
/*
* Statuses:
*
* 0. Not Started
* 1. Starting
* 2. Pre-Game Warmup
* 3. Knife Round
* 4. Knife Winners Deciding
* 5. First Half Warmup
* 6. First Half
* 7. Second Half Warmup
* 8. Second Half
* 9. Overtime Warmup
* 10. Overtime
* 11. Finished
*/
$table->integer('status')->default(0);
$table->boolean('is_paused')->default(false);
$table->string('team_paused')->nullable();
$table->boolean('team_a_unpause')->default(false);
$table->boolean('team_b_unpause')->default(false);
$table->string('current_side')->default('ct');
$table->boolean('t_ready')->default(false);
$table->boolean('ct_ready')->default(false);
$table->timestamps();
}
}
| mit |
MatthieuSegret/graphql-rails-blog | client/src/components/flash/flashMessageLocalLink.ts | 883 | import { withClientState } from 'apollo-link-state';
import FLASH_MESSAGE from 'graphql/flash/flashMessageQuery.graphql';
// typings
import { DataProxy } from 'apollo-cache';
import { FlashMessage } from 'types';
export const flashMessageLocalLink = withClientState({
Query: {
// provide an initial state
message: () => null
},
Mutation: {
// update values in the store on mutations
createFlashMessage(_: any, { type, text }: FlashMessage, { cache }: { cache: DataProxy }) {
const data = {
message: { type, text, __typename: 'FlashMessage' }
};
cache.writeQuery({ query: FLASH_MESSAGE, data });
return null;
},
deleteFlashMessage(_: any, {}, { cache }: { cache: DataProxy }) {
const data = {
message: null
};
cache.writeQuery({ query: FLASH_MESSAGE, data });
return null;
}
}
});
| mit |
SkyIsTheLimit/vacation-planner | src/polyfills.ts | 2506 | /* tslint:disable */
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/set';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/** IE10 and IE11 requires the following to support `@angular/animation`. */
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
/** ALL Firefox browsers require the following to support `@angular/animation`. **/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/***************************************************************************************************
* Zone JS is required by Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
/**
* Date, currency, decimal and percent pipes.
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
*/
import 'intl'; // Run `npm install --save intl`.
/**
* Need to import at least one locale-data with intl.
*/
import 'intl/locale-data/jsonp/en'; | mit |
kbond/ZenstruckBackupBundle | tests/DependencyInjection/Compiler/ProfileCompilerPassTest.php | 914 | <?php
namespace Zenstruck\BackupBundle\Tests\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Zenstruck\BackupBundle\DependencyInjection\Compiler\ProfileCompilerPass;
/**
* @author Kevin Bond <[email protected]>
*/
class ProfileCompilerPassTest extends RegisterCompilerPassTest
{
/**
* {@inheritdoc}
*/
protected function getRegistrarDefinitionName()
{
return 'zenstruck_backup.profile_registry';
}
/**
* {@inheritdoc}
*/
protected function getTagName()
{
return 'zenstruck_backup.profile';
}
/**
* {@inheritdoc}
*/
protected function getMethodName()
{
return 'add';
}
/**
* {@inheritdoc}
*/
protected function registerCompilerPass(ContainerBuilder $container)
{
$container->addCompilerPass(new ProfileCompilerPass());
}
}
| mit |
dragosmocrii/picnic | src/Mjolnic/Picnic/Task.php | 1814 | <?php
namespace Mjolnic\Picnic;
class Task {
/**
*
* @var string
*/
public $publicPath = false;
/**
* Task name (thumb folder name)
* @var string
*/
public $name;
/**
*
* @var string
*/
public $params = array();
/**
*
* @var string
*/
public $prefix;
/**
*
* @var string
*/
public $filename;
/**
*
* @var string
*/
public $extension;
/**
* Full origin file path
* @var string
*/
public $origPath;
/**
* Full origin file path
* @var string
*/
public $origFile;
/**
* Destination folder name (not path)
* @var string
*/
public $destPath;
/**
* Full destination file path
* @var string
*/
public $destFile;
/**
*
* @var \WideImage\Image
*/
public $image;
public function __construct($path, $filename, $extension, $publicPath) {
$this->publicPath = $publicPath;
$path = explode('/', $path);
$this->name = array_pop($path);
$params = explode('_', $this->name);
$this->prefix = array_shift($params); //remove the folder task from the params
$this->params = $params;
$this->filename = $filename;
$this->extension = $extension;
$this->origPath = $publicPath . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $path) . DIRECTORY_SEPARATOR;
$this->origFile = $this->origPath . $this->filename;
$this->destPath = $this->origPath . $this->name . DIRECTORY_SEPARATOR;
$this->destFile = $this->destPath . $this->filename;
}
public function isValid() {
return is_readable($this->origFile) and is_writable($this->origPath);
}
}
| mit |
octawyan12/proiect.tw | src/Manager/AdminBundle/Repository/ProductRepository.php | 269 | <?php
namespace Manager\AdminBundle\Repository;
use Doctrine\ORM\EntityRepository;
/**
* ProductRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class ProductRepository extends EntityRepository
{
}
| mit |
ReapeR-MaxPayne/SU-TM-PF-Ext-0517-Excersises-CSharp | 06-Lists-Exercises/Problem_02_Track Downloader/Properties/AssemblyInfo.cs | 1430 | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Problem_02_Track Downloader")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Problem_02_Track Downloader")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("742127ba-2058-44b6-a4ce-d83d71963669")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| mit |
doug-martin/it | lib/browser/formatters/html.js | 6272 | "use strict";
var _ = require("../../extended"),
AssertionError = require("assert").AssertionError,
Reporter = require("../../formatters/reporter"),
format = _.format,
arraySlice = Array.prototype.slice;
var pluralize = function (count, str) {
return count !== 1 ? str + "s" : str;
};
function getSpacing(action) {
return action.level * 2.5 + "em";
}
function createDom(type, attrs) {
var el = document.createElement(type);
_(arraySlice.call(arguments, 2)).forEach(function (child) {
if (_.isString(child)) {
el.appendChild(document.createTextNode(child));
} else if (child) {
el.appendChild(child);
}
});
_(attrs || {}).forEach(function (attrs, attr) {
if (attr === "className") {
el[attr] = attrs;
} else {
el.setAttribute(attr, attrs);
}
});
return el;
}
function updateActionStatus(action, status) {
var els = document.querySelectorAll('[data-it-actionName="' + action.get("fullName") + '"]');
for (var i = 0, l = els.length; i < l; i++) {
var el = els.item(i), className = el.className;
el.className = className.replace(/(not-run|pending|error|passed) */ig, "") + " " + status;
}
}
Reporter.extend({
instance: {
constructor: function (el) {
this._super(arguments);
this.el = document.getElementById(el);
this.header = this.el.appendChild(createDom("div", {className: "header"}, createDom("h1", {}, createDom("a", {href: "?"}, "It"))));
this.summary = this.header.appendChild(createDom("div", {className: "summary"}));
this.progress = this.el.appendChild(createDom("ul", {className: "progress"}));
this.actions = this.el.appendChild(createDom("div", {className: "actions"}));
this.errors = [];
if (!this.el) {
throw new Error("Unable to find el with id #" + el);
}
},
listenAction: function (action) {
this._super(arguments);
var actionName = action.get("fullName");
this.progress.appendChild(createDom("li", {className: "not-run", "data-it-actionName": actionName}));
},
testRun: function printTitle(action) {
if (action.description) {
this.actions.appendChild(createDom("div",
{className: "header", style: "padding-left:" + getSpacing(action), "data-it-actionName": action.get("fullName")},
createDom("a", {
href: "?filter=" + encodeURIComponent(action.get("fullName"))
}, action.description)
));
}
},
__addAction: function (action) {
var summary = action.get("summary");
this.actions.appendChild(createDom("div",
{className: "pending", style: "padding-left:" + getSpacing(action), "data-it-actionName": action.get("fullName")},
createDom("a", {
href: "?filter=" + encodeURIComponent(action.get("fullName"))
}, format(" %s, (%dms)", action.description, summary.duration))
));
updateActionStatus(action, summary.status);
return this;
},
__formatError: function (error) {
var str = error.stack || error.toString();
if (error instanceof AssertionError) {
str = error.toString() + "\n" + (error.stack || "").replace(/AssertionError.*\n/, "");
}
if (error.message) {
// FF / Opera do not add the message
if (!~str.indexOf(error.message)) {
str = error.message + '\n' + str;
}
// <=IE7 stringifies to [Object Error]. Since it can be overloaded, we
// check for the result of the stringifying.
if ('[object Error]' === str) {
str = error.message;
}
}
// Safari doesn't give you a stack. Let's at least provide a source line.
if (!error.stack && error.sourceURL && error.line !== undefined) {
str += "\n(" + error.sourceURL + ":" + error.line + ")";
}
return str;
},
actionSuccess: function (action) {
this.__addAction(action);
},
actionSkipped: function (action) {
this.__addAction(action);
},
actionPending: function (action) {
this.__addAction(action);
},
actionError: function printError(action) {
this._super(arguments);
this.__addAction(action);
},
printErrors: function () {
if (this.errors.length) {
//clear all actions
this.actions.innerHTML = "";
_(this.errors).forEach(function (test, i) {
var error = test.error, action = test.test;
this.actions.appendChild(createDom("pre",
{className: "failed"},
format(' %s) %s:', i, action.get("fullName")),
createDom("br"),
this.__formatError(error).replace(/^/gm, ' ')
));
}, this);
}
},
printFinalSummary: function (test) {
var summary = test.summary;
var stats = this.processSummary(summary);
var errCount = stats.errCount, successCount = stats.successCount, pendingCount = stats.pendingCount, duration = stats.duration;
var out = [
"Duration " + this.formatMs(duration),
successCount + pluralize(successCount, " example"),
errCount + pluralize(errCount, " error"),
pendingCount + " pending"
];
this.summary.appendChild(createDom("div",
{className: pendingCount > 0 ? "pending" : errCount > 0 ? "failed" : "success"},
out.join(", ")));
this.printErrors();
return errCount ? 1 : 0;
}
}
}).as(module).registerType("html"); | mit |
plrthink/react-native-zip-archive | index.d.ts | 907 | declare module 'react-native-zip-archive' {
enum encryptionMethods {
'STANDARD',
'AES-128',
'AES-256'
}
import { NativeEventSubscription } from 'react-native';
export function isPasswordProtected(source: string): Promise<boolean>;
export function zip(source: string | string[], target: string): Promise<string>;
export function zipWithPassword(source: string | string[], target: string, password: string, encryptionMethod?: encryptionMethods): Promise<string>;
export function unzip(source: string, target: string, charset?: string): Promise<string>;
export function unzipWithPassword(assetPath: string, target: string, password: string): Promise<string>;
export function unzipAssets(assetPath: string, target: string): Promise<string>;
export function subscribe(callback: ({ progress, filePath }: { progress: number, filePath: string }) => void): NativeEventSubscription;
}
| mit |
Blaubot/Blaubot | blaubot/src/main/java/eu/hgross/blaubot/admin/BowDownToNewKingAdminMessage.java | 3689 | package eu.hgross.blaubot.admin;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.List;
import eu.hgross.blaubot.core.BlaubotConstants;
import eu.hgross.blaubot.core.acceptor.ConnectionMetaDataDTO;
import eu.hgross.blaubot.messaging.BlaubotMessage;
/**
* Informs the peasants and the prince that they have to join another king's kingdom.
*
* @author Henning Gross {@literal ([email protected])}
*
*/
public class BowDownToNewKingAdminMessage extends AbstractAdminMessage {
private class MessageDTO {
String uniqueDeviceId;
List<ConnectionMetaDataDTO> connectionMetaDataList;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
MessageDTO that = (MessageDTO) o;
if (connectionMetaDataList != null ? !connectionMetaDataList.equals(that.connectionMetaDataList) : that.connectionMetaDataList != null)
return false;
if (uniqueDeviceId != null ? !uniqueDeviceId.equals(that.uniqueDeviceId) : that.uniqueDeviceId != null)
return false;
return true;
}
@Override
public int hashCode() {
int result = uniqueDeviceId != null ? uniqueDeviceId.hashCode() : 0;
result = 31 * result + (connectionMetaDataList != null ? connectionMetaDataList.hashCode() : 0);
return result;
}
}
private MessageDTO data;
public BowDownToNewKingAdminMessage(String uniqueDeviceId, List<ConnectionMetaDataDTO> connectionMetaDataList) {
super(CLASSIFIER_BOW_DOWN_TO_NEW_KING);
this.data = new MessageDTO();
this.data.connectionMetaDataList = connectionMetaDataList;
this.data.uniqueDeviceId= uniqueDeviceId;
}
public BowDownToNewKingAdminMessage(BlaubotMessage rawMessage) {
super(rawMessage);
}
@Override
protected byte[] payloadToBytes() {
String strToSend = gson.toJson(data);
return strToSend.getBytes(BlaubotConstants.STRING_CHARSET);
}
@Override
protected void setUpFromBytes(ByteBuffer messagePayloadAsBytes) {
byte[] stringBytes = Arrays.copyOfRange(messagePayloadAsBytes.array(), messagePayloadAsBytes.position(), messagePayloadAsBytes.capacity());
String readString = new String(stringBytes, BlaubotConstants.STRING_CHARSET);
this.data = gson.fromJson(readString, MessageDTO.class);
}
/**
*
* @return the discovered king's unique device id
*/
public String getNewKingsUniqueDeviceId() {
return data.uniqueDeviceId;
}
/**
*
* @return the meta data for the device's connectors
*/
public List<ConnectionMetaDataDTO> getNewKingsConnectionMetaDataList() {
return this.data.connectionMetaDataList;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("BowDownToNewKingAdminMessage{");
sb.append("data=").append(data);
sb.append('}');
return sb.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
BowDownToNewKingAdminMessage that = (BowDownToNewKingAdminMessage) o;
if (data != null ? !data.equals(that.data) : that.data != null) return false;
return true;
}
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (data != null ? data.hashCode() : 0);
return result;
}
}
| mit |
royaltm/node-murmurhash-native | test/randomchunkstream.js | 817 | "use strict";
var crypto = require('crypto');
var stream = require('stream');
var Readable = stream.Readable;
require('util').inherits(RandomChunkStream, Readable);
module.exports = RandomChunkStream;
function RandomChunkStream(options) {
this.maxchunksize = options.maxchunksize>>>0;
this.size = options.size>>>0;
this.buffer = Buffer.allocUnsafe(this.size);
this.cursor = 0;
Readable.call(this, options);
}
RandomChunkStream.prototype._read = function() {
var buffer = this.buffer;
var slicelen = (Math.random()*this.maxchunksize|0) + 1;
slicelen = Math.min(slicelen, this.size - this.cursor);
crypto.randomBytes(slicelen).copy(buffer, this.cursor);
var n = this.cursor + slicelen;
this.push(buffer.slice(this.cursor, n));
this.cursor = n;
if (n >= this.size)
this.push(null);
};
| mit |
Quokkalinchen/The-Code-Hustlers | node_modules/@angular/cli/blueprints/module/index.js | 2223 | "use strict";
const path = require('path');
const Blueprint = require('../../ember-cli/lib/models/blueprint');
const dynamicPathParser = require('../../utilities/dynamic-path-parser');
const getFiles = Blueprint.prototype.files;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Blueprint.extend({
description: '',
availableOptions: [
{ name: 'spec', type: Boolean },
{ name: 'flat', type: Boolean },
{ name: 'routing', type: Boolean, default: false }
],
normalizeEntityName: function (entityName) {
this.entityName = entityName;
const parsedPath = dynamicPathParser(this.project, entityName);
this.dynamicPath = parsedPath;
return parsedPath.name;
},
locals: function (options) {
options.flat = options.flat !== undefined ?
options.flat :
this.project.ngConfigObj.get('defaults.module.flat');
options.spec = options.spec !== undefined ?
options.spec :
this.project.ngConfigObj.get('defaults.module.spec');
return {
dynamicPath: this.dynamicPath.dir,
spec: options.spec,
routing: options.routing
};
},
files: function () {
let fileList = getFiles.call(this);
if (!this.options || !this.options.spec) {
fileList = fileList.filter(p => p.indexOf('__name__.module.spec.ts') < 0);
}
if (this.options && !this.options.routing) {
fileList = fileList.filter(p => p.indexOf('__name__-routing.module.ts') < 0);
}
return fileList;
},
fileMapTokens: function (options) {
// Return custom template variables here.
this.dasherizedModuleName = options.dasherizedModuleName;
return {
__path__: () => {
this.generatePath = this.dynamicPath.dir;
if (!options.locals.flat) {
this.generatePath += path.sep + options.dasherizedModuleName;
}
return this.generatePath;
}
};
}
});
//# sourceMappingURL=/Users/hansl/Sources/angular-cli/packages/@angular/cli/blueprints/module/index.js.map | mit |
falling-sky/happy-eye-test | hedata.js | 3593 | /*global GIGO, MirrorConfig, jQuery, window, alert, Browser */
/*jslint browser: true */
/*jslint regexp: true */
/*
TODO: Detect if window is backgrounded and hidden.
If so, limit how many more times we run (say, to 1000 or 10000, or to 1 hour).
If brought to foreground, unblock.
http://stackoverflow.com/questions/1760250/how-to-tell-if-browser-tab-is-active
*/
var GIGO = {}; // We will use this as a name space.
// https://github.com/benjamingr/RegExp.escape/blob/master/polyfill.js
if(!RegExp.escape){
RegExp.escape = function(s){
return String(s).replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
};
}
GIGO.getms = function() {
var d = new Date();
return d.getTime();
}
maketd = function(t) {
var text1 = document.createTextNode(t);
var td1 = document.createElement('td');
td1.appendChild(text1);
return td1;
}
maketh = function(t) {
var text1 = document.createTextNode(t);
var th1 = document.createElement('th');
th1.appendChild(text1);
return th1;
}
var last_re;
var last_min;
last_re = "";
last_min = 0;
check_changed = function() {
var min, re;
if (check_changed.busy) {
return;
}
check_changed.busy = 1;
try {
min = parseInt($("#min").val());
} catch(err) {
min=0
}
try {
var user_re = $("#regex").val();
re = new RegExp(user_re, "i");
} catch(err) {
$("#content").html("bad regexp entered");
re = "undefined bad regexp";
}
if ((String(last_re) !== String(re)) || (last_min !== min)) {
dosearch(min,re);
last_re = re;
last_min = min;
}
check_changed.busy = 0;
}
make_happy_color = function(happy) {
/* Make a color */
var red = Math.floor(.75*(100 - happy));
var green = Math.floor(.75*(happy));
var blue = 0;
var color = 'rgb(' + red + '%,' + green + '%,' + blue + '%)';
return color;
}
use_my_ua = function() {
var ua = String(navigator.userAgent);
var uae = RegExp.escape(ua);
uae = '^' + uae + '$';
$("#regex").val(uae);
}
dosearch = function(min, re) {
/* replace <div id=content> */
var ipv4;
var ipv6;
var total;
var i;
if (! re) {
return;
}
/* Okay, we know what we're searching for now. */
ipv4 = 0;
ipv6 = 0;
total = 0;
var i;
var table = document.createElement('table');
var heading_tr = document.createElement('tr');
table.appendChild(heading_tr);
heading_tr.appendChild(maketh("IPv6"));
heading_tr.appendChild(maketh("Total"));
heading_tr.appendChild(maketh("User Agent"));
var top_tr = document.createElement('tr');
table.appendChild(top_tr);
for ( var i = 0 ; i < hedata.length ; i++ ) {
var ref = hedata[i];
if ((ref.total >= min) && (ref.ua.match(re))) {
/* We do want it. */
ipv4 = ipv4 + ref.ipv4;
ipv6 = ipv6 + ref.ipv6;
total = total + ref.total;
if (!ipv4) {
ipv4 = 0;
}
if (!ipv6) {
ipv6 = 0;
}
/* We also need to build a presentation up. */
var tr = document.createElement('tr');
tr.appendChild(maketd(ref.happy.toFixed(2) + '%'));
tr.appendChild(maketd(ref.total))
tr.appendChild(maketd(ref.ua));
tr.style.color = make_happy_color(ref.happy);
table.appendChild(tr);
}
}
/* Total stats */
var happy = 100 * ipv6 / total;
top_tr.appendChild(maketd(happy.toFixed(2) + '%'));
top_tr.appendChild(maketd(total));
top_tr.appendChild(maketd("TOTAL"));
top_tr.style.color = make_happy_color(happy);
$("#content").html("");
$("#content").append(table);
}
| mit |
EmoLens/EmoLens | Assets/HoloToolkit/Utilities/Scripts/Extensions/TransformExtensions.cs | 4786 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
namespace HoloToolkit.Unity
{
public static class TransformExtensions
{
/// <summary>
/// An extension method that will get you the full path to an object.
/// </summary>
/// <param name="transform">The transform you wish a full path to.</param>
/// <param name="delimiter">The delimiter with which each object is delimited in the string.</param>
/// <param name="prefix">Prefix with which the full path to the object should start.</param>
/// <returns>A delimited string that is the full path to the game object in the hierarchy.</returns>
public static string GetFullPath(this Transform transform, string delimiter = ".", string prefix = "/")
{
StringBuilder stringBuilder = new StringBuilder();
GetFullPath(stringBuilder, transform, delimiter, prefix);
return stringBuilder.ToString();
}
private static void GetFullPath(StringBuilder stringBuilder, Transform transform, string delimiter, string prefix)
{
if (transform.parent == null)
{
stringBuilder.Append(prefix);
}
else
{
GetFullPath(stringBuilder, transform.parent, delimiter, prefix);
stringBuilder.Append(delimiter);
}
stringBuilder.Append(transform.name);
}
/// <summary>
/// Enumerates all children in the hierarchy starting at the root object.
/// </summary>
/// <param name="root">Start point of the traversion set</param>
public static IEnumerable<Transform> EnumerateHierarchy(this Transform root)
{
if (root == null) { throw new ArgumentNullException("root"); }
return root.EnumerateHierarchyCore(new List<Transform>(0));
}
/// <summary>
/// Enumerates all children in the hierarchy starting at the root object except for the branches in ignore.
/// </summary>
/// <param name="root">Start point of the traversion set</param>
/// <param name="ignore">Transforms and all its children to be ignored</param>
public static IEnumerable<Transform> EnumerateHierarchy(this Transform root, ICollection<Transform> ignore)
{
if (root == null) { throw new ArgumentNullException("root"); }
if (ignore == null)
{
throw new ArgumentNullException("ignore", "Ignore collection can't be null, use EnumerateHierarchy(root) instead.");
}
return root.EnumerateHierarchyCore(ignore);
}
/// <summary>
/// Enumerates all children in the hierarchy starting at the root object except for the branches in ignore.
/// </summary>
/// <param name="root">Start point of the traversion set</param>
/// <param name="ignore">Transforms and all its children to be ignored</param>
private static IEnumerable<Transform> EnumerateHierarchyCore(this Transform root, ICollection<Transform> ignore)
{
var transformQueue = new Queue<Transform>();
transformQueue.Enqueue(root);
while (transformQueue.Count > 0)
{
var parentTransform = transformQueue.Dequeue();
if (!parentTransform || ignore.Contains(parentTransform)) { continue; }
for (var i = 0; i < parentTransform.childCount; i++)
{
transformQueue.Enqueue(parentTransform.GetChild(i));
}
yield return parentTransform;
}
}
/// <summary>
/// Calculates the bounds of all the colliders attached to this GameObject and all it's children
/// </summary>
/// <param name="transform">Transform of root GameObject the colliders are attached to </param>
/// <returns>The total bounds of all colliders attached to this GameObject.
/// If no colliders attached, returns a bounds of center and extents 0</returns>
public static Bounds GetColliderBounds(this Transform transform)
{
Collider[] colliders = transform.GetComponentsInChildren<Collider>();
if (colliders.Length == 0) { return new Bounds(); }
Bounds bounds = colliders[0].bounds;
for (int i = 1; i < colliders.Length; i++)
{
bounds.Encapsulate(colliders[i].bounds);
}
return bounds;
}
}
} | mit |
robotii/sophielang | Sophie.Core/Objects/ObjRange.cs | 1035 | using Sophie.Core.VM;
namespace Sophie.Core.Objects
{
public sealed class ObjRange : Obj
{
// The beginning of the range.
// The end of the range. May be greater or less than [from].
// True if [to] is included in the range.
// Creates a new range from [from] to [to].
public ObjRange(double from, double to, bool isInclusive)
{
From = from;
To = to;
IsInclusive = isInclusive;
ClassObj = SophieVM.RangeClass;
}
public readonly double From;
public readonly double To;
public readonly bool IsInclusive;
public static bool Equals(ObjRange a, ObjRange b)
{
return a != null && b != null && a.From == b.From && a.To == b.To && a.IsInclusive == b.IsInclusive;
}
public override int GetHashCode()
{
return From.GetHashCode() + To.GetHashCode() + IsInclusive.GetHashCode();
}
}
}
| mit |
playpossat/blocksattime | src/qt/locale/bitcoin_es_UY.ts | 109983 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="es_UY" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About satoshimadness</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"/>
<source><b>satoshimadness</b> version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2014 The satoshimadness developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Double-click to edit address or label</source>
<translation>Doble clic para editar etiqueta o dirección </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>Copia la dirección seleccionada al portapapeles del sistema</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-46"/>
<source>These are your satoshimadness addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<source>&Copy Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a satoshimadness address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Verify a message to ensure it was signed with a specified satoshimadness address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Borrar</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+65"/>
<source>Copy &Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Edit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+250"/>
<source>Export Address Book Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Archivos separados por coma (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Etiqueta</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Direccion </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 type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Escriba la 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>Repetir nueva contraseña</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>Introduzca la nueva contraseña para el monedero. <br/> Utilice una contraseña de <b> 10 o más caracteres al azar </ b>, o <b> ocho o más palabras </ b>.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Monedero cifrado</translation>
</message>
<message>
<location line="+7"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Esta operacion necesita la contraseña del monedero para desbloquear el mismo</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Monedero destrabado</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Esta operacion necesita la contraseña del monedero para descifrar el mismo</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Monedero descifrado</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>Ingrese la contraseña anterior y la nueva de acceso a el monedero</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Confirme el 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 COINS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+103"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-133"/>
<location line="+60"/>
<source>Wallet encrypted</source>
<translation>Monedero cifrado</translation>
</message>
<message>
<location line="-58"/>
<source>satoshimadness 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>Fallo en el cifrado del monedero</translation>
</message>
<message>
<location line="-56"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Fallo en el cifrado del monedero a causa de un error interno. Su monedero no esta cifrado</translation>
</message>
<message>
<location line="+7"/>
<location line="+50"/>
<source>The supplied passphrases do not match.</source>
<translation>Las contraseñas suministradas no coinciden.</translation>
</message>
<message>
<location line="-38"/>
<source>Wallet unlock failed</source>
<translation>Fallo en el desbloqueo del mondero</translation>
</message>
<message>
<location line="+1"/>
<location line="+12"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>La contraseña introducida para el descifrado del monedero es incorrecta.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Fallo en el descifrado del monedero</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+282"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+251"/>
<source>Synchronizing with network...</source>
<translation>Sincronizando con la red...</translation>
</message>
<message>
<location line="-319"/>
<source>&Overview</source>
<translation>&Vista previa</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Mostrar descripción general del monedero</translation>
</message>
<message>
<location line="+17"/>
<source>&Transactions</source>
<translation>&transaciones </translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Buscar en el historial de transacciones</translation>
</message>
<message>
<location line="+5"/>
<source>&Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit the list of stored addresses and labels</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-13"/>
<source>&Receive coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show the list of addresses for receiving payments</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-7"/>
<source>&Send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>E&xit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Salir de la aplicacion </translation>
</message>
<message>
<location line="+6"/>
<source>Show information about satoshimadness</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Opciones...</translation>
</message>
<message>
<location line="+4"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+259"/>
<source>~%n block(s) remaining</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-256"/>
<source>&Export...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<source>Send coins to a satoshimadness address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Modify configuration options for satoshimadness</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Encrypt or decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Cambie la clave utilizada para el cifrado del monedero</translation>
</message>
<message>
<location line="+10"/>
<source>&Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-202"/>
<source>satoshimadness</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+180"/>
<source>&About satoshimadness</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Lock Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Lock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>&File</source>
<translation>&Archivo</translation>
</message>
<message>
<location line="+8"/>
<source>&Settings</source>
<translation>&Configuracion </translation>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation>&Ayuda</translation>
</message>
<message>
<location line="+12"/>
<source>Tabs toolbar</source>
<translation>Barra de herramientas</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>[prueba_de_red]</translation>
</message>
<message>
<location line="+0"/>
<location line="+60"/>
<source>satoshimadness client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+75"/>
<source>%n active connection(s) to satoshimadness network</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+40"/>
<source>Downloaded %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+413"/>
<source>Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Not staking because wallet is locked</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is syncing</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because you don't have mature coins</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-403"/>
<source>%n second(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="-312"/>
<source>About satoshimadness card</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about satoshimadness card</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>&Unlock Wallet...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+297"/>
<source>%n minute(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Up to date</source>
<translation>A la fecha</translation>
</message>
<message>
<location line="+7"/>
<source>Catching up...</source>
<translation>Ponerse al dia...</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>Transaccion enviada</translation>
</message>
<message>
<location line="+1"/>
<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 type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+15"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<location line="+15"/>
<source>URI can not be parsed! This can be caused by an invalid satoshimadness 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>El Monedero esta <b>cifrado</b> y actualmente <b>desbloqueado</b></translation>
</message>
<message>
<location line="+10"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>El Monedero esta <b>cifrado</b> y actualmente <b>bloqueado</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></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+18"/>
<source>Not staking</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitcoin.cpp" line="+109"/>
<source>A fatal error occurred. satoshimadness can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+90"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="+14"/>
<source>Coin Control</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+551"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation>Direccion </translation>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation>Fecha</translation>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-515"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+317"/>
<source>highest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium-high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>low-medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>low</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>lowest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+155"/>
<source>DUST</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>yes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transactions with higher priority get more likely into a block.
This label turns red, if the priority is smaller than "medium".
This means a fee of at least %1 per kb is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+66"/>
<source>(no label)</source>
<translation>(Sin etiqueta)</translation>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>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 type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Direccion </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>Nueva dirección de recepción </translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Nueva dirección de envío </translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Editar dirección de recepcion </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á en la libreta de direcciones.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid satoshimadness address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>No se puede abrir el monedero.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Fallo en la nueva clave generada.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+420"/>
<location line="+12"/>
<source>satoshimadness-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>Opciones</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Reserved amount does not participate in staking and is therefore spendable at any time.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Reserve</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start satoshimadness after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start satoshimadness on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Detach databases at shutdown</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the satoshimadness client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Connect to the satoshimadness network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting satoshimadness.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show satoshimadness addresses in the transaction list or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Whether to show coin control features or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Display coin &control features (experts only!)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+55"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+149"/>
<location line="+9"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting satoshimadness.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Formulario</translation>
</message>
<message>
<location line="+33"/>
<location line="+231"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the satoshimadness network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-160"/>
<source>Stake:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-107"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Spendable:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current spendable balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Total:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current total balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Transacciones recientes</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 type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+348"/>
<source>N/A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the satoshimadness-Qt help message to get a list with possible satoshimadness command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-104"/>
<source>satoshimadness - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>satoshimadness Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the satoshimadness debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-33"/>
<source>Welcome to the satoshimadness RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+182"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Enviar monedas</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 type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+35"/>
<source>0</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-19"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+86"/>
<location line="+86"/>
<location line="+32"/>
<source>0.00 MAD</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-191"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>custom change address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+106"/>
<source>Send to multiple recipients at once</source>
<translation>Enviar a varios destinatarios a la vez</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Balance:</source>
<translation>Balance:</translation>
</message>
<message>
<location line="+16"/>
<source>123.456 MAD</source>
<translation type="unfinished"/>
</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 type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-173"/>
<source>Enter a satoshimadness address (e.g. MAD1xGeKnTkaAotEVgs2rnUfVsFv8LVSM)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+86"/>
<source><b>%1</b> to %2 (%3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Confirmar el envio de monedas</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 type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>La cantidad a pagar debe ser mayor que 0.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+251"/>
<source>WARNING: Invalid satoshimadness address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>(no label)</source>
<translation>(Sin etiqueta)</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>A&Monto:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>Pagar &A:</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>Introduzca una etiqueta para esta dirección para añadirla a su libreta de direcciones</translation>
</message>
<message>
<location line="+9"/>
<source>&Label:</source>
<translation>&Etiqueta:</translation>
</message>
<message>
<location line="+18"/>
<source>The address to send the payment to (e.g. MAD1xGeKnTkaAotEVgs2rnUfVsFv8LVSM)</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>Pegar la dirección desde el 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 type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a satoshimadness address (e.g. MAD1xGeKnTkaAotEVgs2rnUfVsFv8LVSM)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+124"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-118"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. MAD1xGeKnTkaAotEVgs2rnUfVsFv8LVSM)</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>Pegar la dirección desde el 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 type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this satoshimadness address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<location line="+70"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. MAD1xGeKnTkaAotEVgs2rnUfVsFv8LVSM)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified satoshimadness address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a satoshimadness address (e.g. MAD1xGeKnTkaAotEVgs2rnUfVsFv8LVSM)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter satoshimadness signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+19"/>
<source>Open until %1</source>
<translation>Abrir hasta %1</translation>
</message>
<message numerus="yes">
<location line="-2"/>
<source>Open for %n block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+8"/>
<source>conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Fecha</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 110 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-211"/>
<source>, has not been successfully broadcast yet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>unknown</source>
<translation>desconocido</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+226"/>
<source>Date</source>
<translation>Fecha</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Direccion </translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<source>Open until %1</source>
<translation>Abrir hasta %1</translation>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+190"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+55"/>
<location line="+16"/>
<source>All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+144"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Archivos separados por coma (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Fecha</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Etiqueta</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Direccion </translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+206"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+33"/>
<source>satoshimadness version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send command to -server or satoshimadnessd</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>List commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify configuration file (default: satoshimadness.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: satoshimadnessd.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify wallet file (within data directory)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Listen for connections on <port> (default: 15714 or testnet: 25714)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Bind to given address. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Stake your coins to support network and gain reward (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Detach block and address databases. Increases shutdown time (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<source>Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-11"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+101"/>
<source>Error: Transaction creation failed </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>Error: Wallet locked, unable to create transaction </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-8"/>
<source>Importing blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Importing bootstrap blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-88"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-38"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+117"/>
<source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+61"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong satoshimadness will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-18"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-30"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-62"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+94"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-90"/>
<source>Find peers using DNS lookup (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync checkpoints policy (default: strict)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+83"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Invalid amount for -reservebalance=<amount></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-82"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-74"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-42"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<source>Unable to sign checkpoint, wrong checkpointkey?
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Verifying database integrity...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+57"/>
<source>WARNING: syncronized checkpoint violation detected, but skipped!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-48"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-54"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-84"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=satoshimadnessrpc
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 "satoshimadness Alert" [email protected]
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Find peers using internet relay chat (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Require a confirmations for change (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 2500, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Imports blocks from external blk000?.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+53"/>
<source>Error: Wallet unlocked for staking only, unable to create transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-158"/>
<source>This help message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+95"/>
<source>Wallet %s resides outside data directory %s.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot obtain a lock on data directory %s. satoshimadness is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-98"/>
<source>satoshimadness</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+140"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Loading addresses...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Error loading blkindex.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error loading wallet.dat: Wallet requires newer version of satoshimadness</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart satoshimadness to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Error: could not start node</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Invalid amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-34"/>
<source>Loading block index...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-103"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Unable to bind to %s on this computer. satoshimadness is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-97"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+55"/>
<source>Invalid amount for -mininput=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Loading wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot initialize keypool</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Done loading</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-167"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation type="unfinished"/>
</message>
</context>
</TS> | mit |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-3.1/Lib/re.py | 14330 | #
# Secret Labs' Regular Expression Engine
#
# re-compatible interface for the sre matching engine
#
# Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved.
#
# This version of the SRE library can be redistributed under CNRI's
# Python 1.6 license. For any other use, please contact Secret Labs
# AB ([email protected]).
#
# Portions of this engine have been developed in cooperation with
# CNRI. Hewlett-Packard provided funding for 1.6 integration and
# other compatibility work.
#
r"""Support for regular expressions (RE).
This module provides regular expression matching operations similar to
those found in Perl. It supports both 8-bit and Unicode strings; both
the pattern and the strings being processed can contain null bytes and
characters outside the US ASCII range.
Regular expressions can contain both special and ordinary characters.
Most ordinary characters, like "A", "a", or "0", are the simplest
regular expressions; they simply match themselves. You can
concatenate ordinary characters, so last matches the string 'last'.
The special characters are:
"." Matches any character except a newline.
"^" Matches the start of the string.
"$" Matches the end of the string or just before the newline at
the end of the string.
"*" Matches 0 or more (greedy) repetitions of the preceding RE.
Greedy means that it will match as many repetitions as possible.
"+" Matches 1 or more (greedy) repetitions of the preceding RE.
"?" Matches 0 or 1 (greedy) of the preceding RE.
*?,+?,?? Non-greedy versions of the previous three special characters.
{m,n} Matches from m to n repetitions of the preceding RE.
{m,n}? Non-greedy version of the above.
"\\" Either escapes special characters or signals a special sequence.
[] Indicates a set of characters.
A "^" as the first character indicates a complementing set.
"|" A|B, creates an RE that will match either A or B.
(...) Matches the RE inside the parentheses.
The contents can be retrieved or matched later in the string.
(?aiLmsux) Set the A, I, L, M, S, U, or X flag for the RE (see below).
(?:...) Non-grouping version of regular parentheses.
(?P<name>...) The substring matched by the group is accessible by name.
(?P=name) Matches the text matched earlier by the group named name.
(?#...) A comment; ignored.
(?=...) Matches if ... matches next, but doesn't consume the string.
(?!...) Matches if ... doesn't match next.
(?<=...) Matches if preceded by ... (must be fixed length).
(?<!...) Matches if not preceded by ... (must be fixed length).
(?(id/name)yes|no) Matches yes pattern if the group with id/name matched,
the (optional) no pattern otherwise.
The special sequences consist of "\\" and a character from the list
below. If the ordinary character is not on the list, then the
resulting RE will match the second character.
\number Matches the contents of the group of the same number.
\A Matches only at the start of the string.
\Z Matches only at the end of the string.
\b Matches the empty string, but only at the start or end of a word.
\B Matches the empty string, but not at the start or end of a word.
\d Matches any decimal digit; equivalent to the set [0-9] in
bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the whole
range of Unicode digits.
\D Matches any non-digit character; equivalent to [^\d].
\s Matches any whitespace character; equivalent to [ \t\n\r\f\v].
\S Matches any non-whitespace character; equiv. to [^ \t\n\r\f\v].
\w Matches any alphanumeric character; equivalent to [a-zA-Z0-9_]
in bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the
range of Unicode alphanumeric characters (letters plus digits
plus underscore).
With LOCALE, it will match the set [0-9_] plus characters defined
as letters for the current locale.
\W Matches the complement of \w.
\\ Matches a literal backslash.
This module exports the following functions:
match Match a regular expression pattern to the beginning of a string.
search Search a string for the presence of a pattern.
sub Substitute occurrences of a pattern found in a string.
subn Same as sub, but also return the number of substitutions made.
split Split a string by the occurrences of a pattern.
findall Find all occurrences of a pattern in a string.
finditer Return an iterator yielding a match object for each match.
compile Compile a pattern into a RegexObject.
purge Clear the regular expression cache.
escape Backslash all non-alphanumerics in a string.
Some of the functions in this module takes flags as optional parameters:
A ASCII For string patterns, make \w, \W, \b, \B, \d, \D
match the corresponding ASCII character categories
(rather than the whole Unicode categories, which is the
default).
For bytes patterns, this flag is the only available
behaviour and needn't be specified.
I IGNORECASE Perform case-insensitive matching.
L LOCALE Make \w, \W, \b, \B, dependent on the current locale.
M MULTILINE "^" matches the beginning of lines (after a newline)
as well as the string.
"$" matches the end of lines (before a newline) as well
as the end of the string.
S DOTALL "." matches any character at all, including the newline.
X VERBOSE Ignore whitespace and comments for nicer looking RE's.
U UNICODE For compatibility only. Ignored for string patterns (it
is the default), and forbidden for bytes patterns.
This module also defines an exception 'error'.
"""
import sys
import sre_compile
import sre_parse
# public symbols
__all__ = [ "match", "search", "sub", "subn", "split", "findall",
"compile", "purge", "template", "escape", "A", "I", "L", "M", "S", "X",
"U", "ASCII", "IGNORECASE", "LOCALE", "MULTILINE", "DOTALL", "VERBOSE",
"UNICODE", "error" ]
__version__ = "2.2.1"
# flags
A = ASCII = sre_compile.SRE_FLAG_ASCII # assume ascii "locale"
I = IGNORECASE = sre_compile.SRE_FLAG_IGNORECASE # ignore case
L = LOCALE = sre_compile.SRE_FLAG_LOCALE # assume current 8-bit locale
U = UNICODE = sre_compile.SRE_FLAG_UNICODE # assume unicode "locale"
M = MULTILINE = sre_compile.SRE_FLAG_MULTILINE # make anchors look for newline
S = DOTALL = sre_compile.SRE_FLAG_DOTALL # make dot match newline
X = VERBOSE = sre_compile.SRE_FLAG_VERBOSE # ignore whitespace and comments
# sre extensions (experimental, don't rely on these)
T = TEMPLATE = sre_compile.SRE_FLAG_TEMPLATE # disable backtracking
DEBUG = sre_compile.SRE_FLAG_DEBUG # dump pattern after compilation
# sre exception
error = sre_compile.error
# --------------------------------------------------------------------
# public interface
def match(pattern, string, flags=0):
"""Try to apply the pattern at the start of the string, returning
a match object, or None if no match was found."""
return _compile(pattern, flags).match(string)
def search(pattern, string, flags=0):
"""Scan through string looking for a match to the pattern, returning
a match object, or None if no match was found."""
return _compile(pattern, flags).search(string)
def sub(pattern, repl, string, count=0, flags=0):
"""Return the string obtained by replacing the leftmost
non-overlapping occurrences of the pattern in string by the
replacement repl. repl can be either a string or a callable;
if a string, backslash escapes in it are processed. If it is
a callable, it's passed the match object and must return
a replacement string to be used."""
return _compile(pattern, flags).sub(repl, string, count)
def subn(pattern, repl, string, count=0, flags=0):
"""Return a 2-tuple containing (new_string, number).
new_string is the string obtained by replacing the leftmost
non-overlapping occurrences of the pattern in the source
string by the replacement repl. number is the number of
substitutions that were made. repl can be either a string or a
callable; if a string, backslash escapes in it are processed.
If it is a callable, it's passed the match object and must
return a replacement string to be used."""
return _compile(pattern, flags).subn(repl, string, count)
def split(pattern, string, maxsplit=0, flags=0):
"""Split the source string by the occurrences of the pattern,
returning a list containing the resulting substrings."""
return _compile(pattern, flags).split(string, maxsplit)
def findall(pattern, string, flags=0):
"""Return a list of all non-overlapping matches in the string.
If one or more groups are present in the pattern, return a
list of groups; this will be a list of tuples if the pattern
has more than one group.
Empty matches are included in the result."""
return _compile(pattern, flags).findall(string)
if sys.hexversion >= 0x02020000:
__all__.append("finditer")
def finditer(pattern, string, flags=0):
"""Return an iterator over all non-overlapping matches in the
string. For each match, the iterator returns a match object.
Empty matches are included in the result."""
return _compile(pattern, flags).finditer(string)
def compile(pattern, flags=0):
"Compile a regular expression pattern, returning a pattern object."
return _compile(pattern, flags)
def purge():
"Clear the regular expression cache"
_cache.clear()
_cache_repl.clear()
def template(pattern, flags=0):
"Compile a template pattern, returning a pattern object"
return _compile(pattern, flags|T)
_alphanum_str = frozenset(
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890")
_alphanum_bytes = frozenset(
b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890")
def escape(pattern):
"Escape all non-alphanumeric characters in pattern."
if isinstance(pattern, str):
alphanum = _alphanum_str
s = list(pattern)
for i in range(len(pattern)):
c = pattern[i]
if c not in alphanum:
if c == "\000":
s[i] = "\\000"
else:
s[i] = "\\" + c
return "".join(s)
else:
alphanum = _alphanum_bytes
s = []
esc = ord(b"\\")
for c in pattern:
if c in alphanum:
s.append(c)
else:
if c == 0:
s.extend(b"\\000")
else:
s.append(esc)
s.append(c)
return bytes(s)
# --------------------------------------------------------------------
# internals
_cache = {}
_cache_repl = {}
_pattern_type = type(sre_compile.compile("", 0))
_MAXCACHE = 100
def _compile(*key):
# internal: compile pattern
cachekey = (type(key[0]),) + key
p = _cache.get(cachekey)
if p is not None:
return p
pattern, flags = key
if isinstance(pattern, _pattern_type):
if flags:
raise ValueError(
"Cannot process flags argument with a compiled pattern")
return pattern
if not sre_compile.isstring(pattern):
raise TypeError("first argument must be string or compiled pattern")
p = sre_compile.compile(pattern, flags)
if len(_cache) >= _MAXCACHE:
_cache.clear()
_cache[cachekey] = p
return p
def _compile_repl(*key):
# internal: compile replacement pattern
p = _cache_repl.get(key)
if p is not None:
return p
repl, pattern = key
p = sre_parse.parse_template(repl, pattern)
if len(_cache_repl) >= _MAXCACHE:
_cache_repl.clear()
_cache_repl[key] = p
return p
def _expand(pattern, match, template):
# internal: match.expand implementation hook
template = sre_parse.parse_template(template, pattern)
return sre_parse.expand_template(template, match)
def _subx(pattern, template):
# internal: pattern.sub/subn implementation helper
template = _compile_repl(template, pattern)
if not template[0] and len(template[1]) == 1:
# literal replacement
return template[1][0]
def filter(match, template=template):
return sre_parse.expand_template(template, match)
return filter
# register myself for pickling
import copyreg
def _pickle(p):
return _compile, (p.pattern, p.flags)
copyreg.pickle(_pattern_type, _pickle, _compile)
# --------------------------------------------------------------------
# experimental stuff (see python-dev discussions for details)
class Scanner:
def __init__(self, lexicon, flags=0):
from sre_constants import BRANCH, SUBPATTERN
self.lexicon = lexicon
# combine phrases into a compound pattern
p = []
s = sre_parse.Pattern()
s.flags = flags
for phrase, action in lexicon:
p.append(sre_parse.SubPattern(s, [
(SUBPATTERN, (len(p)+1, sre_parse.parse(phrase, flags))),
]))
s.groups = len(p)+1
p = sre_parse.SubPattern(s, [(BRANCH, (None, p))])
self.scanner = sre_compile.compile(p)
def scan(self, string):
result = []
append = result.append
match = self.scanner.scanner(string).match
i = 0
while 1:
m = match()
if not m:
break
j = m.end()
if i == j:
break
action = self.lexicon[m.lastindex-1][1]
if hasattr(action, "__call__"):
self.match = m
action = action(self, m.group())
if action is not None:
append(action)
i = j
return result, string[i:]
| mit |
tmetsch/suricate | tests/analytics_exec_node_test.py | 4342 | import time
import unittest
from suricate.analytics import exec_node, proj_ntb_store
class ExecNodeTest(unittest.TestCase):
payload = {'uid': 'foo',
'token': 'bar',
'project_id': 'qwe'}
mongo_uri = 'mongodb://foo:bar@localhost:27017/foo'
amqp_uri = 'amqp://guest:guest@localhost:5672/%2f'
def setUp(self):
self.store = proj_ntb_store.NotebookStore(self.mongo_uri, 'foo')
self.cut = ClassUnderTestWrapper(self.mongo_uri, self.amqp_uri,
'sdk.py', 'foo')
self.ntb_id = self.store.update_notebook('qwe',
None,
{'src': 'print "hello"',
'meta': {'name': 'abc.py',
'tags': []}},
'foo', 'bar')
def tearDown(self):
self.store.delete_project('qwe', 'foo', 'bar')
def test_handle_for_sanity(self):
# test listing
self.payload['call'] = 'list_projects'
self.assertTrue('qwe' in self.cut._handle(self.payload)['projects'])
# retrieve project
self.payload['call'] = 'retrieve_project'
self.assertEquals(self.cut._handle(self.payload)['project'],
[(self.ntb_id, {'name': 'abc.py', 'tags': []})])
# test retrieving
self.payload['call'] = 'retrieve_notebook'
self.payload['notebook_id'] = self.ntb_id
self.assertEqual(self.cut._handle(self.payload)['notebook']['src'],
'print "hello"')
# test running code
self.payload['call'] = 'run_notebook'
self.payload['notebook_id'] = self.ntb_id
self.payload['src'] = 'print("hello")'
self.assertEqual(self.cut._handle(self.payload), {})
self.payload['call'] = 'retrieve_notebook'
self.assertEquals(self.cut._handle(self.payload)['notebook']['out'],
['hello'])
# test interacting
self.payload['call'] = 'interact'
self.payload['loc'] = 'print("foobar")'
self.assertEqual(self.cut._handle(self.payload), {})
# test update
self.payload['call'] = 'update_notebook'
self.payload['notebook_id'] = self.ntb_id
self.payload['src'] = 'for i in range(0,5):\n\tprint i'
self.cut._handle(self.payload)
# retrieve it
self.payload['call'] = 'retrieve_notebook'
self.assertEquals(self.cut._handle(self.payload)['notebook']['src'],
'for i in range(0,5):\n\tprint i')
# test run an job.
self.payload['call'] = 'run_job'
self.payload['notebook_id'] = self.ntb_id
self.payload['src'] = 'import time\nfor i in range(0,10):' \
'\n\ttime.sleep(1)'
self.cut._handle(self.payload)
# list jobs
self.payload['call'] = 'list_jobs'
time.sleep(2)
self.assertEquals(self.cut._handle(self.payload)['jobs'].values()[0],
{'project': 'qwe', 'ntb_name': 'abc.py',
'state': 'running', 'ntb_id': self.ntb_id})
time.sleep(10)
tmp = self.cut._handle(self.payload)['jobs'].values()[0]
self.assertEquals(tmp['project'], 'qwe')
self.assertEquals(tmp['ntb_name'], 'abc.py')
self.assertEquals(tmp['ntb_id'], self.ntb_id)
self.assertIsNot(tmp['state'].find('done'), -1)
# retrieve it
self.payload['call'] = 'retrieve_notebook'
self.assertEquals(self.cut._handle(self.payload)['notebook']['src'],
'import time\nfor i in range(0,10):'
'\n\ttime.sleep(1)')
# delete it
self.payload['call'] = 'delete_notebook'
self.payload['notebook_id'] = self.ntb_id
self.cut._handle(self.payload)
class ClassUnderTestWrapper(exec_node.ExecNode):
"""
Wraps around the ExecNode and disables the listening.
"""
def __init__(self, mongo_uri, amqp_uri, sdk, uid):
self.uid = uid
self.uri = mongo_uri
self.sdk = sdk
# store
self.stor = proj_ntb_store.NotebookStore(mongo_uri, 'foo') | mit |
monicajimenez/weas | resources/views/request/purchase/file_old.php | 13341 | @extends("layouts/master")
@section('sitetitle', 'File PR Request: ')
@section('pagetitle', 'File PR Request: ')
@section("content")
<div class="row">
<div class="col l10 right">
<form class="form-horizontal" id="form_file" method="post" action="{{ route('request.store') }}">
<input type="hidden" name="_token" value="{{ csrf_token()}}"/>
<input type="hidden" name="filing_type" value="pr" />
<!-- View Errors -->
@if($errors->any())
@foreach($errors->all() as $error)
<p class="errors">{{$error}}</p>
@endforeach
@endif
<!-- End: View Errors -->
<!-- Basic Details -->
<div class="col l10 section">
<div class="row">
<div class="input-field col l2">
<input class="with-gap" id="supplies" name="pr_type[]" value="Req-040" type="radio" checked/>
<label for="supplies">Supplies</label>
</div>
<div class="input-field col l2">
<input class="with-gap" id="capex" name="pr_type[]" value="Req-041" type="radio"/>
<label for="capex">CAPEX</label>
</div>
<div class="input-field col l2">
<input class="with-gap" id="capex_it" name="pr_type[]" value="Req-042" type="radio"/>
<label for="capex_it">CAPEX IT</label>
</div>
<div class="input-field col l3 right">
<input name="date_filed" type="text" class="validate" value="{{date('M d, Y')}}" disabled>
<input name="date_filed" type="hidden" class="validate" value="{{date('M d, Y')}}">
<label for="date_filed">Date Filed</label>
</div>
</div>
<div class="row">
<div class="input-field col l3 right">
<input name="requesting_department" type="text" class="validate" value="{{$requesting_department->dept_name}}" disabled>
<label for="requesting_department">Requesting Department</label>
</div>
</div>
<div class="row">
<div class="input-field col l3 right">
<select id="deliver_to" name="deliver_to">
<option value="" disabled selected>Choose your option</option>
@foreach($team_members as $team_member)
<option value="{{$team_member->app_code}}">{{$team_member->app_lname}}, {{$team_member->app_fname}}</option>
@endforeach
</select>
<label for="deliver_to">Deliver To:</label>
</div>
</div>
</div>
<!-- End: Basic Details -->
<div class="row">
<div class="col l10">
<div class="divider">
</div>
</div>
</div>
<!-- Table -->
<div class="row section">
<div class="col l10">
<table class="responsive-table" id="table_items">
<thead class="">
<tr>
<th data-field="item_count" class="index center-align">
#
</th>
<th data-field="item_qty" class="index center-align">
QTY
</th>
<th data-field="item_unit" class="center-align">
UNIT
</th>
<th data-field="item_unit_price" class="center-align">
UNIT PRICE
</th>
<th data-field="item_amount" class="center-align">
Amount
</th>
<th data-field="item_description" class="center-align">
Description
</th>
<th data-field="item_budget" class="center-align">
Budget
</th>
<th data-field="item_dept_proj" class="center-align">
Dept/Project
</th>
<th data-field="item_acct_name" class="center-align">
ACCT Name
</th>
<th data-field="item_cost_code" class="center-align">
COST CODE
</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><input type="text" name="item_qty" value=""/></td>
<td>
<select id="item_unit" name="deliver_to">
<option value="" disabled selected>Choose your option</option>
@foreach($item_units as $unit)
<option value="{{$unit->unit_code}}">{{$unit->unit_symbol}}</option>
@endforeach
</select>
<label for="item_unit">Deliver To:</label>
</td>
<td><input type="text" name="item_qty" value=""/></td>
<td><input type="text" name="item_unit" value=""/></td>
<td><input type="text" name="item_qty" value=""/></td>
<td><input type="text" name="item_unit" value=""/></td>
<td><input type="text" name="item_qty" value=""/></td>
<td><input type="text" name="item_unit" value=""/></td>
<td><input type="text" name="item_unit" value=""/></td>
</tr>
</tbody>
</table>
<div class="section right" id="add_row"><a class="waves-effect waves-light btn"><i class="small material-icons">add</i></a></div>
</div>
</div>
<!-- End: Table -->
<div class="row">
<div class="col l10">
<div class="divider">
</div>
</div>
</div>
<!-- Table of Approvers -->
<div class="row">
<div class="col l10">
<h5>Approvers:</h5>
<table class="responsive-table" id="table_approvers">
<thead class="">
<tr>
<th data-field="app_level" class="index center-align">
Level
</th>
<th data-field="app_closing" class="center-align">
Closing
</th>
<th data-field="app_name" class="center-align">
Name
</th>
<th data-field="app_pos" class="center-align">
Position
</th>
<th data-field="app_mandatory" class="center-align">
Mandatory
</th>
<th data-field="app_delete" class="center-align">
Delete
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<!-- <div class="section right" id="container_modal_add_approver"><a class="waves-effect waves-light btn modal-trigger" href="#modal_add_approver"><i class="small material-icons">add</i></a></div> -->
</div>
</div>
<!-- End: Table of Approvers -->
<div class="row">
<div class="col l10">
<div class="divider">
</div>
</div>
</div>
<!-- End: RFR Forfeiture Reminder -->
<!-- Remarks -->
@if($filing_type !='RFC')
@include("request.includes_remarks")
@endif
<!-- End: Remarks -->
<!-- Buttons-->
<div class="fixed-action-btn click-to-toggle" style="bottom: 80px;">
<a class="btn-floating btn-large">
<i class="large material-icons">mode_edit</i>
</a>
<ul>
<li><button type="submit" value="Save" title="Save" class="btn-floating btn-small waves-effect waves-light green"><i class="material-icons">done</i></button></li>
<li><button type="reset" value="Cancel" title="Cancel" class="btn-floating btn-small waves-effect waves-light red"><i class="material-icons">not_interested</i></button></li>
</ul>
</div>
<!-- End: Buttons-->
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
//Function getting new token
function getToken()
{
$.ajax({
type: 'GET',
url: '{{route("token")}}',
async: false,
context: this,
data: "",
timeout: this.url_check_timeout,
success: function (token) {
$('meta[name="csrf-token"]').attr('content', token );
}.bind(this),
error: function () {
this.lastError = NetError.invalidURL;
}.bind(this)
});
}
//Function for populating the Approvers' table
function populateApproversTable(data)
{
var newRowContent;
$('#table_approvers tbody').empty();
$.each( data, function( key, approver ) {
newRowContent = "<tr>" +
"<td class='index center-align'>" + approver["app_level"] + "</td>" +
"<td class='center-align'>" + approver["close_desc"] +
"<input type='hidden' name='close_codes[]' value='"+ approver["close_code"] +"'>" + "</td>" +
"<td class='center-align'>" + approver["app_fname"] + " " + approver["app_lname"] +
"<input type='hidden' name='approvers[]' value='"+ approver["app_code"] +"'>" + "</td>" +
"<td class='center-align'>" + approver["app_position"] + "</td>" +
"<td class='center-align'>" + approver["mandatory"] + "</td>";
if(approver["mandatory"] != 'Y')
{
newRowContent += "<td class='center-align'>" + "<a name='"+ approver["app_code"]+"' class='delete_app btn-flat'><i class='tiny material-icons'>delete</i></a>" + "</td>";
}
else
{
newRowContent += "<td class='delete'>" + "" + "</td>";
}
$("#table_approvers tbody").append(newRowContent);
});
}
//RFC, QAC and RFR (Forfeiture) Filing: Handler for Project Name Dropdown and populating the Approvers' table thereafter
//RFC Filing: Handler for Project Name Dropdown and populating the RFC REF dropdown thereafter
$('#project_type').change(function(){
getToken();
filing_type = $('input[name="filing_type"]').val();
request_type_code = '';
if(filing_type == 'RFR')
{
request_type_code = 'Req-027'; //request_type_code for Forfeitures
}
if(filing_type == 'QAC')
{
request_type_code = 'Req-021'; //request_type_code for QAC
}
$.ajax({
url: '{{route("getrequesttypeapprovers")}}',
method: 'POST',
data: {'project_code' :$('#project_type').val(), 'filing_type': $('input[name="filing_type"]').val(),
'request_type_code': request_type_code, '_token': $('meta[name="csrf-token"]').attr('content') },
success: function(data){
populateApproversTable(data);
}
});
});
//Add row for request table
var rowCounter = 2;
var table_units;
$( "#add_row" ).click(function() {
itemsPointer = $("#table_items tbody");
if(!table_units)
{
$.ajax({
url: '{{route("unit.index")}}',
method: 'GET',
data:{},
success: function(data){
table_units = data;
}
});
}
itemsPointer.append(
$("<tr></tr>").html($("<td></td>").attr("value",rowCounter).text(rowCounter++))
.append( $("<td></td>").html( $("<input>").attr("type","text").attr("name","item_qty") ) )
.append( $("<td></td>").html( $("<option></option>").attr("name","item_unit").attr("value","item_unit") ) )
.append( $("<td></td>").html( $("<input>").attr("type","text").attr("name","item_unit_price") ) )
.append( $("<td></td>").html( $("<input>").attr("type","text").attr("name","item_amount") ) )
.append( $("<td></td>").html( $("<input>").attr("type","text").attr("name","item_description") ) )
.append( $("<td></td>").html( $("<input>").attr("type","text").attr("name","item_budget") ) )
.append( $("<td></td>").html( $("<input>").attr("type","text").attr("name","item_dept_proj") ) )
.append( $("<td></td>").html( $("<input>").attr("type","text").attr("name","item_acct_name") ) )
.append( $("<td></td>").html( $("<input>").attr("type","text").attr("name","item_cost_code") ) )
);
$('#yourSelectBoxId').append(new Option('optionName', 'optionValue'));
});
//APPROVER TABLE SORTING FUNCTIONALITIES
var fixHelperModified = function(e, tr) {
var $originals = tr.children();
var $helper = tr.clone();
$helper.children().each(function(index) {
$(this).width($originals.eq(index).width())
});
return $helper;
},
updateIndex = function(e, ui) {
$('td.index', ui.item.parent()).each(function (i) {
$(this).html(i + 1);
});
};
$("#table_approvers tbody").sortable({
helper: fixHelperModified,
stop: updateIndex
}).disableSelection();
// DYNAMICALLY ADDED COMPONENTS' EVENT LISTENERS
$('#table_approvers').on('click', '.delete_app', function() {
$(this).parents('tr').remove();
$('td.index', 'table').each(function (i) {
$(this).html(i + 1);
});
});
});
</script>
@stop | mit |
irodgal/visioapp | dist/users/UserController.js | 2656 | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const config_1 = require("../config");
class UserController {
pruebaAccesoBD() {
console.log('en pruebaAccesoBD');
//console.log(config.client);
//const client = new Client<Foo>("http://localhost:5984", "visio");
/*
const pp = config.client.get("15d3b91506830f2ebe36d35d79004252").then((res) => {
console.log(res);
}).catch((error) => {
console.log("ERRRORAZO");
console.log(error);
});
console.log("LALAAL");
console.log(pp);
*/
//buscar el usuario por nombre
config_1.default.clientDB.view('users', 'nombreView', { keys: ["Tomás"] })
.then(function ([body, headers]) {
console.log('OK');
console.log(body);
})
.catch(function (err) {
console.log('KO');
console.error(err);
});
/*
config.client.view('users', 'nombreView', {
keys: ["Tomás"]
}, function (err, body) {
console.log('LLL');
console.log(err);
console.log(body);
var user = body.rows[0].value;
console.log(user);
if (!err) {
if (body.rows.length == 0) {
return me.sendErrorResponse(res, 404, 'Authentication failed. User not found.');
} else {
var user = body.rows[0].value,
encryptedPass = me.getEncryptedPassword(req.body.password);
// check if password matches
if (user.password != encryptedPass) {
return me.sendErrorResponse(res, 401, 'Authentication failed. Wrong password.');
} else {
// if user is found and password is right, create a token
var token = jwt.sign(user, express.getSuperSecret(), {
//expiresInMinutes: 1440 // expires in 24 hours
expiresIn: config.tokenExpiresIn
});
// return the information including token as JSON
res.send({
success: true,
message: 'Enjoy your token!',
token: token
});
}
}
} else {
return me.sendErrorResponse(res, 400, err);
}
});
*/
return "en pruebaAccesoBD";
}
}
exports.UserController = UserController;
const userController = new UserController();
exports.default = userController;
| mit |
raoulvdberge/refinedstorage | src/main/java/com/refinedmods/refinedstorage/screen/grid/sorting/QuantityGridSorter.java | 923 | package com.refinedmods.refinedstorage.screen.grid.sorting;
import com.refinedmods.refinedstorage.api.network.grid.IGrid;
import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack;
public class QuantityGridSorter implements IGridSorter {
@Override
public boolean isApplicable(IGrid grid) {
return grid.getSortingType() == IGrid.SORTING_TYPE_QUANTITY;
}
@Override
public int compare(IGridStack left, IGridStack right, SortingDirection sortingDirection) {
int leftSize = left.getQuantity();
int rightSize = right.getQuantity();
if (leftSize != rightSize) {
if (sortingDirection == SortingDirection.ASCENDING) {
return (leftSize > rightSize) ? 1 : -1;
} else if (sortingDirection == SortingDirection.DESCENDING) {
return (rightSize > leftSize) ? 1 : -1;
}
}
return 0;
}
}
| mit |
spesmilo/electrum | electrum/tests/__init__.py | 1287 | import unittest
import threading
import tempfile
import shutil
import electrum
import electrum.logging
from electrum import constants
# Set this locally to make the test suite run faster.
# If set, unit tests that would normally test functions with multiple implementations,
# will only be run once, using the fastest implementation.
# e.g. libsecp256k1 vs python-ecdsa. pycryptodomex vs pyaes.
FAST_TESTS = False
electrum.logging._configure_stderr_logging()
# some unit tests are modifying globals...
class SequentialTestCase(unittest.TestCase):
test_lock = threading.Lock()
def setUp(self):
super().setUp()
self.test_lock.acquire()
def tearDown(self):
super().tearDown()
self.test_lock.release()
class ElectrumTestCase(SequentialTestCase):
"""Base class for our unit tests."""
def setUp(self):
super().setUp()
self.electrum_path = tempfile.mkdtemp()
def tearDown(self):
super().tearDown()
shutil.rmtree(self.electrum_path)
class TestCaseForTestnet(ElectrumTestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
constants.set_testnet()
@classmethod
def tearDownClass(cls):
super().tearDownClass()
constants.set_mainnet()
| mit |
blood2/bloodcoin-0.9 | src/qt/locale/bitcoin_fa.ts | 135289 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<source>About Blood Core</source>
<translation type="unfinished"/>
</message>
<message>
<source><b>Blood Core</b> version</source>
<translation type="unfinished"/>
</message>
<message>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source>
<translation>⏎ ⏎ این یک نرمافزار آزمایشی است⏎ ⏎ نرم افزار تحت مجوز MIT/X11 منتشر شده است. پروندهٔ COPYING یا نشانی http://www.opensource.org/licenses/mit-license.php. را ببینید⏎ ⏎ این محصول شامل نرمافزار توسعه دادهشده در پروژهٔ OpenSSL است. در این نرمافزار از OpenSSL Toolkit (http://www.openssl.org/) و نرمافزار رمزنگاری نوشته شده توسط اریک یانگ ([email protected]) و UPnP توسط توماس برنارد استفاده شده است.</translation>
</message>
<message>
<source>Copyright</source>
<translation>حق تألیف</translation>
</message>
<message>
<source>The Blood Core developers</source>
<translation type="unfinished"/>
</message>
<message>
<source>(%1-bit)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<source>Double-click to edit address or label</source>
<translation>برای ویرایش نشانی یا برچسب دوبار کلیک کنید</translation>
</message>
<message>
<source>Create a new address</source>
<translation>ایجاد نشانی جدید</translation>
</message>
<message>
<source>&New</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy the currently selected address to the system clipboard</source>
<translation>کپی نشانی انتخاب شده به حافظهٔ سیستم</translation>
</message>
<message>
<source>&Copy</source>
<translation type="unfinished"/>
</message>
<message>
<source>C&lose</source>
<translation type="unfinished"/>
</message>
<message>
<source>&Copy Address</source>
<translation>&کپی نشانی</translation>
</message>
<message>
<source>Delete the currently selected address from the list</source>
<translation>حذف نشانی انتخابشده از لیست</translation>
</message>
<message>
<source>Export the data in the current tab to a file</source>
<translation>خروجی گرفتن دادههای برگهٔ فعلی به یک پرونده</translation>
</message>
<message>
<source>&Export</source>
<translation>&صدور</translation>
</message>
<message>
<source>&Delete</source>
<translation>&حذف</translation>
</message>
<message>
<source>Choose the address to send coins to</source>
<translation type="unfinished"/>
</message>
<message>
<source>Choose the address to receive coins with</source>
<translation type="unfinished"/>
</message>
<message>
<source>C&hoose</source>
<translation type="unfinished"/>
</message>
<message>
<source>Sending addresses</source>
<translation type="unfinished"/>
</message>
<message>
<source>Receiving addresses</source>
<translation type="unfinished"/>
</message>
<message>
<source>These are your Blood addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation>اینها نشانیهای بیتکوین شما برای ارسال وجود هستند. همیشه قبل از ارسال سکهها، نشانی دریافتکننده و مقدار ارسالی را بررسی کنید.</translation>
</message>
<message>
<source>These are your Blood addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy &Label</source>
<translation>کپی و برچسب&گذاری</translation>
</message>
<message>
<source>&Edit</source>
<translation>&ویرایش</translation>
</message>
<message>
<source>Export Address List</source>
<translation type="unfinished"/>
</message>
<message>
<source>Comma separated file (*.csv)</source>
<translation>پروندهٔ نوع CSV جداشونده با کاما (*.csv)</translation>
</message>
<message>
<source>Exporting Failed</source>
<translation type="unfinished"/>
</message>
<message>
<source>There was an error trying to save the address list to %1.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<source>Label</source>
<translation>برچسب</translation>
</message>
<message>
<source>Address</source>
<translation>آدرس</translation>
</message>
<message>
<source>(no label)</source>
<translation>(بدون برچسب)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<source>Passphrase Dialog</source>
<translation>پنجرهٔ گذرواژه</translation>
</message>
<message>
<source>Enter passphrase</source>
<translation>گذرواژه را وارد کنید</translation>
</message>
<message>
<source>New passphrase</source>
<translation>گذرواژهٔ جدید</translation>
</message>
<message>
<source>Repeat new passphrase</source>
<translation>تکرار گذرواژهٔ جدید</translation>
</message>
<message>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>گذرواژهٔ جدید کیف پول خود را وارد کنید.<br/>لطفاً از گذرواژهای با <b>حداقل ۱۰ حرف تصادفی</b>، یا <b>حداقل هشت کلمه</b> انتخاب کنید.</translation>
</message>
<message>
<source>Encrypt wallet</source>
<translation>رمزنگاری کیف پول</translation>
</message>
<message>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>انجام این عملیات نیازمند گذرواژهٔ کیف پول شما برای باز کردن قفل آن است.</translation>
</message>
<message>
<source>Unlock wallet</source>
<translation>باز کردن قفل کیف پول</translation>
</message>
<message>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>انجام این عملیات نیازمند گذرواژهٔ کیف پول شما برای رمزگشایی کردن آن است.</translation>
</message>
<message>
<source>Decrypt wallet</source>
<translation>رمزگشایی کیف پول</translation>
</message>
<message>
<source>Change passphrase</source>
<translation>تغییر گذرواژه</translation>
</message>
<message>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>گذرواژهٔ قدیمی و جدید کیف پول را وارد کنید.</translation>
</message>
<message>
<source>Confirm wallet encryption</source>
<translation>تأیید رمزنگاری کیف پول</translation>
</message>
<message>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR Bloodcoins</b>!</source>
<translation>هشدار: اگر کیف پول خود را رمزنگاری کنید و گذرواژه را فراموش کنید، <b>تمام دارایی بیتکوین خود را از دست خواهید داد</b>!</translation>
</message>
<message>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>آیا مطمئن هستید که میخواهید کیف پول خود را رمزنگاری کنید؟</translation>
</message>
<message>
<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>مهم: هر نسخهٔ پشتیبانی که تا کنون از کیف پول خود تهیه کردهاید، باید با کیف پول رمزنگاری شدهٔ جدید جایگزین شود. به دلایل امنیتی، پروندهٔ قدیمی کیف پول بدون رمزنگاری، تا زمانی که از کیف پول رمزنگاریشدهٔ جدید استفاده نکنید، غیرقابل استفاده خواهد بود.</translation>
</message>
<message>
<source>Warning: The Caps Lock key is on!</source>
<translation>هشدار: کلید Caps Lock روشن است!</translation>
</message>
<message>
<source>Wallet encrypted</source>
<translation>کیف پول رمزنگاری شد</translation>
</message>
<message>
<source>Blood will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bloods from being stolen by malware infecting your computer.</source>
<translation>بیتکوین هم اکنون بسته میشود تا فرایند رمزگذاری را تمام کند. به خاطر داشته باشید که رمزگذاری کردن کیف پولتان نمیتواند به طور کامل بیتکوینهای شما را در برابر دزدیده شدن توسط بدافزارهایی که احتمالاً رایانهٔ شما را آلوده میکنند، محافظت نماید.</translation>
</message>
<message>
<source>Wallet encryption failed</source>
<translation>رمزنگاری کیف پول با شکست مواجه شد</translation>
</message>
<message>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>رمزنگاری کیف پول بنا به یک خطای داخلی با شکست مواجه شد. کیف پول شما رمزنگاری نشد.</translation>
</message>
<message>
<source>The supplied passphrases do not match.</source>
<translation>گذرواژههای داده شده با هم تطابق ندارند.</translation>
</message>
<message>
<source>Wallet unlock failed</source>
<translation>بازگشایی قفل کیفپول با شکست مواجه شد</translation>
</message>
<message>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>گذرواژهٔ وارد شده برای رمزگشایی کیف پول نادرست بود.</translation>
</message>
<message>
<source>Wallet decryption failed</source>
<translation>رمزگشایی ناموفق کیف پول</translation>
</message>
<message>
<source>Wallet passphrase was successfully changed.</source>
<translation>گذرواژهٔ کیف پول با موفقیت عوض شد.</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<source>Sign &message...</source>
<translation>&امضای پیام...</translation>
</message>
<message>
<source>Synchronizing with network...</source>
<translation>همگامسازی با شبکه...</translation>
</message>
<message>
<source>&Overview</source>
<translation>&بررسی اجمالی</translation>
</message>
<message>
<source>Node</source>
<translation type="unfinished"/>
</message>
<message>
<source>Show general overview of wallet</source>
<translation>نمایش بررسی اجمالی کیف پول</translation>
</message>
<message>
<source>&Transactions</source>
<translation>&تراکنشها</translation>
</message>
<message>
<source>Browse transaction history</source>
<translation>مرور تاریخچهٔ تراکنشها</translation>
</message>
<message>
<source>E&xit</source>
<translation>&خروج</translation>
</message>
<message>
<source>Quit application</source>
<translation>خروج از برنامه</translation>
</message>
<message>
<source>Show information about Blood</source>
<translation>نمایش اطلاعات در مورد بیتکوین</translation>
</message>
<message>
<source>About &Qt</source>
<translation>دربارهٔ &کیوت</translation>
</message>
<message>
<source>Show information about Qt</source>
<translation>نمایش اطلاعات دربارهٔ کیوت</translation>
</message>
<message>
<source>&Options...</source>
<translation>&تنظیمات...</translation>
</message>
<message>
<source>&Encrypt Wallet...</source>
<translation>&رمزنگاری کیف پول...</translation>
</message>
<message>
<source>&Backup Wallet...</source>
<translation>&پیشتیبانگیری از کیف پول...</translation>
</message>
<message>
<source>&Change Passphrase...</source>
<translation>&تغییر گذرواژه...</translation>
</message>
<message>
<source>&Sending addresses...</source>
<translation type="unfinished"/>
</message>
<message>
<source>&Receiving addresses...</source>
<translation type="unfinished"/>
</message>
<message>
<source>Open &URI...</source>
<translation type="unfinished"/>
</message>
<message>
<source>Importing blocks from disk...</source>
<translation>دریافت بلوکها از دیسک...</translation>
</message>
<message>
<source>Reindexing blocks on disk...</source>
<translation>بازنشانی بلوکها روی دیسک...</translation>
</message>
<message>
<source>Send coins to a Blood address</source>
<translation>ارسال وجه به نشانی بیتکوین</translation>
</message>
<message>
<source>Modify configuration options for Blood</source>
<translation>تغییر و اصلاح تنظیمات پیکربندی بیتکوین</translation>
</message>
<message>
<source>Backup wallet to another location</source>
<translation>تهیهٔ پشتیبان از کیف پول در یک مکان دیگر</translation>
</message>
<message>
<source>Change the passphrase used for wallet encryption</source>
<translation>تغییر گذرواژهٔ مورد استفاده در رمزنگاری کیف پول</translation>
</message>
<message>
<source>&Debug window</source>
<translation>پنجرهٔ ا&شکالزدایی</translation>
</message>
<message>
<source>Open debugging and diagnostic console</source>
<translation>باز کردن کنسول خطایابی و اشکالزدایی</translation>
</message>
<message>
<source>&Verify message...</source>
<translation>با&زبینی پیام...</translation>
</message>
<message>
<source>Blood</source>
<translation>بیتکوین</translation>
</message>
<message>
<source>Wallet</source>
<translation>کیف پول</translation>
</message>
<message>
<source>&Send</source>
<translation>&ارسال</translation>
</message>
<message>
<source>&Receive</source>
<translation>&دریافت</translation>
</message>
<message>
<source>&Show / Hide</source>
<translation>&نمایش/ عدم نمایش</translation>
</message>
<message>
<source>Show or hide the main Window</source>
<translation>نمایش یا مخفیکردن پنجرهٔ اصلی</translation>
</message>
<message>
<source>Encrypt the private keys that belong to your wallet</source>
<translation>رمزنگاری کلیدهای خصوصی متعلق به کیف پول شما</translation>
</message>
<message>
<source>Sign messages with your Blood addresses to prove you own them</source>
<translation>برای اثبات اینکه پیامها به شما تعلق دارند، آنها را با نشانی بیتکوین خود امضا کنید</translation>
</message>
<message>
<source>Verify messages to ensure they were signed with specified Blood addresses</source>
<translation>برای حصول اطمینان از اینکه پیام با نشانی بیتکوین مشخص شده امضا است یا خیر، پیام را شناسایی کنید</translation>
</message>
<message>
<source>&File</source>
<translation>&فایل</translation>
</message>
<message>
<source>&Settings</source>
<translation>&تنظیمات</translation>
</message>
<message>
<source>&Help</source>
<translation>&کمکرسانی</translation>
</message>
<message>
<source>Tabs toolbar</source>
<translation>نوارابزار برگهها</translation>
</message>
<message>
<source>[testnet]</source>
<translation>[شبکهٔ آزمایش]</translation>
</message>
<message>
<source>Blood Core</source>
<translation> هسته Blood </translation>
</message>
<message>
<source>Request payments (generates QR codes and blood: URIs)</source>
<translation type="unfinished"/>
</message>
<message>
<source>&About Blood Core</source>
<translation type="unfinished"/>
</message>
<message>
<source>Show the list of used sending addresses and labels</source>
<translation type="unfinished"/>
</message>
<message>
<source>Show the list of used receiving addresses and labels</source>
<translation type="unfinished"/>
</message>
<message>
<source>Open a blood: URI or payment request</source>
<translation type="unfinished"/>
</message>
<message>
<source>&Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<source>Show the Blood Core help message to get a list with possible Blood command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<source>Blood client</source>
<translation>کلاینت بیتکوین</translation>
</message>
<message numerus="yes">
<source>%n active connection(s) to Blood network</source>
<translation><numerusform>%n ارتباط فعال با شبکهٔ بیتکوین</numerusform></translation>
</message>
<message>
<source>No block source available...</source>
<translation>منبعی برای دریافت بلاک در دسترس نیست...</translation>
</message>
<message>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation>%1 بلاک از مجموع %2 بلاک (تخمینی) تاریخچهٔ تراکنشها پردازش شده است.</translation>
</message>
<message>
<source>Processed %1 blocks of transaction history.</source>
<translation>%1 بلاک از تاریخچهٔ تراکنشها پردازش شده است.</translation>
</message>
<message numerus="yes">
<source>%n hour(s)</source>
<translation><numerusform>%n ساعت</numerusform></translation>
</message>
<message numerus="yes">
<source>%n day(s)</source>
<translation><numerusform>%n روز</numerusform></translation>
</message>
<message numerus="yes">
<source>%n week(s)</source>
<translation><numerusform>%n هفته</numerusform></translation>
</message>
<message>
<source>%1 and %2</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<source>%n year(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<source>%1 behind</source>
<translation>%1 عقبتر</translation>
</message>
<message>
<source>Last received block was generated %1 ago.</source>
<translation>آخرین بلاک دریافتی %1 پیش ایجاد شده است.</translation>
</message>
<message>
<source>Transactions after this will not yet be visible.</source>
<translation>تراکنشهای بعد از این هنوز قابل مشاهده نیستند.</translation>
</message>
<message>
<source>Error</source>
<translation>خطا</translation>
</message>
<message>
<source>Warning</source>
<translation>هشدار</translation>
</message>
<message>
<source>Information</source>
<translation>اطلاعات</translation>
</message>
<message>
<source>Up to date</source>
<translation>وضعیت بهروز</translation>
</message>
<message>
<source>Catching up...</source>
<translation>بهروز رسانی...</translation>
</message>
<message>
<source>Sent transaction</source>
<translation>تراکنش ارسال شد</translation>
</message>
<message>
<source>Incoming transaction</source>
<translation>تراکنش دریافت شد</translation>
</message>
<message>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>تاریخ: %1
مبلغ: %2
نوع: %3
نشانی: %4
</translation>
</message>
<message>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>کیف پول <b>رمزنگاری شده</b> است و هماکنون <b>باز</b> است</translation>
</message>
<message>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>کیف پول <b>رمزنگاری شده</b> است و هماکنون <b>قفل</b> است</translation>
</message>
<message>
<source>A fatal error occurred. Blood can no longer continue safely and will quit.</source>
<translation>یک خطای مهلک اتفاق افتاده است. بیتکوین نمیتواند بدون مشکل به کار خود ادامه دهد و بسته خواهد شد.</translation>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<source>Network Alert</source>
<translation>پیام شبکه</translation>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<source>Coin Control Address Selection</source>
<translation type="unfinished"/>
</message>
<message>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Amount:</source>
<translation>مبلغ:</translation>
</message>
<message>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Change:</source>
<translation type="unfinished"/>
</message>
<message>
<source>(un)select all</source>
<translation type="unfinished"/>
</message>
<message>
<source>Tree mode</source>
<translation type="unfinished"/>
</message>
<message>
<source>List mode</source>
<translation type="unfinished"/>
</message>
<message>
<source>Amount</source>
<translation>مبلغ</translation>
</message>
<message>
<source>Address</source>
<translation>نشانی</translation>
</message>
<message>
<source>Date</source>
<translation>تاریخ</translation>
</message>
<message>
<source>Confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<source>Confirmed</source>
<translation>تأیید شده</translation>
</message>
<message>
<source>Priority</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy address</source>
<translation>کپی نشانی</translation>
</message>
<message>
<source>Copy label</source>
<translation>کپی برچسب</translation>
</message>
<message>
<source>Copy amount</source>
<translation>کپی مقدار</translation>
</message>
<message>
<source>Copy transaction ID</source>
<translation>کپی شناسهٔ تراکنش</translation>
</message>
<message>
<source>Lock unspent</source>
<translation type="unfinished"/>
</message>
<message>
<source>Unlock unspent</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<source>highest</source>
<translation type="unfinished"/>
</message>
<message>
<source>higher</source>
<translation type="unfinished"/>
</message>
<message>
<source>high</source>
<translation type="unfinished"/>
</message>
<message>
<source>medium-high</source>
<translation type="unfinished"/>
</message>
<message>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<source>low-medium</source>
<translation type="unfinished"/>
</message>
<message>
<source>low</source>
<translation type="unfinished"/>
</message>
<message>
<source>lower</source>
<translation type="unfinished"/>
</message>
<message>
<source>lowest</source>
<translation type="unfinished"/>
</message>
<message>
<source>(%1 locked)</source>
<translation type="unfinished"/>
</message>
<message>
<source>none</source>
<translation type="unfinished"/>
</message>
<message>
<source>Dust</source>
<translation type="unfinished"/>
</message>
<message>
<source>yes</source>
<translation type="unfinished"/>
</message>
<message>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
<translation type="unfinished"/>
</message>
<message>
<source>This means a fee of at least %1 per kB is required.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Can vary +/- 1 byte per input.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Transactions with higher priority are more likely to get included into a block.</source>
<translation type="unfinished"/>
</message>
<message>
<source>This label turns red, if the priority is smaller than "medium".</source>
<translation type="unfinished"/>
</message>
<message>
<source>This label turns red, if any recipient receives an amount smaller than %1.</source>
<translation type="unfinished"/>
</message>
<message>
<source>This means a fee of at least %1 is required.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
<translation type="unfinished"/>
</message>
<message>
<source>This label turns red, if the change is smaller than %1.</source>
<translation type="unfinished"/>
</message>
<message>
<source>(no label)</source>
<translation>(بدون برچسب)</translation>
</message>
<message>
<source>change from %1 (%2)</source>
<translation type="unfinished"/>
</message>
<message>
<source>(change)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<source>Edit Address</source>
<translation>ویرایش نشانی</translation>
</message>
<message>
<source>&Label</source>
<translation>&برچسب</translation>
</message>
<message>
<source>The label associated with this address list entry</source>
<translation type="unfinished"/>
</message>
<message>
<source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<source>&Address</source>
<translation>&نشانی</translation>
</message>
<message>
<source>New receiving address</source>
<translation>نشانی دریافتی جدید</translation>
</message>
<message>
<source>New sending address</source>
<translation>نشانی ارسالی جدید</translation>
</message>
<message>
<source>Edit receiving address</source>
<translation>ویرایش نشانی دریافتی</translation>
</message>
<message>
<source>Edit sending address</source>
<translation>ویرایش نشانی ارسالی</translation>
</message>
<message>
<source>The entered address "%1" is already in the address book.</source>
<translation>نشانی وارد شده «%1» در حال حاضر در دفترچه وجود دارد.</translation>
</message>
<message>
<source>The entered address "%1" is not a valid Blood address.</source>
<translation>نشانی وارد شده «%1» یک نشانی معتبر بیتکوین نیست.</translation>
</message>
<message>
<source>Could not unlock wallet.</source>
<translation>نمیتوان کیف پول را رمزگشایی کرد.</translation>
</message>
<message>
<source>New key generation failed.</source>
<translation>ایجاد کلید جدید با شکست مواجه شد.</translation>
</message>
</context>
<context>
<name>FreespaceChecker</name>
<message>
<source>A new data directory will be created.</source>
<translation>یک مسیر دادهٔ جدید ایجاد خواهد شد.</translation>
</message>
<message>
<source>name</source>
<translation>نام</translation>
</message>
<message>
<source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
<translation>این پوشه در حال حاضر وجود دارد. اگر میخواهید یک دایرکتوری جدید در اینجا ایجاد کنید، %1 را اضافه کنید.</translation>
</message>
<message>
<source>Path already exists, and is not a directory.</source>
<translation>مسیر داده شده موجود است و به یک پوشه اشاره نمیکند.</translation>
</message>
<message>
<source>Cannot create data directory here.</source>
<translation>نمیتوان پوشهٔ داده در اینجا ایجاد کرد.</translation>
</message>
</context>
<context>
<name>HelpMessageDialog</name>
<message>
<source>Blood Core - Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<source>Blood Core</source>
<translation> هسته Blood </translation>
</message>
<message>
<source>version</source>
<translation>نسخه</translation>
</message>
<message>
<source>Usage:</source>
<translation>استفاده:</translation>
</message>
<message>
<source>command-line options</source>
<translation>گزینههای خط فرمان</translation>
</message>
<message>
<source>UI options</source>
<translation>گزینههای رابط کاربری</translation>
</message>
<message>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation>زبان را تنظیم کنید؛ برای مثال «de_DE» (زبان پیشفرض محلی)</translation>
</message>
<message>
<source>Start minimized</source>
<translation>اجرای برنامه به صورت کوچکشده</translation>
</message>
<message>
<source>Set SSL root certificates for payment request (default: -system-)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Show splash screen on startup (default: 1)</source>
<translation>نمایش پنجرهٔ خوشامدگویی در ابتدای اجرای برنامه (پیشفرض: 1)</translation>
</message>
<message>
<source>Choose data directory on startup (default: 0)</source>
<translation>انتخاب مسیر دادهها در ابتدای اجرای برنامه (پیشفرض: 0)</translation>
</message>
</context>
<context>
<name>Intro</name>
<message>
<source>Welcome</source>
<translation>خوشآمدید</translation>
</message>
<message>
<source>Welcome to Blood Core.</source>
<translation type="unfinished"/>
</message>
<message>
<source>As this is the first time the program is launched, you can choose where Blood Core will store its data.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Blood Core will download and store a copy of the Blood block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Use the default data directory</source>
<translation>استفاده از مسیر پیشفرض</translation>
</message>
<message>
<source>Use a custom data directory:</source>
<translation>استفاده از یک مسیر سفارشی:</translation>
</message>
<message>
<source>Blood</source>
<translation>بیتکوین</translation>
</message>
<message>
<source>Error: Specified data directory "%1" can not be created.</source>
<translation>خطا: نمیتوان پوشهای برای دادهها در «%1» ایجاد کرد.</translation>
</message>
<message>
<source>Error</source>
<translation>خطا</translation>
</message>
<message>
<source>GB of free space available</source>
<translation>گیگابات فضا موجود است</translation>
</message>
<message>
<source>(of %1GB needed)</source>
<translation>(از %1 گیگابایت فضای مورد نیاز)</translation>
</message>
</context>
<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
<translation type="unfinished"/>
</message>
<message>
<source>Open payment request from URI or file</source>
<translation type="unfinished"/>
</message>
<message>
<source>URI:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Select payment request file</source>
<translation type="unfinished"/>
</message>
<message>
<source>Select payment request file to open</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<source>Options</source>
<translation>گزینهها</translation>
</message>
<message>
<source>&Main</source>
<translation>&عمومی</translation>
</message>
<message>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation>کارمزد اختیاریِ هر کیلوبایت برای انتقال سریعتر تراکنش. اکثر تراکنشها ۱ کیلوبایتی هستند.</translation>
</message>
<message>
<source>Pay transaction &fee</source>
<translation>پرداخت &کارمزد تراکنش</translation>
</message>
<message>
<source>Automatically start Blood after logging in to the system.</source>
<translation>اجرای خودکار بیتکوین در زمان ورود به سیستم.</translation>
</message>
<message>
<source>&Start Blood on system login</source>
<translation>&اجرای بیتکوین با ورود به سیستم</translation>
</message>
<message>
<source>Size of &database cache</source>
<translation type="unfinished"/>
</message>
<message>
<source>MB</source>
<translation type="unfinished"/>
</message>
<message>
<source>Number of script &verification threads</source>
<translation type="unfinished"/>
</message>
<message>
<source>Connect to the Blood network through a SOCKS proxy.</source>
<translation type="unfinished"/>
</message>
<message>
<source>&Connect through SOCKS proxy (default proxy):</source>
<translation type="unfinished"/>
</message>
<message>
<source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Third party transaction URLs</source>
<translation type="unfinished"/>
</message>
<message>
<source>Active command-line options that override above options:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Reset all client options to default.</source>
<translation>بازنشانی تمام تنظیمات به پیشفرض.</translation>
</message>
<message>
<source>&Reset Options</source>
<translation>&بازنشانی تنظیمات</translation>
</message>
<message>
<source>&Network</source>
<translation>&شبکه</translation>
</message>
<message>
<source>(0 = auto, <0 = leave that many cores free)</source>
<translation type="unfinished"/>
</message>
<message>
<source>W&allet</source>
<translation type="unfinished"/>
</message>
<message>
<source>Expert</source>
<translation type="unfinished"/>
</message>
<message>
<source>Enable coin &control features</source>
<translation type="unfinished"/>
</message>
<message>
<source>If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed.</source>
<translation type="unfinished"/>
</message>
<message>
<source>&Spend unconfirmed change</source>
<translation type="unfinished"/>
</message>
<message>
<source>Automatically open the Blood client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>باز کردن خودکار درگاه شبکهٔ بیتکوین روی روترها. تنها زمانی کار میکند که روتر از پروتکل UPnP پشتیبانی کند و این پروتکل فعال باشد.</translation>
</message>
<message>
<source>Map port using &UPnP</source>
<translation>نگاشت درگاه شبکه با استفاده از پروتکل &UPnP</translation>
</message>
<message>
<source>Proxy &IP:</source>
<translation>آ&یپی پراکسی:</translation>
</message>
<message>
<source>&Port:</source>
<translation>&درگاه:</translation>
</message>
<message>
<source>Port of the proxy (e.g. 9050)</source>
<translation>درگاه پراکسی (مثال 9050)</translation>
</message>
<message>
<source>SOCKS &Version:</source>
<translation>&نسخهٔ SOCKS:</translation>
</message>
<message>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation>نسخهٔ پراکسی SOCKS (مثلاً 5)</translation>
</message>
<message>
<source>&Window</source>
<translation>&پنجره</translation>
</message>
<message>
<source>Show only a tray icon after minimizing the window.</source>
<translation>تنها بعد از کوچک کردن پنجره، tray icon را نشان بده.</translation>
</message>
<message>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>&کوچک کردن به سینی بهجای نوار وظیفه</translation>
</message>
<message>
<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>مخفی کردن در نوار کناری بهجای خروج هنگام بستن پنجره. زمانی که این گزینه فعال است، برنامه فقط با استفاده از گزینهٔ خروج در منو قابل بسته شدن است.</translation>
</message>
<message>
<source>M&inimize on close</source>
<translation>کوچک کردن &در زمان بسته شدن</translation>
</message>
<message>
<source>&Display</source>
<translation>&نمایش</translation>
</message>
<message>
<source>User Interface &language:</source>
<translation>زبان &رابط کاربری:</translation>
</message>
<message>
<source>The user interface language can be set here. This setting will take effect after restarting Blood.</source>
<translation>زبان رابط کاربر میتواند در اینجا تنظیم شود. تنظیمات بعد از ظروع مجدد بیتکوین اعمال خواهد شد.</translation>
</message>
<message>
<source>&Unit to show amounts in:</source>
<translation>&واحد نمایش مبالغ:</translation>
</message>
<message>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>انتخاب واحد پول مورد استفاده برای نمایش در پنجرهها و برای ارسال سکه.</translation>
</message>
<message>
<source>Whether to show Blood addresses in the transaction list or not.</source>
<translation>نمایش یا عدم نمایش نشانیهای بیتکوین در لیست تراکنشها.</translation>
</message>
<message>
<source>&Display addresses in transaction list</source>
<translation>نمایش ن&شانیها در فهرست تراکنشها</translation>
</message>
<message>
<source>Whether to show coin control features or not.</source>
<translation type="unfinished"/>
</message>
<message>
<source>&OK</source>
<translation>&تأیید</translation>
</message>
<message>
<source>&Cancel</source>
<translation>&لغو</translation>
</message>
<message>
<source>default</source>
<translation>پیشفرض</translation>
</message>
<message>
<source>none</source>
<translation type="unfinished"/>
</message>
<message>
<source>Confirm options reset</source>
<translation>تأییدِ بازنشانی گزینهها</translation>
</message>
<message>
<source>Client restart required to activate changes.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Client will be shutdown, do you want to proceed?</source>
<translation type="unfinished"/>
</message>
<message>
<source>This change would require a client restart.</source>
<translation type="unfinished"/>
</message>
<message>
<source>The supplied proxy address is invalid.</source>
<translation>آدرس پراکسی داده شده صحیح نیست.</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<source>Form</source>
<translation>فرم</translation>
</message>
<message>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Blood network after a connection is established, but this process has not completed yet.</source>
<translation>اطلاعات نمایشداده شده ممکن است قدیمی باشند. بعد از این که یک اتصال با شبکه برقرار شد، کیف پول شما بهصورت خودکار با شبکهٔ بیتکوین همگامسازی میشود. اما این روند هنوز کامل نشده است.</translation>
</message>
<message>
<source>Wallet</source>
<translation>کیف پول</translation>
</message>
<message>
<source>Available:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Your current spendable balance</source>
<translation>تراز علیالحساب شما</translation>
</message>
<message>
<source>Pending:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
<translation>مجموع تراکنشهایی که هنوز تأیید نشدهاند؛ و هنوز روی تراز علیالحساب اعمال نشدهاند</translation>
</message>
<message>
<source>Immature:</source>
<translation>نارسیده:</translation>
</message>
<message>
<source>Mined balance that has not yet matured</source>
<translation>تراز استخراج شده از معدن که هنوز بالغ نشده است</translation>
</message>
<message>
<source>Total:</source>
<translation>جمع کل:</translation>
</message>
<message>
<source>Your current total balance</source>
<translation>تراز کل فعلی شما</translation>
</message>
<message>
<source><b>Recent transactions</b></source>
<translation><b>تراکنشهای اخیر</b></translation>
</message>
<message>
<source>out of sync</source>
<translation>ناهمگام</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<source>URI handling</source>
<translation>مدیریت URI</translation>
</message>
<message>
<source>URI can not be parsed! This can be caused by an invalid Blood address or malformed URI parameters.</source>
<translation>نشانی اینترنتی قابل تجزیه و تحلیل نیست! دلیل این وضعیت ممکن است یک نشانی نامعتبر بیتکوین و یا پارامترهای ناهنجار در URI بوده باشد.</translation>
</message>
<message>
<source>Requested payment amount of %1 is too small (considered dust).</source>
<translation type="unfinished"/>
</message>
<message>
<source>Payment request error</source>
<translation type="unfinished"/>
</message>
<message>
<source>Cannot start blood: click-to-pay handler</source>
<translation>نمیتوان بیتکوین را اجرا کرد: کنترلکنندهٔ کلیک-و-پرداخت</translation>
</message>
<message>
<source>Net manager warning</source>
<translation type="unfinished"/>
</message>
<message>
<source>Your active proxy doesn't support SOCKS5, which is required for payment requests via proxy.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Payment request fetch URL is invalid: %1</source>
<translation type="unfinished"/>
</message>
<message>
<source>Payment request file handling</source>
<translation type="unfinished"/>
</message>
<message>
<source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Unverified payment requests to custom payment scripts are unsupported.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Refund from %1</source>
<translation type="unfinished"/>
</message>
<message>
<source>Error communicating with %1: %2</source>
<translation type="unfinished"/>
</message>
<message>
<source>Payment request can not be parsed or processed!</source>
<translation type="unfinished"/>
</message>
<message>
<source>Bad response from server %1</source>
<translation type="unfinished"/>
</message>
<message>
<source>Payment acknowledged</source>
<translation type="unfinished"/>
</message>
<message>
<source>Network request error</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QObject</name>
<message>
<source>Blood</source>
<translation>بیتکوین</translation>
</message>
<message>
<source>Error: Specified data directory "%1" does not exist.</source>
<translation>خطا: پوشهٔ مشخص شده برای دادهها در «%1» وجود ندارد.</translation>
</message>
<message>
<source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Error: Invalid combination of -regtest and -testnet.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Blood Core didn't yet exit safely...</source>
<translation type="unfinished"/>
</message>
<message>
<source>Enter a Blood address (e.g. QfgBvXopUwn3KtDnW4HHqX2L7KD37TigXS)</source>
<translation>یک آدرس بیتکوین وارد کنید (مثلاً QfgBvXopUwn3KtDnW4HHqX2L7KD37TigXS)</translation>
</message>
</context>
<context>
<name>QRImageWidget</name>
<message>
<source>&Save Image...</source>
<translation type="unfinished"/>
</message>
<message>
<source>&Copy Image</source>
<translation type="unfinished"/>
</message>
<message>
<source>Save QR Code</source>
<translation>ذخیرهٔ کد QR</translation>
</message>
<message>
<source>PNG Image (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<source>Client name</source>
<translation>نام کلاینت</translation>
</message>
<message>
<source>N/A</source>
<translation>ناموجود</translation>
</message>
<message>
<source>Client version</source>
<translation>نسخهٔ کلاینت</translation>
</message>
<message>
<source>&Information</source>
<translation>&اطلاعات</translation>
</message>
<message>
<source>Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<source>General</source>
<translation type="unfinished"/>
</message>
<message>
<source>Using OpenSSL version</source>
<translation>نسخهٔ OpenSSL استفاده شده</translation>
</message>
<message>
<source>Startup time</source>
<translation>زمان آغاز به کار</translation>
</message>
<message>
<source>Network</source>
<translation>شبکه</translation>
</message>
<message>
<source>Name</source>
<translation>اسم</translation>
</message>
<message>
<source>Number of connections</source>
<translation>تعداد ارتباطات</translation>
</message>
<message>
<source>Block chain</source>
<translation>زنجیرهٔ بلوکها</translation>
</message>
<message>
<source>Current number of blocks</source>
<translation>تعداد فعلی بلوکها</translation>
</message>
<message>
<source>Estimated total blocks</source>
<translation>تعداد تخمینی بلوکها</translation>
</message>
<message>
<source>Last block time</source>
<translation>زمان آخرین بلوک</translation>
</message>
<message>
<source>&Open</source>
<translation>با&ز کردن</translation>
</message>
<message>
<source>&Console</source>
<translation>&کنسول</translation>
</message>
<message>
<source>&Network Traffic</source>
<translation type="unfinished"/>
</message>
<message>
<source>&Clear</source>
<translation type="unfinished"/>
</message>
<message>
<source>Totals</source>
<translation type="unfinished"/>
</message>
<message>
<source>In:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Out:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Build date</source>
<translation>ساخت تاریخ</translation>
</message>
<message>
<source>Debug log file</source>
<translation>فایلِ لاگِ اشکال زدایی</translation>
</message>
<message>
<source>Open the Blood debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation>فایلِ لاگِ اشکال زدایی Blood را از دایرکتوری جاری داده ها باز کنید. این عملیات ممکن است برای فایلهای لاگِ حجیم طولانی شود.</translation>
</message>
<message>
<source>Clear console</source>
<translation>پاکسازی کنسول</translation>
</message>
<message>
<source>Welcome to the Blood RPC console.</source>
<translation>به کنسور RPC بیتکوین خوش آمدید.</translation>
</message>
<message>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>دکمههای بالا و پایین برای پیمایش تاریخچه و <b>Ctrl-L</b> برای پاک کردن صفحه.</translation>
</message>
<message>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>برای نمایش یک مرور کلی از دستورات ممکن، عبارت <b>help</b> را بنویسید.</translation>
</message>
<message>
<source>%1 B</source>
<translation type="unfinished"/>
</message>
<message>
<source>%1 KB</source>
<translation type="unfinished"/>
</message>
<message>
<source>%1 MB</source>
<translation type="unfinished"/>
</message>
<message>
<source>%1 GB</source>
<translation type="unfinished"/>
</message>
<message>
<source>%1 m</source>
<translation type="unfinished"/>
</message>
<message>
<source>%1 h</source>
<translation type="unfinished"/>
</message>
<message>
<source>%1 h %2 m</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ReceiveCoinsDialog</name>
<message>
<source>&Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<source>&Label:</source>
<translation>&برچسب:</translation>
</message>
<message>
<source>&Message:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
<translation type="unfinished"/>
</message>
<message>
<source>R&euse an existing receiving address (not recommended)</source>
<translation type="unfinished"/>
</message>
<message>
<source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Blood network.</source>
<translation type="unfinished"/>
</message>
<message>
<source>An optional label to associate with the new receiving address.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Use this form to request payments. All fields are <b>optional</b>.</source>
<translation type="unfinished"/>
</message>
<message>
<source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Clear all fields of the form.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Clear</source>
<translation type="unfinished"/>
</message>
<message>
<source>Requested payments history</source>
<translation type="unfinished"/>
</message>
<message>
<source>&Request payment</source>
<translation type="unfinished"/>
</message>
<message>
<source>Show the selected request (does the same as double clicking an entry)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Show</source>
<translation type="unfinished"/>
</message>
<message>
<source>Remove the selected entries from the list</source>
<translation type="unfinished"/>
</message>
<message>
<source>Remove</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy label</source>
<translation>کپی برچسب</translation>
</message>
<message>
<source>Copy message</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy amount</source>
<translation>کپی مقدار</translation>
</message>
</context>
<context>
<name>ReceiveRequestDialog</name>
<message>
<source>QR Code</source>
<translation>کد QR</translation>
</message>
<message>
<source>Copy &URI</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy &Address</source>
<translation type="unfinished"/>
</message>
<message>
<source>&Save Image...</source>
<translation type="unfinished"/>
</message>
<message>
<source>Request payment to %1</source>
<translation type="unfinished"/>
</message>
<message>
<source>Payment information</source>
<translation type="unfinished"/>
</message>
<message>
<source>URI</source>
<translation type="unfinished"/>
</message>
<message>
<source>Address</source>
<translation>نشانی</translation>
</message>
<message>
<source>Amount</source>
<translation>مبلغ</translation>
</message>
<message>
<source>Label</source>
<translation>برچسب</translation>
</message>
<message>
<source>Message</source>
<translation>پیام</translation>
</message>
<message>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation>URL ایجاد شده خیلی طولانی است. سعی کنید طول برچسب و یا پیام را کمتر کنید.</translation>
</message>
<message>
<source>Error encoding URI into QR Code.</source>
<translation>خطا در تبدیل نشانی اینترنتی به صورت کد QR.</translation>
</message>
</context>
<context>
<name>RecentRequestsTableModel</name>
<message>
<source>Date</source>
<translation>تاریخ</translation>
</message>
<message>
<source>Label</source>
<translation>برچسب</translation>
</message>
<message>
<source>Message</source>
<translation>پیام</translation>
</message>
<message>
<source>Amount</source>
<translation>مبلغ</translation>
</message>
<message>
<source>(no label)</source>
<translation>(بدون برچسب)</translation>
</message>
<message>
<source>(no message)</source>
<translation type="unfinished"/>
</message>
<message>
<source>(no amount)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
<translation>ارسال سکه</translation>
</message>
<message>
<source>Coin Control Features</source>
<translation type="unfinished"/>
</message>
<message>
<source>Inputs...</source>
<translation type="unfinished"/>
</message>
<message>
<source>automatically selected</source>
<translation type="unfinished"/>
</message>
<message>
<source>Insufficient funds!</source>
<translation type="unfinished"/>
</message>
<message>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Amount:</source>
<translation>مبلغ:</translation>
</message>
<message>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Change:</source>
<translation type="unfinished"/>
</message>
<message>
<source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Custom change address</source>
<translation type="unfinished"/>
</message>
<message>
<source>Send to multiple recipients at once</source>
<translation>ارسال به چند دریافتکنندهٔ بهطور همزمان</translation>
</message>
<message>
<source>Add &Recipient</source>
<translation>&دریافتکنندهٔ جدید</translation>
</message>
<message>
<source>Clear all fields of the form.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Clear &All</source>
<translation>پاکسازی &همه</translation>
</message>
<message>
<source>Balance:</source>
<translation>تزار:</translation>
</message>
<message>
<source>Confirm the send action</source>
<translation>عملیات ارسال را تأیید کنید</translation>
</message>
<message>
<source>S&end</source>
<translation>&ارسال</translation>
</message>
<message>
<source>Confirm send coins</source>
<translation>ارسال سکه را تأیید کنید</translation>
</message>
<message>
<source>%1 to %2</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy amount</source>
<translation>کپی مقدار</translation>
</message>
<message>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<source>Total Amount %1 (= %2)</source>
<translation type="unfinished"/>
</message>
<message>
<source>or</source>
<translation type="unfinished"/>
</message>
<message>
<source>The recipient address is not valid, please recheck.</source>
<translation>نشانی گیرنده معتبر نیست؛ لطفا دوباره بررسی کنید.</translation>
</message>
<message>
<source>The amount to pay must be larger than 0.</source>
<translation>مبلغ پرداخت باید بیشتر از ۰ باشد.</translation>
</message>
<message>
<source>The amount exceeds your balance.</source>
<translation>میزان پرداخت از تراز شما بیشتر است.</translation>
</message>
<message>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>با احتساب هزینهٔ %1 برای هر تراکنش، مجموع میزان پرداختی از مبلغ تراز شما بیشتر میشود.</translation>
</message>
<message>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>یک نشانی تکراری پیدا شد. در هر عملیات ارسال، به هر نشانی فقط مبلغ میتوان ارسال کرد.</translation>
</message>
<message>
<source>Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<source>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>
<source>Warning: Invalid Blood address</source>
<translation type="unfinished"/>
</message>
<message>
<source>(no label)</source>
<translation>(بدون برچسب)</translation>
</message>
<message>
<source>Warning: Unknown change address</source>
<translation type="unfinished"/>
</message>
<message>
<source>Are you sure you want to send?</source>
<translation type="unfinished"/>
</message>
<message>
<source>added as transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<source>Payment request expired</source>
<translation type="unfinished"/>
</message>
<message>
<source>Invalid payment address %1</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<source>A&mount:</source>
<translation>A&مبلغ :</translation>
</message>
<message>
<source>Pay &To:</source>
<translation>پرداخ&ت به:</translation>
</message>
<message>
<source>The address to send the payment to (e.g. QfgBvXopUwn3KtDnW4HHqX2L7KD37TigXS)</source>
<translation>نشانی مقصد برای پرداخت (مثلاً QfgBvXopUwn3KtDnW4HHqX2L7KD37TigXS)</translation>
</message>
<message>
<source>Enter a label for this address to add it to your address book</source>
<translation>برای این نشانی یک برچسب وارد کنید تا در دفترچهٔ آدرس ذخیره شود</translation>
</message>
<message>
<source>&Label:</source>
<translation>&برچسب:</translation>
</message>
<message>
<source>Choose previously used address</source>
<translation type="unfinished"/>
</message>
<message>
<source>This is a normal payment.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<source>Paste address from clipboard</source>
<translation>چسباندن نشانی از حافظهٔ سیستم</translation>
</message>
<message>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<source>Remove this entry</source>
<translation type="unfinished"/>
</message>
<message>
<source>Message:</source>
<translation>پیام:</translation>
</message>
<message>
<source>This is a verified payment request.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Enter a label for this address to add it to the list of used addresses</source>
<translation type="unfinished"/>
</message>
<message>
<source>A message that was attached to the blood: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Blood network.</source>
<translation type="unfinished"/>
</message>
<message>
<source>This is an unverified payment request.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Pay To:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Memo:</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ShutdownWindow</name>
<message>
<source>Blood Core is shutting down...</source>
<translation type="unfinished"/>
</message>
<message>
<source>Do not shut down the computer until this window disappears.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<source>Signatures - Sign / Verify a Message</source>
<translation>امضاها - امضا / تأیید یک پیام</translation>
</message>
<message>
<source>&Sign Message</source>
<translation>ا&مضای پیام</translation>
</message>
<message>
<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>برای احراز اینکه پیامها از جانب شما هستند، میتوانید آنها را با نشانی خودتان امضا کنید. مراقب باشید چیزی که بدان اطمینان ندارید را امضا نکنید زیرا حملات فیشینگ ممکن است بخواهند از.پیامی با امضای شما سوءاستفاده کنند. تنها مواردی را که حاوی اطلاعات دقیق و قابل قبول برای شما هستند امضا کنید.</translation>
</message>
<message>
<source>The address to sign the message with (e.g. QfgBvXopUwn3KtDnW4HHqX2L7KD37TigXS)</source>
<translation>نشانی مورد استفاده برای امضا کردن پیام (برای مثال QfgBvXopUwn3KtDnW4HHqX2L7KD37TigXS)</translation>
</message>
<message>
<source>Choose previously used address</source>
<translation type="unfinished"/>
</message>
<message>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<source>Paste address from clipboard</source>
<translation>چسباندن نشانی از حافظهٔ سیستم</translation>
</message>
<message>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<source>Enter the message you want to sign here</source>
<translation>پیامی را که میخواهید امضا کنید در اینجا وارد کنید</translation>
</message>
<message>
<source>Signature</source>
<translation>امضا</translation>
</message>
<message>
<source>Copy the current signature to the system clipboard</source>
<translation>امضای فعلی را به حافظهٔ سیستم کپی کن</translation>
</message>
<message>
<source>Sign the message to prove you own this Blood address</source>
<translation>برای اثبات تعلق این نشانی به شما، پیام را امضا کنید</translation>
</message>
<message>
<source>Sign &Message</source>
<translation>ا&مضای پیام</translation>
</message>
<message>
<source>Reset all sign message fields</source>
<translation>بازنشانی تمام فیلدهای پیام</translation>
</message>
<message>
<source>Clear &All</source>
<translation>پاک &کردن همه</translation>
</message>
<message>
<source>&Verify Message</source>
<translation>&شناسایی پیام</translation>
</message>
<message>
<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>برای شناسایی پیام، نشانیِ امضا کننده و متن پیام را وارد کنید. (مطمئن شوید که فاصلهها، تبها و خطوط را عیناً کپی میکنید.) مراقب باشید در امضا چیزی بیشتر از آنچه در پیام میبینید وجود نداشته باشد تا فریب دزدان اینترنتی و حملات از نوع MITM را نخورید.</translation>
</message>
<message>
<source>The address the message was signed with (e.g. QfgBvXopUwn3KtDnW4HHqX2L7KD37TigXS)</source>
<translation>نشانی مورد استفاده برای امضا کردن پیام (برای مثال QfgBvXopUwn3KtDnW4HHqX2L7KD37TigXS)</translation>
</message>
<message>
<source>Verify the message to ensure it was signed with the specified Blood address</source>
<translation>برای حصول اطمینان از اینکه پیام با نشانی بیتکوین مشخص شده امضا است یا خیر، پیام را شناسایی کنید</translation>
</message>
<message>
<source>Verify &Message</source>
<translation>&شناسایی پیام</translation>
</message>
<message>
<source>Reset all verify message fields</source>
<translation>بازنشانی تمام فیلدهای پیام</translation>
</message>
<message>
<source>Enter a Blood address (e.g. QfgBvXopUwn3KtDnW4HHqX2L7KD37TigXS)</source>
<translation>یک نشانی بیتکوین وارد کنید (مثلاً QfgBvXopUwn3KtDnW4HHqX2L7KD37TigXS)</translation>
</message>
<message>
<source>Click "Sign Message" to generate signature</source>
<translation>برای ایجاد یک امضای جدید روی «امضای پیام» کلیک کنید</translation>
</message>
<message>
<source>The entered address is invalid.</source>
<translation>نشانی وارد شده نامعتبر است.</translation>
</message>
<message>
<source>Please check the address and try again.</source>
<translation>لطفاً نشانی را بررسی کنید و دوباره تلاش کنید.</translation>
</message>
<message>
<source>The entered address does not refer to a key.</source>
<translation>نشانی وارد شده به هیچ کلیدی اشاره نمیکند.</translation>
</message>
<message>
<source>Wallet unlock was cancelled.</source>
<translation>عملیات باز کرن قفل کیف پول لغو شد.</translation>
</message>
<message>
<source>Private key for the entered address is not available.</source>
<translation>کلید خصوصی برای نشانی وارد شده در دسترس نیست.</translation>
</message>
<message>
<source>Message signing failed.</source>
<translation>امضای پیام با شکست مواجه شد.</translation>
</message>
<message>
<source>Message signed.</source>
<translation>پیام امضا شد.</translation>
</message>
<message>
<source>The signature could not be decoded.</source>
<translation>امضا نمیتواند کدگشایی شود.</translation>
</message>
<message>
<source>Please check the signature and try again.</source>
<translation>لطفاً امضا را بررسی نموده و دوباره تلاش کنید.</translation>
</message>
<message>
<source>The signature did not match the message digest.</source>
<translation>امضا با خلاصهٔ پیام مطابقت ندارد.</translation>
</message>
<message>
<source>Message verification failed.</source>
<translation>شناسایی پیام با شکست مواجه شد.</translation>
</message>
<message>
<source>Message verified.</source>
<translation>پیام شناسایی شد.</translation>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<source>Blood Core</source>
<translation> هسته Blood </translation>
</message>
<message>
<source>The Blood Core developers</source>
<translation type="unfinished"/>
</message>
<message>
<source>[testnet]</source>
<translation>آزمایش شبکه</translation>
</message>
</context>
<context>
<name>TrafficGraphWidget</name>
<message>
<source>KB/s</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<source>Open until %1</source>
<translation>باز تا %1</translation>
</message>
<message>
<source>conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<source>%1/offline</source>
<translation>%1/آفلاین</translation>
</message>
<message>
<source>%1/unconfirmed</source>
<translation>%1/تأیید نشده</translation>
</message>
<message>
<source>%1 confirmations</source>
<translation>%1 تأییدیه</translation>
</message>
<message>
<source>Status</source>
<translation>وضعیت</translation>
</message>
<message numerus="yes">
<source>, broadcast through %n node(s)</source>
<translation><numerusform>، پخش از طریق %n گره</numerusform></translation>
</message>
<message>
<source>Date</source>
<translation>تاریخ</translation>
</message>
<message>
<source>Source</source>
<translation>منبع</translation>
</message>
<message>
<source>Generated</source>
<translation>تولید شده</translation>
</message>
<message>
<source>From</source>
<translation>فرستنده</translation>
</message>
<message>
<source>To</source>
<translation>گیرنده</translation>
</message>
<message>
<source>own address</source>
<translation>آدرس شما</translation>
</message>
<message>
<source>label</source>
<translation>برچسب</translation>
</message>
<message>
<source>Credit</source>
<translation>بدهی</translation>
</message>
<message numerus="yes">
<source>matures in %n more block(s)</source>
<translation><numerusform>بلوغ در %n بلوک دیگر</numerusform></translation>
</message>
<message>
<source>not accepted</source>
<translation>پذیرفته نشد</translation>
</message>
<message>
<source>Debit</source>
<translation>اعتبار</translation>
</message>
<message>
<source>Transaction fee</source>
<translation>هزینهٔ تراکنش</translation>
</message>
<message>
<source>Net amount</source>
<translation>مبلغ خالص</translation>
</message>
<message>
<source>Message</source>
<translation>پیام</translation>
</message>
<message>
<source>Comment</source>
<translation>نظر</translation>
</message>
<message>
<source>Transaction ID</source>
<translation>شناسهٔ تراکنش</translation>
</message>
<message>
<source>Merchant</source>
<translation type="unfinished"/>
</message>
<message>
<source>Generated coins must mature %1 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>
<source>Debug information</source>
<translation>اطلاعات اشکالزدایی</translation>
</message>
<message>
<source>Transaction</source>
<translation>تراکنش</translation>
</message>
<message>
<source>Inputs</source>
<translation>ورودیها</translation>
</message>
<message>
<source>Amount</source>
<translation>مبلغ</translation>
</message>
<message>
<source>true</source>
<translation>درست</translation>
</message>
<message>
<source>false</source>
<translation>نادرست</translation>
</message>
<message>
<source>, has not been successfully broadcast yet</source>
<translation>، هنوز با موفقیت ارسال نشده</translation>
</message>
<message numerus="yes">
<source>Open for %n more block(s)</source>
<translation><numerusform>باز برای %n بلوک دیگر</numerusform></translation>
</message>
<message>
<source>unknown</source>
<translation>ناشناس</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<source>Transaction details</source>
<translation>جزئیات تراکنش</translation>
</message>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>این پانل شامل توصیف کاملی از جزئیات تراکنش است</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<source>Date</source>
<translation>تاریخ</translation>
</message>
<message>
<source>Type</source>
<translation>نوع</translation>
</message>
<message>
<source>Address</source>
<translation>نشانی</translation>
</message>
<message>
<source>Amount</source>
<translation>مبلغ</translation>
</message>
<message>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<source>Open for %n more block(s)</source>
<translation><numerusform>باز برای %n بلوک دیگر</numerusform></translation>
</message>
<message>
<source>Open until %1</source>
<translation>باز شده تا %1</translation>
</message>
<message>
<source>Confirmed (%1 confirmations)</source>
<translation>تأیید شده (%1 تأییدیه)</translation>
</message>
<message>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>این بلوک از هیچ همتای دیگری دریافت نشده است و احتمال میرود پذیرفته نشود!</translation>
</message>
<message>
<source>Generated but not accepted</source>
<translation>تولید شده ولی قبول نشده</translation>
</message>
<message>
<source>Offline</source>
<translation type="unfinished"/>
</message>
<message>
<source>Unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<source>Received with</source>
<translation>دریافتشده با</translation>
</message>
<message>
<source>Received from</source>
<translation>دریافتشده از</translation>
</message>
<message>
<source>Sent to</source>
<translation>ارسالشده به</translation>
</message>
<message>
<source>Payment to yourself</source>
<translation>پر داخت به خودتان</translation>
</message>
<message>
<source>Mined</source>
<translation>استخراجشده</translation>
</message>
<message>
<source>(n/a)</source>
<translation>(ناموجود)</translation>
</message>
<message>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>وضعیت تراکنش. نشانگر را روی این فیلد نگه دارید تا تعداد تأییدیهها نشان داده شود.</translation>
</message>
<message>
<source>Date and time that the transaction was received.</source>
<translation>تاریخ و ساعت دریافت تراکنش.</translation>
</message>
<message>
<source>Type of transaction.</source>
<translation>نوع تراکنش.</translation>
</message>
<message>
<source>Destination address of transaction.</source>
<translation>نشانی مقصد تراکنش.</translation>
</message>
<message>
<source>Amount removed from or added to balance.</source>
<translation>مبلغ کسر شده و یا اضافه شده به تراز.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<source>All</source>
<translation>همه</translation>
</message>
<message>
<source>Today</source>
<translation>امروز</translation>
</message>
<message>
<source>This week</source>
<translation>این هفته</translation>
</message>
<message>
<source>This month</source>
<translation>این ماه</translation>
</message>
<message>
<source>Last month</source>
<translation>ماه گذشته</translation>
</message>
<message>
<source>This year</source>
<translation>امسال</translation>
</message>
<message>
<source>Range...</source>
<translation>محدوده...</translation>
</message>
<message>
<source>Received with</source>
<translation>دریافتشده با </translation>
</message>
<message>
<source>Sent to</source>
<translation>ارسال به</translation>
</message>
<message>
<source>To yourself</source>
<translation>به خودتان</translation>
</message>
<message>
<source>Mined</source>
<translation>استخراجشده</translation>
</message>
<message>
<source>Other</source>
<translation>دیگر</translation>
</message>
<message>
<source>Enter address or label to search</source>
<translation>برای جستوجو نشانی یا برچسب را وارد کنید</translation>
</message>
<message>
<source>Min amount</source>
<translation>مبلغ حداقل</translation>
</message>
<message>
<source>Copy address</source>
<translation>کپی نشانی</translation>
</message>
<message>
<source>Copy label</source>
<translation>کپی برچسب</translation>
</message>
<message>
<source>Copy amount</source>
<translation>کپی مقدار</translation>
</message>
<message>
<source>Copy transaction ID</source>
<translation>کپی شناسهٔ تراکنش</translation>
</message>
<message>
<source>Edit label</source>
<translation>ویرایش برچسب</translation>
</message>
<message>
<source>Show transaction details</source>
<translation>نمایش جزئیات تراکنش</translation>
</message>
<message>
<source>Export Transaction History</source>
<translation type="unfinished"/>
</message>
<message>
<source>Exporting Failed</source>
<translation type="unfinished"/>
</message>
<message>
<source>There was an error trying to save the transaction history to %1.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Exporting Successful</source>
<translation type="unfinished"/>
</message>
<message>
<source>The transaction history was successfully saved to %1.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Comma separated file (*.csv)</source>
<translation>پروندهٔ نوع CSV جداشونده با کاما (*.csv)</translation>
</message>
<message>
<source>Confirmed</source>
<translation>تأیید شده</translation>
</message>
<message>
<source>Date</source>
<translation>تاریخ</translation>
</message>
<message>
<source>Type</source>
<translation>نوع</translation>
</message>
<message>
<source>Label</source>
<translation>برچسب</translation>
</message>
<message>
<source>Address</source>
<translation>نشانی</translation>
</message>
<message>
<source>Amount</source>
<translation>مبلغ</translation>
</message>
<message>
<source>ID</source>
<translation>شناسه</translation>
</message>
<message>
<source>Range:</source>
<translation>محدوده:</translation>
</message>
<message>
<source>to</source>
<translation>به</translation>
</message>
</context>
<context>
<name>WalletFrame</name>
<message>
<source>No wallet has been loaded.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<source>Send Coins</source>
<translation>ارسال وجه</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<source>&Export</source>
<translation>&صدور</translation>
</message>
<message>
<source>Export the data in the current tab to a file</source>
<translation>داده ها نوارِ جاری را به فایل انتقال دهید</translation>
</message>
<message>
<source>Backup Wallet</source>
<translation>نسخهٔ پشتیبان کیف پول</translation>
</message>
<message>
<source>Wallet Data (*.dat)</source>
<translation>دادهٔ کیف پول (*.dat)</translation>
</message>
<message>
<source>Backup Failed</source>
<translation>خطا در پشتیبانگیری</translation>
</message>
<message>
<source>There was an error trying to save the wallet data to %1.</source>
<translation type="unfinished"/>
</message>
<message>
<source>The wallet data was successfully saved to %1.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Backup Successful</source>
<translation>پشتیبانگیری موفق</translation>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<source>Usage:</source>
<translation>استفاده:</translation>
</message>
<message>
<source>List commands</source>
<translation>نمایش لیست فرمانها</translation>
</message>
<message>
<source>Get help for a command</source>
<translation>راهنمایی در مورد یک دستور</translation>
</message>
<message>
<source>Options:</source>
<translation>گزینهها:</translation>
</message>
<message>
<source>Specify configuration file (default: bloodcoin.conf)</source>
<translation>مشخص کردن فایل پیکربندی (پیشفرض: bloodcoin.conf)</translation>
</message>
<message>
<source>Specify pid file (default: bloodd.pid)</source>
<translation>مشخص کردن فایل شناسهٔ پردازش - pid - (پیشفرض: blood.pid)</translation>
</message>
<message>
<source>Specify data directory</source>
<translation>مشخص کردن دایرکتوری دادهها</translation>
</message>
<message>
<source>Listen for connections on <port> (default: 8333 or testnet: 18333)</source>
<translation>پذیرش اتصالات روی پورت <port> (پیشفرض: 8833 یا شبکهٔ آزمایشی: 18333)</translation>
</message>
<message>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>حداکثر <n> اتصال با همتایان برقرار شود (پیشفرض: ۱۲۵)</translation>
</message>
<message>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>اتصال به یک گره برای دریافت آدرسهای همتا و قطع اتصال پس از اتمام عملیات</translation>
</message>
<message>
<source>Specify your own public address</source>
<translation>آدرس عمومی خود را مشخص کنید</translation>
</message>
<message>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>حد آستانه برای قطع ارتباط با همتایان بدرفتار (پیشفرض: ۱۰۰)</translation>
</message>
<message>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>مدت زمان جلوگیری از اتصال مجدد همتایان بدرفتار، به ثانیه (پیشفرض: ۸۴۶۰۰)</translation>
</message>
<message>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation>هنگام تنظیم پورت RPC %u برای گوش دادن روی IPv4 خطایی رخ داده است: %s</translation>
</message>
<message>
<source>Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)</source>
<translation>پورت مورد شنود برای اتصالات JSON-RPC (پیشفرض: 8332 برای شبکهٔ تست 18332)</translation>
</message>
<message>
<source>Accept command line and JSON-RPC commands</source>
<translation>پذیرش دستورات خط فرمان و دستورات JSON-RPC</translation>
</message>
<message>
<source>Blood Core RPC client version</source>
<translation type="unfinished"/>
</message>
<message>
<source>Run in the background as a daemon and accept commands</source>
<translation>اجرا در پشت زمینه بهصورت یک سرویس و پذیرش دستورات</translation>
</message>
<message>
<source>Use the test network</source>
<translation>استفاده از شبکهٔ آزمایش</translation>
</message>
<message>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>پذیرش اتصالات از بیرون (پیش فرض:1 بدون پراکسی یا اتصال)</translation>
</message>
<message>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=bloodrpc
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 "Blood Alert" [email protected]
</source>
<translation type="unfinished"/>
</message>
<message>
<source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation>مقید به نشانی داده شده باشید و همیشه از آن پیروی کنید. از نشانه گذاری استاندار IPv6 به صورت Host]:Port] استفاده کنید.</translation>
</message>
<message>
<source>Continuously rate-limit free transactions to <n>*1000 bytes per minute (default:15)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Error: Listening for incoming connections failed (listen returned error %d)</source>
<translation type="unfinished"/>
</message>
<message>
<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>تراکنش پذیرفته نیست! این خطا ممکن است در حالتی رخ داده باشد که مقداری از سکه های شما در کیف پولتان از جایی دیگر، همانند یک کپی از کیف پول اصلی اتان، خرج شده باشد اما در کیف پول اصلی اتان به عنوان مبلغ خرج شده، نشانه گذاری نشده باشد.</translation>
</message>
<message>
<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>خطا: این تراکنش به علت میزان وجه، دشواری، و یا استفاده از وجوه دریافتی اخیر نیازمند کارمزد به مبلغ حداقل %s است.</translation>
</message>
<message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>هنگامی که یک تراکنش در کیف پولی رخ می دهد، دستور را اجرا کن(%s در دستورات بوسیله ی TxID جایگزین می شود)</translation>
</message>
<message>
<source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Flush database activity from memory pool to disk log every <n> megabytes (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
<translation type="unfinished"/>
</message>
<message>
<source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
<translation type="unfinished"/>
</message>
<message>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation>این یک نسخه ی آزمایشی است - با مسئولیت خودتان از آن استفاده کنید - آن را در معدن و بازرگانی بکار نگیرید.</translation>
</message>
<message>
<source>Unable to bind to %s on this computer. Blood Core is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation>هشدار: مبلغ paytxfee بسیار بالایی تنظیم شده است! این مبلغ هزینهای است که شما برای تراکنشها پرداخت میکنید.</translation>
</message>
<message>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Blood will not work properly.</source>
<translation>هشدار: لطفا زمان و تاریخ رایانه خود را تصحیح نمایید! اگر ساعت رایانه شما اشتباه باشد bitcoin ممکن است صحیح کار نکند</translation>
</message>
<message>
<source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<source>(default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<source>(default: wallet.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<source><category> can be:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<source>Blood Core Daemon</source>
<translation type="unfinished"/>
</message>
<message>
<source>Block creation options:</source>
<translation>بستن گزینه ایجاد</translation>
</message>
<message>
<source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Connect only to the specified node(s)</source>
<translation>تنها در گره (های) مشخص شده متصل شوید</translation>
</message>
<message>
<source>Connect through SOCKS proxy</source>
<translation type="unfinished"/>
</message>
<message>
<source>Connect to JSON-RPC on <port> (default: 8332 or testnet: 18332)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Connection options:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Corrupted block database detected</source>
<translation>یک پایگاه داده ی بلوک خراب یافت شد</translation>
</message>
<message>
<source>Debugging/Testing options:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Disable safemode, override a real safe mode event (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>آدرس آی.پی. خود را شناسایی کنید (پیش فرض:1 در زمان when listening وno -externalip)</translation>
</message>
<message>
<source>Do not load the wallet and disable wallet RPC calls</source>
<translation type="unfinished"/>
</message>
<message>
<source>Do you want to rebuild the block database now?</source>
<translation>آیا مایلید که اکنون پایگاه داده ی بلوک را بازسازی کنید؟</translation>
</message>
<message>
<source>Error initializing block database</source>
<translation>خطا در آماده سازی پایگاه داده ی بلوک</translation>
</message>
<message>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<source>Error loading block database</source>
<translation>خطا در بارگذاری پایگاه داده ها</translation>
</message>
<message>
<source>Error opening block database</source>
<translation>خطا در بازگشایی پایگاه داده ی بلوک</translation>
</message>
<message>
<source>Error: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation type="unfinished"/>
</message>
<message>
<source>Error: system error: </source>
<translation>خطا: خطای سامانه:</translation>
</message>
<message>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>شنیدن هر گونه درگاه انجام پذیر نیست. ازlisten=0 برای اینکار استفاده کیند.</translation>
</message>
<message>
<source>Failed to read block info</source>
<translation>خواندن اطلاعات بلوک با شکست مواجه شد</translation>
</message>
<message>
<source>Failed to read block</source>
<translation>خواندن بلوک با شکست مواجه شد</translation>
</message>
<message>
<source>Failed to sync block index</source>
<translation>همگام سازی فهرست بلوک با شکست مواجه شد</translation>
</message>
<message>
<source>Failed to write block index</source>
<translation>نوشتن فهرست بلوک با شکست مواجه شد</translation>
</message>
<message>
<source>Failed to write block info</source>
<translation>نوشتن اطلاعات بلوک با شکست مواجه شد</translation>
</message>
<message>
<source>Failed to write block</source>
<translation>نوشتن بلوک با شکست مواجه شد</translation>
</message>
<message>
<source>Failed to write file info</source>
<translation>نوشتن اطلاعات پرونده با شکست مواجه شد</translation>
</message>
<message>
<source>Failed to write to coin database</source>
<translation>نوشتن اطلاعات در پایگاه داده ی سکه ها با شکست مواجه شد</translation>
</message>
<message>
<source>Failed to write transaction index</source>
<translation>نوشتن فهرست تراکنش ها با شکست مواجه شد</translation>
</message>
<message>
<source>Failed to write undo data</source>
<translation>عملیات بازگشت دادن اطلاعات با شکست مواجه شدن</translation>
</message>
<message>
<source>Fee per kB to add to transactions you send</source>
<translation>نرخ هر کیلوبایت برای اضافه کردن به تراکنشهایی که میفرستید</translation>
</message>
<message>
<source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation>قرینه ها را برای جستجوی DNS بیاب (پیش فرض: 1 مگر در زمان اتصال)</translation>
</message>
<message>
<source>Force safe mode (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Generate coins (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation>چند بلوک نیاز است که در ابتدای راه اندازی بررسی شوند(پیش فرض:288 ،0=همه)</translation>
</message>
<message>
<source>If <category> is not supplied, output all debugging information.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Importing...</source>
<translation type="unfinished"/>
</message>
<message>
<source>Incorrect or no genesis block found. Wrong datadir for network?</source>
<translation type="unfinished"/>
</message>
<message>
<source>Invalid -onion address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<source>Not enough file descriptors available.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Prepend debug output with timestamp (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<source>RPC client options:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation type="unfinished"/>
</message>
<message>
<source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Set maximum block size in bytes (default: %d)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Specify wallet file (within data directory)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Spend unconfirmed change when sending transactions (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<source>This is intended for regression testing tools and app development.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Usage (deprecated, use blood-cli):</source>
<translation type="unfinished"/>
</message>
<message>
<source>Verifying blocks...</source>
<translation>در حال بازبینی بلوک ها...</translation>
</message>
<message>
<source>Verifying wallet...</source>
<translation>در حال بازبینی کیف پول...</translation>
</message>
<message>
<source>Wait for RPC server to start</source>
<translation type="unfinished"/>
</message>
<message>
<source>Wallet %s resides outside data directory %s</source>
<translation type="unfinished"/>
</message>
<message>
<source>Wallet options:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
<translation type="unfinished"/>
</message>
<message>
<source>You need to rebuild the database using -reindex to change -txindex</source>
<translation type="unfinished"/>
</message>
<message>
<source>Imports blocks from external blk000??.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<source>Cannot obtain a lock on data directory %s. Blood Core is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Output debugging information (default: 0, supplying <category> is optional)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Information</source>
<translation>اطلاعات</translation>
</message>
<message>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<source>Limit size of signature cache to <n> entries (default: 50000)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Maintain a full transaction index (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation>حداکثر بافر دریافت شده بر اساس اتصال <n>* 1000 بایت (پیش فرض:5000)</translation>
</message>
<message>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>حداکثر بافر دریافت شده بر اساس اتصال <n>* 1000 بایت (پیش فرض:1000)</translation>
</message>
<message>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>تنها =به گره ها در شبکه متصا شوید <net> (IPv4, IPv6 or Tor)</translation>
</message>
<message>
<source>Print block on startup, if found in block index</source>
<translation type="unfinished"/>
</message>
<message>
<source>Print block tree on startup (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<source>RPC SSL options: (see the Blood Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<source>RPC server options:</source>
<translation type="unfinished"/>
</message>
<message>
<source>Randomly drop 1 of every <n> network messages</source>
<translation type="unfinished"/>
</message>
<message>
<source>Randomly fuzz 1 of every <n> network messages</source>
<translation type="unfinished"/>
</message>
<message>
<source>Run a thread to flush wallet periodically (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<source>SSL options: (see the Blood Wiki for SSL setup instructions)</source>
<translation>گزینه ssl (به ویکیbitcoin برای راهنمای راه اندازی ssl مراجعه شود)</translation>
</message>
<message>
<source>Send command to Blood Core</source>
<translation type="unfinished"/>
</message>
<message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>اطلاعات ردگیری/اشکالزدایی را به جای فایل لاگ اشکالزدایی به کنسول بفرستید</translation>
</message>
<message>
<source>Set minimum block size in bytes (default: 0)</source>
<translation>حداقل سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 0)</translation>
</message>
<message>
<source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Show all debugging options (usage: --help -help-debug)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Show benchmark information (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>فایل debug.log را در startup مشتری کوچک کن (پیش فرض:1 اگر اشکال زدایی روی نداد)</translation>
</message>
<message>
<source>Signing transaction failed</source>
<translation type="unfinished"/>
</message>
<message>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>(میلی ثانیه )فاصله ارتباط خاص</translation>
</message>
<message>
<source>Start Blood Core Daemon</source>
<translation type="unfinished"/>
</message>
<message>
<source>System error: </source>
<translation>خطای سامانه</translation>
</message>
<message>
<source>Transaction amount too small</source>
<translation type="unfinished"/>
</message>
<message>
<source>Transaction amounts must be positive</source>
<translation type="unfinished"/>
</message>
<message>
<source>Transaction too large</source>
<translation type="unfinished"/>
</message>
<message>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:0)</translation>
</message>
<message>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:1 در زمان شنیدن)</translation>
</message>
<message>
<source>Username for JSON-RPC connections</source>
<translation>JSON-RPC شناسه برای ارتباطات</translation>
</message>
<message>
<source>Warning</source>
<translation>هشدار</translation>
</message>
<message>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>هشدار: این نسخه قدیمی است، روزآمدسازی مورد نیاز است</translation>
</message>
<message>
<source>Zapping all transactions from wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<source>on startup</source>
<translation type="unfinished"/>
</message>
<message>
<source>version</source>
<translation>نسخه</translation>
</message>
<message>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<source>Password for JSON-RPC connections</source>
<translation>JSON-RPC عبارت عبور برای ارتباطات</translation>
</message>
<message>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>از آدرس آی پی خاص JSON-RPC قبول ارتباطات</translation>
</message>
<message>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>(127.0.0.1پیش فرض: ) &lt;ip&gt; دادن فرمانها برای استفاده گره ها روی</translation>
</message>
<message>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>زمانی که بهترین بلاک تغییر کرد، دستور را اجرا کن (%s در cmd با block hash جایگزین شده است)</translation>
</message>
<message>
<source>Upgrade wallet to latest format</source>
<translation>wallet را به جدیدترین فرمت روزآمد کنید</translation>
</message>
<message>
<source>Set key pool size to <n> (default: 100)</source>
<translation> (100پیش فرض:)&lt;n&gt; گذاشتن اندازه کلید روی </translation>
</message>
<message>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>اسکان مجدد زنجیر بلوکها برای گم والت معامله</translation>
</message>
<message>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>JSON-RPCبرای ارتباطات استفاده کنید OpenSSL (https)</translation>
</message>
<message>
<source>Server certificate file (default: server.cert)</source>
<translation> (server.certپیش فرض: )گواهی نامه سرور</translation>
</message>
<message>
<source>Server private key (default: server.pem)</source>
<translation>(server.pemپیش فرض: ) کلید خصوصی سرور</translation>
</message>
<message>
<source>This help message</source>
<translation>پیام کمکی</translation>
</message>
<message>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>امکان اتصال به %s از این رایانه وجود ندارد ( bind returned error %d, %s)</translation>
</message>
<message>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>به DNS اجازه بده تا برای addnode ، seednode و اتصال جستجو کند</translation>
</message>
<message>
<source>Loading addresses...</source>
<translation>بار گیری آدرس ها</translation>
</message>
<message>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>خطا در بارگیری wallet.dat: کیف پول خراب شده است</translation>
</message>
<message>
<source>Error loading wallet.dat: Wallet requires newer version of Blood</source>
<translation>خطا در بارگیری wallet.dat: کیف پول به ویرایش جدیدتری از Biticon نیاز دارد</translation>
</message>
<message>
<source>Wallet needed to be rewritten: restart Blood to complete</source>
<translation>سلام</translation>
</message>
<message>
<source>Error loading wallet.dat</source>
<translation>خطا در بارگیری wallet.dat</translation>
</message>
<message>
<source>Invalid -proxy address: '%s'</source>
<translation>آدرس پراکسی اشتباه %s</translation>
</message>
<message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>شبکه مشخص شده غیرقابل شناسایی در onlynet: '%s'</translation>
</message>
<message>
<source>Unknown -socks proxy version requested: %i</source>
<translation>نسخه پراکسی ساکس غیرقابل شناسایی درخواست شده است: %i</translation>
</message>
<message>
<source>Cannot resolve -bind address: '%s'</source>
<translation>آدرس قابل اتصال- شناسایی نیست %s</translation>
</message>
<message>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>آدرس خارجی قابل اتصال- شناسایی نیست %s</translation>
</message>
<message>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>میزان وجه اشتباه برای paytxfee=<میزان وجه>: %s</translation>
</message>
<message>
<source>Invalid amount</source>
<translation>میزان وجه اشتباه</translation>
</message>
<message>
<source>Insufficient funds</source>
<translation>بود جه نا کافی </translation>
</message>
<message>
<source>Loading block index...</source>
<translation>بار گیری شاخص بلوک</translation>
</message>
<message>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>به اتصال یک گره اضافه کنید و اتصال را باز نگاه دارید</translation>
</message>
<message>
<source>Loading wallet...</source>
<translation>بار گیری والت</translation>
</message>
<message>
<source>Cannot downgrade wallet</source>
<translation>امکان تنزل نسخه در wallet وجود ندارد</translation>
</message>
<message>
<source>Cannot write default address</source>
<translation>آدرس پیش فرض قابل ذخیره نیست</translation>
</message>
<message>
<source>Rescanning...</source>
<translation>اسکان مجدد</translation>
</message>
<message>
<source>Done loading</source>
<translation>بار گیری انجام شده است</translation>
</message>
<message>
<source>To use the %s option</source>
<translation>برای استفاده از %s از انتخابات</translation>
</message>
<message>
<source>Error</source>
<translation>خطا</translation>
</message>
<message>
<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>%s، شما باید یک rpcpassword را در فایل پیکربندی تنظیم کنید :⏎%s⏎ اگر فایل ایجاد نشد، یک فایل فقط متنی ایجاد کنید.
</translation>
</message>
</context>
</TS> | mit |
clinReasonTool/ClinicalReasoningTool | ClinReasonTool/src/scripts/crt_box.js | 32572 |
/**
* javascript for displaying the illness script tabs representation
*/
/******************** general add/del*******************************/
/**
* user changes the course of time, we trigger an ajax call to save change.
*/
/*function changeCourseOfTime(){
var courseTime = $("#courseTime").val();
sendAjax(courseTime, doNothing, "chgCourseOfTime", "");
}*/
/******************** problems tab*******************************/
/**
* a problem is added to the list of the already added problems:
**/
function addProblem(problemId, name, typedinName){
clearErrorMsgs();
var prefix = $("#fdg_prefix").val();
if(name!=""){
checkBoxColorOnAdd("fdg_title", "fdgs");
sendAjax(problemId, problemCallBack, "addProblem", prefix, typedinName);
}
}
/**
* we check whether we have to change the box color from red to light red/gray when an item has been added.
* @param titleId
* @param boxnames
*/
function checkBoxColorOnAdd(titleId, boxnames){
if($("#"+titleId).hasClass("contcol_0")) return;
var learnerNumItems = $("."+boxnames);
var expNumItems = $(".exp"+boxnames);
var learnerNum = learnerNumItems.length;
var expNum = expNumItems.length;
$("#"+titleId).removeClass("contcol_1");
$("#"+titleId).removeClass("contcol_2");
if(expNum - learnerNum > 5) $("#"+titleId).addClass("contcol_2") ;
else if(expNum - learnerNum > 3) $("#"+titleId).addClass("contcol_1") ;
else $("#"+titleId).addClass("contcol_0");
}
function chgProblem(id, type){
clearErrorMsgs();
sendAjax(id, problemCallBack, "changeProblem", type);
}
function delProblem(id){
clearErrorMsgs();
sendAjax(id, delProbCallBack, "delProblem", "");
}
function delProbCallBack(probId, selProb){
deleteEndpoints("fdg_"+probId);
problemCallBack(probId, selProb);
}
function problemCallBack(){
$("#problems").val("");
$("#fdg_prefix").val("");
//var arr = $(".fdgs");
removeElems("fdgs");
removeElems("expfdgs");
//we update the problems list and the json string
$("[id='probform:hiddenProbButton']").click();
$("[id='cnxsform:hiddenCnxButton']").click();
}
function updateProbCallback(data){
if(isCallbackStatusSuccess(data)){
updateItemCallback(data, "fdg", "fdg_box");
if(isOverallExpertOn()) //re-display expert items:
turnOverallExpFeedbackOn('expFeedback', 'icon-user-md');
}
}
function addJokerFdg(){
clearErrorMsgs();
sendAjax("", problemCallBack, "addJoker", 1);
//sendAjaxUrlHtml("", problemAddCallBack, "addJoker", 1, "probbox2.xhtml");
}
function toggleFdgFeedback(){
clearErrorMsgs();
toggleExpBoxFeedback("expFeedbackFdg", "fdgs", 1);
}
function togglePeersFdg(){
clearErrorMsgs();
togglePeerBoxFeedback("peerFeedbackFdg", "peer_score_fdg", 1);
}
/******************** diagnoses *******************************/
/**
* a diagnosis is added to the list of the already added diagnoses:
**/
function addDiagnosis(diagnId, name, typedinName){
clearErrorMsgs();
if(name!=""){
checkBoxColorOnAdd("ddx_title", "ddxs");
sendAjax(diagnId, diagnosisCallBack, "addDiagnosis", name, typedinName);
}
//sendAjaxUrlHtml(diagnId, diagnosisAddCallBack, "addDiagnosis", name, "ddxbox2.xhtml");
}
function delDiagnosis(id){
clearErrorMsgs();
sendAjax(id, delDiagnosisCallBack, "delDiagnosis", "");
}
/** we come back from deleting a diagnosis **/
function delDiagnosisCallBack(ddxId, selDDX){
//we have to delete the endpoint separately, otherwise they persist....
//deleteEndpoints("ddx_"+ddxId);
diagnosisCallBack();
}
/**
* we come back from adding a diagnosis (either manually or with a joker)
*/
function diagnosisCallBack(){
$("#ddx").val("");
//$(".ddxs").remove();
removeElems("ddxs");
removeElems("expddxs");
//we update the ddx boxes (re-printing all boxes)
$("[id='ddxform:hiddenDDXButton']").click();
$("[id='cnxsform:hiddenCnxButton']").click();
}
/**
* click on the hidden ddx button calls this function
* @param data
*/
function updateDDXCallback(data){
if(isCallbackStatusSuccess(data)){
checkSubmitBtn();
updateItemCallback(data, "ddx", "ddx_box");
if(isOverallExpertOn()) //re-display expert items:
turnOverallExpFeedbackOn('expFeedback', 'icon-user-md');
}
}
/** a diagnosis is changed to must not missed -red icon or toggled back*/
function toggleMnM(id){
clearErrorMsgs();
hideDropDown("ddddx_"+id);
var id2 = "mnmicon_"+id;
if ($("#"+id2).hasClass("fa-exclamation-circle1")){
$("#"+id2).removeClass("fa-exclamation-circle1");
$("#"+id2).addClass("fa-exclamation-circle0");
}
else{
$("#"+id2).removeClass("fa-exclamation-circle0");
$("#"+id2).addClass("fa-exclamation-circle1");
}
sendAjax(id, doNothing, "changeMnM", "");
}
function addJokerDDX(){
clearErrorMsgs();
//sendAjax("", diagnosisCallBack, "addJoker", 2);
sendAjaxUrlHtml("", diagnosisCallBack, "addJoker", 2, "ddxbox2.xhtml");
}
function toggleDDXFeedback(){
clearErrorMsgs();
toggleExpBoxFeedback("expFeedbackDDX", "ddxs", 2);
}
function togglePeersDDX(){
clearErrorMsgs();
togglePeerBoxFeedback("peerFeedbackDDX", "peer_score_ddx", 2);
}
/** 1. we show the submit ddx dialog and ask for confidence **/
function doSubmitDDXDialog(){
clearErrorMsgs();
//we check whether there are diagnoses, if so we open a dialog, else we display a hint
var ddxNum = $( ".ddxs" ).length;
$('.ui-tooltip').remove();
if(ddxNum>0){ //then open jdialog:
$("#jdialog").dialog( "option", "width", ['300'] );
$("#jdialog").dialog( "option", "height", ['350'] );
$("#jdialog").dialog( "option", "title", submitDialogTitle );
$("#jdialog").dialog( "option", "buttons", [ ] );
//$("#jdialog").dialog( "option", "position", [20,20] );
//loadFile();
if(submitted=="true" || presubmitted=="true") $("#jdialog").load("submitteddialog.xhtml"); // $("#jdialog").load("submitteddialog.xhtml");
else $("#jdialog").load("submitdialog.xhtml"); //$("#jdialog").load("submitdialog.xhtml");
$("#jdialog" ).dialog( "open" );
$("#jdialog").show();
}
else{
alert(submitDDXOne);
$('.ui-tooltip').remove();
}
}
/**
* successful submission -> continue case = just close dialog...
*/
function continueCase(){
$("#jdialog" ).dialog( "close" );
removeElems("ddxs");
removeElems("expddxs");
$("[id='ddxform:hiddenDDXButton']").click();
$("[id='cnxsform:hiddenCnxButton']").click();
}
/** 2. user has selected ddxs and submits final ddxs */
function submitDDXConfirmed(){
var checks = $(".chb_ddx:checked");
if(checks.length<=0){
alert(subcheck);
return;
}
var ids="";
for(i=0; i<checks.length;i++){
ids += checks[i].value +"#";
}
ids = ids.substring(0, ids.length-1);
var confVal = $( "#confidence_slider" ).slider( "value" );
sendAjax(ids, submitDDXConfirmedCallBack, "submitDDXAndConf", confVal);
}
/** 3. we come back after the submission and have to reload ddxs once again show feedback for submitted diagnoses */
function submitDDXConfirmedCallBack(data){
$("#jdialog").load("submitteddialog.xhtml");
}
/* 5. show feedback for submitted diagnoses */
function doScoreDDXDialogCallback(){
$(".tier_4").prop( "checked", true );
$(".chb_ddx").attr("disabled","disabled");
}
/*
* close the dialog and user continues with case....
*/
function backToCase(){
$("#jdialog" ).dialog( "close" );
sendAjax("", revertSubmissionCallback, "resetFinalDDX","");
}
/** called when the submitting dialog is closed or backToCase is clicked**/
function revertSubmissionCallback(data){
//we update the ddx boxes (re-printing all boxes)
presubmitted = "false";
checkSubmitBtn();
postEnforceFinalDDXSubmission("false");
}
/*
* dialog remains open and user can choose again from list? -> what if correct diagnosis is not included
*/
function tryAgain(){
sendAjax("", tryAgainCallback, "resetFinalDDX","");
}
function tryAgainCallback(data){
presubmitted = "false";
postEnforceFinalDDXSubmission("false");
$("#jdialog").load("submitdialog.xhtml");
}
function showSolution(){
sendAjax("", showSolutionCallBack, "showSolution", "");
}
function showSolutionCallBack(data){
//if(isCallbackStatusSuccess(data)){
showSolutionStage = currentStageScriptNoUPdate;
$("#jdialog" ).dialog( "close" );
clickExpFeedbackOn();
presubmitted = "false";
submitted = "true";
postEnforceFinalDDXSubmission("true");
//make changes visible in the ddx box:
removeElems("ddxs");
removeElems("expddxs");
$("[id='ddxform:hiddenDDXButton']").click();
$("[id='cnxsform:hiddenCnxButton']").click();
//}
}
/**
* called when user clicks on close button of the submit dialog
*/
function closeSubmitDialog(){
//just close jdialog if diagnosis already submitted OR only submitdialog is opened.
if(submitted=="true" || presubmitted=="false"){
removeElems("ddxs");
removeElems("expddxs");
$("[id='ddxform:hiddenDDXButton']").click();
$("[id='cnxsform:hiddenCnxButton']").click();
return true;
}
if(parseInt(currentStage) < parseInt(maxSubmittedStage)){ //user can continue the case:
sendAjax("", revertSubmissionCallback, "resetFinalDDX","");
return true;
}
else{ //user has already reached max number of cards and has to decide about final diagnosis, so we do NOT close the dialog
//but display a message:
$("#enforceSubmitMsg").show();
return false;
}
}
function ruleOut(id){
clearErrorMsgs();
hideDropDown("ddddx_"+id);
var item = $("#ddx_"+id);
item.css("border-color", "#cccccc");
item.css("color", "#cccccc");
$("#ri_a_"+id).removeClass();
$("#ro_a_"+id).removeClass();
$("#ro_a_"+id).hide();
$("#ri_a_"+id).show();
sendAjax(id, doNothing, "changeTier", 5);
}
function ruleIn(id){
clearErrorMsgs();
hideDropDown("ddddx_"+id);
var item = $("#ddx_"+id);
item.css("border-color", "#000000");
item.css("color", "#000000");
$("#ri_a_"+id).removeClass();
$("#ro_a_"+id).removeClass();
$("#ri_a_"+id).hide();
$("#ro_a_"+id).show();
sendAjax(id, doNothing, "changeTier", 5);
}
function workingDDXOn(id){
clearErrorMsgs();
hideDropDown("ddddx_"+id);
var item = $("#ddx_"+id);
item.css("background-color", getRectColor(6))
//item.css("color", "#c00815");
$("#wdon_a_"+id).removeClass();
$("#wdoff_a_"+id).removeClass();
$("#wdon_a_"+id).hide();
$("#wdoff_a_"+id).show();
sendAjax(id, doNothing, "changeTier", 6);
}
function workingDDXOff(id){
clearErrorMsgs();
hideDropDown("ddddx_"+id);
var item = $("#ddx_"+id);
item.css("background-color", getRectColor(-1))
//item.css("color", "#000000");
$("#wdoff_a_"+id).removeClass();
$("#wdon_a_"+id).removeClass();
$("#wdoff_a_"+id).hide();
$("#wdon_a_"+id).show();
sendAjax(id, doNothing, "changeTier", 6);
}
function getRectColor(tier){
if(tier==5) return "#cccccc"; //ruled-out
if(tier==6) return "#cce6ff"; //working diagnosis
if(tier==4) return "#80bfff"; //final diagnosis
//if(tier==7) return "#f3546a"; //MnM
return "#ffffff";
}
function checkSubmitBtn(){
var ddxNum = $( ".ddxs" ).length;
//enable submit button:
if(ddxNum>0 && submitted!="true"){
$("#submitBtnSpan").removeClass("submitBtnOff");
}
//disable submit button:
else if((ddxNum<=0 || submitted=="true") && !$("#submitBtnSpan").hasClass("submitBtnOff")){
$("#submitBtnSpan").addClass("submitBtnOff");
}
if( submitted=="true"){
$("#submitBtnA").html(submittedButonName);
}
else $("#submitBtnA").html(submitButonName);
}
/*
* user has changed the confidence slider, so, we send the new value via ajax.
* -> now we submit it together with the ddx submission.
*/
function submitSliderChange(){
var confVal = $( "#confidence_slider" ).slider( "value" );
//sendAjax(-1, doNothing, "changeConfidence", confVal);
}
/**
* we init the display of the dialog shown after a diagnosis has been submitted.
* depending on the score we display different dialogs. If showSolution or score >=0.5 we als trigger
* the update of the ddx box to show the final diagnosis in the appropriate color.
*/
function initSubmittedDialog(){
if(minScoreCorrect=="") minScoreCorrect = "0.5";
presubmitted = "true";
$(".tier_4").prop( "checked", true );
var ddxsFBIcons = $(".expfb");
if(ddxsFBIcons!=null){
for(i=0; i<ddxsFBIcons.length;i++){
var iItem = ddxsFBIcons[i];
if($(iItem).attr("mytooltip")=="") $(iItem).hide();
}
}
//learner has the correct or pretty correct solution:
if($("#score").val()>=parseFloat(minScoreCorrect) || $("#score").val()==-2){ // 50 - 100% correct solution or no scoring possible:
submitted = "true";
presubmitted = "false";
$(".aftersubmit_succ").show();
$(".aftersubmit_fail").hide();
$(".errors").hide();
postEnforceFinalDDXSubmission(submitted/*, myStage, maxSubmittedStage*/);
return;
}
//show solution has been selected
if(showSolutionStage!="" && showSolutionStage!="-1" && showSolutionStage!="0"){
submitted = "true";
$(".aftersubmit_succ").show();
$(".aftersubmit_fail").hide();
postEnforceFinalDDXSubmission(submitted/*, myStage, maxSubmittedStage*/);
return;
}
else{
$(".aftersubmit_fail").show();
$(".aftersubmit_succ").hide();
if($("#errors").html().trim()=="")
$(".errors").hide();
}
}
/******************** management *******************************/
/*
* a management item is added to the list of the already added items:
*/
function addManagement(mngId, name, typedinName){
clearErrorMsgs();
if(name!=""){
checkBoxColorOnAdd("mng_title", "mngs");
sendAjax(mngId, managementCallBack, "addMng", name, typedinName);
}
}
function delManagement(id){
clearErrorMsgs();
sendAjax(id, delManagementCallBack, "delMng", "");
}
function chgManagement(id, type){
clearErrorMsgs();
sendAjax(id, managementCallBack, "changeMng", type);
}
function delManagementCallBack(mngId, selMng){
//if(isCallbackStatusSuccess(data)){
//deleteEndpoints("mng_"+mngId);
managementCallBack(mngId, selMng);
//}
}
function managementCallBack(mngId, selMng){
//if(isCallbackStatusSuccess(data)){
$("#mng").val("");
//$(".mngs").remove();
removeElems("mngs");
removeElems("expmngs");
//we update the problems list and the json string
$("[id='mngform:hiddenMngButton']").click();
$("[id='cnxsform:hiddenCnxButton']").click();
//}
}
function updatMngCallback(data){
if(isCallbackStatusSuccess(data)){
updateItemCallback(data, "mng", "mng_box");
if(isOverallExpertOn()) //re-display expert items:
turnOverallExpFeedbackOn('expFeedback', 'icon-user-md');
}
}
function addJokerMng(){
clearErrorMsgs();
sendAjax("", managementCallBack, "addJoker", 4);
}
function toggleMngFeedback(){
clearErrorMsgs();
toggleExpBoxFeedback("expFeedbackMng", "mngs", 4);
}
function togglePeersMng(){
clearErrorMsgs();
togglePeerBoxFeedback("peerFeedbackMng", "peer_score_mng", 4);
}
/******************** diagnostic steps *******************************/
/*
* a test is added to the list of the already added tests:
*/
function addTest(testId, name, typedinName){
clearErrorMsgs();
if(name!=""){
checkBoxColorOnAdd("tst_title", "tests");
sendAjax(testId, testCallBack, "addTest", name, typedinName);
}
}
function delTest(id){
clearErrorMsgs();
sendAjax(id, delTestCallBack, "delTest", "");
}
function delTestCallBack(testId, selTest){
//deleteEndpoints("tst_"+testId);
testCallBack(testId, selTest);
}
function testCallBack(testId, selTest){
$("#test").val("");
//$(".tests").remove();
removeElems("tests");
removeElems("exptests");
//we update the problems list and the json string
$("[id='testform:hiddenTestButton']").click();
$("[id='cnxsform:hiddenCnxButton']").click();
}
function updateTestCallback(data){
if(isCallbackStatusSuccess(data)){
updateItemCallback(data, "tst","tst_box");
if(isOverallExpertOn()) //re-display expert items:
turnOverallExpFeedbackOn('expFeedback', 'icon-user-md');
}
}
function chgTest(id, type){
clearErrorMsgs();
sendAjax(id, testCallBack, "changeTest", type);
}
function addJokerTest(){
clearErrorMsgs();
sendAjax("", testCallBack, "addJoker", 3);
}
function toggleTestFeedback(){
clearErrorMsgs();
toggleExpBoxFeedback("expFeedbackTest", "tests", 3);
}
function togglePeersTest(){
clearErrorMsgs();
togglePeerBoxFeedback("peerFeedbackTest", "peer_score_test", 3);
}
/******************** pathophysiology *******************************/
/*
* a test is added to the list of the already added tests:
*/
function addPatho(pathoId, name, typedinName){
clearErrorMsgs();
if(name!=""){
checkBoxColorOnAdd("patho_title", "patho");
sendAjax(pathoId, testCallBack, "addPatho", name, typedinName);
}
}
function delPatho(id){
clearErrorMsgs();
sendAjax(id, delPathoCallBack, "delPatho", "");
}
function delPathoCallBack(pathoId, selPatho){
pathoCallBack(pathoId, selPatho);
}
function pathoCallBack(pathoId, selPatho){
$("#patho").val("");
//$(".tests").remove();
removeElems("patho");
removeElems("exppatho");
//we update the problems list and the json string
$("[id='pathoform:hiddenPathoButton']").click();
$("[id='cnxsform:hiddenCnxButton']").click();
}
function updatePathoCallback(data){
if(isCallbackStatusSuccess(data)){
updateItemCallback(data, "pat","patho_box");
if(isOverallExpertOn()) //re-display expert items:
turnOverallExpFeedbackOn('expFeedback', 'icon-user-md');
}
}
function chgPatho(id, type){
clearErrorMsgs();
sendAjax(id, pathoCallBack, "changePatho", type);
}
function addJokerPatho(){
clearErrorMsgs();
sendAjax("", pathoCallBack, "addJoker", 3);
}
function togglePathoFeedback(){
clearErrorMsgs();
toggleExpBoxFeedback("expFeedbackPatho", "patho", 6);
}
function togglePeersPatho(){
clearErrorMsgs();
togglePeerBoxFeedback("peerFeedbackPatho", "peer_score_patho", 6);
}
/******************** summary statement *******************************/
function saveSummSt(id){
clearErrorMsgs();
var text = $("#summStText").val();
sendAjax(id, saveSummStatementCallBack, "saveSummStatement",text);
}
function saveSummStatementCallBack(data){
//if(isCallbackStatusSuccess(data)){
$("#msg_sumstform").html(saveSumConfirm);
//}
}
/******************** Feedback *******************************/
/*
* display exp feedback (green/gray borders for boxes) for given box/type.
* Does not include missing items!
*/
function toggleExpBoxFeedback(iconId, itemClass, type){
if($("#"+iconId).hasClass("fa-user-md_on")){ //turn feedback off
turnExpBoxFeedbackOff(iconId, itemClass);
sendAjaxContext(0, doNothing, "toogleExpBoxFeedback", type);
}
else{ //turn feedback on
turnExpBoxFeedbackOn(iconId, itemClass);
sendAjaxContext(1, doNothing, "toogleExpBoxFeedback", type);
}
}
function turnExpBoxFeedbackOn(iconId, itemClass){
//if($("#"+iconId).hasClass("fa-user-md_on")) return; //already on
$("#"+iconId).removeClass("fa-user-md_off");
$("#"+iconId).addClass("fa-user-md_on");
$("#"+iconId).attr("title", hideExpTitle);
$("."+itemClass+"_score").show();
if(itemClass!="ddxs") return;
var items = $("."+itemClass);
if(items!=null){
for (i=0; i<items.length; i++){
var suffix = $("#"+items[i].id).attr("suffix");
var expSuffix = $("#expstyle_"+items[i].id).attr("suffix");
if(suffix!=expSuffix && expSuffix>=0){
$("#"+items[i].id).removeClass("ddxclass_"+suffix);
$("#"+items[i].id).addClass("ddxclass_"+expSuffix);
}
}
}
}
function turnExpBoxFeedbackOff(iconId, itemClass){
if($("#"+iconId).hasClass("fa-user-md_off")) return; //already off
$("#"+iconId).removeClass("fa-user-md_on");
$("#"+iconId).addClass("fa-user-md_off");
$("#"+iconId).attr("title", showExpTitle);
$("."+itemClass+"_score").hide();
if(itemClass!="ddxs") return;
var items = $("."+itemClass);
if(items!=null){
for (i=0; i<items.length; i++){
var suffix = $("#"+items[i].id).attr("suffix");
var expSuffix = $("#expstyle_"+items[i].id).attr("suffix");
if(suffix!=expSuffix && expSuffix>=0){
$("#"+items[i].id).removeClass("ddxclass_"+expSuffix);
$("#"+items[i].id).addClass("ddxclass_"+suffix);
}
//var cssclass = $("#"+items[i].id).attr("class");
//alert(cssclass);
//addClass("box_"+score);
}
}
}
var addHeightPixSum = 0;
/*
* display or hide the expert's summary statement
*/
function toggleSumFeedback(iconId, type){
clearErrorMsgs();
if($("#"+iconId).hasClass("fa-user-md_on")){ //turn feedback off
$("#"+iconId).removeClass("fa-user-md_on");
$("#"+iconId).addClass("fa-user-md_off");
$("#"+iconId).attr("title", showExpTitle);
$("#list_score_sum").hide();
sendAjaxContext(0, doNothing, "toogleExpBoxFeedback", type);
}
else{ //turn feedback on
//sumstanchor
$("#"+iconId).removeClass("fa-user-md_off");
$("#"+iconId).addClass("fa-user-md_on");
$("#"+iconId).attr("title", hideExpTitle);
$("#list_score_sum").show();
//var element = document.getElementById("list_score_sum");
$("#list_score_sum")[0].scrollIntoView({
behavior: "smooth", // or "auto" or "instant"
block: "start" // or "end"
});
sendAjaxContext(1, doNothing, "toogleExpBoxFeedback", type);
}
}
function isOverallExpertOn(){
if($("#expFeedback").prop("checked"))
return true;
return false;
}
function clickExpFeedbackOn(){
$("#expFeedback").prop("checked", "true");
}
/* when displaying the expert summSt we have to increase the height of the box.*/
function calcAddPixForExpSum(){
}
/*
* we display the peer feedback for the given box/type
*/
function togglePeerBoxFeedback(iconId, itemClass, type){
hideTooltips();
if($("#"+iconId).hasClass("fa-users_on")){ //turn off
$("#"+iconId).removeClass("fa-users_on");
$("#"+iconId).addClass("fa-users_off");
$("#"+iconId).removeClass("icon-users_on");
$("#"+iconId).attr("title", "click to hide expert feedback");
$("."+itemClass).hide();
sendAjaxContext(0, doNothing, "tooglePeerBoxFeedback", type);
}
else{ //turn it on
$("#"+iconId).removeClass("fa-users_off");
$("#"+iconId).addClass("fa-users_on");
$("#"+iconId).attr("title", "click to show expert feedback");
$("."+itemClass).show();
sendAjaxContext(1, doNothing, "tooglePeerBoxFeedback", type);
}
}
/*
* display/hide overall expert feedback (including missing items)
* if isAllowed=false, then user is not allwoed to access feedback at this time
*/
function toggleExpFeedback(iconId, itemClass, isAllowed){
hideTooltips();
if(isAllowed=="false" || !isAllowed) return; //should not happen, because button is hidden anyway.
if($("#"+iconId).hasClass("fa-user-md_on")){ //turn feedback off
turnOverallExpFeedbackOff(iconId, itemClass);
sendAjaxContext(0, doNothing, "toogleExpFeedback", "");
}
else{
turnOverallExpFeedbackOn(iconId, itemClass);
sendAjaxContext(1, doNothing, "toogleExpFeedback", "");
}
}
function turnOverallExpFeedbackOn(iconId, itemClass){
turnViewModeOff();
if(iconId!=""){
$("#"+iconId).removeClass("fa-user-md_off");
$("#"+iconId).addClass("fa-user-md_on");
$("#"+iconId).attr("title", hideExpTitle);
}
$(".expbox").addClass("expboxstatus_show");
$(".expbox").removeClass("expboxstatus");
$(".expbox").removeClass("expboxinvis");
if(probBoxUsed==1)turnExpBoxFeedbackOn("expFeedbackFdg", "fdgs");
if(ddxBoxUsed==1) turnExpBoxFeedbackOn("expFeedbackDDX", "ddxs");
if(testBoxUsed==1)turnExpBoxFeedbackOn("expFeedbackTest", "tests");
if(pathoBoxUsed==1)turnExpBoxFeedbackOn("expFeedbackPatho", "patho");
if(mngBoxUsed==1)turnExpBoxFeedbackOn("expFeedbackMng", "mngs");
if(isOverallCnxOn()){
$(".jtk-exp-connector").addClass("jtk-exp-connector-show");
$(".jtk-exp-connector").removeClass("jtk-exp-connector-hide");
}
}
function turnViewModeBoxOn(box, prefix, prefix2){
if(box=="2"){ //view mode
$(".pass"+prefix+"s").removeClass("passboxinvis");
$(".pass"+prefix+"s").removeClass("passboxstatus");
$(".pass"+prefix+"s").addClass("passboxstatus_show");
//turnExpBoxFeedbackOn("expFeedbackFdg", "fdgs");
$("."+prefix2+"search").hide(); //hide search box
//THIS IS AN UGLY HACK - without it, the box is 30px downwards.
$("#"+prefix+"_box.search").removeClass("boxchild");
$("#"+prefix+"_box.search").height(30);
$("."+prefix+"passive").show();
}
}
function turnViewModeBoxOff(box, prefix, prefix2){
if(box=="2"){ //view mode
$(".pass"+prefix+"s").addClass("passboxinvis");
$(".pass"+prefix+"s").addClass("passboxstatus");
$(".pass"+prefix+"s").removeClass("passboxstatus_show");
//turnExpBoxFeedbackOn("expFeedbackFdg", "fdgs");
//$("."+prefix2+"search").hide(); //hide search box
//THIS IS AN UGLY HACK - without it, the box is 30px downwards.
//$("#"+prefix+"_box.search").removeClass("boxchild");
//$("#"+prefix+"_box.search").height(30);
$("."+prefix+"passive").show();
}
}
/*
* if boxes are displayed in view mode we show the expert items and hide the search box.
*/
function turnViewModeOn(){
turnViewModeBoxOn(probBoxUsed, "fdg", "prob");
turnViewModeBoxOn(ddxBoxUsed, "ddx", "ddx");
turnViewModeBoxOn(testBoxUsed, "test", "test");
turnViewModeBoxOn(pathoBoxUsed, "patho", "pat");
turnViewModeBoxOn(mngBoxUsed, "mng", "mng");
/*if(probBoxUsed=="2"){ //view mode
$(".passfdgs").removeClass("passboxinvis");
$(".passfdgs").removeClass("passboxstatus");
$(".passfdgs").addClass("passboxstatus_show");
//turnExpBoxFeedbackOn("expFeedbackFdg", "fdgs");
$(".probsearch").hide(); //hide search box
//THIS IS AN UGLY HACK - without it, the box is 30px downwards.
$("#fdg_box.search").removeClass("boxchild");
$("#fdg_box.search").height(30);
$(".fdgpassive").show();
}*/
/*if(ddxBoxUsed=="2"){
$(".passddxs").removeClass("passboxinvis");
$(".passddxs").removeClass("passboxstatus");
$(".passddxs").addClass("passboxstatus_show");
$(".footer").hide(); //hide final diagnosis button because we are in readonly mode
$(".ddxsearch").hide(); //hide search box
$("#ddx_box.search").removeClass("boxchild");
$("#ddx_box.search").height(30);
$(".ddxpassive").show();
//turnExpBoxFeedbackOn("expFeedbackDDX", "ddxs");
}*/
/* if(testBoxUsed=="2"){
$(".passtests").removeClass("passboxinvis");
$(".passtests").removeClass("passboxstatus");
$(".passtests").addClass("passboxstatus_show");
$(".testsearch").hide(); //hide search box
$("#tst_box.search").removeClass("boxchild");
$("#tst_box.search").height(30);
$(".tstpassive").show();
//turnExpBoxFeedbackOn("expFeedbackTest", "tests");
}*/
/*if(pathoBoxUsed=="2"){
$(".passpatho").removeClass("passboxinvis");
$(".passpatho").removeClass("passboxstatus");
$(".passpatho").addClass("passboxstatus_show");
$(".pathosearch").hide(); //hide search box
$("#pat_box.search").removeClass("boxchild");
$("#pat_box.search").height(30);
$(".patpassive").show();
//turnExpBoxFeedbackOn("expFeedbackPatho", "patho");
}*/
/*if(mngBoxUsed=="2"){
$(".passmngs").removeClass("passboxinvis");
$(".passmngs").removeClass("passboxstatus");
$(".passmngs").addClass("passboxstatus_show");
//turnExpBoxFeedbackOn("passFeedbackMng", "mngs");
$(".mngsearch").hide(); //hide search box
$("#mng_box.search").removeClass("boxchild");
$("#mng_box.search").height(30);
$(".mngpassive").show();
}*/
//hide search boxes and ddx footer
//turnExpBoxFeedbackOn("expFeedbackTest", "tests");
//turnExpBoxFeedbackOn("expFeedbackMng", "mngs");
/*if(isOverallCnxOn()){
$(".jtk-exp-connector").addClass("jtk-exp-connector-show");
$(".jtk-exp-connector").removeClass("jtk-exp-connector-hide");
}*/
}
function turnViewModeOff(){
turnViewModeBoxOff(probBoxUsed, "fdg", "prob");
turnViewModeBoxOff(ddxBoxUsed, "ddx", "ddx");
turnViewModeBoxOff(testBoxUsed, "test", "tst");
turnViewModeBoxOff(pathoBoxUsed, "patho", "pat");
turnViewModeBoxOff(mngBoxUsed, "mng", "mng");
}
function turnOverallExpFeedbackOff(iconId, itemClass){
if(iconId!=""){
$("#"+iconId).removeClass("fa-user-md_on");
$("#"+iconId).addClass("fa-user-md_off");
$("#"+iconId).attr("title", showExpTitle);
}
$(".expbox").removeClass("expboxstatus_show");
$(".expbox").addClass("expboxstatus");
turnExpBoxFeedbackOff("expFeedbackFdg", "fdgs");
turnExpBoxFeedbackOff("expFeedbackDDX", "ddxs");
turnExpBoxFeedbackOff("expFeedbackTest", "tests");
turnExpBoxFeedbackOff("expFeedbackPatho", "patho");
turnExpBoxFeedbackOff("expFeedbackMng", "mngs");
$(".jtk-exp-connector").addClass("jtk-exp-connector-hide");
$(".jtk-exp-connector").removeClass("jtk-exp-connector-show");
turnViewModeOn();
}
/**
* if fireExpNowAvailable is true we display a jdialog with a hint about the availability of the expert feedback button.
* @param fireExpNowAvailable
*/
/*function checkDisplayExpFbHint(fireExpNowAvailable){
if(fireExpNowAvailable=="true" || fireExpNowAvailable){
$("#jdialogFbHint").dialog( "option", "width", ['180'] );
$("#jdialogFbHint").dialog( "option", "height", ['220'] );
//$("#jdialogFbHint").dialog( "option", "title", "Feedback");
$("#jdialogFbHint").dialog( "option", "buttons", [ ] );
//$("#jdialogFbHint").html(expFbHint);
$('.ui-tooltip').remove();
$("#jdialogFbHint" ).dialog( "open" );
}
}*/
function openErrorDialog(){
$("#jdialogError").dialog( "option", "width", ['300'] );
$("#jdialogError").dialog( "option", "height", ['300'] );
$("#jdialogError").dialog( "option", "title", errorDialogTitle);
$("#jdialogError").dialog( "option", "buttons", [ ] );
//$("#jdialogError").load("errors.xhtml");
$('.ui-tooltip').remove();
$("#jdialogError" ).dialog( "open" );
$("#jdialogError").show();
}
/*
* show the expert items as a step-wise process thru the stages
*/
function showExpStages(){
}
/*
* We get the position of the pos element (the itembox) and position the dropdown menu close to it
*/
function showDropDown(id, pos){
hideAllDropDowns(); //we first hide all in case any are still open...
clearErrorMsgs();
$("#"+id).show();
var x = $("#"+pos).position().left+10;
var y = $("#"+pos).position().top+5;
$("#"+id).css( { left: x + "px", top: y + "px" } )
}
/*
* Onmouseleave (! not onmouseout) we hide the dropdown again
*/
function hideDropDown(id){
$("#"+id).hide();
}
function hideAllDropDowns(){
$(".dropdown-content").hide();
}
function clearErrorMsgs(){
$(".errormsg").html("");
}
function hideTooltips(){
$('.ui-tooltip').remove();
$('.hintdiv').hide();
}
/**
* opens the help dialog
*/
function openHelp(expFBMode){
clearErrorMsgs();
$("#jdialogHelp").dialog( "option", "width", ['350'] );
$("#jdialogHelp").dialog( "option", "position", {my: "center top", at: "center top", of: window} );
$("#jdialogHelp").dialog( "option", "height", ['400'] );
$("#jdialogHelp").dialog( "option", "title", helpDialogTitle);
$("#jdialogHelp").dialog( "option", "buttons", [ ] );
$("#jdialogHelp").load("help/index_"+lang+".template");
//$("#help" ).dialog.html(template);
$('.ui-tooltip').remove();
$("#jdialogHelp" ).dialog( "open" ).dialog("widget").css("visibility", "hidden");
$("#helpicon").effect("transfer", { //opening effect to show where help icon is:
to: $("#jdialogHelp").dialog("widget"),
className: "ui-effects-transfer"
}, 500, function () {
$("#jdialogHelp").dialog("widget").css("visibility", "visible");
toggleExpFBHelp(expFBMode);
});
//toggleExpFBHelp(expFBMode);
//var helpoptions = { to: "#jdialogHelp" , className: "ui-effects-transfer" }
//$( "#helpicon" ).effect( "transfer", helpoptions, 500, openHelpCallback );
}
/**
* depending on the exp feedback mode we hide/display different sections in the help pages
* @param expFBMode
*/
function toggleExpFBHelp(expFBMode){
if(expFBMode<0) expFBMode = 0;
$("#help_expfb_0").hide();
$("#help_expfb_1").hide();
$("#help_expfb_"+ expFBMode).show();
}
function closeHelpDialog(){}
function openHelpCallback() {
$("#jdialogHelp").show();
//toggleExpFBHelp(1);
}
function removeElems(className){
turnOverallExpFeedbackOn("", "");
var arr = $("."+className);
if(arr!=null){
for(i=0; i<arr.length;i++){
var rmId = $(arr[i]).attr("id");
deleteEndpoints(rmId);
instance.remove(arr[i],true);
}
}
item_arr = new Array();
exp_arr = new Array();
turnOverallExpFeedbackOff("", "");
}
function correctFdgScore(in_score) {
return correctSpecialScore (in_score, 40, 2, 80, 40, 3);
}
function correctDDxScore(in_score) {
return correctSpecialScore (in_score, 40, 2, 80, 40, 3);
}
function correctTstScore(in_score) {
return correctSpecialScore (in_score, 40, 2, 80, 40, 3);
}
function correctMngScore(in_score) {
return correctSpecialScore (in_score, 40, 2, 80, 40, 3);
}
/**
** in the view mode we can hide/show the scoring for each item (checkmarks)
*/
function toggleExpItemFeedback(){
if($("#expItemFeedback").prop("checked"))
$(".icons_score").show();
else
$(".icons_score").hide();
}
| mit |
Touchwonders/testflight-exporter | lib/testflight_exporter/version.rb | 50 | module TestFlightExporter
VERSION = "0.2.2"
end
| mit |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.