text
stringlengths
2
1.04M
meta
dict
/** * LiveStreamEventActionError.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.dfp.axis.v201411; /** * Lists all errors associated with live stream event action. */ public class LiveStreamEventActionError extends com.google.api.ads.dfp.axis.v201411.ApiError implements java.io.Serializable { private com.google.api.ads.dfp.axis.v201411.LiveStreamEventActionErrorReason reason; public LiveStreamEventActionError() { } public LiveStreamEventActionError( java.lang.String fieldPath, java.lang.String trigger, java.lang.String errorString, java.lang.String apiErrorType, com.google.api.ads.dfp.axis.v201411.LiveStreamEventActionErrorReason reason) { super( fieldPath, trigger, errorString, apiErrorType); this.reason = reason; } /** * Gets the reason value for this LiveStreamEventActionError. * * @return reason */ public com.google.api.ads.dfp.axis.v201411.LiveStreamEventActionErrorReason getReason() { return reason; } /** * Sets the reason value for this LiveStreamEventActionError. * * @param reason */ public void setReason(com.google.api.ads.dfp.axis.v201411.LiveStreamEventActionErrorReason reason) { this.reason = reason; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof LiveStreamEventActionError)) return false; LiveStreamEventActionError other = (LiveStreamEventActionError) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = super.equals(obj) && ((this.reason==null && other.getReason()==null) || (this.reason!=null && this.reason.equals(other.getReason()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); if (getReason() != null) { _hashCode += getReason().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(LiveStreamEventActionError.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201411", "LiveStreamEventActionError")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("reason"); elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201411", "reason")); elemField.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201411", "LiveStreamEventActionError.Reason")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
{ "content_hash": "546ab222471d65dda67b64ce12042e8a", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 150, "avg_line_length": 32.857142857142854, "alnum_prop": 0.6331807780320367, "repo_name": "ya7lelkom/googleads-java-lib", "id": "c1d219e81087c825d3001834c0ba256c13dd7ded", "size": "4370", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201411/LiveStreamEventActionError.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "93553686" } ], "symlink_target": "" }
#region Copyright Information // Sentience Lab Unity Framework // (C) Sentience Lab ([email protected]), Auckland University of Technology, Auckland, New Zealand #endregion Copyright Information using System; using System.Collections.Generic; using UnityEngine; namespace SentienceLab.Input { /// <summary> /// Class for managing inputs via a variety of sources, e.g., keypress, mouse click, etc. /// </summary> /// public class InputHandler { public readonly string Name; /// <summary> /// Shortcut to find an input handler through the InputManager singelton. /// </summary> /// <param name="inputName">the input handler to search for</param> /// <returns>the input handler</returns> /// public static InputHandler Find(String inputName) { return InputManager.GetInputHandler(inputName); } /// <summary> /// Creates a new input handler instance. /// </summary> /// public InputHandler(string name) { Name = name; devices = new List<IDevice>(); // by default, check for existing Unity Input axis names try { UnityEngine.Input.GetAxis(name); AddMapping(InputManager.InputType.UnityInput, name); } catch (Exception) { // axis doesn't exist > don't bother } // set default threshold SetPressThreshold(1.0f); } /// <summary> /// Adds an input handler. /// </summary> /// <param name="type">the type of input handler</param> /// <param name="inputName">the name of the input handler</param> /// <returns><c>true</c>if the handler was added</returns> /// public bool AddMapping(InputManager.InputType type, string inputName) { IDevice device = null; // check for special devices if (inputName.Contains("-|+")) { // plus/minus device string[] parts = inputName.Split(new string[] { "-|+" }, StringSplitOptions.RemoveEmptyEntries); if (parts.Length > 1) { IDevice deviceMinus = CreateDevice(type, parts[0]); IDevice devicePlus = CreateDevice(type, parts[1]); if ((devicePlus != null) && (deviceMinus != null)) { device = new Device_PlusMinus(devicePlus, deviceMinus); } } } else { // standard device device = CreateDevice(type, inputName); } if (device != null) { // success devices.Add(device); } return (device != null); } private IDevice CreateDevice(InputManager.InputType type, string inputName) { IDevice device = null; // create specific device subtype switch (type) { case InputManager.InputType.UnityInput: device = new Device_UnityInput(); break; case InputManager.InputType.Keyboard: device = new Device_Keyboard(); break; #if !NO_MOCAP_INPUT case InputManager.InputType.MoCapDevice: device = new Device_MoCap(); break; #endif default: { Debug.LogWarning("Input Type " + type.ToString() + " not supported."); break; } } // try to initialise given the parameter string if (device != null) { inputName = inputName.Trim(); if (!device.Initialise(inputName)) { // failed device = null; } } return device; } /// <summary> /// Processes all input devices. /// </summary> /// public void Process() { foreach (IDevice d in devices) { d.Process(); } } /// <summary> /// Checks if the input is currently active, e.g., a button is down. /// </summary> /// <returns><c>true</c> when the input is active</returns> /// public bool IsActive() { bool returnValue = false; foreach (IDevice d in devices) { returnValue |= d.IsActive(); } return returnValue; } /// <summary> /// Checks if the input has just been activated, e.g., a button has been pressed. /// </summary> /// <returns><c>true</c> when the input has been activated</returns> /// public bool IsActivated() { bool isActivated = false; foreach (IDevice d in devices) { isActivated |= d.IsActivated(); } return isActivated; } /// <summary> /// Checks if the input has been deactivated, e.g., a button has been released. /// </summary> /// <returns><c>true</c> when the input has been deactivated</returns> /// public bool IsDeactivated() { bool isDeactivated = false; foreach (IDevice d in devices) { isDeactivated |= d.IsDeactivated(); } return isDeactivated; } /// <summary> /// Gets the raw "value" of the input. /// </summary> /// <returns>raw channel/axis/button value</returns> /// public float GetValue() { float returnValue = 0.0f; foreach (IDevice d in devices) { returnValue += d.GetValue(); } return returnValue; } public float GetPressThreshold() { return pressThreshold; } public void SetPressThreshold(float value) { pressThreshold = value; foreach (IDevice device in devices) { device.SetPressThreshold(pressThreshold); } } public override string ToString() { string txtDevices = ""; foreach (IDevice d in devices) { txtDevices += (txtDevices.Length > 0) ? ", " : ""; txtDevices += d.ToString(); } return "'" + Name + "' (Devices: " + txtDevices + ")"; } public bool HasDevices() { return devices.Count > 0; } private List<IDevice> devices; private float pressThreshold; /// <summary> /// Interface for a generic input device. /// </summary> /// private interface IDevice { bool Initialise(string inputName); void Process(); bool IsActive(); bool IsActivated(); bool IsDeactivated(); float GetValue(); void SetPressThreshold(float value); } /// <summary> /// Class for a Unity input axis device. /// </summary> /// private class Device_UnityInput : IDevice { public Device_UnityInput() { axisName = ""; oldValue = 0; } public bool Initialise(string inputName) { bool success = false; try { UnityEngine.Input.GetAxis(inputName); success = true; axisName = inputName; // get first value Process(); oldValue = value; } catch (Exception e) { // the Input.GetAxis call didn't succeed // -> the name of the key must have been wrong Debug.LogWarning(e.Message); } return success; } public void Process() { oldValue = value; value = UnityEngine.Input.GetAxis(axisName); } public bool IsActive() { return (value >= pressThreshold); } public bool IsActivated() { return (oldValue < pressThreshold) && (value >= pressThreshold); } public bool IsDeactivated() { return (oldValue >= pressThreshold) && (value < pressThreshold); } public float GetValue() { return value; } public void SetPressThreshold(float value) { pressThreshold = value; } public override string ToString() { return "Axis '" + axisName + "'"; } private string axisName; private float value, oldValue; private float pressThreshold; } /// <summary> /// Class for a keyboard button input device. /// It can be a single key, or a +/- combination of two keys, e.g., for zoom. /// </summary> /// private class Device_Keyboard : IDevice { enum Mode { SingleKey, Combination } public Device_Keyboard() { keyName1 = ""; keyName2 = ""; } public bool Initialise(string inputName) { bool success = false; try { if ((inputName.Length > 1) && inputName.Contains("+")) { // TODO: Split by "+" // input name for a combo name (with a '+' separating them) string[] parts = inputName.Split('+'); UnityEngine.Input.GetKey(parts[0]); keyName1 = parts[0]; UnityEngine.Input.GetKey(parts[1]); keyName2 = parts[1]; mode = Mode.Combination; } else { // only a single key UnityEngine.Input.GetKey(inputName); keyName1 = inputName; mode = Mode.SingleKey; } success = true; } catch (Exception e) { // one of the Input.GetKey calls didn't succeed // -> the name of the key must have been wrong Debug.LogWarning(e.Message); } return success; } public void Process() { // nothing to do } public bool IsActive() { switch (mode) { case Mode.Combination: return (UnityEngine.Input.GetKey(keyName1) && UnityEngine.Input.GetKey(keyName2)); default: return UnityEngine.Input.GetKey(keyName1); } } public bool IsActivated() { switch (mode) { case Mode.Combination: return (UnityEngine.Input.GetKeyDown(keyName1) && UnityEngine.Input.GetKey(keyName2)) || (UnityEngine.Input.GetKey(keyName1) && UnityEngine.Input.GetKeyDown(keyName2)); default: return UnityEngine.Input.GetKeyDown(keyName1); } } public bool IsDeactivated() { switch (mode) { case Mode.Combination: return (UnityEngine.Input.GetKeyUp(keyName1) && UnityEngine.Input.GetKey(keyName2)) || (UnityEngine.Input.GetKey(keyName1) && UnityEngine.Input.GetKeyUp(keyName2)); default: return UnityEngine.Input.GetKeyUp(keyName1); } } public float GetValue() { float value; switch (mode) { case Mode.Combination: value = (UnityEngine.Input.GetKey(keyName1) && UnityEngine.Input.GetKey(keyName2)) ? 1 : 0; break; default: value = UnityEngine.Input.GetKey(keyName1) ? 1 : 0; break; } return value; } public void SetPressThreshold(float value) { // doesn't apply to keys } public override string ToString() { switch (mode) { case Mode.Combination: return "Keys '" + keyName1 + "'+'" + keyName2 + "'"; default: return "Key '" + keyName1 + "'"; } } private string keyName1, keyName2; private Mode mode; } #if !NO_MOCAP_INPUT /// <summary> /// Class for a MoCap input device. /// </summary> /// private class Device_MoCap : IDevice { public Device_MoCap() { device = null; } public bool Initialise(string inputName) { // input name shoud be "device/channel" syntax string[] parts = inputName.Split('/'); if ((parts.Length >= 2) && MoCap.MoCapManager.Instance != null) { device = new MoCap.InputDeviceHandler(parts[0], parts[1]); } return device != null; } public void Process() { device.Process(); } public bool IsActive() { return device.GetButton(); } public bool IsActivated() { return device.GetButtonDown(); } public bool IsDeactivated() { return device.GetButtonUp(); } public float GetValue() { return device.GetAxis(); } public void SetPressThreshold(float value) { device.PressThreshold = value; } public override string ToString() { return device.ToString(); } private MoCap.InputDeviceHandler device; } #endif /// <summary> /// Metaclass for an input device that takes a positive and negative input. /// </summary> /// private class Device_PlusMinus : IDevice { public Device_PlusMinus(IDevice _devicePlus, IDevice _deviceMinus) { devicePlus = _devicePlus; deviceMinus = _deviceMinus; } public bool Initialise(string inputName) { return true; // not used } public void Process() { devicePlus.Process(); deviceMinus.Process(); } public bool IsActive() { return devicePlus.IsActive() || deviceMinus.IsActive(); } public bool IsActivated() { return devicePlus.IsActivated() || deviceMinus.IsActivated(); } public bool IsDeactivated() { return devicePlus.IsDeactivated() || deviceMinus.IsDeactivated(); } public float GetValue() { return devicePlus.GetValue() - deviceMinus.GetValue(); } public void SetPressThreshold(float value) { devicePlus.SetPressThreshold(value); deviceMinus.SetPressThreshold(value); } public override string ToString() { return deviceMinus.ToString() + " -|+ " + devicePlus.ToString(); } private IDevice devicePlus, deviceMinus; } } }
{ "content_hash": "be3e0e2955ac66498f796006c9c2800c", "timestamp": "", "source": "github", "line_count": 599, "max_line_length": 104, "avg_line_length": 20.507512520868115, "alnum_prop": 0.6152718984044285, "repo_name": "stefanmarks/MotionServer_Clients", "id": "b2be74dcf8327aa23725019202734a7e04b659df", "size": "12286", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Unity/Assets/SentienceLab/Scripts/Input/InputHandler.cs", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C#", "bytes": "414749" }, { "name": "Java", "bytes": "68925" }, { "name": "Processing", "bytes": "10549" }, { "name": "ShaderLab", "bytes": "5068" } ], "symlink_target": "" }
module.exports = function(callback, config) { var Nexmo = require('../lib/Nexmo'); var nexmo = new Nexmo({ apiKey: config.API_KEY, apiSecret: config.API_SECRET }, { debug: config.DEBUG }); nexmo.pricing.getPrefix("sms", "44", callback); };
{ "content_hash": "468988f0508ada6c190dfa9b32de6e84", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 49, "avg_line_length": 20.384615384615383, "alnum_prop": 0.6264150943396226, "repo_name": "Nexmo/nexmo-node", "id": "ad1fa03243696877d8a006964a26152b946ade98", "size": "265", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "examples/ex-get-prefix-pricing.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "206360" } ], "symlink_target": "" }
<?php # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/firestore/admin/v1/firestore_admin.proto namespace Google\Cloud\Firestore\Admin\V1; use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** * The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. * * Generated from protobuf message <code>google.firestore.admin.v1.ListIndexesResponse</code> */ class ListIndexesResponse extends \Google\Protobuf\Internal\Message { /** * The requested indexes. * * Generated from protobuf field <code>repeated .google.firestore.admin.v1.Index indexes = 1;</code> */ private $indexes; /** * A page token that may be used to request another page of results. If blank, * this is the last page. * * Generated from protobuf field <code>string next_page_token = 2;</code> */ private $next_page_token = ''; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $indexes * The requested indexes. * @type string $next_page_token * A page token that may be used to request another page of results. If blank, * this is the last page. * } */ public function __construct($data = NULL) { \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); parent::__construct($data); } /** * The requested indexes. * * Generated from protobuf field <code>repeated .google.firestore.admin.v1.Index indexes = 1;</code> * @return \Google\Protobuf\Internal\RepeatedField */ public function getIndexes() { return $this->indexes; } /** * The requested indexes. * * Generated from protobuf field <code>repeated .google.firestore.admin.v1.Index indexes = 1;</code> * @param array<\Google\Cloud\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setIndexes($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); $this->indexes = $arr; return $this; } /** * A page token that may be used to request another page of results. If blank, * this is the last page. * * Generated from protobuf field <code>string next_page_token = 2;</code> * @return string */ public function getNextPageToken() { return $this->next_page_token; } /** * A page token that may be used to request another page of results. If blank, * this is the last page. * * Generated from protobuf field <code>string next_page_token = 2;</code> * @param string $var * @return $this */ public function setNextPageToken($var) { GPBUtil::checkString($var, True); $this->next_page_token = $var; return $this; } }
{ "content_hash": "3cc037918925509eacfd6531b39fac26", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 140, "avg_line_length": 30.552380952380954, "alnum_prop": 0.6371571072319202, "repo_name": "googleapis/google-cloud-php", "id": "2eb06c68a731b7a6617039f1400727b6d02ef476", "size": "3208", "binary": false, "copies": "2", "ref": "refs/heads/main", "path": "Firestore/src/Admin/V1/ListIndexesResponse.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "3333" }, { "name": "PHP", "bytes": "47981731" }, { "name": "Python", "bytes": "413107" }, { "name": "Shell", "bytes": "8171" } ], "symlink_target": "" }
use FindBin qw($RealBin); use File::Basename; use File::Path; my $SCRIPTS_ROOTDIR = $RealBin; $SCRIPTS_ROOTDIR =~ s/\/training$//; $SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"} if defined($ENV{"SCRIPTS_ROOTDIR"}); ## We preserve this bit of comments to keep the traditional weight ranges. # "w" => [ [ 0.0, -1.0, 1.0 ] ], # word penalty # "d" => [ [ 1.0, 0.0, 2.0 ] ], # lexicalized reordering model # "lm" => [ [ 1.0, 0.0, 2.0 ] ], # language model # "g" => [ [ 1.0, 0.0, 2.0 ], # generation model # [ 1.0, 0.0, 2.0 ] ], # "tm" => [ [ 0.3, 0.0, 0.5 ], # translation model # [ 0.2, 0.0, 0.5 ], # [ 0.3, 0.0, 0.5 ], # [ 0.2, 0.0, 0.5 ], # [ 0.0,-1.0, 1.0 ] ], # ... last weight is phrase penalty # "lex"=> [ [ 0.1, 0.0, 0.2 ] ], # global lexical model # "I" => [ [ 0.0,-1.0, 1.0 ] ], # input lattice scores # moses.ini file uses FULL names for lambdas, while this training script # internally (and on the command line) uses ABBR names. my @ABBR_FULL_MAP = qw(d=weight-d lm=weight-l tm=weight-t w=weight-w g=weight-generation lex=weight-lex I=weight-i); my %ABBR2FULL = map {split/=/,$_,2} @ABBR_FULL_MAP; my %FULL2ABBR = map {my ($a, $b) = split/=/,$_,2; ($b, $a);} @ABBR_FULL_MAP; my $minimum_required_change_in_weights = 0.00001; # stop if no lambda changes more than this my $verbose = 0; my $usage = 0; # request for --help my $___WORKING_DIR = "mert-work"; my $___DEV_F = undef; # required, input text to decode my $___DEV_E = undef; # required, basename of files with references my $___DECODER = undef; # required, pathname to the decoder executable my $___CONFIG = undef; # required, pathname to startup ini file my $___N_BEST_LIST_SIZE = 100; my $queue_flags = "-hard"; # extra parameters for parallelizer # the -l ws0ssmt was relevant only to JHU 2006 workshop my $___JOBS = undef; # if parallel, number of jobs to use (undef or 0 -> serial) my $___DECODER_FLAGS = ""; # additional parametrs to pass to the decoder my $continue = 0; # should we try to continue from the last saved step? my $skip_decoder = 0; # and should we skip the first decoder run (assuming we got interrupted during mert) my $___FILTER_PHRASE_TABLE = 1; # filter phrase table my $___PREDICTABLE_SEEDS = 0; my $___START_WITH_HISTORIC_BESTS = 0; # use best settings from all previous iterations as starting points [Foster&Kuhn,2009] my $___RANDOM_DIRECTIONS = 0; # search in random directions only my $___NUM_RANDOM_DIRECTIONS = 0; # number of random directions, also works with default optimizer [Cer&al.,2008] my $___PAIRWISE_RANKED_OPTIMIZER = 0; # use Hopkins&May[2011] my $___PRO_STARTING_POINT = 0; # get a starting point from pairwise ranked optimizer my $___RANDOM_RESTARTS = 20; my $___HISTORIC_INTERPOLATION = 0; # interpolate optimize weights with previous iteration's weights [Hopkins&May,2011,5.4.3] my $__THREADS = 0; # Parameter for effective reference length when computing BLEU score # Default is to use shortest reference # Use "--shortest" to use shortest reference length # Use "--average" to use average reference length # Use "--closest" to use closest reference length # Only one between --shortest, --average and --closest can be set # If more than one choice the defualt (--shortest) is used my $___SHORTEST = 0; my $___AVERAGE = 0; my $___CLOSEST = 0; # Use "--nocase" to compute case-insensitive scores my $___NOCASE = 0; # Use "--nonorm" to non normalize translation before computing scores my $___NONORM = 0; # set 0 if input type is text, set 1 if input type is confusion network my $___INPUTTYPE = 0; my $mertdir = undef; # path to new mert directory my $mertargs = undef; # args to pass through to mert & extractor my $mertmertargs = undef; # args to pass through to mert only my $filtercmd = undef; # path to filter-model-given-input.pl my $filterfile = undef; my $qsubwrapper = undef; my $moses_parallel_cmd = undef; my $scorer_config = "BLEU:1"; my $old_sge = 0; # assume sge<6.0 my $___CONFIG_ORIG = undef; # pathname to startup ini file before filtering my $___ACTIVATE_FEATURES = undef; # comma-separated (or blank-separated) list of features to work on # if undef work on all features # (others are fixed to the starting values) my $___RANGES = undef; my $prev_aggregate_nbl_size = -1; # number of previous step to consider when loading data (default =-1) # -1 means all previous, i.e. from iteration 1 # 0 means no previous data, i.e. from actual iteration # 1 means 1 previous data , i.e. from the actual iteration and from the previous one # and so on my $maximum_iterations = 25; use strict; use Getopt::Long; GetOptions( "working-dir=s" => \$___WORKING_DIR, "input=s" => \$___DEV_F, "inputtype=i" => \$___INPUTTYPE, "refs=s" => \$___DEV_E, "decoder=s" => \$___DECODER, "config=s" => \$___CONFIG, "nbest=i" => \$___N_BEST_LIST_SIZE, "queue-flags=s" => \$queue_flags, "jobs=i" => \$___JOBS, "decoder-flags=s" => \$___DECODER_FLAGS, "continue" => \$continue, "skip-decoder" => \$skip_decoder, "shortest" => \$___SHORTEST, "average" => \$___AVERAGE, "closest" => \$___CLOSEST, "nocase" => \$___NOCASE, "nonorm" => \$___NONORM, "help" => \$usage, "verbose" => \$verbose, "mertdir=s" => \$mertdir, "mertargs=s" => \$mertargs, "mertmertargs=s" => \$mertmertargs, "rootdir=s" => \$SCRIPTS_ROOTDIR, "filtercmd=s" => \$filtercmd, # allow to override the default location "filterfile=s" => \$filterfile, # input to filtering script (useful for lattices/confnets) "qsubwrapper=s" => \$qsubwrapper, # allow to override the default location "mosesparallelcmd=s" => \$moses_parallel_cmd, # allow to override the default location "old-sge" => \$old_sge, #passed to moses-parallel "filter-phrase-table!" => \$___FILTER_PHRASE_TABLE, # (dis)allow of phrase tables "predictable-seeds" => \$___PREDICTABLE_SEEDS, # make random restarts deterministic "historic-bests" => \$___START_WITH_HISTORIC_BESTS, # use best settings from all previous iterations as starting points "random-directions" => \$___RANDOM_DIRECTIONS, # search only in random directions "number-of-random-directions=i" => \$___NUM_RANDOM_DIRECTIONS, # number of random directions "random-restarts=i" => \$___RANDOM_RESTARTS, # number of random restarts "activate-features=s" => \$___ACTIVATE_FEATURES, #comma-separated (or blank-separated) list of features to work on (others are fixed to the starting values) "range=s@" => \$___RANGES, "prev-aggregate-nbestlist=i" => \$prev_aggregate_nbl_size, #number of previous step to consider when loading data (default =-1, i.e. all previous) "maximum-iterations=i" => \$maximum_iterations, "pairwise-ranked" => \$___PAIRWISE_RANKED_OPTIMIZER, "pro-starting-point" => \$___PRO_STARTING_POINT, "historic-interpolation=f" => \$___HISTORIC_INTERPOLATION, "threads=i" => \$__THREADS, "sc-config=s" => \$scorer_config ) or exit(1); # the 4 required parameters can be supplied on the command line directly # or using the --options if (scalar @ARGV == 4) { # required parameters: input_file references_basename decoder_executable $___DEV_F = shift; $___DEV_E = shift; $___DECODER = shift; $___CONFIG = shift; } if ($usage || !defined $___DEV_F || !defined $___DEV_E || !defined $___DECODER || !defined $___CONFIG) { print STDERR "usage: $0 input-text references decoder-executable decoder.ini Options: --working-dir=mert-dir ... where all the files are created --nbest=100 ... how big nbestlist to generate --jobs=N ... set this to anything to run moses in parallel --mosesparallelcmd=STR ... use a different script instead of moses-parallel --queue-flags=STRING ... anything you with to pass to qsub, eg. '-l ws06osssmt=true'. The default is: '-hard' To reset the parameters, please use --queue-flags=' ' (i.e. a space between the quotes). --decoder-flags=STRING ... extra parameters for the decoder --continue ... continue from the last successful iteration --skip-decoder ... skip the decoder run for the first time, assuming that we got interrupted during optimization --shortest --average --closest ... Use shortest/average/closest reference length as effective reference length (mutually exclusive) --nocase ... Do not preserve case information; i.e. case-insensitive evaluation (default is false). --nonorm ... Do not use text normalization (flag is not active, i.e. text is NOT normalized) --filtercmd=STRING ... path to filter-model-given-input.pl --filterfile=STRING ... path to alternative to input-text for filtering model. useful for lattice decoding --rootdir=STRING ... where do helpers reside (if not given explicitly) --mertdir=STRING ... path to new mert implementation --mertargs=STRING ... extra args for mert, eg. to specify scorer --mertmertargs=STRING ... extra args for mert only, --scorenbestcmd=STRING ... path to score-nbest.py --old-sge ... passed to parallelizers, assume Grid Engine < 6.0 --inputtype=[0|1|2] ... Handle different input types: (0 for text, 1 for confusion network, 2 for lattices, default is 0) --no-filter-phrase-table ... disallow filtering of phrase tables (useful if binary phrase tables are available) --random-restarts=INT ... number of random restarts (default: 20) --predictable-seeds ... provide predictable seeds to mert so that random restarts are the same on every run --range=tm:0..1,-1..1 ... specify min and max value for some features --range can be repeated as needed. The order of the various --range specifications is important only within a feature name. E.g.: --range=tm:0..1,-1..1 --range=tm:0..2 is identical to: --range=tm:0..1,-1..1,0..2 but not to: --range=tm:0..2 --range=tm:0..1,-1..1 --activate-features=STRING ... comma-separated list of features to optimize, others are fixed to the starting values default: optimize all features example: tm_0,tm_4,d_0 --prev-aggregate-nbestlist=INT ... number of previous step to consider when loading data (default = $prev_aggregate_nbl_size) -1 means all previous, i.e. from iteration 1 0 means no previous data, i.e. only the current iteration N means this and N previous iterations --maximum-iterations=ITERS ... Maximum number of iterations. Default: $maximum_iterations --random-directions ... search only in random directions --number-of-random-directions=int ... number of random directions (also works with regular optimizer, default: 0) --pairwise-ranked ... Use PRO for optimisation (Hopkins and May, emnlp 2011) --pro-starting-point ... Use PRO to get a starting point for MERT --threads=NUMBER ... Use multi-threaded mert (must be compiled in). --historic-interpolation ... Interpolate optimized weights with prior iterations' weight (parameter sets factor [0;1] given to current weights) --sc-config=STRING ... extra option to specify multiscoring. "; exit 1; } # Check validity of input parameters and set defaults if needed print STDERR "Using WORKING_DIR: $___WORKING_DIR\n"; print STDERR "Using SCRIPTS_ROOTDIR: $SCRIPTS_ROOTDIR\n"; # path of script for filtering phrase tables and running the decoder $filtercmd="$SCRIPTS_ROOTDIR/training/filter-model-given-input.pl" if !defined $filtercmd; if ( ! -x $filtercmd && ! $___FILTER_PHRASE_TABLE) { print STDERR "Filtering command not found: $filtercmd.\n"; print STDERR "Use --filtercmd=PATH to specify a valid one or --no-filter-phrase-table\n"; exit 1; } $qsubwrapper="$SCRIPTS_ROOTDIR/generic/qsub-wrapper.pl" if !defined $qsubwrapper; $moses_parallel_cmd = "$SCRIPTS_ROOTDIR/generic/moses-parallel.pl" if !defined $moses_parallel_cmd; if (!defined $mertdir) { $mertdir = "/usr/bin"; print STDERR "Assuming --mertdir=$mertdir\n"; } my $mert_extract_cmd = "$mertdir/extractor"; my $mert_mert_cmd = "$mertdir/mert"; die "Not executable: $mert_extract_cmd" if ! -x $mert_extract_cmd; die "Not executable: $mert_mert_cmd" if ! -x $mert_mert_cmd; my $pro_optimizer = "$mertdir/megam_i686.opt"; # or set to your installation if (($___PAIRWISE_RANKED_OPTIMIZER || $___PRO_STARTING_POINT) && ! -x $pro_optimizer) { print "did not find $pro_optimizer, installing it in $mertdir\n"; `cd $mertdir; wget http://www.cs.utah.edu/~hal/megam/megam_i686.opt.gz;`; `gunzip $pro_optimizer.gz`; `chmod +x $pro_optimizer`; die("ERROR: Installation of megam_i686.opt failed! Install by hand from http://www.cs.utah.edu/~hal/megam/") unless -x $pro_optimizer; } $mertargs = "" if !defined $mertargs; my $scconfig = undef; if ($mertargs =~ /\-\-scconfig\s+(.+?)(\s|$)/){ $scconfig=$1; $scconfig =~ s/\,/ /g; $mertargs =~ s/\-\-scconfig\s+(.+?)(\s|$)//; } # handling reference lengh strategy if (($___CLOSEST + $___AVERAGE + $___SHORTEST) > 1){ die "You can specify just ONE reference length strategy (closest or shortest or average) not both\n"; } if ($___SHORTEST){ $scconfig .= " reflen:shortest"; }elsif ($___AVERAGE){ $scconfig .= " reflen:average"; }elsif ($___CLOSEST){ $scconfig .= " reflen:closest"; } # handling case-insensitive flag if ($___NOCASE) { $scconfig .= " case:false"; }else{ $scconfig .= " case:true"; } $scconfig =~ s/^\s+//; $scconfig =~ s/\s+$//; $scconfig =~ s/\s+/,/g; $scconfig = "--scconfig $scconfig" if ($scconfig); my $mert_extract_args=$mertargs; $mert_extract_args .=" $scconfig"; $mertmertargs = "" if !defined $mertmertargs; my $mert_mert_args="$mertargs $mertmertargs"; $mert_mert_args =~ s/\-+(binary|b)\b//; $mert_mert_args .=" $scconfig"; if ($___ACTIVATE_FEATURES){ $mert_mert_args .=" -o \"$___ACTIVATE_FEATURES\""; } my ($just_cmd_filtercmd,$x) = split(/ /,$filtercmd); die "Not executable: $just_cmd_filtercmd" if ! -x $just_cmd_filtercmd; die "Not executable: $moses_parallel_cmd" if defined $___JOBS && ! -x $moses_parallel_cmd; die "Not executable: $qsubwrapper" if defined $___JOBS && ! -x $qsubwrapper; die "Not executable: $___DECODER" if ! -x $___DECODER; my $input_abs = ensure_full_path($___DEV_F); die "File not found: $___DEV_F (interpreted as $input_abs)." if ! -e $input_abs; $___DEV_F = $input_abs; # Option to pass to qsubwrapper and moses-parallel my $pass_old_sge = $old_sge ? "-old-sge" : ""; my $decoder_abs = ensure_full_path($___DECODER); die "File not executable: $___DECODER (interpreted as $decoder_abs)." if ! -x $decoder_abs; $___DECODER = $decoder_abs; my $ref_abs = ensure_full_path($___DEV_E); # check if English dev set (reference translations) exist and store a list of all references my @references; if (-e $ref_abs) { push @references, $ref_abs; } else { # if multiple file, get a full list of the files my $part = 0; while (-e $ref_abs.$part) { push @references, $ref_abs.$part; $part++; } die("Reference translations not found: $___DEV_E (interpreted as $ref_abs)") unless $part; } my $config_abs = ensure_full_path($___CONFIG); die "File not found: $___CONFIG (interpreted as $config_abs)." if ! -e $config_abs; $___CONFIG = $config_abs; # moses should use our config if ($___DECODER_FLAGS =~ /(^|\s)-(config|f) / || $___DECODER_FLAGS =~ /(^|\s)-(ttable-file|t) / || $___DECODER_FLAGS =~ /(^|\s)-(distortion-file) / || $___DECODER_FLAGS =~ /(^|\s)-(generation-file) / || $___DECODER_FLAGS =~ /(^|\s)-(lmodel-file) / || $___DECODER_FLAGS =~ /(^|\s)-(global-lexical-file) / ) { die "It is forbidden to supply any of -config, -ttable-file, -distortion-file, -generation-file or -lmodel-file in the --decoder-flags.\nPlease use only the --config option to give the config file that lists all the supplementary files."; } # as weights are normalized in the next steps (by cmert) # normalize initial LAMBDAs, too my $need_to_normalize = 1; #store current directory and create the working directory (if needed) my $cwd = `pawd 2>/dev/null`; if(!$cwd){$cwd = `pwd`;} chomp($cwd); mkpath($___WORKING_DIR); { # open local scope #chdir to the working directory chdir($___WORKING_DIR) or die "Can't chdir to $___WORKING_DIR"; # fixed file names my $mert_outfile = "mert.out"; my $mert_logfile = "mert.log"; my $weights_in_file = "init.opt"; my $weights_out_file = "weights.txt"; # set start run my $start_run = 1; my $bestpoint = undef; my $devbleu = undef; my $sparse_weights_file = undef; my $prev_feature_file = undef; my $prev_score_file = undef; my $prev_init_file = undef; if ($___FILTER_PHRASE_TABLE) { my $outdir = "filtered"; if (-e "$outdir/moses.ini") { print STDERR "Assuming the tables are already filtered, reusing $outdir/moses.ini\n"; } else { # filter the phrase tables with respect to input, use --decoder-flags print STDERR "filtering the phrase tables... ".`date`; my $___FILTER_F = $___DEV_F; $___FILTER_F = $filterfile if (defined $filterfile); my $cmd = "$filtercmd ./$outdir $___CONFIG $___FILTER_F"; &submit_or_exec($cmd,"filterphrases.out","filterphrases.err"); } # make a backup copy of startup ini filepath $___CONFIG_ORIG = $___CONFIG; # the decoder should now use the filtered model $___CONFIG = "$outdir/moses.ini"; } else{ # do not filter phrase tables (useful if binary phrase tables are available) # use the original configuration file $___CONFIG_ORIG = $___CONFIG; } # we run moses to check validity of moses.ini and to obtain all the feature # names my $featlist = get_featlist_from_moses($___CONFIG); $featlist = insert_ranges_to_featlist($featlist, $___RANGES); # Mark which features are disabled: if (defined $___ACTIVATE_FEATURES) { my %enabled = map { ($_, 1) } split /[, ]+/, $___ACTIVATE_FEATURES; my %cnt; for(my $i=0; $i<scalar(@{$featlist->{"names"}}); $i++) { my $name = $featlist->{"names"}->[$i]; $cnt{$name} = 0 if !defined $cnt{$name}; $featlist->{"enabled"}->[$i] = $enabled{$name."_".$cnt{$name}}; $cnt{$name}++; } } else { # all enabled for(my $i=0; $i<scalar(@{$featlist->{"names"}}); $i++) { $featlist->{"enabled"}->[$i] = 1; } } print STDERR "MERT starting values and ranges for random generation:\n"; for(my $i=0; $i<scalar(@{$featlist->{"names"}}); $i++) { my $name = $featlist->{"names"}->[$i]; my $val = $featlist->{"values"}->[$i]; my $min = $featlist->{"mins"}->[$i]; my $max = $featlist->{"maxs"}->[$i]; my $enabled = $featlist->{"enabled"}->[$i]; printf STDERR " %5s = %7.3f", $name, $val; if ($enabled) { printf STDERR " (%5.2f .. %5.2f)\n", $min, $max; } else { print STDERR " --- inactive, not optimized ---\n"; } } if ($continue) { # getting the last finished step print STDERR "Trying to continue an interrupted optimization.\n"; open IN, "finished_step.txt" or die "Failed to find the step number, failed to read finished_step.txt"; my $step = <IN>; chomp $step; close IN; print STDERR "Last finished step is $step\n"; # getting the first needed step my $firststep; if ($prev_aggregate_nbl_size==-1){ $firststep=1; } else{ $firststep=$step-$prev_aggregate_nbl_size+1; $firststep=($firststep>0)?$firststep:1; } #checking if all needed data are available if ($firststep<=$step){ print STDERR "First previous needed data index is $firststep\n"; print STDERR "Checking whether all needed data (from step $firststep to step $step) are available\n"; for (my $prevstep=$firststep; $prevstep<=$step;$prevstep++){ print STDERR "Checking whether data of step $prevstep are available\n"; if (! -e "run$prevstep.features.dat"){ die "Can't start from step $step, because run$prevstep.features.dat was not found!"; }else{ if (defined $prev_feature_file){ $prev_feature_file = "${prev_feature_file},run$prevstep.features.dat"; } else{ $prev_feature_file = "run$prevstep.features.dat"; } } if (! -e "run$prevstep.scores.dat"){ die "Can't start from step $step, because run$prevstep.scores.dat was not found!"; }else{ if (defined $prev_score_file){ $prev_score_file = "${prev_score_file},run$prevstep.scores.dat"; } else{ $prev_score_file = "run$prevstep.scores.dat"; } } if (! -e "run$prevstep.${weights_in_file}"){ die "Can't start from step $step, because run$prevstep.${weights_in_file} was not found!"; }else{ if (defined $prev_init_file){ $prev_init_file = "${prev_init_file},run$prevstep.${weights_in_file}"; } else{ $prev_init_file = "run$prevstep.${weights_in_file}"; } } } if (! -e "run$step.weights.txt"){ die "Can't start from step $step, because run$step.weights.txt was not found!"; } if (! -e "run$step.$mert_logfile"){ die "Can't start from step $step, because run$step.$mert_logfile was not found!"; } if (! -e "run$step.best$___N_BEST_LIST_SIZE.out.gz"){ die "Can't start from step $step, because run$step.best$___N_BEST_LIST_SIZE.out.gz was not found!"; } print STDERR "All needed data are available\n"; print STDERR "Loading information from last step ($step)\n"; my %dummy; # sparse features ($bestpoint,$devbleu) = &get_weights_from_mert("run$step.$mert_outfile","run$step.$mert_logfile",scalar @{$featlist->{"names"}},\%dummy); die "Failed to parse mert.log, missed Best point there." if !defined $bestpoint || !defined $devbleu; print "($step) BEST at $step $bestpoint => $devbleu at ".`date`; my @newweights = split /\s+/, $bestpoint; # Sanity check: order of lambdas must match sanity_check_order_of_lambdas($featlist, "gunzip -c < run$step.best$___N_BEST_LIST_SIZE.out.gz |"); # update my cache of lambda values $featlist->{"values"} = \@newweights; } else{ print STDERR "No previous data are needed\n"; } $start_run = $step +1; } ###### MERT MAIN LOOP my $run=$start_run-1; my $oldallsorted = undef; my $allsorted = undef; my $nbest_file=undef; while(1) { $run++; if ($maximum_iterations && $run > $maximum_iterations) { print "Maximum number of iterations exceeded - stopping\n"; last; } # run beamdecoder with option to output nbestlists # the end result should be (1) @NBEST_LIST, a list of lists; (2) @SCORE, a list of lists of lists print "run $run start at ".`date`; # In case something dies later, we might wish to have a copy create_config($___CONFIG, "./run$run.moses.ini", $featlist, $run, (defined$devbleu?$devbleu:"--not-estimated--"),$sparse_weights_file); # skip running the decoder if the user wanted if (!$skip_decoder) { print "($run) run decoder to produce n-best lists\n"; $nbest_file = run_decoder($featlist, $run, $need_to_normalize); $need_to_normalize = 0; safesystem("gzip -f $nbest_file") or die "Failed to gzip run*out"; $nbest_file = $nbest_file.".gz"; } else { $nbest_file="run$run.best$___N_BEST_LIST_SIZE.out.gz"; print "skipped decoder run $run\n"; $skip_decoder = 0; $need_to_normalize = 0; } # extract score statistics and features from the nbest lists print STDERR "Scoring the nbestlist.\n"; my $base_feature_file = "features.dat"; my $base_score_file = "scores.dat"; my $feature_file = "run$run.${base_feature_file}"; my $score_file = "run$run.${base_score_file}"; # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # my $cmd = ""; my $scorer_name; my $scorer_weight; $scorer_config=~s/ //g; my @lists_scorer_config=split(",",$scorer_config); $mert_mert_args=$mert_mert_args." --sctype MERGE "; my $scorer_config_spec; foreach $scorer_config_spec(@lists_scorer_config) { # print STDERR $scorer_config_spec."\n"; my @lists_scorer_config_spec=split(":",$scorer_config_spec); $scorer_name=$lists_scorer_config_spec[0]; $scorer_weight=$lists_scorer_config_spec[1]; # print STDERR $scorer_name."\n"; # print STDERR $scorer_weight."\n"; $cmd = "$mert_extract_cmd $mert_extract_args --scfile $score_file.$scorer_name --ffile $feature_file.$scorer_name --sctype $scorer_name -r ".join(",", @references)." -n $nbest_file"; # print STDERR "LANCEMENT $scorer_name ********************************************\n"; &submit_or_exec($cmd,"extract.out.$scorer_name","extract.err.$scorer_name"); # print STDERR "FIN $scorer_name ************************************************** \n"; # print STDERR "executing $cmd\n"; # print STDERR "\n"; # safesystem("date"); # print STDERR "\n"; # if (defined $___JOBS) { # safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -queue-parameter=\"$queue_flags\" -stdout=extract.out.$scorer_name -stderr=extract.err.$scorer_name" ) # or die "$scorer_name Failed to submit extraction to queue (via $qsubwrapper)"; # } else { # safesystem("$cmd > extract.out.$scorer_name 2> extract.err.$scorer_name") or die "$scorer_name Failed to do extraction of statistics."; # } # print FILE "$scorer_name $scorer_weight $score_file.$scorer_name $feature_file.$scorer_name\n"; } # print STDERR "CREATION INI\n"; my @scorer_content; my @feature_content; my $fileIncrement=0; my $minSizeIncrement=-1; open(FILE,">merge.init") || die ("File creation ERROR : merge.init"); foreach $scorer_config_spec(@lists_scorer_config) { my @lists_scorer_config_spec=split(":",$scorer_config_spec); $scorer_name=$lists_scorer_config_spec[0]; $scorer_weight=$lists_scorer_config_spec[1]; print FILE "$scorer_name $scorer_weight $score_file.$scorer_name $feature_file.$scorer_name\n"; my @tmp_load_content=`/bin/cat $score_file.$scorer_name`; my @tmp_load_feat_content=`/bin/cat $feature_file.$scorer_name`; my @tmp_content; my @tmp_feat_content; my $contentIncrement=0; my @tmp_part_content; my $increment_part=0; while ($contentIncrement<scalar(@tmp_load_feat_content)) { my $line=$tmp_load_feat_content[$contentIncrement]; chomp($line); $line=~s/^[ ]+//g; $line=~s/[ ]+$//g; $line=~s/[ ]+/ /g; push @tmp_part_content,$line; if (rindex($line,"FEATURES_TXT_END")>-1) { $tmp_feat_content[$increment_part] = [ @tmp_part_content ]; $increment_part++; @tmp_part_content=(); } $contentIncrement++; } $contentIncrement=0; $increment_part=0; @tmp_part_content=(); while ($contentIncrement<scalar(@tmp_load_content)) { my $line=$tmp_load_content[$contentIncrement]; chomp($line); $line=~s/^[ ]+//g; $line=~s/[ ]+$//g; $line=~s/[ ]+/ /g; push @tmp_part_content,$line; if (rindex($line,"SCORES_TXT_END")>-1) { $tmp_content[$increment_part] = [ @tmp_part_content ]; $increment_part++; @tmp_part_content=(); } $contentIncrement++; } if ($minSizeIncrement<0 || $minSizeIncrement>$increment_part) { $minSizeIncrement=$increment_part; } $scorer_content[$fileIncrement] = [ @tmp_content ]; $feature_content[$fileIncrement] = [ @tmp_feat_content ]; # if ($fileIncrement==0) # { # `/bin/cp $feature_file.$scorer_name $feature_file`; # } $fileIncrement++; } close(FILE); # print STDERR "\n"; # safesystem("date"); # print STDERR "\n"; # print STDERR "ON VA RASSEMBLER dans $score_file\n"; open(SCOREFILE,">$score_file") || die ("File creation ERROR : $score_file"); open(FEATFILE,">$feature_file") || die ("File creation ERROR : $feature_file"); my $newFileIncrement=0; my $contentIncrement=0; my $maxContent=100; my $increment_part=0; my $contentSize=scalar(@{$scorer_content[0]}); # print STDERR "TAILLE : ".$contentSize."|".$fileIncrement."|".$minSizeIncrement."\n"; while ($increment_part<$minSizeIncrement) { $contentIncrement=0; # print STDERR "increment_part : $increment_part\n"; while ($contentIncrement< $maxContent) { # print STDERR "contentIncrement : $contentIncrement\n"; my $line=""; my $featureLine=""; my $createLines=1; $newFileIncrement=0; while($newFileIncrement< $fileIncrement) { # print STDERR "newFileIncrement : $newFileIncrement\n"; if (rindex($scorer_content[$newFileIncrement][$increment_part][$contentIncrement],"BEGIN")<0) { if (rindex($line,"SCORES_TXT_END")>-1) { # $line=$line; # chomp($line); } elsif (rindex($scorer_content[$newFileIncrement][$increment_part][$contentIncrement],"SCORES_TXT_END")>-1) { $line=$scorer_content[$newFileIncrement][$increment_part][$contentIncrement]; $featureLine=$feature_content[$newFileIncrement][$increment_part][$contentIncrement]; } else { $line=$line." ".$scorer_content[$newFileIncrement][$increment_part][$contentIncrement]; chomp($line); if (length($featureLine)>0 && rindex($featureLine,$feature_content[$newFileIncrement][$increment_part][$contentIncrement])==0) { $featureLine=$feature_content[$newFileIncrement][$increment_part][$contentIncrement]; chomp($featureLine); } elsif (length($featureLine)>0) { # $createLines=0; my @split_line=split(/[\s]+/,$featureLine); my @split_line_input=split(/[\s]+/,$feature_content[$newFileIncrement][$increment_part][$contentIncrement]); my $i=0; $featureLine=""; for ($i=0;$i<scalar(@split_line_input);$i++) { $split_line_input[$i]=($split_line_input[$i]+$split_line[$i])/2; $featureLine=$featureLine.$split_line_input[$i]." "; } } elsif (length($featureLine)==0) { $featureLine=$feature_content[$newFileIncrement][$increment_part][$contentIncrement]; chomp($featureLine); } } } else { my @split_line_input=split(" ",$scorer_content[$newFileIncrement][$increment_part][$contentIncrement]); my @split_line_feat_input=split(/[\s]+/,$feature_content[$newFileIncrement][$increment_part][$contentIncrement]); my @split_line=split(" ",$line); if (scalar(@split_line)>4) { $split_line_input[3]=$split_line[3]+$split_line_input[3]; } if (scalar(@split_line_input)>4) { if (scalar(@split_line)>4) { if ($split_line[2]<$split_line_input[2]) { $split_line_input[2]=$split_line[2]; } } else { ## Nothing to do } $maxContent=$split_line_input[2]+2; # print STDERR "maxContent : $maxContent : ".$scorer_content[$newFileIncrement][$increment_part][$contentIncrement]."\n"; } else { die "scoreFile bad format : ".$scorer_content[$newFileIncrement][$increment_part][$contentIncrement]."\n"; } $line=$split_line_input[0]." ".$split_line_input[1]." ".$split_line_input[2]." ".$split_line_input[3]." MERGE"; my $i=0; $featureLine=""; for ($i=0;$i<scalar(@split_line_feat_input);$i++) { # $split_line_feat_input[$i]=($split_line_input[$i]+$split_line[$i])/2; if ($i==2) { $featureLine=$featureLine.$split_line_input[2]." "; } else { $featureLine=$featureLine.$split_line_feat_input[$i]." "; } } # $featureLine=$feature_content[$newFileIncrement][$increment_part][$contentIncrement]; } $newFileIncrement++; } $line=~s/^[ ]+//g; $line=~s/[ ]+$//g; $line=~s/[ ]+/ /g; # $line=~s/( SCORES_TXT_END[^!]*)//g; # print STDERR $line."\n"; # if ($createLines>0) # { print SCOREFILE $line."\n"; print FEATFILE $featureLine."\n"; # } $contentIncrement++; } $increment_part++; } close(SCOREFILE); close(FEATFILE); # `/bin/cp ` # $cmd="$mertdir/mergeWeights -c merge.init -s $score_file -f $feature_file"; # print STDERR "executing : $cmd\n"; # if (defined $___JOBS) { # safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -queue-parameter=\"$queue_flags\" -stdout=mergeWeight.out.MERGE -stderr=mergeWeight.err.MERGE" ) # or die "MERGE Failed to submit extraction to queue (via $qsubwrapper)"; # } else { # safesystem("$cmd > mergeWeight.out.MERGE 2> mergeWeight.err.MERGE") or die "MERGE Failed to do extraction of statistics."; # } # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # my $cmd = "$mert_extract_cmd $mert_extract_args --scfile $score_file --ffile $feature_file -r ".join(",", @references)." -n $nbest_file"; # &submit_or_exec($cmd,"extract.out","extract.err"); # Create the initial weights file for mert: init.opt my @MIN = @{$featlist->{"mins"}}; my @MAX = @{$featlist->{"maxs"}}; my @CURR = @{$featlist->{"values"}}; my @NAME = @{$featlist->{"names"}}; open(OUT,"> $weights_in_file") or die "Can't write $weights_in_file (WD now $___WORKING_DIR)"; print OUT join(" ", @CURR)."\n"; print OUT join(" ", @MIN)."\n"; # this is where we could pass MINS print OUT join(" ", @MAX)."\n"; # this is where we could pass MAXS close(OUT); # print join(" ", @NAME)."\n"; # make a backup copy labelled with this run number safesystem("\\cp -f $weights_in_file run$run.$weights_in_file") or die; my $DIM = scalar(@CURR); # number of lambdas # run mert $cmd = "$mert_mert_cmd -d $DIM $mert_mert_args"; my $mert_settings = " -n $___RANDOM_RESTARTS"; if ($___PREDICTABLE_SEEDS) { my $seed = $run * 1000; $mert_settings .= " -r $seed"; } if ($___RANDOM_DIRECTIONS) { if ($___NUM_RANDOM_DIRECTIONS == 0) { $mert_settings .= " -m 50"; } $mert_settings .= " -t random-direction"; } if ($___NUM_RANDOM_DIRECTIONS) { $mert_settings .= " -m $___NUM_RANDOM_DIRECTIONS"; } if ($__THREADS) { $mert_settings .= " --threads $__THREADS"; } my $file_settings = ""; if (defined $prev_feature_file) { $file_settings .= " --ffile $prev_feature_file,$feature_file"; } else{ $file_settings .= " --ffile $feature_file"; } if (defined $prev_score_file) { $file_settings .= " --scfile $prev_score_file,$score_file"; } else{ $file_settings .= " --scfile $score_file"; } if ($___START_WITH_HISTORIC_BESTS && defined $prev_init_file) { $file_settings .= " --ifile $prev_init_file,run$run.$weights_in_file"; } else{ $file_settings .= " --ifile run$run.$weights_in_file"; } $cmd .= $file_settings; # pro optimization if ($___PAIRWISE_RANKED_OPTIMIZER) { $cmd .= " --pro run$run.pro.data ; echo 'not used' > $weights_out_file; $pro_optimizer -fvals -maxi 30 -nobias binary run$run.pro.data"; &submit_or_exec($cmd,$mert_outfile,$mert_logfile); } # first pro, then mert elsif ($___PRO_STARTING_POINT) { # run pro... my $pro_cmd = $cmd." --pro run$run.pro.data ; $pro_optimizer -fvals -maxi 30 -nobias binary run$run.pro.data"; &submit_or_exec($pro_cmd,"run$run.pro.out","run$run.pro.err"); # ... get results ... my %dummy; ($bestpoint,$devbleu) = &get_weights_from_mert("run$run.pro.out","run$run.pro.err",scalar @{$featlist->{"names"}},\%dummy); open(PRO_START,">run$run.init.pro"); print PRO_START $bestpoint."\n"; close(PRO_START); # ... and run mert $cmd =~ s/(--ifile \S+)/$1,run$run.init.pro/; &submit_or_exec($cmd.$mert_settings,$mert_outfile,$mert_logfile); } # just mert else { &submit_or_exec($cmd.$mert_settings,$mert_outfile,$mert_logfile); } die "Optimization failed, file $weights_out_file does not exist or is empty" if ! -s $weights_out_file; # backup copies foreach my $extractFiles(`/bin/ls extract.*`) { chomp $extractFiles; safesystem ("\\cp -f $extractFiles run$run.$extractFiles") or die; } # safesystem ("\\cp -f extract.err run$run.extract.err") or die; # safesystem ("\\cp -f extract.out run$run.extract.out") or die; safesystem ("\\cp -f $mert_outfile run$run.$mert_outfile") or die; safesystem ("\\cp -f $mert_logfile run$run.$mert_logfile") or die; safesystem ("touch $mert_logfile run$run.$mert_logfile") or die; safesystem ("\\cp -f $weights_out_file run$run.$weights_out_file") or die; # this one is needed for restarts, too print "run $run end at ".`date`; my %sparse_weights; # sparse features ($bestpoint,$devbleu) = &get_weights_from_mert("run$run.$mert_outfile","run$run.$mert_logfile",scalar @{$featlist->{"names"}},\%sparse_weights); die "Failed to parse mert.log, missed Best point there." if !defined $bestpoint || !defined $devbleu; print "($run) BEST at $run: $bestpoint => $devbleu at ".`date`; # update my cache of lambda values my @newweights = split /\s+/, $bestpoint; # interpolate with prior's interation weight, if historic-interpolation is specified if ($___HISTORIC_INTERPOLATION>0 && $run>3) { my %historic_sparse_weights; if (-e "run$run.sparse-weights") { open(SPARSE,"run$run.sparse-weights"); while(<SPARSE>) { chop; my ($feature,$weight) = split; $historic_sparse_weights{$feature} = $weight; } } my $prev = $run-1; my @historic_weights = split /\s+/, `cat run$prev.$weights_out_file`; for(my $i=0;$i<scalar(@newweights);$i++) { $newweights[$i] = $___HISTORIC_INTERPOLATION * $newweights[$i] + (1-$___HISTORIC_INTERPOLATION) * $historic_weights[$i]; } print "interpolate with ".join(",",@historic_weights)." to ".join(",",@newweights); foreach (keys %sparse_weights) { $sparse_weights{$_} *= $___HISTORIC_INTERPOLATION; #print STDERR "sparse_weights{$_} *= $___HISTORIC_INTERPOLATION -> $sparse_weights{$_}\n"; } foreach (keys %historic_sparse_weights) { $sparse_weights{$_} += (1-$___HISTORIC_INTERPOLATION) * $historic_sparse_weights{$_}; #print STDERR "sparse_weights{$_} += (1-$___HISTORIC_INTERPOLATION) * $historic_sparse_weights{$_} -> $sparse_weights{$_}\n"; } } if ($___HISTORIC_INTERPOLATION>0) { open(WEIGHTS,">run$run.$weights_out_file"); print WEIGHTS join(" ",@newweights); close(WEIGHTS); } $featlist->{"values"} = \@newweights; if (scalar keys %sparse_weights) { $sparse_weights_file = "run".($run+1).".sparse-weights"; open(SPARSE,">".$sparse_weights_file); foreach my $feature (keys %sparse_weights) { print SPARSE "$feature $sparse_weights{$feature}\n"; } close(SPARSE); } ## additional stopping criterion: weights have not changed my $shouldstop = 1; for(my $i=0; $i<@CURR; $i++) { die "Lost weight! mert reported fewer weights (@newweights) than we gave it (@CURR)" if !defined $newweights[$i]; if (abs($CURR[$i] - $newweights[$i]) >= $minimum_required_change_in_weights) { $shouldstop = 0; last; } } open F, "> finished_step.txt" or die "Can't mark finished step"; print F $run."\n"; close F; if ($shouldstop) { print STDERR "None of the weights changed more than $minimum_required_change_in_weights. Stopping.\n"; last; } my $firstrun; if ($prev_aggregate_nbl_size==-1){ $firstrun=1; } else{ $firstrun=$run-$prev_aggregate_nbl_size+1; $firstrun=($firstrun>0)?$firstrun:1; } print "loading data from $firstrun to $run (prev_aggregate_nbl_size=$prev_aggregate_nbl_size)\n"; $prev_feature_file = undef; $prev_score_file = undef; $prev_init_file = undef; for (my $i=$firstrun;$i<=$run;$i++){ if (defined $prev_feature_file){ $prev_feature_file = "${prev_feature_file},run${i}.${base_feature_file}"; } else{ $prev_feature_file = "run${i}.${base_feature_file}"; } if (defined $prev_score_file){ $prev_score_file = "${prev_score_file},run${i}.${base_score_file}"; } else{ $prev_score_file = "run${i}.${base_score_file}"; } if (defined $prev_init_file){ $prev_init_file = "${prev_init_file},run${i}.${weights_in_file}"; } else{ $prev_init_file = "run${i}.${weights_in_file}"; } } print "loading data from $prev_feature_file\n" if defined($prev_feature_file); print "loading data from $prev_score_file\n" if defined($prev_score_file); print "loading data from $prev_init_file\n" if defined($prev_init_file); } print "Training finished at ".`date`; if (defined $allsorted){ safesystem ("\\rm -f $allsorted") or die; }; safesystem("\\cp -f $weights_in_file run$run.$weights_in_file") or die; safesystem("\\cp -f $mert_logfile run$run.$mert_logfile") or die; create_config($___CONFIG_ORIG, "./moses.ini", $featlist, $run, $devbleu); # just to be sure that we have the really last finished step marked open F, "> finished_step.txt" or die "Can't mark finished step"; print F $run."\n"; close F; #chdir back to the original directory # useless, just to remind we were not there chdir($cwd); } # end of local scope sub get_weights_from_mert { my ($outfile,$logfile,$weight_count,$sparse_weights) = @_; my ($bestpoint,$devbleu); if ($___PAIRWISE_RANKED_OPTIMIZER || ($___PRO_STARTING_POINT && $logfile =~ /pro/)) { open(IN,$outfile) or die "Can't open $outfile"; my (@WEIGHT,$sum); for(my $i=0;$i<$weight_count;$i++) { push @WEIGHT, 0; } while(<IN>) { # regular features if (/^F(\d+) ([\-\.\de]+)/) { $WEIGHT[$1] = $2; $sum += abs($2); } # sparse features elsif(/^(.+_.+) ([\-\.\de]+)/) { $$sparse_weights{$1} = $2; } } $devbleu = "unknown"; foreach (@WEIGHT) { $_ /= $sum; } foreach (keys %{$sparse_weights}) { $$sparse_weights{$_} /= $sum; } $bestpoint = join(" ",@WEIGHT); close IN; } else { open(IN,$logfile) or die "Can't open $logfile"; while (<IN>) { if (/Best point:\s*([\s\d\.\-e]+?)\s*=> ([\-\d\.]+)/) { $bestpoint = $1; $devbleu = $2; last; } } close IN; } return ($bestpoint,$devbleu); } sub run_decoder { my ($featlist, $run, $need_to_normalize) = @_; my $filename_template = "run%d.best$___N_BEST_LIST_SIZE.out"; my $filename = sprintf($filename_template, $run); # user-supplied parameters print "params = $___DECODER_FLAGS\n"; # parameters to set all model weights (to override moses.ini) my @vals = @{$featlist->{"values"}}; if ($need_to_normalize) { print STDERR "Normalizing lambdas: @vals\n"; my $totlambda=0; grep($totlambda+=abs($_),@vals); grep($_/=$totlambda,@vals); } # moses now does not seem accept "-tm X -tm Y" but needs "-tm X Y" my %model_weights; for(my $i=0; $i<scalar(@{$featlist->{"names"}}); $i++) { my $name = $featlist->{"names"}->[$i]; $model_weights{$name} = "-$name" if !defined $model_weights{$name}; $model_weights{$name} .= sprintf " %.6f", $vals[$i]; } my $decoder_config = join(" ", values %model_weights); print STDERR "DECODER_CFG = $decoder_config\n"; print "decoder_config = $decoder_config\n"; # run the decoder my $nBest_cmd = "-n-best-size $___N_BEST_LIST_SIZE"; my $decoder_cmd; if (defined $___JOBS && $___JOBS > 0) { $decoder_cmd = "$moses_parallel_cmd $pass_old_sge -config $___CONFIG -inputtype $___INPUTTYPE -qsub-prefix mert$run -queue-parameters \"$queue_flags\" -decoder-parameters \"$___DECODER_FLAGS $decoder_config\" -n-best-list \"$filename $___N_BEST_LIST_SIZE\" -input-file $___DEV_F -jobs $___JOBS -decoder $___DECODER > run$run.out"; } else { $decoder_cmd = "$___DECODER $___DECODER_FLAGS -config $___CONFIG -inputtype $___INPUTTYPE $decoder_config -n-best-list $filename $___N_BEST_LIST_SIZE -input-file $___DEV_F > run$run.out"; } safesystem($decoder_cmd) or die "The decoder died. CONFIG WAS $decoder_config \n"; sanity_check_order_of_lambdas($featlist, $filename); return $filename; } sub insert_ranges_to_featlist { my $featlist = shift; my $ranges = shift; $ranges = [] if !defined $ranges; # first collect the ranges from options my $niceranges; foreach my $range (@$ranges) { my $name = undef; foreach my $namedpair (split /,/, $range) { if ($namedpair =~ /^(.*?):/) { $name = $1; $namedpair =~ s/^.*?://; die "Unrecognized name '$name' in --range=$range" if !defined $ABBR2FULL{$name}; } my ($min, $max) = split /\.\./, $namedpair; die "Bad min '$min' in --range=$range" if $min !~ /^-?[0-9.]+$/; die "Bad max '$max' in --range=$range" if $min !~ /^-?[0-9.]+$/; die "No name given in --range=$range" if !defined $name; push @{$niceranges->{$name}}, [$min, $max]; } } # now populate featlist my $seen = undef; for(my $i=0; $i<scalar(@{$featlist->{"names"}}); $i++) { my $name = $featlist->{"names"}->[$i]; $seen->{$name} ++; my $min = 0.0; my $max = 1.0; if (defined $niceranges->{$name}) { my $minmax = shift @{$niceranges->{$name}}; ($min, $max) = @$minmax if defined $minmax; } $featlist->{"mins"}->[$i] = $min; $featlist->{"maxs"}->[$i] = $max; } return $featlist; } sub sanity_check_order_of_lambdas { my $featlist = shift; my $filename_or_stream = shift; my @expected_lambdas = @{$featlist->{"names"}}; my @got = get_order_of_scores_from_nbestlist($filename_or_stream); die "Mismatched lambdas. Decoder returned @got, we expected @expected_lambdas" if "@got" ne "@expected_lambdas"; } sub get_featlist_from_moses { # run moses with the given config file and return the list of features and # their initial values my $configfn = shift; my $featlistfn = "./features.list"; if (-e $featlistfn) { print STDERR "Using cached features list: $featlistfn\n"; } else { print STDERR "Asking moses for feature names and values from $___CONFIG\n"; my $cmd = "$___DECODER $___DECODER_FLAGS -config $configfn -inputtype $___INPUTTYPE -show-weights > $featlistfn"; safesystem($cmd) or die "Failed to run moses with the config $configfn"; } # read feature list my @names = (); my @startvalues = (); open(INI,$featlistfn) or die "Can't read $featlistfn"; my $nr = 0; my @errs = (); while (<INI>) { $nr++; chomp; /^(.+) (\S+) (\S+)$/ || die("invalid feature: $_"); my ($longname, $feature, $value) = ($1,$2,$3); next if $value eq "sparse"; push @errs, "$featlistfn:$nr:Bad initial value of $feature: $value\n" if $value !~ /^[+-]?[0-9.e]+$/; push @errs, "$featlistfn:$nr:Unknown feature '$feature', please add it to \@ABBR_FULL_MAP\n" if !defined $ABBR2FULL{$feature}; push @names, $feature; push @startvalues, $value; } close INI; if (scalar @errs) { print STDERR join("", @errs); exit 1; } return {"names"=>\@names, "values"=>\@startvalues}; } sub get_order_of_scores_from_nbestlist { # read the first line and interpret the ||| label: num num num label2: num ||| column in nbestlist # return the score labels in order my $fname_or_source = shift; # print STDERR "Peeking at the beginning of nbestlist to get order of scores: $fname_or_source\n"; open IN, $fname_or_source or die "Failed to get order of scores from nbestlist '$fname_or_source'"; my $line = <IN>; close IN; die "Line empty in nbestlist '$fname_or_source'" if !defined $line; my ($sent, $hypo, $scores, $total) = split /\|\|\|/, $line; $scores =~ s/^\s*|\s*$//g; die "No scores in line: $line" if $scores eq ""; my @order = (); my $label = undef; my $sparse = 0; # we ignore sparse features here foreach my $tok (split /\s+/, $scores) { if ($tok =~ /.+_.+:/) { $sparse = 1; } elsif ($tok =~ /^([a-z][0-9a-z]*):/i) { $label = $1; } elsif ($tok =~ /^-?[-0-9.e]+$/) { if (!$sparse) { # a score found, remember it die "Found a score but no label before it! Bad nbestlist '$fname_or_source'!" if !defined $label; push @order, $label; } $sparse = 0; } else { die "Not a label, not a score '$tok'. Failed to parse the scores string: '$scores' of nbestlist '$fname_or_source'"; } } print STDERR "The decoder returns the scores in this order: @order\n"; return @order; } sub create_config { my $infn = shift; # source config my $outfn = shift; # where to save the config my $featlist = shift; # the lambdas we should write my $iteration = shift; # just for verbosity my $bleu_achieved = shift; # just for verbosity my $sparse_weights_file = shift; # only defined when optimizing sparse features my %P; # the hash of all parameters we wish to override # first convert the command line parameters to the hash { # ensure local scope of vars my $parameter=undef; print "Parsing --decoder-flags: |$___DECODER_FLAGS|\n"; $___DECODER_FLAGS =~ s/^\s*|\s*$//; $___DECODER_FLAGS =~ s/\s+/ /; foreach (split(/ /,$___DECODER_FLAGS)) { if (/^\-([^\d].*)$/) { $parameter = $1; $parameter = $ABBR2FULL{$parameter} if defined($ABBR2FULL{$parameter}); } else { die "Found value with no -paramname before it: $_" if !defined $parameter; push @{$P{$parameter}},$_; } } } # First delete all weights params from the input, we're overwriting them. # Delete both short and long-named version. for(my $i=0; $i<scalar(@{$featlist->{"names"}}); $i++) { my $name = $featlist->{"names"}->[$i]; delete($P{$name}); delete($P{$ABBR2FULL{$name}}); } # Convert weights to elements in P for(my $i=0; $i<scalar(@{$featlist->{"names"}}); $i++) { my $name = $featlist->{"names"}->[$i]; my $val = $featlist->{"values"}->[$i]; $name = defined $ABBR2FULL{$name} ? $ABBR2FULL{$name} : $name; # ensure long name push @{$P{$name}}, $val; } if (defined($sparse_weights_file)) { push @{$P{"weights-file"}}, $___WORKING_DIR."/".$sparse_weights_file; } # create new moses.ini decoder config file by cloning and overriding the original one open(INI,$infn) or die "Can't read $infn"; delete($P{"config"}); # never output print "Saving new config to: $outfn\n"; open(OUT,"> $outfn") or die "Can't write $outfn"; print OUT "# MERT optimized configuration\n"; print OUT "# decoder $___DECODER\n"; print OUT "# BLEU $bleu_achieved on dev $___DEV_F\n"; print OUT "# We were before running iteration $iteration\n"; print OUT "# finished ".`date`; my $line = <INI>; while(1) { last unless $line; # skip until hit [parameter] if ($line !~ /^\[(.+)\]\s*$/) { $line = <INI>; print OUT $line if $line =~ /^\#/ || $line =~ /^\s+$/; next; } # parameter name my $parameter = $1; $parameter = $ABBR2FULL{$parameter} if defined($ABBR2FULL{$parameter}); print OUT "[$parameter]\n"; # change parameter, if new values if (defined($P{$parameter})) { # write new values foreach (@{$P{$parameter}}) { print OUT $_."\n"; } delete($P{$parameter}); # skip until new parameter, only write comments while($line = <INI>) { print OUT $line if $line =~ /^\#/ || $line =~ /^\s+$/; last if $line =~ /^\[/; last unless $line; } next; } # unchanged parameter, write old while($line = <INI>) { last if $line =~ /^\[/; print OUT $line; } } # write all additional parameters foreach my $parameter (keys %P) { print OUT "\n[$parameter]\n"; foreach (@{$P{$parameter}}) { print OUT $_."\n"; } } close(INI); close(OUT); print STDERR "Saved: $outfn\n"; } sub safesystem { print STDERR "Executing: @_\n"; system(@_); if ($? == -1) { print STDERR "Failed to execute: @_\n $!\n"; exit(1); } elsif ($? & 127) { printf STDERR "Execution of: @_\n died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without'; exit(1); } else { my $exitcode = $? >> 8; print STDERR "Exit code: $exitcode\n" if $exitcode; return ! $exitcode; } } sub ensure_full_path { my $PATH = shift; $PATH =~ s/\/nfsmnt//; return $PATH if $PATH =~ /^\//; my $dir = `pawd 2>/dev/null`; if(!$dir){$dir = `pwd`;} chomp($dir); $PATH = $dir."/".$PATH; $PATH =~ s/[\r\n]//g; $PATH =~ s/\/\.\//\//g; $PATH =~ s/\/+/\//g; my $sanity = 0; while($PATH =~ /\/\.\.\// && $sanity++<10) { $PATH =~ s/\/+/\//g; $PATH =~ s/\/[^\/]+\/\.\.\//\//g; } $PATH =~ s/\/[^\/]+\/\.\.$//; $PATH =~ s/\/+$//; $PATH =~ s/\/nfsmnt//; return $PATH; } sub submit_or_exec { my ($cmd,$stdout,$stderr) = @_; print STDERR "exec: $cmd\n"; if (defined $___JOBS && $___JOBS > 0) { safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -queue-parameter=\"$queue_flags\" -stdout=$stdout -stderr=$stderr" ) or die "ERROR: Failed to submit '$cmd' (via $qsubwrapper)"; } else { safesystem("$cmd > $stdout 2> $stderr") or die "ERROR: Failed to run '$cmd'."; } }
{ "content_hash": "d9b981ac66adb580c2a66532ab4193fc", "timestamp": "", "source": "github", "line_count": 1468, "max_line_length": 336, "avg_line_length": 36.805177111716624, "alnum_prop": 0.6006848047381085, "repo_name": "yang1fan2/nematus", "id": "3c1b36f0ea744ced593eba5c57938cd72e910c7e", "size": "57361", "binary": false, "copies": "9", "ref": "refs/heads/master", "path": "mosesdecoder-master/contrib/mert-moses-multi.pl", "mode": "33261", "license": "bsd-3-clause", "language": [ { "name": "Assembly", "bytes": "10914" }, { "name": "Batchfile", "bytes": "18581" }, { "name": "C", "bytes": "2157828" }, { "name": "C++", "bytes": "9300642" }, { "name": "CMake", "bytes": "13717" }, { "name": "CSS", "bytes": "22945" }, { "name": "E", "bytes": "66" }, { "name": "Emacs Lisp", "bytes": "34068" }, { "name": "Forth", "bytes": "58" }, { "name": "HTML", "bytes": "439533" }, { "name": "Java", "bytes": "9070" }, { "name": "JavaScript", "bytes": "176069" }, { "name": "Logos", "bytes": "3118" }, { "name": "M4", "bytes": "47488" }, { "name": "Makefile", "bytes": "293964" }, { "name": "NewLisp", "bytes": "3164" }, { "name": "Objective-C", "bytes": "8255" }, { "name": "PHP", "bytes": "145237" }, { "name": "Perl", "bytes": "1617898" }, { "name": "Protocol Buffer", "bytes": "947" }, { "name": "Python", "bytes": "974116" }, { "name": "Roff", "bytes": "14619243" }, { "name": "Ruby", "bytes": "3298" }, { "name": "Shell", "bytes": "478589" }, { "name": "Slash", "bytes": "634" }, { "name": "Smalltalk", "bytes": "208330" }, { "name": "SystemVerilog", "bytes": "368" }, { "name": "Yacc", "bytes": "18910" }, { "name": "nesC", "bytes": "366" } ], "symlink_target": "" }
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_ConsumesDef_i::TAO_ConsumesDef_i ( TAO_Repository_i *repo ) : TAO_IRObject_i (repo), TAO_Contained_i (repo), TAO_EventPortDef_i (repo) { } TAO_ConsumesDef_i::~TAO_ConsumesDef_i (void) { } CORBA::DefinitionKind TAO_ConsumesDef_i::def_kind (void) { return CORBA::dk_Consumes; } TAO_END_VERSIONED_NAMESPACE_DECL
{ "content_hash": "b715f61b7d4f4751284268c9a95aec02", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 44, "avg_line_length": 16.818181818181817, "alnum_prop": 0.7, "repo_name": "binary42/OCI", "id": "811d93708f24a73ac08adafe9a707f09ebdc9e7c", "size": "541", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "orbsvcs/IFRService/ConsumesDef_i.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "176672" }, { "name": "C++", "bytes": "28193015" }, { "name": "HTML", "bytes": "19914" }, { "name": "IDL", "bytes": "89802" }, { "name": "LLVM", "bytes": "4067" }, { "name": "Lex", "bytes": "6305" }, { "name": "Makefile", "bytes": "509509" }, { "name": "Yacc", "bytes": "18367" } ], "symlink_target": "" }
package org.openqa.selenium.safari; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import com.google.common.collect.ImmutableMap; import org.junit.Test; import org.openqa.selenium.Capabilities; import org.openqa.selenium.ImmutableCapabilities; import java.util.Map; public class SafariOptionsTest { @Test public void commonUsagePatternWorks() { SafariOptions options = new SafariOptions().useCleanSession(true); Map<String, ?> caps = options.asMap(); assertEquals(((Map<String, ?>) caps.get(SafariOptions.CAPABILITY)).get("cleanSession"), true); } @Test public void roundTrippingToCapabilitiesAndBackWorks() { SafariOptions expected = new SafariOptions() .useCleanSession(true) .setUseTechnologyPreview(true); // Convert to a Map so we can create a standalone capabilities instance, which we then use to // create a new set of options. This is the round trip, ladies and gentlemen. SafariOptions seen = new SafariOptions(new ImmutableCapabilities(expected.asMap())); assertEquals(expected, seen); } }
{ "content_hash": "e950011def4727cc376bf67d2ad37664", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 98, "avg_line_length": 31.2972972972973, "alnum_prop": 0.7538860103626943, "repo_name": "bayandin/selenium", "id": "29c632950fbfb58ec25009fedcc10062dd4b7de2", "size": "1962", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "java/client/test/org/openqa/selenium/safari/SafariOptionsTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ASP", "bytes": "825" }, { "name": "Batchfile", "bytes": "321" }, { "name": "C", "bytes": "62551" }, { "name": "C#", "bytes": "2769011" }, { "name": "C++", "bytes": "1875901" }, { "name": "CSS", "bytes": "27283" }, { "name": "HTML", "bytes": "1846569" }, { "name": "Java", "bytes": "4858567" }, { "name": "JavaScript", "bytes": "4667200" }, { "name": "Makefile", "bytes": "4655" }, { "name": "Objective-C", "bytes": "4376" }, { "name": "Python", "bytes": "853104" }, { "name": "Ragel", "bytes": "3086" }, { "name": "Ruby", "bytes": "909984" }, { "name": "Shell", "bytes": "2688" }, { "name": "XSLT", "bytes": "1047" } ], "symlink_target": "" }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width initial-scale=1"> <meta property="og:title" content="De debian squeeze a wheezy (1)"> <title>De debian squeeze a wheezy (1)</title> <meta property="og:description" content=" Aquestes vacances de Cap d’Any he estat migrant d’Squeeze a Wheezy (versió 7.3). Tot ha anat bé llevat de dues qüestions: la gràfica i el so. En aquest p..."> <meta property="og:url" content="http://peremig.github.io/howto/2014/01/01/de_squeeze_a_wheezy_1.html"> <meta property="og:site_name" content="Buscant pingüins al pol nord"> <meta property="og:locale" content="ca_ES"> <meta name="twitter:card" content="summary"> <meta name="twitter:site" content="@Pere_MiG"> <meta name="twitter:creator" content="@Pere_MiG"> <meta name="twitter:title" content="De debian squeeze a wheezy (1)"> <meta name="twitter:description" content=" Aquestes vacances de Cap d’Any he estat migrant d’Squeeze a Wheezy (versió 7.3). Tot ha anat bé llevat de dues qüestions: la gràfica i el so. En aquest p..."> <meta name="twitter:url" content="http://peremig.github.io/howto/2014/01/01/de_squeeze_a_wheezy_1.html"> <meta name="keywords" content="Linux, debian, català"> <link rel="icon" href="/images/favicon.ico"> <link rel="stylesheet" href="/css/main.css"> <link rel="canonical" href="http://peremig.github.io/howto/2014/01/01/de_squeeze_a_wheezy_1.html"> <link rel="alternate" type="application/atom+xml" title="Buscant pingüins al pol nord" href="http://peremig.github.io/feed.xml" /> <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script language="Javascript" type="text/javascript"> function search_google() { var query = document.getElementById("google-search").value; window.open("http://google.com/search?q=" + query + "%20site:" + "http://peremig.github.io"); } </script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '', 'auto'); ga('send', 'pageview'); </script> <script type='text/javascript'> var blocklink = ['http://humanorightswatch.org','http://o-o-6-o-o.com','http://darodar.com','http://blackhatworth.com','http://hulfingtonpost.com','http://bestwebsitesawards.com','http://darodar.com','http://buttons-for-website.com','http://ilovevitaly.co','http://semalt.com','http://priceg.com','http://simple-share-buttons.com','http://googlsucks.com','http://4webmasters.org','http://aliexpress.com','http://addons.mozilla.org/en-US/firefox/addon/ilovevitaly/','http://free-share-buttons.com','http://buttons-for-your-website.com','http://theguardlan.com','http://buy-cheap-online.info','http://best-seo-offer.com']; for (var b = blocklink.length; b--;) { if (document.referrer.match(blocklink[b])) window.location = "http://www.google.com"; } </script> </head> <body> <div class="container"> <header class="site-header"> <div class="wrapper"> <h1 class="site-title"><a href="/">Buscant pingüins al pol nord</a></h1> <h3 class="site-meta">Les aventures d'un professor de català amb Linux i el xinès</h3> <nav class="site-nav"> <a href="#" class="menu-icon"> <svg viewBox="0 0 18 15"> <path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/> <path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/> <path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/> </svg> </a> <div class="trigger"> <a class="page-link" href="/">Inici</a> <a class="page-link" href="/about/">Qui sóc?</a> <a class="page-link" href="/archives/">Arxiu</a> <a class="page-link" href="/categories/">Categories</a> <a class="page-link" href="/tags/">Etiquetes</a> <a class="page-link" href="/guestbook/">Llibre de visites</a> <a class="page-link" href="/feed.xml">Segueix-me</a> </div> </nav> </div> </header> <div class="page-content col-sm-8"> <div class="post" itemscope itemtype="http://schema.org/BlogPosting"> <header class="post-header"> <h1 itemprop="name" class="post-title">De debian squeeze a wheezy (1)</h1> <meta itemprop="keywords" content="Debian,Squeeze,Wheezy,vídeo,nvidia" /> <p class="post-meta"> Publicat a <a href="/categories/#howto">howto</a>&nbsp; i etiquetat <a href="/tags/#Debian" title="Debian">Debian </a>, <a href="/tags/#Squeeze" title="Squeeze">Squeeze </a>, <a href="/tags/#Wheezy" title="Wheezy">Wheezy </a>, <a href="/tags/#vídeo" title="vídeo">vídeo </a>, <a href="/tags/#nvidia" title="nvidia">nvidia </a> <time itemprop="datePublished" datetime="2014-01-01"> el 1 Jan, 2014 </time> </p> </header> <article class="post-content" itemprop="articleBody"> <div style="text-align:center"> <p><img src="https://i1.wp.com/kbase.vectorworks.net/images/nvidia-2.jpg" alt="nVidia" /></p> </div> <div style="text-align:justify"> <p>Aquestes vacances de Cap d’Any he estat migrant d’Squeeze a Wheezy (versió 7.3). Tot ha anat bé llevat de dues qüestions: la gràfica i el so. En aquest primer post tractaré de com he resolt el sistema gràfic (ja que va ser el primer que vaig resoldre).</p> <!-- more --> <p>El sistema actualitzat és un pèl antic, es tracta d’un AMD 386, amb una gràfica amb xip <em>nvidia Geforce 6200LE</em>, per la qual cosa, almenys en teoria, no hauria de tenir problemes amb les drivers lliures <em>nouveau</em>. D’entrada, cal dir ja que en la versió Squeeze aquests drivers no havien funcionat, per la qual cosa vaig optar per baixar-ne els drivers propietaris de la web d’<em>nvidia</em> i compilar-los. Tot i que sempre van funcionar correctament, la veritat és que el procediment era una mica pesat, ja que qualsevol actualització del kernel linux o del servidor gràfic <em>x.org</em> m’obligava a recompilar-ne els drivers.</p> <p>En arrencar Wheezy amb els drivers nouveau, feia la impressió que estigués arrencant un Windows: el sistema arrencava lentament i el servidor gràfic anava força lent (a trompades); és més, al cap d’una estona i quan es començava a fer ús de la multitasca, feia la impressió que tot el sistema s’hagués penjat (el sistema gràfic es congelava i deixava de respondre a ratolí i a teclat).</p> <p>La solució passa per desintal·lar els drivers <em>nouveau</em> i fer servir els drivers propietaris. Si intentem la via fàcil (desintal·lar i purgar el paquet <em>xserver-xorg-video-nouveau</em> i instal·lar el paquet <em>xserver-xorg-video-nvidia</em>), observarem que no només no funciona, sinó que ni tan sols arrenca el servidor gràfic. Arreglar-ho demana uns quants passos més:</p> <ol> <li>Eliminar el fitxer <em>/usr/lib/xorg/modules/drivers/nouveau.so</em></li> <li>Obligar el servidor gràfic a emprar els drivers propietaris i, per tant, crear el fitxer <em>/etc/X11/xorg.conf</em> amb almenys les línies següents:</li> </ol> <div class="highlight"><pre><code class="language-bash" data-lang="bash">Section <span class="s2">"Screen"</span> Identifier <span class="s2">"Default screen"</span> Device <span class="s2">"Default Video Card"</span> DefaultDepth 24 EndSection Section <span class="s2">"Device"</span> Identifier <span class="s2">"Default Video Card"</span> Driver <span class="s2">"nvidia"</span> EndSection</code></pre></div> <p>Reiniciem llavors el servidor gràfic (o tot el sistema, com ho preferim) i ja tindrem el sistema gràfic amb la potència i fiabilitat de GNU/Linux, amb l’avantatge (respecte de la compilació dels drivers), que qualsevol actualització que es faci del nucli Linux o de les <em>X</em> ens recompilarà els drivers de forma totalment automàtica. El desavantatge és que no disposarem dels darrers drivers publicats per <em>nvidia</em>.</p> </div> </article> <hr /> </div> <section class="pager"> <ul> <li class="previous"><a href="/articles/2013/10/09/corrector_gramatical_catala.html" title="Corrector gramatical i d’estil en català">&larr; Entrades més antigues</a></li> <li class="next"><a href="/howto/2014/01/02/de_squeeze_a_wheezy_2.html" title="De debian squeeze a wheezy (2)">Entrades més noves &rarr;</a></li> </ul> </section> <div id="disqus_thread"></div> <script type="text/javascript"> var disqus_developer = 1; var disqus_shortname ='peremig'; /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Sisplau activeu JavaScript per poder accedir als <a href="http://disqus.com/?ref_noscript">comentaris servits per Disqus.</a></noscript> <section class="pager"> </section> </div> <div class="col-sm-2"> <div class="sidebar-module about"> <h4>Qui sóc?</h4> <img title="Pere MiG" src="/images/pinguins.jpg" alt="Pere MiG"/> <span>Blog sobre Linux de Pere MiG, professor de català amant dels impossibles.</span> <br /> Pots contactar amb mi a través de: <br /> <a href="mailto:[email protected]" title="mailto: [email protected]"><i class="fa fa-envelope-square fa-3x"></i></a>&nbsp; <a href="https://github.com/peremig" title="GithubID: peremig"><i class="fa fa-github-square fa-3x"></i></a>&nbsp; <a href="https://twitter.com/Pere_MiG" title="TwitterID: Pere_MiG"><i class="fa fa-twitter-square fa-3x"></i></a> </div> <div class="sidebar-module"> <h4>Cerca en el lloc</h4> <form onsubmit="search_google()" > <input type="text" id="google-search" placeholder="Google search" /> <input type="submit" name="sa" value="Go" /> </form> </div> <div class="sidebar-module"> <!-- sidebar-module-inset">--> <h4>Sobre el Copyright</h4> <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/"> <img src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png"> </a> <br /> <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Attribution-NonCommercial-ShareAlike</a> </div> <div class="sidebar-module"> <h4>Entrades recents</h4> <li> <a href="//articles/2018/03/06/Driver_Unichrome%E2%81%84OpenChrome_trencat_a_Debian_9.html" title="Driver per a xips de vídeo VIA UniChrome trencat a Debian 9 Stretch" rel="bookmark">Driver per a xips de vídeo VIA UniChrome trencat a Debian 9 Stretch</a> </li> <li> <a href="//howto/2016/03/20/Resetejar_webserver_airzone.html" title="Resetejar webserver d'Airzone" rel="bookmark">Resetejar webserver d'Airzone</a> </li> <li> <a href="//articles/2016/03/19/Torna_Firefox_a_Debian.html" title="Torna Firefox a Debian" rel="bookmark">Torna Firefox a Debian</a> </li> <li> <a href="//articles/2016/03/06/Abandonant_PLC_retorn_wifi.html" title="Abandonant els PLC, retorn al wifi" rel="bookmark">Abandonant els PLC, retorn al wifi</a> </li> <li> <a href="//articles/2015/12/13/Contacte_accidentat_amb_Windows_10.html" title="Contacte accidentat amb Windows 10" rel="bookmark">Contacte accidentat amb Windows 10</a> </li> </div> <div class="sidebar-module"> <h4>Categories</h4> <li><a href="/categories/#articles" title="articles" rel="11">articles (11)</a></li> <li><a href="/categories/#howto" title="howto" rel="10">howto (10)</a></li> </div> <div class="sidebar-module"> <h4>Etiquetes</h4> <a href="/tags/#ime" title="ime" rel="4">ime</a> &nbsp; <a href="/tags/#IBUS" title="IBUS" rel="2">IBUS</a> &nbsp; <a href="/tags/#Tegaki" title="Tegaki" rel="1">Tegaki</a> &nbsp; <a href="/tags/#PDF" title="PDF" rel="2">PDF</a> &nbsp; <a href="/tags/#xsane" title="xsane" rel="1">xsane</a> &nbsp; <a href="/tags/#Debian" title="Debian" rel="7">Debian</a> &nbsp; <a href="/tags/#Linkat" title="Linkat" rel="1">Linkat</a> &nbsp; <a href="/tags/#dictat" title="dictat" rel="1">dictat</a> &nbsp; <a href="/tags/#iconv" title="iconv" rel="1">iconv</a> &nbsp; <a href="/tags/#rename" title="rename" rel="1">rename</a> &nbsp; <a href="/tags/#sed" title="sed" rel="1">sed</a> &nbsp; <a href="/tags/#wdiff" title="wdiff" rel="1">wdiff</a> &nbsp; <a href="/tags/#vídeo" title="vídeo" rel="3">vídeo</a> &nbsp; <a href="/tags/#email" title="email" rel="3">email</a> &nbsp; <a href="/tags/#docència" title="docència" rel="1">docència</a> &nbsp; <a href="/tags/#corrector" title="corrector" rel="1">corrector</a> &nbsp; <a href="/tags/#gramàtica" title="gramàtica" rel="1">gramàtica</a> &nbsp; <a href="/tags/#Squeeze" title="Squeeze" rel="2">Squeeze</a> &nbsp; <a href="/tags/#Wheezy" title="Wheezy" rel="2">Wheezy</a> &nbsp; <a href="/tags/#nvidia" title="nvidia" rel="1">nvidia</a> &nbsp; <a href="/tags/#audio" title="audio" rel="1">audio</a> &nbsp; <a href="/tags/#AC'97" title="AC'97" rel="1">AC'97</a> &nbsp; <a href="/tags/#SCIM" title="SCIM" rel="1">SCIM</a> &nbsp; <a href="/tags/#UIM" title="UIM" rel="1">UIM</a> &nbsp; <a href="/tags/#FCITX" title="FCITX" rel="2">FCITX</a> &nbsp; <a href="/tags/#emacs" title="emacs" rel="1">emacs</a> &nbsp; <a href="/tags/#Jessie" title="Jessie" rel="2">Jessie</a> &nbsp; <a href="/tags/#usb" title="usb" rel="1">usb</a> &nbsp; <a href="/tags/#Mutt" title="Mutt" rel="2">Mutt</a> &nbsp; <a href="/tags/#XTEC" title="XTEC" rel="1">XTEC</a> &nbsp; <a href="/tags/#gmail" title="gmail" rel="2">gmail</a> &nbsp; <a href="/tags/#Windows" title="Windows" rel="1">Windows</a> &nbsp; <a href="/tags/#xarxa" title="xarxa" rel="1">xarxa</a> &nbsp; <a href="/tags/#PLC" title="PLC" rel="1">PLC</a> &nbsp; <a href="/tags/#Iceweasel" title="Iceweasel" rel="1">Iceweasel</a> &nbsp; <a href="/tags/#Firefox" title="Firefox" rel="1">Firefox</a> &nbsp; <a href="/tags/#airzone" title="airzone" rel="1">airzone</a> &nbsp; <a href="/tags/#domòtica" title="domòtica" rel="1">domòtica</a> &nbsp; <a href="/tags/#webserver" title="webserver" rel="1">webserver</a> &nbsp; <a href="/tags/#Stretch" title="Stretch" rel="1">Stretch</a> &nbsp; </div> <div class="sidebar-module"> <h4>Blogroll</h4> <li><a href="https://elageminada.wordpress.com" title="Bloc de llengua i literatura catalanes">Elageminada</a></li> <li><a href="https://hanyucat.wordpress.com/" title="Materials en català per a l'estudi de la llengua xinesa">Hanyu – Cat</a></li> </div> <div class="sidebar-module"> <h4>Arxius</h4> <li id="2018" > <a href="/archives/#2018">2018</a></li> <li id="2016" > <a href="/archives/#2016">2016</a></li> <li id="2015" > <a href="/archives/#2015">2015</a></li> <li id="2014" > <a href="/archives/#2014">2014</a></li> <li id="2013" > <a href="/archives/#2013">2013</a></li> <li id="2011" > <a href="/archives/#2011">2011</a></li> </div> </div> <footer class="site-footer"> <p>Copyright &copy; <a href="/">Buscant pingüins al pol nord</a></p> <p>Powered by <a href="https://github.com/jekyll/jekyll">Jekyll</a> a <a href="https://github.com/">Github</a> | Tema <a href="https://github.com/yulijia/freshman21/">Freshman21</a> Dissenyat per <a href="http://yulijia.net">Lijia Yu</a> <div id="totop" style="position:fixed;bottom:150px;right:50px;cursor: pointer;"> <a title="Back To Top"><img src="/images/topbutton.png"/></a> </div> <script src="/js/jquery-1.9.1.min.js"></script> <script src="/js/totop.js"></script> </footer> </div> </body> </html>
{ "content_hash": "08ff6ac5fcd9b354f80b42659d9e0c75", "timestamp": "", "source": "github", "line_count": 564, "max_line_length": 653, "avg_line_length": 30.25886524822695, "alnum_prop": 0.6317238954646666, "repo_name": "peremig/peremig.github.io", "id": "de6f5271a7a8ce2c740b827110e4ed563fbade9b", "size": "17182", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_site/howto/2014/01/01/de_squeeze_a_wheezy_1.html", "mode": "33261", "license": "mit", "language": [ { "name": "CSS", "bytes": "30802" }, { "name": "HTML", "bytes": "695857" }, { "name": "JavaScript", "bytes": "3004" } ], "symlink_target": "" }
 #include <aws/qldb/model/ResourceNotFoundException.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace QLDB { namespace Model { ResourceNotFoundException::ResourceNotFoundException() : m_messageHasBeenSet(false), m_resourceTypeHasBeenSet(false), m_resourceNameHasBeenSet(false) { } ResourceNotFoundException::ResourceNotFoundException(JsonView jsonValue) : m_messageHasBeenSet(false), m_resourceTypeHasBeenSet(false), m_resourceNameHasBeenSet(false) { *this = jsonValue; } ResourceNotFoundException& ResourceNotFoundException::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Message")) { m_message = jsonValue.GetString("Message"); m_messageHasBeenSet = true; } if(jsonValue.ValueExists("ResourceType")) { m_resourceType = jsonValue.GetString("ResourceType"); m_resourceTypeHasBeenSet = true; } if(jsonValue.ValueExists("ResourceName")) { m_resourceName = jsonValue.GetString("ResourceName"); m_resourceNameHasBeenSet = true; } return *this; } JsonValue ResourceNotFoundException::Jsonize() const { JsonValue payload; if(m_messageHasBeenSet) { payload.WithString("Message", m_message); } if(m_resourceTypeHasBeenSet) { payload.WithString("ResourceType", m_resourceType); } if(m_resourceNameHasBeenSet) { payload.WithString("ResourceName", m_resourceName); } return payload; } } // namespace Model } // namespace QLDB } // namespace Aws
{ "content_hash": "e183b96c1b7a5abf3be2e8aca091ff94", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 84, "avg_line_length": 18.372093023255815, "alnum_prop": 0.7272151898734177, "repo_name": "aws/aws-sdk-cpp", "id": "65962e4472920bc9cd4d437b5c7a521d4832a030", "size": "1699", "binary": false, "copies": "4", "ref": "refs/heads/main", "path": "aws-cpp-sdk-qldb/source/model/ResourceNotFoundException.cpp", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "309797" }, { "name": "C++", "bytes": "476866144" }, { "name": "CMake", "bytes": "1245180" }, { "name": "Dockerfile", "bytes": "11688" }, { "name": "HTML", "bytes": "8056" }, { "name": "Java", "bytes": "413602" }, { "name": "Python", "bytes": "79245" }, { "name": "Shell", "bytes": "9246" } ], "symlink_target": "" }
package org.apache.calcite.rel.rules; import org.apache.calcite.plan.RelOptRule; import org.apache.calcite.plan.RelOptRuleCall; import org.apache.calcite.plan.RelOptUtil; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.SingleRel; import org.apache.calcite.rel.core.Aggregate; import org.apache.calcite.rel.core.Filter; import org.apache.calcite.rel.core.Join; import org.apache.calcite.rel.core.Project; import org.apache.calcite.rel.core.RelFactories; import org.apache.calcite.rel.core.Sort; import org.apache.calcite.rel.core.Values; import org.apache.calcite.rel.logical.LogicalIntersect; import org.apache.calcite.rel.logical.LogicalMinus; import org.apache.calcite.rel.logical.LogicalUnion; import org.apache.calcite.rel.logical.LogicalValues; import org.apache.calcite.rex.RexLiteral; import org.apache.calcite.tools.RelBuilder; import org.apache.calcite.tools.RelBuilderFactory; import com.google.common.base.Predicate; import com.google.common.base.Predicates; import java.util.ArrayList; import java.util.List; import static org.apache.calcite.plan.RelOptRule.any; import static org.apache.calcite.plan.RelOptRule.none; import static org.apache.calcite.plan.RelOptRule.operand; import static org.apache.calcite.plan.RelOptRule.some; import static org.apache.calcite.plan.RelOptRule.unordered; /** * Collection of rules which remove sections of a query plan known never to * produce any rows. * * <p>Conventionally, the way to represent an empty relational expression is * with a {@link Values} that has no tuples. * * @see LogicalValues#createEmpty */ public abstract class PruneEmptyRules { //~ Static fields/initializers --------------------------------------------- /** * Rule that removes empty children of a * {@link org.apache.calcite.rel.logical.LogicalUnion}. * * <p>Examples: * * <ul> * <li>Union(Rel, Empty, Rel2) becomes Union(Rel, Rel2) * <li>Union(Rel, Empty, Empty) becomes Rel * <li>Union(Empty, Empty) becomes Empty * </ul> */ public static final RelOptRule UNION_INSTANCE = new RelOptRule( operand(LogicalUnion.class, unordered(operand(Values.class, null, Values.IS_EMPTY, none()))), "Union") { public void onMatch(RelOptRuleCall call) { final LogicalUnion union = call.rel(0); final List<RelNode> inputs = call.getChildRels(union); assert inputs != null; final List<RelNode> newInputs = new ArrayList<>(); for (RelNode input : inputs) { if (!isEmpty(input)) { newInputs.add(input); } } assert newInputs.size() < inputs.size() : "planner promised us at least one Empty child"; final RelBuilder builder = call.builder(); switch (newInputs.size()) { case 0: builder.push(union).empty(); break; case 1: builder.push( RelOptUtil.createCastRel( newInputs.get(0), union.getRowType(), true)); break; default: builder.push(LogicalUnion.create(newInputs, union.all)); break; } call.transformTo(builder.build()); } }; /** * Rule that removes empty children of a * {@link org.apache.calcite.rel.logical.LogicalMinus}. * * <p>Examples: * * <ul> * <li>Minus(Rel, Empty, Rel2) becomes Minus(Rel, Rel2) * <li>Minus(Empty, Rel) becomes Empty * </ul> */ public static final RelOptRule MINUS_INSTANCE = new RelOptRule( operand(LogicalMinus.class, unordered(operand(Values.class, null, Values.IS_EMPTY, none()))), "Minus") { public void onMatch(RelOptRuleCall call) { final LogicalMinus minus = call.rel(0); final List<RelNode> inputs = call.getChildRels(minus); assert inputs != null; final List<RelNode> newInputs = new ArrayList<>(); for (RelNode input : inputs) { if (!isEmpty(input)) { newInputs.add(input); } else if (newInputs.isEmpty()) { // If the first input of Minus is empty, the whole thing is // empty. break; } } assert newInputs.size() < inputs.size() : "planner promised us at least one Empty child"; final RelBuilder builder = call.builder(); switch (newInputs.size()) { case 0: builder.push(minus).empty(); break; case 1: builder.push( RelOptUtil.createCastRel( newInputs.get(0), minus.getRowType(), true)); break; default: builder.push(LogicalMinus.create(newInputs, minus.all)); break; } call.transformTo(builder.build()); } }; /** * Rule that converts a * {@link org.apache.calcite.rel.logical.LogicalIntersect} to * empty if any of its children are empty. * * <p>Examples: * * <ul> * <li>Intersect(Rel, Empty, Rel2) becomes Empty * <li>Intersect(Empty, Rel) becomes Empty * </ul> */ public static final RelOptRule INTERSECT_INSTANCE = new RelOptRule( operand(LogicalIntersect.class, unordered(operand(Values.class, null, Values.IS_EMPTY, none()))), "Intersect") { public void onMatch(RelOptRuleCall call) { LogicalIntersect intersect = call.rel(0); final RelBuilder builder = call.builder(); builder.push(intersect).empty(); call.transformTo(builder.build()); } }; private static boolean isEmpty(RelNode node) { return node instanceof Values && ((Values) node).getTuples().isEmpty(); } /** * Rule that converts a {@link org.apache.calcite.rel.logical.LogicalProject} * to empty if its child is empty. * * <p>Examples: * * <ul> * <li>Project(Empty) becomes Empty * </ul> */ public static final RelOptRule PROJECT_INSTANCE = new RemoveEmptySingleRule(Project.class, Predicates.<Project>alwaysTrue(), RelFactories.LOGICAL_BUILDER, "PruneEmptyProject"); /** * Rule that converts a {@link org.apache.calcite.rel.logical.LogicalFilter} * to empty if its child is empty. * * <p>Examples: * * <ul> * <li>Filter(Empty) becomes Empty * </ul> */ public static final RelOptRule FILTER_INSTANCE = new RemoveEmptySingleRule(Filter.class, "PruneEmptyFilter"); /** * Rule that converts a {@link org.apache.calcite.rel.core.Sort} * to empty if its child is empty. * * <p>Examples: * * <ul> * <li>Sort(Empty) becomes Empty * </ul> */ public static final RelOptRule SORT_INSTANCE = new RemoveEmptySingleRule(Sort.class, "PruneEmptySort"); /** * Rule that converts a {@link org.apache.calcite.rel.core.Sort} * to empty if it has {@code LIMIT 0}. * * <p>Examples: * * <ul> * <li>Sort(Empty) becomes Empty * </ul> */ public static final RelOptRule SORT_FETCH_ZERO_INSTANCE = new RelOptRule( operand(Sort.class, any()), "PruneSortLimit0") { @Override public void onMatch(RelOptRuleCall call) { Sort sort = call.rel(0); if (sort.fetch != null && RexLiteral.intValue(sort.fetch) == 0) { call.transformTo(call.builder().push(sort).empty().build()); } } }; /** * Rule that converts an {@link org.apache.calcite.rel.core.Aggregate} * to empty if its child is empty. * * <p>Examples: * * <ul> * <li>{@code Aggregate(key: [1, 3], Empty)} &rarr; {@code Empty} * * <li>{@code Aggregate(key: [], Empty)} is unchanged, because an aggregate * without a GROUP BY key always returns 1 row, even over empty input * </ul> * * @see AggregateValuesRule */ public static final RelOptRule AGGREGATE_INSTANCE = new RemoveEmptySingleRule(Aggregate.class, Aggregate.IS_NOT_GRAND_TOTAL, RelFactories.LOGICAL_BUILDER, "PruneEmptyAggregate"); /** * Rule that converts a {@link org.apache.calcite.rel.core.Join} * to empty if its left child is empty. * * <p>Examples: * * <ul> * <li>Join(Empty, Scan(Dept), INNER) becomes Empty * </ul> */ public static final RelOptRule JOIN_LEFT_INSTANCE = new RelOptRule( operand(Join.class, some( operand(Values.class, null, Values.IS_EMPTY, none()), operand(RelNode.class, any()))), "PruneEmptyJoin(left)") { @Override public void onMatch(RelOptRuleCall call) { Join join = call.rel(0); if (join.getJoinType().generatesNullsOnLeft()) { // "select * from emp right join dept" is not necessarily empty if // emp is empty return; } call.transformTo(call.builder().push(join).empty().build()); } }; /** * Rule that converts a {@link org.apache.calcite.rel.core.Join} * to empty if its right child is empty. * * <p>Examples: * * <ul> * <li>Join(Scan(Emp), Empty, INNER) becomes Empty * </ul> */ public static final RelOptRule JOIN_RIGHT_INSTANCE = new RelOptRule( operand(Join.class, some( operand(RelNode.class, any()), operand(Values.class, null, Values.IS_EMPTY, none()))), "PruneEmptyJoin(right)") { @Override public void onMatch(RelOptRuleCall call) { Join join = call.rel(0); if (join.getJoinType().generatesNullsOnRight()) { // "select * from emp left join dept" is not necessarily empty if // dept is empty return; } call.transformTo(call.builder().push(join).empty().build()); } }; /** Planner rule that converts a single-rel (e.g. project, sort, aggregate or * filter) on top of the empty relational expression into empty. */ public static class RemoveEmptySingleRule extends RelOptRule { /** Creatse a simple RemoveEmptySingleRule. */ public <R extends SingleRel> RemoveEmptySingleRule(Class<R> clazz, String description) { this(clazz, Predicates.<R>alwaysTrue(), RelFactories.LOGICAL_BUILDER, description); } /** Creates a RemoveEmptySingleRule. */ public <R extends SingleRel> RemoveEmptySingleRule(Class<R> clazz, Predicate<R> predicate, RelBuilderFactory relBuilderFactory, String description) { super( operand(clazz, null, predicate, operand(Values.class, null, Values.IS_EMPTY, none())), relBuilderFactory, description); } public void onMatch(RelOptRuleCall call) { SingleRel single = call.rel(0); call.transformTo(call.builder().push(single).empty().build()); } } } // End PruneEmptyRules.java
{ "content_hash": "37591e452800bbee64cddc7961738ce3", "timestamp": "", "source": "github", "line_count": 343, "max_line_length": 80, "avg_line_length": 32.4198250728863, "alnum_prop": 0.6071942446043166, "repo_name": "sreev/incubator-calcite", "id": "51aefe1debafdc62ba367d1d333c6036add7b28c", "size": "11917", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "core/src/main/java/org/apache/calcite/rel/rules/PruneEmptyRules.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "2810" }, { "name": "CSS", "bytes": "36560" }, { "name": "FreeMarker", "bytes": "2154" }, { "name": "HTML", "bytes": "18711" }, { "name": "Java", "bytes": "12943399" }, { "name": "Protocol Buffer", "bytes": "14111" }, { "name": "Ruby", "bytes": "1769" }, { "name": "Shell", "bytes": "7923" } ], "symlink_target": "" }
package org.aesh.extensions.manual.page; import java.io.IOException; import java.util.List; /** * @author <a href="mailto:[email protected]">Ståle W. Pedersen</a> */ public interface PageLoader { List<String> loadPage(int columns) throws IOException; String getResourceName(); }
{ "content_hash": "825d33e518ea2d65c54074b7f5116f55", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 74, "avg_line_length": 20.066666666666666, "alnum_prop": 0.7275747508305648, "repo_name": "aeshell/aesh-extensions", "id": "82f04ffd94d8a9515c40dffececed0489bf582ca", "size": "1128", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "readline/src/main/java/org/aesh/extensions/manual/page/PageLoader.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Groovy", "bytes": "1308" }, { "name": "Java", "bytes": "496602" } ], "symlink_target": "" }
RSpec::Matchers.define :be_directory do match do |actual| if actual.respond_to?(:directory?) actual.directory? else backend.check_directory(example, actual) end end end
{ "content_hash": "888a0892357720c21d54c12d3003a709", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 46, "avg_line_length": 21.88888888888889, "alnum_prop": 0.6751269035532995, "repo_name": "ryotarai/serverspec", "id": "afa8b6dfa9fb2075cd6610a36f231f4ea582c5cf", "size": "197", "binary": false, "copies": "9", "ref": "refs/heads/master", "path": "lib/serverspec/matchers/be_directory.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "218466" } ], "symlink_target": "" }
<?php /** * Defines a cURL handle interface * * @category Payment * @package Payment_Klarna * @subpackage HTTP * @author David K. <[email protected]> * @copyright 2015 Klarna AB * @license http://www.apache.org/licenses/LICENSE-2.0 Apache license v2.0 * @link http://developers.klarna.com/ */ interface Klarna_Checkout_HTTP_CURLHandleInterface { /** * Set an option for the cURL transfer * * @param int $name option the set * @param mixed $value the value to be set on option * * @return void */ public function setOption($name, $value); /** * Perform the cURL session * * @return mixed response */ public function execute(); /** * Get information regarding this transfer * * @return array */ public function getInfo(); /** * Get error message regarding this transfer * * @return string Error message */ public function getError(); /** * Close the cURL session * * @return void */ public function close(); }
{ "content_hash": "f9482c3e6dce14dddc147490a81b854a", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 77, "avg_line_length": 20.51851851851852, "alnum_prop": 0.5893501805054152, "repo_name": "yaelduckwen/libriastore", "id": "b82cfef6d88f17757ef809bb3c75757e8b8f9cf9", "size": "2060", "binary": false, "copies": "24", "ref": "refs/heads/master", "path": "joomla/plugins/vmpayment/klarnacheckout/kco_php/Checkout/HTTP/CURLHandleInterface.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "44" }, { "name": "CSS", "bytes": "2779463" }, { "name": "HTML", "bytes": "26380" }, { "name": "JavaScript", "bytes": "2813038" }, { "name": "PHP", "bytes": "24821947" }, { "name": "PLpgSQL", "bytes": "2393" }, { "name": "SQLPL", "bytes": "17688" } ], "symlink_target": "" }
#ifndef TUDAT_APPROXIMATE_PLANET_POSITIONS_H #define TUDAT_APPROXIMATE_PLANET_POSITIONS_H #include <memory> #include "tudat/math/basic/mathematicalConstants.h" #include "tudat/astro/basic_astro/convertMeanToEccentricAnomalies.h" #include "tudat/astro/ephemerides/approximatePlanetPositionsBase.h" #include "tudat/basics/basicTypedefs.h" namespace tudat { namespace ephemerides { //! Ephemeris class using JPL "Approximate Positions of Major Planets". /*! * Ephemeris class using JPL "Approximate Positions of Major Planets". */ class ApproximateJplEphemeris : public ApproximateJplSolarSystemEphemerisBase { public: using Ephemeris::getCartesianState; ApproximateJplEphemeris( const std::string& bodyName, const double sunGravitationalParameter = 1.32712440018e20 ) : ApproximateJplSolarSystemEphemerisBase( sunGravitationalParameter ), eccentricAnomalyAtGivenJulianDate_( TUDAT_NAN ), longitudeOfPerihelionAtGivenJulianDate_( TUDAT_NAN ), meanAnomalyAtGivenJulianDate_( TUDAT_NAN ), trueAnomalyAtGivenJulianData_( TUDAT_NAN ) { this->setPlanet( bodyName ); } //! Get cartesian state from ephemeris. /*! * Returns cartesian state from ephemeris. * \param secondsSinceEpoch Seconds since epoch. * \return State in Cartesian elements from ephemeris. */ Eigen::Vector6d getCartesianState( const double secondsSinceEpoch ); //! Get keplerian state from ephemeris. /*! * Returns keplerian state in from ephemeris. * \param secondsSinceEpoch Seconds since epoch. * \return State in Keplerian elements from ephemeris. */ Eigen::Vector6d getKeplerianStateFromEphemeris( const double secondsSinceEpoch ); protected: private: //! Eccentric anomaly at given Julian date. /*! * Eccentric anomaly of planet at given Julian date. */ double eccentricAnomalyAtGivenJulianDate_; //! Longitude of perihelion at given Julian date. /*! * Longitude of perihelion of planet at given Julian date. */ double longitudeOfPerihelionAtGivenJulianDate_; //! Mean anomaly at given Julian date. /*! * Mean anomaly of planet at given Julian date. */ double meanAnomalyAtGivenJulianDate_; //! True anomaly at given Julian date. /*! * True anomaly of planet at given Julian date. */ double trueAnomalyAtGivenJulianData_; }; //! NOTE: Implementation of this function taken from https://github.com/esa/pagmo/blob/master/src/AstroToolbox/Pl_Eph_An.cpp Eigen::Vector6d getGtopCartesianElements( const double daysSinceMjd2000, const int planet ); class ApproximateGtopEphemeris : public Ephemeris { public: using Ephemeris::getCartesianState; ApproximateGtopEphemeris( const std::string& bodyName ); //! Get cartesian state from ephemeris. /*! * Returns cartesian state from ephemeris. * \param secondsSinceEpoch Seconds since epoch. * \return State in Cartesian elements from ephemeris. */ Eigen::Vector6d getCartesianState( const double secondsSinceEpoch ) { double mjd2000 = ( secondsSinceEpoch + physical_constants::JULIAN_DAY / 2.0 ) / physical_constants::JULIAN_DAY; return getGtopCartesianElements( mjd2000, bodyIndex_ ); } protected: private: int bodyIndex_; }; //Eigen::Vector6d getGtopKeplerElements( const double currentTime ); } // namespace ephemerides } // namespace tudat #endif // TUDAT_APPROXIMATE_PLANET_POSITIONS_H
{ "content_hash": "6a46a877b5370ba647b330e58c3a2f91", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 124, "avg_line_length": 28.77777777777778, "alnum_prop": 0.7015995587424159, "repo_name": "Tudat/tudat", "id": "6367eee838136d8c809d9c92a7de7f07fa21a6ff", "size": "4264", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "include/tudat/astro/ephemerides/approximatePlanetPositions.h", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Batchfile", "bytes": "1372" }, { "name": "C", "bytes": "47041" }, { "name": "C++", "bytes": "14445148" }, { "name": "CMake", "bytes": "206040" }, { "name": "Python", "bytes": "810" }, { "name": "Shell", "bytes": "1396" }, { "name": "Xonsh", "bytes": "1143" } ], "symlink_target": "" }
package com.google.cloud.pubsub.sql; import org.apache.beam.sdk.schemas.Schema; import org.apache.beam.sdk.schemas.Schema.FieldType; public class Rows { private Rows() { } public static final String MESSAGE_KEY_FIELD = "message_key"; public static final String EVENT_TIMESTAMP_FIELD = "event_timestamp"; public static final String ATTRIBUTES_FIELD = "attributes"; public static final String PAYLOAD_FIELD = "payload"; public static final String ATTRIBUTES_KEY_FIELD = "key"; public static final String ATTRIBUTES_VALUES_FIELD = "values"; public static final Schema ATTRIBUTES_ENTRY_SCHEMA = Schema.builder() .addStringField(ATTRIBUTES_KEY_FIELD) .addArrayField(ATTRIBUTES_VALUES_FIELD, Schema.FieldType.BYTES) .build(); public static final Schema.FieldType ATTRIBUTES_FIELD_TYPE = Schema.FieldType.array(Schema.FieldType.row(ATTRIBUTES_ENTRY_SCHEMA)); public static final Schema STANDARD_SCHEMA = Schema.builder() .addByteArrayField(PAYLOAD_FIELD) .addByteArrayField(MESSAGE_KEY_FIELD) .addDateTimeField(EVENT_TIMESTAMP_FIELD) .addArrayField(ATTRIBUTES_FIELD, Schema.FieldType.row(ATTRIBUTES_ENTRY_SCHEMA)) .build(); }
{ "content_hash": "53f0515a55b78b435c4b82e08bff72a3", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 89, "avg_line_length": 37.72727272727273, "alnum_prop": 0.7220883534136546, "repo_name": "kamalaboulhosn/pubsub", "id": "75b44edb2eaabe724f515fb5bc811923b17ec082", "size": "1245", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "sql-streaming-copier/src/main/java/com/google/cloud/pubsub/sql/Rows.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Go", "bytes": "24013" }, { "name": "Java", "bytes": "418308" }, { "name": "JavaScript", "bytes": "26647" }, { "name": "Python", "bytes": "29318" }, { "name": "Shell", "bytes": "9071" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="ro"> <head> <!-- Generated by javadoc (version 1.7.0_07) on Tue May 27 14:37:26 EEST 2014 --> <title>Uses of Package net.sf.jasperreports.data.bean (JasperReports 5.6.0 API)</title> <meta name="date" content="2014-05-27"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Package net.sf.jasperreports.data.bean (JasperReports 5.6.0 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li class="navBarCell1Rev">Use</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?net/sf/jasperreports/data/bean/package-use.html" target="_top">Frames</a></li> <li><a href="package-use.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h1 title="Uses of Package net.sf.jasperreports.data.bean" class="title">Uses of Package<br>net.sf.jasperreports.data.bean</h1> </div> <div class="contentContainer"> <ul class="blockList"> <li class="blockList"> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../net/sf/jasperreports/data/bean/package-summary.html">net.sf.jasperreports.data.bean</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#net.sf.jasperreports.data.bean">net.sf.jasperreports.data.bean</a></td> <td class="colLast"> <div class="block">Contains classes for bean data adapters.</div> </td> </tr> </tbody> </table> </li> <li class="blockList"><a name="net.sf.jasperreports.data.bean"> <!-- --> </a> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> <caption><span>Classes in <a href="../../../../../net/sf/jasperreports/data/bean/package-summary.html">net.sf.jasperreports.data.bean</a> used by <a href="../../../../../net/sf/jasperreports/data/bean/package-summary.html">net.sf.jasperreports.data.bean</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Class and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colOne"><a href="../../../../../net/sf/jasperreports/data/bean/class-use/BeanDataAdapter.html#net.sf.jasperreports.data.bean">BeanDataAdapter</a>&nbsp;</td> </tr> </tbody> </table> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li class="navBarCell1Rev">Use</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?net/sf/jasperreports/data/bean/package-use.html" target="_top">Frames</a></li> <li><a href="package-use.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small> <span style="font-decoration:none;font-family:Arial,Helvetica,sans-serif;font-size:8pt;font-style:normal;color:#000000;">&copy; 2001-2010 Jaspersoft Corporation <a href="http://www.jaspersoft.com" target="_blank" style="color:#000000;">www.jaspersoft.com</a></span> </small></p> </body> </html>
{ "content_hash": "f43cd6e56627fadda9e3f96934a87d60", "timestamp": "", "source": "github", "line_count": 155, "max_line_length": 308, "avg_line_length": 36.70967741935484, "alnum_prop": 0.6335676625659051, "repo_name": "phurtado1112/cnaemvc", "id": "8d3b564200d559327fdfeac5ab7cfcdc9a9ca450", "size": "5690", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/JasperReport__5.6/docs/api/net/sf/jasperreports/data/bean/package-use.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "11139" }, { "name": "HTML", "bytes": "112926414" }, { "name": "Java", "bytes": "532942" } ], "symlink_target": "" }
/* $OpenBSD: e_bf.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young ([email protected]) * All rights reserved. * * This package is an SSL implementation written * by Eric Young ([email protected]). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson ([email protected]). * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young ([email protected])" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson ([email protected])" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ #include <stdio.h> #include <openssl/opensslconf.h> #ifndef OPENSSL_NO_BF #include <openssl/blowfish.h> #include <openssl/evp.h> #include <openssl/objects.h> #include "evp_locl.h" static int bf_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc); typedef struct { BF_KEY ks; } EVP_BF_KEY; #define data(ctx) EVP_C_DATA(EVP_BF_KEY,ctx) IMPLEMENT_BLOCK_CIPHER(bf, ks, BF, EVP_BF_KEY, NID_bf, 8, 16, 8, 64, EVP_CIPH_VARIABLE_LENGTH, bf_init_key, NULL, EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL) static int bf_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { BF_set_key(&data(ctx)->ks, EVP_CIPHER_CTX_key_length(ctx), key); return 1; } #endif
{ "content_hash": "c817ab753024dd8aa9b45d78c4582c80", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 80, "avg_line_length": 43.76923076923077, "alnum_prop": 0.7424052221943259, "repo_name": "GaloisInc/hacrypto", "id": "5806f9c8b9c5c9818264fba33f55e8b1872358c2", "size": "3983", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "src/C/libressl/libressl-2.0.0/crypto/evp/e_bf.c", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "AGS Script", "bytes": "62991" }, { "name": "Ada", "bytes": "443" }, { "name": "AppleScript", "bytes": "4518" }, { "name": "Assembly", "bytes": "25398957" }, { "name": "Awk", "bytes": "36188" }, { "name": "Batchfile", "bytes": "530568" }, { "name": "C", "bytes": "344517599" }, { "name": "C#", "bytes": "7553169" }, { "name": "C++", "bytes": "36635617" }, { "name": "CMake", "bytes": "213895" }, { "name": "CSS", "bytes": "139462" }, { "name": "Coq", "bytes": "320964" }, { "name": "Cuda", "bytes": "103316" }, { "name": "DIGITAL Command Language", "bytes": "1545539" }, { "name": "DTrace", "bytes": "33228" }, { "name": "Emacs Lisp", "bytes": "22827" }, { "name": "GDB", "bytes": "93449" }, { "name": "Gnuplot", "bytes": "7195" }, { "name": "Go", "bytes": "393057" }, { "name": "HTML", "bytes": "41466430" }, { "name": "Hack", "bytes": "22842" }, { "name": "Haskell", "bytes": "64053" }, { "name": "IDL", "bytes": "3205" }, { "name": "Java", "bytes": "49060925" }, { "name": "JavaScript", "bytes": "3476841" }, { "name": "Jolie", "bytes": "412" }, { "name": "Lex", "bytes": "26290" }, { "name": "Logos", "bytes": "108920" }, { "name": "Lua", "bytes": "427" }, { "name": "M4", "bytes": "2508986" }, { "name": "Makefile", "bytes": "29393197" }, { "name": "Mathematica", "bytes": "48978" }, { "name": "Mercury", "bytes": "2053" }, { "name": "Module Management System", "bytes": "1313" }, { "name": "NSIS", "bytes": "19051" }, { "name": "OCaml", "bytes": "981255" }, { "name": "Objective-C", "bytes": "4099236" }, { "name": "Objective-C++", "bytes": "243505" }, { "name": "PHP", "bytes": "22677635" }, { "name": "Pascal", "bytes": "99565" }, { "name": "Perl", "bytes": "35079773" }, { "name": "Prolog", "bytes": "350124" }, { "name": "Python", "bytes": "1242241" }, { "name": "Rebol", "bytes": "106436" }, { "name": "Roff", "bytes": "16457446" }, { "name": "Ruby", "bytes": "49694" }, { "name": "Scheme", "bytes": "138999" }, { "name": "Shell", "bytes": "10192290" }, { "name": "Smalltalk", "bytes": "22630" }, { "name": "Smarty", "bytes": "51246" }, { "name": "SourcePawn", "bytes": "542790" }, { "name": "SystemVerilog", "bytes": "95379" }, { "name": "Tcl", "bytes": "35696" }, { "name": "TeX", "bytes": "2351627" }, { "name": "Verilog", "bytes": "91541" }, { "name": "Visual Basic", "bytes": "88541" }, { "name": "XS", "bytes": "38300" }, { "name": "Yacc", "bytes": "132970" }, { "name": "eC", "bytes": "33673" }, { "name": "q", "bytes": "145272" }, { "name": "sed", "bytes": "1196" } ], "symlink_target": "" }
<!-- Bootstrap style sheet --> <link rel="stylesheet" href="<?=base_url()?>css/lib/bootstrap/bootstrap.css" /> <!-- Font Awesome style sheet --> <link rel="stylesheet" href="<?=base_url()?>css/lib/font-awesome/font-awesome.min.css"> <!-- Ionicons style sheet --> <link rel="stylesheet" href="<?=base_url()?>css/lib/ionicons/ionicons.min.css"> <!-- Date range picker style sheet --> <link rel="stylesheet" href="<?=base_url()?>css/lib/daterangepicker/daterangepicker-bs3.css" /> <!-- Page specific style sheet --> <link rel="stylesheet" href="<?=base_url()?>css/lib/datatables/datatables.css"> <!-- Tab drop style sheets --> <link rel="stylesheet" href="<?=base_url()?>css/lib/tabdrop/tabdrop.css" /> <!-- Theme specific style sheets --> <link rel="stylesheet" href="<?=base_url()?>css/styles.css" id="theme-css" /> <div class="container-fluid container-padded dash-controls"> <div class="row"> <div class="col-md-12"> <ol class="breadcrumb"> <li><a href="#">Inicio</a></li> <li><a href="#">Usuarios</a></li> <li class="active">Lista Usuarios</li> </ol> </div> </div><p></p> </div> <!-- Main content start --> <div class="main-content"> <!-- Section start --> <section> <!-- title container start --> <div class="container-fluid container-padded"> <div class="row"> <div class="col-md-12 page-title"> <h3>Lista de Usuarios</h3> <hr> </div> <!-- col end --> </div> <!-- row end --> </div> <!-- title container end --> <!-- section container start --> <div class="container-fluid container-padded"> <div class="row"> <div class="col-md-12"> <div class="panel panel-success"> <div class="panel-heading">Usuarios en el Sistema</div> <div class="panel-body"> <div class="starter-template"> <div class="table-responsive"> <table cellpadding="0" cellspacing="0" border="0" class="datatable table table-striped table-bordered"> <thead> <tr> <th>Nombre Usuario</th> <th>Nombre</th> <th>Correo</th> <th>Estado</th> <th></th> <th></th> </tr> </thead> <tbody> <?php foreach ($users as $row) { if ($row->username=="admin") { } else{ ?> <tr> <td><?=$row->username?></td> <td><?=$row->realname?></td> <td><?=$row->email?></td> <?php if ($row->active==1) { ?> <td>True</td> <td> <a href="" class="btn btn-default btn-circle2" onClick="id_users('<?=$row->id?>')" data-toggle="modal" data-target="#edit"> <span class="glyphicon glyphicon-edit"> </span>&nbsp; </a> </td> <td> <a href="" class="btn btn-default btn-circle2" onClick="id_users('<?=$row->id?>')" data-toggle="modal" data-target="#active"> <span class="glyphicon glyphicon-remove"> </span>&nbsp; </a> </td> <?php } else{ ?> <td>False</td> <td> <a href="" class="btn btn-default btn-circle2" onClick="id_users('<?=$row->id?>')" data-toggle="modal" data-target="#edit"> <span class="glyphicon glyphicon-edit"> </span>&nbsp; </a> </td> <td> <a href="" class="btn btn-default btn-circle2" onClick="id_users('<?=$row->id?>')" data-toggle="modal" data-target="#active"> <span class="glyphicon glyphicon-remove"> </span>&nbsp; </a> </td> <?php } ?> </tr> <?php } } ?> </tbody> </table> <div class="modal fade" id="active" tabindex="1" role="dialog" aria-labelleby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close " data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove-circle"></span>&nbsp;</button> <h4>Activar/Desactivar o Eliminar Usuario</h4> </div> <div class="modal-body"> <form class="form-signin"> <div> <label>Nombre de Usuario: </label> <label id="username"></label> </div> <div> <label>Nombre: </label> <label id="name"></label> </div> <div> <label>Correo: </label> <label id="email"></label> </div> <div> <label>Estado: </label> <label id="activer"></label> </div> </form> </div> <div class="modal-footer"> <button class=" btn btn-primary" type="button" onClick="acti_dascti_user()" data-dismiss="modal">Activate/Desactivate</button> <button class=" btn btn-primary" type="button" onClick="delete_user()" data-dismiss="modal">Delete</button> </div> </div> </div> </div> <div class="modal fade" id="edit" tabindex="1" role="dialog" aria-labelleby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close " data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove-circle"></span>&nbsp;</button> <h4> Editar Usuario </h4> </div> <div class="modal-body"> <?php echo form_open('user/callupdate',array('class'=>'form-signin'));?> <div> <input style='display:none' name="idi" class="form-control" id="idi" type="text"/> </div> <div> <label>Nombre usuario: </label> <input name="usernamei" class="form-control" id="usernamei" type="text"/> </div> <div> <label>Nombre: </label> <input name="namei" class="form-control" type="text" id="namei"/> </div> <div> <label>Correo: </label> <input name="emaili" type="text"class="form-control" id="emaili"/> </div> <button style="margin-top:10px" class=" btn btn-primary" type="submit">Update</button> </form> </div> <div class="modal-footer"> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </section> </div> <!-- ===== JAVASCRIPT START ===== --> <!-- jQuery script --> <script src="<?=base_url()?>js/lib/jquery/jquery-1.10.2.min.js" type="text/javascript"></script> <!-- Bootstrap script --> <script src="<?=base_url()?>js/lib/bootstrap/bootstrap.min.js" type="text/javascript"></script> <!-- Slim Scroll script --> <script src="<?=base_url()?>js/lib/slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script> <!-- Date range picker script --> <script src="<?=base_url()?>js/lib/momentjs/moment.min.js" type="text/javascript"></script> <script src="<?=base_url()?>js/lib/daterangepicker/daterangepicker.js" type="text/javascript"></script> <!-- Tab drop script --> <script src="<?=base_url()?>js/lib/tabdrop/bootstrap-tabdrop.js" type="text/javascript"></script> <script src="<?=base_url()?>js/lib/datatables/jquery.dataTables.min.js"></script> <script src="<?=base_url()?>js/lib/datatables/datatables.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $('.datatable').DataTable({ "sPaginationType": "bs_four_button", "oLanguage": { "oPaginate": { "sPrevious": "Ant", "sNext": "Sig", "sLast": "Ult", "sFirst": "Prim" }, "sLengthMenu": 'Mostrar <select>'+ '<option value="10">10</option>'+ '<option value="20">20</option>'+ '<option value="30">30</option>'+ '<option value="40">40</option>'+ '<option value="50">50</option>'+ '<option value="-1">Todos</option>'+ '</select> registros', "sInfo": "Mostrando del _START_ a _END_ (Total: _TOTAL_ resultados)", "sInfoFiltered": " - filtrados de _MAX_ registros", "sInfoEmpty": "No hay resultados de búsqueda", "sZeroRecords": "No hay registros a mostrar", "sProcessing": "Espere, por favor...", "sSearch": "Buscar:", } }); $('.datatable').each(function(){ var datatable = $(this); // SEARCH - Add the placeholder for Search and Turn this into in-line form control var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input'); search_input.attr('placeholder', 'Search'); search_input.addClass('form-control input-sm'); // LENGTH - Inline-Form control var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select'); length_sel.addClass('form-control input-sm'); }); }); </script> <!-- Theme script --> <script src="<?=base_url()?>js/scripts.js" type="text/javascript"></script> <script src="<?=base_url()?>js/Dole/dole.js" type="text/javascript"></script>
{ "content_hash": "f01d4b4f225d9dcb40fd947d933538a2", "timestamp": "", "source": "github", "line_count": 266, "max_line_length": 161, "avg_line_length": 40.97744360902256, "alnum_prop": 0.46009174311926604, "repo_name": "JoseFabioAvila/dole", "id": "31836c30acb2f01ae3339ee147701a2cd6511ca5", "size": "10901", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "application/views/lista_usuarios.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "568" }, { "name": "CSS", "bytes": "690726" }, { "name": "HTML", "bytes": "6424554" }, { "name": "JavaScript", "bytes": "1729000" }, { "name": "PHP", "bytes": "31877736" }, { "name": "Smarty", "bytes": "11202" } ], "symlink_target": "" }
package tikv import ( "context" "crypto/tls" "fmt" "math/rand" "net/url" "strings" "sync" "sync/atomic" "time" "github.com/opentracing/opentracing-go" "github.com/pingcap/errors" "github.com/pingcap/failpoint" "github.com/pingcap/tidb/config" "github.com/pingcap/tidb/kv" "github.com/pingcap/tidb/metrics" "github.com/pingcap/tidb/store/tikv/latch" "github.com/pingcap/tidb/store/tikv/oracle" "github.com/pingcap/tidb/store/tikv/oracle/oracles" "github.com/pingcap/tidb/store/tikv/tikvrpc" "github.com/pingcap/tidb/util/execdetails" "github.com/pingcap/tidb/util/fastrand" "github.com/pingcap/tidb/util/logutil" pd "github.com/tikv/pd/client" "go.etcd.io/etcd/clientv3" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/keepalive" ) type storeCache struct { sync.Mutex cache map[string]*tikvStore } var mc storeCache // Driver implements engine Driver. type Driver struct { } func createEtcdKV(addrs []string, tlsConfig *tls.Config) (*clientv3.Client, error) { cfg := config.GetGlobalConfig() cli, err := clientv3.New(clientv3.Config{ Endpoints: addrs, AutoSyncInterval: 30 * time.Second, DialTimeout: 5 * time.Second, TLS: tlsConfig, DialKeepAliveTime: time.Second * time.Duration(cfg.TiKVClient.GrpcKeepAliveTime), DialKeepAliveTimeout: time.Second * time.Duration(cfg.TiKVClient.GrpcKeepAliveTimeout), }) if err != nil { return nil, errors.Trace(err) } return cli, nil } // Open opens or creates an TiKV storage with given path. // Path example: tikv://etcd-node1:port,etcd-node2:port?cluster=1&disableGC=false func (d Driver) Open(path string) (kv.Storage, error) { mc.Lock() defer mc.Unlock() security := config.GetGlobalConfig().Security tikvConfig := config.GetGlobalConfig().TiKVClient txnLocalLatches := config.GetGlobalConfig().TxnLocalLatches etcdAddrs, disableGC, err := config.ParsePath(path) if err != nil { return nil, errors.Trace(err) } pdCli, err := pd.NewClient(etcdAddrs, pd.SecurityOption{ CAPath: security.ClusterSSLCA, CertPath: security.ClusterSSLCert, KeyPath: security.ClusterSSLKey, }, pd.WithGRPCDialOptions( grpc.WithKeepaliveParams(keepalive.ClientParameters{ Time: time.Duration(tikvConfig.GrpcKeepAliveTime) * time.Second, Timeout: time.Duration(tikvConfig.GrpcKeepAliveTimeout) * time.Second, }), )) pdCli = execdetails.InterceptedPDClient{Client: pdCli} if err != nil { return nil, errors.Trace(err) } // FIXME: uuid will be a very long and ugly string, simplify it. uuid := fmt.Sprintf("tikv-%v", pdCli.GetClusterID(context.TODO())) if store, ok := mc.cache[uuid]; ok { return store, nil } tlsConfig, err := security.ToTLSConfig() if err != nil { return nil, errors.Trace(err) } spkv, err := NewEtcdSafePointKV(etcdAddrs, tlsConfig) if err != nil { return nil, errors.Trace(err) } coprCacheConfig := &config.GetGlobalConfig().TiKVClient.CoprCache s, err := newTikvStore(uuid, &codecPDClient{pdCli}, spkv, newRPCClient(security), !disableGC, coprCacheConfig) if err != nil { return nil, errors.Trace(err) } if txnLocalLatches.Enabled { s.EnableTxnLocalLatches(txnLocalLatches.Capacity) } s.etcdAddrs = etcdAddrs s.tlsConfig = tlsConfig mc.cache[uuid] = s return s, nil } // EtcdBackend is used for judging a storage is a real TiKV. type EtcdBackend interface { EtcdAddrs() ([]string, error) TLSConfig() *tls.Config StartGCWorker() error } // update oracle's lastTS every 2000ms. var oracleUpdateInterval = 2000 type tikvStore struct { clusterID uint64 uuid string oracle oracle.Oracle client Client pdClient pd.Client regionCache *RegionCache coprCache *coprCache lockResolver *LockResolver txnLatches *latch.LatchesScheduler gcWorker GCHandler etcdAddrs []string tlsConfig *tls.Config mock bool enableGC bool kv SafePointKV safePoint uint64 spTime time.Time spMutex sync.RWMutex // this is used to update safePoint and spTime closed chan struct{} // this is used to nofity when the store is closed replicaReadSeed uint32 // this is used to load balance followers / learners when replica read is enabled memCache kv.MemManager // this is used to query from memory } func (s *tikvStore) UpdateSPCache(cachedSP uint64, cachedTime time.Time) { s.spMutex.Lock() s.safePoint = cachedSP s.spTime = cachedTime s.spMutex.Unlock() } func (s *tikvStore) CheckVisibility(startTime uint64) error { s.spMutex.RLock() cachedSafePoint := s.safePoint cachedTime := s.spTime s.spMutex.RUnlock() diff := time.Since(cachedTime) if diff > (GcSafePointCacheInterval - gcCPUTimeInaccuracyBound) { return ErrPDServerTimeout.GenWithStackByArgs("start timestamp may fall behind safe point") } if startTime < cachedSafePoint { t1 := oracle.GetTimeFromTS(startTime) t2 := oracle.GetTimeFromTS(cachedSafePoint) return ErrGCTooEarly.GenWithStackByArgs(t1, t2) } return nil } func newTikvStore(uuid string, pdClient pd.Client, spkv SafePointKV, client Client, enableGC bool, coprCacheConfig *config.CoprocessorCache) (*tikvStore, error) { o, err := oracles.NewPdOracle(pdClient, time.Duration(oracleUpdateInterval)*time.Millisecond) if err != nil { return nil, errors.Trace(err) } store := &tikvStore{ clusterID: pdClient.GetClusterID(context.TODO()), uuid: uuid, oracle: o, client: reqCollapse{client}, pdClient: pdClient, regionCache: NewRegionCache(pdClient), coprCache: nil, kv: spkv, safePoint: 0, spTime: time.Now(), closed: make(chan struct{}), replicaReadSeed: fastrand.Uint32(), memCache: kv.NewCacheDB(), } store.lockResolver = newLockResolver(store) store.enableGC = enableGC coprCache, err := newCoprCache(coprCacheConfig) if err != nil { return nil, errors.Trace(err) } store.coprCache = coprCache go store.runSafePointChecker() return store, nil } func (s *tikvStore) EnableTxnLocalLatches(size uint) { s.txnLatches = latch.NewScheduler(size) } // IsLatchEnabled is used by mockstore.TestConfig. func (s *tikvStore) IsLatchEnabled() bool { return s.txnLatches != nil } var ( ldflagGetEtcdAddrsFromConfig = "0" // 1:Yes, otherwise:No ) func (s *tikvStore) EtcdAddrs() ([]string, error) { if s.etcdAddrs == nil { return nil, nil } if ldflagGetEtcdAddrsFromConfig == "1" { // For automated test purpose. // To manipulate connection to etcd by mandatorily setting path to a proxy. cfg := config.GetGlobalConfig() return strings.Split(cfg.Path, ","), nil } ctx := context.Background() bo := NewBackoffer(ctx, GetAllMembersBackoff) etcdAddrs := make([]string, 0) pdClient := s.pdClient if pdClient == nil { return nil, errors.New("Etcd client not found") } for { members, err := pdClient.GetAllMembers(ctx) if err != nil { err := bo.Backoff(BoRegionMiss, err) if err != nil { return nil, err } continue } for _, member := range members { if len(member.ClientUrls) > 0 { u, err := url.Parse(member.ClientUrls[0]) if err != nil { logutil.BgLogger().Error("fail to parse client url from pd members", zap.String("client_url", member.ClientUrls[0]), zap.Error(err)) return nil, err } etcdAddrs = append(etcdAddrs, u.Host) } } return etcdAddrs, nil } } func (s *tikvStore) TLSConfig() *tls.Config { return s.tlsConfig } // StartGCWorker starts GC worker, it's called in BootstrapSession, don't call this function more than once. func (s *tikvStore) StartGCWorker() error { if !s.enableGC || NewGCHandlerFunc == nil { return nil } gcWorker, err := NewGCHandlerFunc(s, s.pdClient) if err != nil { return errors.Trace(err) } gcWorker.Start() s.gcWorker = gcWorker return nil } func (s *tikvStore) runSafePointChecker() { d := gcSafePointUpdateInterval for { select { case spCachedTime := <-time.After(d): cachedSafePoint, err := loadSafePoint(s.GetSafePointKV()) if err == nil { metrics.TiKVLoadSafepointCounter.WithLabelValues("ok").Inc() s.UpdateSPCache(cachedSafePoint, spCachedTime) d = gcSafePointUpdateInterval } else { metrics.TiKVLoadSafepointCounter.WithLabelValues("fail").Inc() logutil.BgLogger().Error("fail to load safepoint from pd", zap.Error(err)) d = gcSafePointQuickRepeatInterval } case <-s.Closed(): return } } } func (s *tikvStore) Begin() (kv.Transaction, error) { txn, err := newTiKVTxn(s) if err != nil { return nil, errors.Trace(err) } return txn, nil } // BeginWithStartTS begins a transaction with startTS. func (s *tikvStore) BeginWithStartTS(startTS uint64) (kv.Transaction, error) { txn, err := newTikvTxnWithStartTS(s, startTS, s.nextReplicaReadSeed()) if err != nil { return nil, errors.Trace(err) } return txn, nil } func (s *tikvStore) GetSnapshot(ver kv.Version) kv.Snapshot { snapshot := newTiKVSnapshot(s, ver, s.nextReplicaReadSeed()) return snapshot } func (s *tikvStore) Close() error { mc.Lock() defer mc.Unlock() delete(mc.cache, s.uuid) s.oracle.Close() s.pdClient.Close() if s.gcWorker != nil { s.gcWorker.Close() } close(s.closed) if err := s.client.Close(); err != nil { return errors.Trace(err) } if s.txnLatches != nil { s.txnLatches.Close() } s.regionCache.Close() if s.coprCache != nil { s.coprCache.cache.Close() } if err := s.kv.Close(); err != nil { return errors.Trace(err) } return nil } func (s *tikvStore) UUID() string { return s.uuid } func (s *tikvStore) CurrentVersion() (kv.Version, error) { bo := NewBackofferWithVars(context.Background(), tsoMaxBackoff, nil) startTS, err := s.getTimestampWithRetry(bo) if err != nil { return kv.NewVersion(0), errors.Trace(err) } return kv.NewVersion(startTS), nil } func (s *tikvStore) getTimestampWithRetry(bo *Backoffer) (uint64, error) { if span := opentracing.SpanFromContext(bo.ctx); span != nil && span.Tracer() != nil { span1 := span.Tracer().StartSpan("tikvStore.getTimestampWithRetry", opentracing.ChildOf(span.Context())) defer span1.Finish() bo.ctx = opentracing.ContextWithSpan(bo.ctx, span1) } for { startTS, err := s.oracle.GetTimestamp(bo.ctx) // mockGetTSErrorInRetry should wait MockCommitErrorOnce first, then will run into retry() logic. // Then mockGetTSErrorInRetry will return retryable error when first retry. // Before PR #8743, we don't cleanup txn after meet error such as error like: PD server timeout // This may cause duplicate data to be written. failpoint.Inject("mockGetTSErrorInRetry", func(val failpoint.Value) { if val.(bool) && !kv.IsMockCommitErrorEnable() { err = ErrPDServerTimeout.GenWithStackByArgs("mock PD timeout") } }) if err == nil { return startTS, nil } err = bo.Backoff(BoPDRPC, errors.Errorf("get timestamp failed: %v", err)) if err != nil { return 0, errors.Trace(err) } } } func (s *tikvStore) nextReplicaReadSeed() uint32 { return atomic.AddUint32(&s.replicaReadSeed, 1) } func (s *tikvStore) GetClient() kv.Client { return &CopClient{ store: s, replicaReadSeed: s.nextReplicaReadSeed(), } } func (s *tikvStore) GetMPPClient() kv.MPPClient { return &MPPClient{ store: s, } } func (s *tikvStore) GetOracle() oracle.Oracle { return s.oracle } func (s *tikvStore) Name() string { return "TiKV" } func (s *tikvStore) Describe() string { return "TiKV is a distributed transactional key-value database" } func (s *tikvStore) ShowStatus(ctx context.Context, key string) (interface{}, error) { return nil, kv.ErrNotImplemented } func (s *tikvStore) SupportDeleteRange() (supported bool) { return !s.mock } func (s *tikvStore) SendReq(bo *Backoffer, req *tikvrpc.Request, regionID RegionVerID, timeout time.Duration) (*tikvrpc.Response, error) { sender := NewRegionRequestSender(s.regionCache, s.client) return sender.SendReq(bo, req, regionID, timeout) } func (s *tikvStore) GetRegionCache() *RegionCache { return s.regionCache } func (s *tikvStore) GetLockResolver() *LockResolver { return s.lockResolver } func (s *tikvStore) GetGCHandler() GCHandler { return s.gcWorker } func (s *tikvStore) Closed() <-chan struct{} { return s.closed } func (s *tikvStore) GetSafePointKV() SafePointKV { return s.kv } func (s *tikvStore) SetOracle(oracle oracle.Oracle) { s.oracle = oracle } func (s *tikvStore) SetTiKVClient(client Client) { s.client = client } func (s *tikvStore) GetTiKVClient() (client Client) { return s.client } func (s *tikvStore) GetMemCache() kv.MemManager { return s.memCache } func init() { mc.cache = make(map[string]*tikvStore) rand.Seed(time.Now().UnixNano()) }
{ "content_hash": "c425cbe0f17d36c456d84ce66f68e58e", "timestamp": "", "source": "github", "line_count": 489, "max_line_length": 162, "avg_line_length": 26.047034764826176, "alnum_prop": 0.7047185365470676, "repo_name": "EvilMcJerkface/tidb", "id": "53dae50d13c04b5d7db894be0bee2d5ebff03f79", "size": "13252", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "store/tikv/kv.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "648" }, { "name": "Go", "bytes": "9155557" }, { "name": "Makefile", "bytes": "7319" }, { "name": "Shell", "bytes": "9648" } ], "symlink_target": "" }
This file defines the OCI Runtime Command Line Interface version 1.0.1. It is one of potentially several [runtime APIs supported by the runtime compliance test suite](runtime-compliance-testing.md#supported-apis). ## Notation The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119][rfc2119]. The key words "unspecified", "undefined", and "implementation-defined" are to be interpreted as described in the [rationale for the C99 standard][c99-unspecified]. ## Compliance This specification targets compliance criteria according to the role of a participant in runtime invocation. Requirements are placed on both runtimes and runtime callers, depending on what behavior is being constrained by the requirement. An implementation is compliant if it satisfies all the applicable MUST, REQUIRED, and SHALL requirements. An implementation is not compliant if it fails to satisfy one or more of the applicable MUST, REQUIRED, and SHALL requirements. ## Versioning The command line interface is versioned with [SemVer v2.0.0][semver]. The command line interface version is independent of the OCI Runtime Specification as a whole (which is tied to the [configuration format][runtime-spec-version]. For example, if a caller is compliant with version 1.1 of the command line interface, they are compatible with all runtimes that support any 1.1 or later release of the command line interface, but are not compatible with a runtime that supports 1.0 and not 1.1. ## Global usage The runtime MUST provide an executable (called `funC` in the following examples). That executable MUST support commands with the following template: ``` $ funC [global-options] <COMMAND> [command-specific-options] <command-specific-arguments> ``` The runtime MUST support the entire API defined in this specification. Runtimes MAY also support additional options and commands as extensions to this API, but callers interested in OCI-runtime portability SHOULD NOT rely on those extensions. ## Global options None are required, but the runtime MAY support options that start with at least one hyphen. Global options MAY take positional arguments (e.g. `--log-level debug`). Command names MUST NOT start with hyphens. The option parsing MUST be such that `funC <COMMAND>` is unambiguously an invocation of `<COMMAND>` (even for commands not specified in this document). If the runtime is invoked with an unrecognized command, it MUST exit with a nonzero exit code and MAY log a warning to stderr. Beyond the above rules, the behavior of the runtime in the presence of commands and options not specified in this document is unspecified. ## Character encodings This API specification does not cover character encodings, but runtimes SHOULD conform to their native operating system. For example, POSIX systems define [`LANG` and related environment variables][posix-lang] for [declaring][posix-locale-encoding] [locale-specific character encodings][posix-encoding], so a runtime in an `en_US.UTF-8` locale SHOULD write its [state](#state) to stdout in [UTF-8][]. ## Commands ### create [Create][create] a container from a [bundle directory][bundle]. * *Arguments* * *`<ID>`* Set the container ID to create. * *Options* * *`--bundle <PATH>`* Override the path to the [bundle directory][bundle] (defaults to the current working directory). * *`--console-socket <FD>`* The runtime MUST pass the [pseudoterminal master][posix_openpt.3] through the open socket at file descriptor `<FD>`; the protocol is [described below](#console-socket). * *`--pid-file <PATH>`* The runtime MUST write the container PID to this path. * *Standard streams:* * If [`process.terminal`][process] is true: * *stdin:* The runtime MUST NOT attempt to read from its stdin. * *stdout:* The handling of stdout is unspecified. * *stderr:* The runtime MAY print diagnostic messages to stderr, and the format for those lines is not specified in this document. * If [`process.terminal`][process] is not true: * *stdin:* The runtime MUST pass its stdin file descriptor through to the container process without manipulation or modification. "Without manipulation or modification" means that the runtime MUST not seek on the file descriptor, or close it, or read or write to it, or [`ioctl`][ioctl.3] it, or perform any other action on it besides passing it through to the container process. When using a container to drop privileges, note that providing a privileged terminal's file descriptor may allow the container to [execute privileged operations via `TIOCSTI`][TIOCSTI-security] or other [TTY ioctls][tty_ioctl.4]. On Linux, [`TIOCSTI` requires `CAP_SYS_ADMIN`][capabilities.7] unless the target terminal is the caller's [controlling terminal][controlling-terminal]. * *stdout:* The runtime MUST pass its stdout file descriptor through to the container process without manipulation or modification. * *stderr:* When `create` exists with a zero code, the runtime MUST pass its stderr file descriptor through to the container process without manipulation or modification. When `create` exits with a non-zero code, the runtime MAY print diagnostic messages to stderr, and the format for those lines is not specified in this document. * *Environment variables* * *`LISTEN_FDS`:* The number of file descriptors passed. For example, `LISTEN_FDS=2` would mean that the runtime MUST pass file descriptors 3 and 4 to the container process (in addition to the standard streams) to support [socket activation][systemd-listen-fds]. * *Exit code:* Zero if the container was successfully created and non-zero on errors. Callers MAY block on this command's successful exit to trigger post-create activity. #### Console socket The [`AF_UNIX`][unix-socket] used by [`--console-socket`](#create) handles request and response messages between a runtime and server. The socket type MUST be [`SOCK_SEQPACKET`][socket-types] or [`SOCK_STREAM`][socket-types]. The server MUST send a single response for each runtime request. The [normal data][socket-queue] ([`msghdr.msg_iov*`][socket.h]) of all messages MUST be [UTF-8][] [JSON](glossary.md#json). There are [JSON Schemas](../schema/README.md#oci-runtime-command-line-interface) and [Go bindings](../api/socket/socket.go) for the messages specified in this section. ##### Requests All requests MUST contain a **`type`** property whose value MUST one of the following strings: * `terminal`, if the request is passing a [pseudoterminal master][posix_openpt.3]. When `type` is `terminal`, the request MUST also contain the following properties: * **`container`** (string, REQUIRED) The container ID, as set by [create](#create). The message's [ancillary data][socket-queue] (`msg_control*`) MUST contain at least one [`cmsghdr`][socket.h]). The first `cmsghdr` MUST have: * `cmsg_type` set to [`SOL_SOCKET`][socket.h], * `cmsg_level` set to [`SCM_RIGHTS`][socket.h], * `cmsg_len` greater than or equal to `CMSG_LEN(sizeof(int))`, and * `((int*)CMSG_DATA(cmsg))[0]` set to the pseudoterminal master file descriptor. ##### Responses All responses MUST contain a **`type`** property whose value MUST be one of the following strings: * `success`, if the request was successfully processed. * `error`, if the request was not successfully processed. In addition, responses MAY contain any of the following properties: * **`message`** (string, OPTIONAL) A phrase describing the response. #### Example ``` # in a bundle directory with a process that echos "hello" and exits 42 $ test -t 1 && echo 'stdout is a terminal' stdout is a terminal $ funC create hello-1 <&- >stdout 2>stderr $ echo $? 0 $ wc stdout 0 0 0 stdout $ funC start hello-1 $ echo $? 0 $ cat stdout hello $ block-on-exit-and-collect-exit-code hello-1 $ echo $? 42 $ funC delete hello-1 $ echo $? 0 ``` #### Container process exit The [example's](#example) `block-on-exit-and-collect-exit-code` is platform-specific and is not specified in this document. On Linux, it might involve an ancestor process which had set [`PR_SET_CHILD_SUBREAPER`][prctl.2] and collected the container PID [from the state][state], or a process that was [ptracing][ptrace.2] the container process for [`exit_group`][exit_group.2], although both of those race against the container process exiting before the watcher is monitoring. ### start [Start][start] the user-specified code from [`process`][process]. * *Arguments* * *`<ID>`* The container to start. * *Standard streams:* * *stdin:* The runtime MUST NOT attempt to read from its stdin. * *stdout:* The handling of stdout is unspecified. * *stderr:* The runtime MAY print diagnostic messages to stderr, and the format for those lines is not specified in this document. * *Exit code:* Zero if the container was successfully started and non-zero on errors. Callers MAY block on this command's successful exit to trigger post-start activity. See [create](#example) for an example. ### state [Request][state-request] the container [state][state]. * *Arguments* * *`<ID>`* The container whose state is being requested. * *Standard streams:* * *stdin:* The runtime MUST NOT attempt to read from its stdin. * *stdout:* The runtime MUST print the [state JSON][state] to its stdout. * *stderr:* The runtime MAY print diagnostic messages to stderr, and the format for those lines is not specified in this document. * *Exit code:* Zero if the state was successfully written to stdout and non-zero on errors. #### Example ``` $ funC create sleeper-1 $ funC state sleeper-1 { "ociVersion": "1.0.0-rc1", "id": "sleeper-1", "status": "created", "pid": 4422, "bundlePath": "/containers/sleeper", "annotations" { "myKey": "myValue" } } $ echo $? 0 ``` ### kill [Send a signal][kill] to the container process. * *Arguments* * *`<ID>`* The container being signaled. * *Options* * *`--signal <SIGNAL>`* The signal to send (defaults to `TERM`). The runtime MUST support `TERM` and `KILL` signals with [the POSIX semantics][posix-signals]. The runtime MAY support additional signal names. On platforms that support [POSIX signals][posix-signals], the runtime MUST implement this command using POSIX signals. On platforms that do not support POSIX signals, the runtime MAY implement this command with alternative technology as long as `TERM` and `KILL` retain their POSIX semantics. Runtime authors on non-POSIX platforms SHOULD submit documentation for their TERM implementation to this specificiation, so runtime callers can configure the container process to gracefully handle the signals. * *Standard streams:* * *stdin:* The runtime MUST NOT attempt to read from its stdin. * *stdout:* The handling of stdout is unspecified. * *stderr:* The runtime MAY print diagnostic messages to stderr, and the format for those lines is not specified in this document. * *Exit code:* Zero if the signal was successfully sent to the container process and non-zero on errors. Successfully sent does not mean that the signal was successfully received or handled by the container process. #### Example ``` # in a bundle directory where the container process ignores TERM $ funC create sleeper-1 $ funC start sleeper-1 $ funC kill sleeper-1 $ echo $? 0 $ funC kill --signal KILL sleeper-1 $ echo $? 0 ``` ### delete [Release](#delete) container resources after the container process has exited. * *Arguments* * *`<ID>`* The container to delete. * *Standard streams:* * *stdin:* The runtime MUST NOT attempt to read from its stdin. * *stdout:* The handling of stdout is unspecified. * *stderr:* The runtime MAY print diagnostic messages to stderr, and the format for those lines is not specified in this document. * *Exit code:* Zero if the container was successfully deleted and non-zero on errors. See [create](#example) for an example. [bundle]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc4/bundle.md [c99-unspecified]: http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf#page=18 [capabilities.7]: http://man7.org/linux/man-pages/man7/capabilities.7.html [controlling-terminal]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap11.html#tag_11_01_03 [create]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc4/runtime.md#create [delete]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc4/runtime.md#delete [exit_group.2]: http://man7.org/linux/man-pages/man2/exit_group.2.html [ioctl.3]: http://pubs.opengroup.org/onlinepubs/9699919799/ [kill]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc4/runtime.md#kill [kill.2]: http://man7.org/linux/man-pages/man2/kill.2.html [process]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc4/config.md#process [posix-encoding]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap06.html#tag_06_02 [posix-lang]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_02 [posix-locale-encoding]: http://www.unicode.org/reports/tr35/#Bundle_vs_Item_Lookup [posix_openpt.3]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_openpt.html [posix-signals]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html#tag_13_42_03 [prctl.2]: http://man7.org/linux/man-pages/man2/prctl.2.html [ptrace.2]: http://man7.org/linux/man-pages/man2/ptrace.2.html [semver]: http://semver.org/spec/v2.0.0.html [socket-queue]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_10_11 [socket-types]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_10_06 [socket.h]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html [standard-streams]: https://github.com/opencontainers/specs/blob/v0.1.1/runtime-linux.md#file-descriptors [start]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc4/runtime.md#start [state]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc4/runtime.md#state [state-request]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc4/runtime.md#query-state [systemd-listen-fds]: http://www.freedesktop.org/software/systemd/man/sd_listen_fds.html [rfc2119]: https://tools.ietf.org/html/rfc2119 [runtime-spec-version]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc4/config.md#specification-version [TIOCSTI-security]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628843 [tty_ioctl.4]: http://man7.org/linux/man-pages/man4/tty_ioctl.4.html [unix-socket]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_10_17 [UTF-8]: http://www.unicode.org/versions/Unicode8.0.0/ch03.pdf
{ "content_hash": "c9bb5be75657b20018aeaccb6e8a1931", "timestamp": "", "source": "github", "line_count": 275, "max_line_length": 352, "avg_line_length": 54.31272727272727, "alnum_prop": 0.7457820032137118, "repo_name": "opencontainers/ocitools", "id": "c8dd57b45b5f6959e6ccf8558674229e60538010", "size": "14974", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "docs/command-line-interface.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Go", "bytes": "81466" }, { "name": "Makefile", "bytes": "1690" }, { "name": "Shell", "bytes": "12688" } ], "symlink_target": "" }
/* * Created on Jun 28, 2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package org.tolweb.tapestry; import java.util.List; import org.tolweb.tapestry.injections.BaseInjectable; import org.tolweb.tapestry.injections.ImageInjectable; /** * @author dmandel * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public abstract class TeacherResourceEducationStandards extends TeacherResourceViewComponent implements ImageInjectable, BaseInjectable { @SuppressWarnings("unchecked") public List getStateStandardsSubjects() { return getTextPreparer().getNewlineSeparatedList(getTeacherResource().getStateStandardsSubjects()); } public String getStateStandardsSubjectsString() { return getUlListStringWithSemicolons(getStateStandardsSubjects(), null); } public String getNationalStandardsSubjectsString() { return getUlListStringWithSemicolons(getNationalStandardsSubjects(), null); } @SuppressWarnings("unchecked") public List getNationalStandardsSubjects() { return getTextPreparer().getNewlineSeparatedList(getTeacherResource().getNationalStandardsSubjects()); } public boolean getHasStateStandardsDocument() { return getTeacherResource().getStateStandardsDocument() != null; } public String getStateStandardsUrl() { return getImageUtils().getImageUrl(getTeacherResource().getStateStandardsDocument()); } public boolean getHasNationalStandardsDocument() { return getTeacherResource().getNationalStandardsDocument() != null; } public String getNationalStandardsUrl() { return getImageUtils().getImageUrl(getTeacherResource().getNationalStandardsDocument()); } public String getStateStandardsValue() { return ((ViewTreehouse) getPage()).getPreparedText(getTeacherResource().getStateStandardsValue()); } public String getNationalStandardsValue() { String value = getTeacherResource().getNationalStandardsValue(); return ((ViewTreehouse) getPage()).getPreparedText(value); } @SuppressWarnings("unchecked") private String getUlListStringWithSemicolons(List list, String liClass) { return getTextPreparer().getUlListStringWithSemicolons(list, liClass); } }
{ "content_hash": "67857e5051d4df4c63ddc24dd91ff659", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 110, "avg_line_length": 35.73913043478261, "alnum_prop": 0.7347931873479319, "repo_name": "tolweb/tolweb-app", "id": "757a54e8ba81379bc665868a93582dc7cd005389", "size": "2466", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "OnlineContributors/src/org/tolweb/tapestry/TeacherResourceEducationStandards.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ActionScript", "bytes": "23343" }, { "name": "Groovy", "bytes": "69785" }, { "name": "Java", "bytes": "5142212" }, { "name": "JavaScript", "bytes": "2421139" }, { "name": "Shell", "bytes": "942" } ], "symlink_target": "" }
<?php class EngineBlock_Http_Client_Adapter_Curl extends Zend_Http_Client_Adapter_Curl { /** * Initialize curl * * @param string $host * @param int $port * @param boolean $secure * @return void * @throws Zend_Http_Client_Adapter_Exception if unable to connect */ public function connect($host, $port = 80, $secure = false) { parent::connect($host, $port, $secure); // for some reason the zend_http_client_adapter_curl only sets a timeout on // connecting, not on the reading. // So we override and set the same timeout being used for connecting as // the timeout for reading / writing. curl_setopt($this->_curl, CURLOPT_TIMEOUT, (int)$this->_config['timeout']); } }
{ "content_hash": "d08ea04c403a529dcc25bf5268ef9c22", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 83, "avg_line_length": 32.458333333333336, "alnum_prop": 0.6187419768934531, "repo_name": "Martin1982/OpenConext-engineblock", "id": "6b9640dc46096e618a56b8617373261cc78a7a2b", "size": "779", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "library/EngineBlock/Http/Client/Adapter/Curl.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "55121" }, { "name": "HTML", "bytes": "71905" }, { "name": "JavaScript", "bytes": "37193" }, { "name": "PHP", "bytes": "936270" }, { "name": "Shell", "bytes": "10204" }, { "name": "XSLT", "bytes": "3812" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (c) 2009-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>org.wso2.carbon.store</groupId> <artifactId>store-parent</artifactId> <version>2.0.1-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>store.feature</artifactId> <packaging>pom</packaging> <name>store Module - Feature</name> <build> <plugins> <plugin> <artifactId>maven-resources-plugin</artifactId> <executions> <execution> <id>copy-p2.inf</id> <phase>generate-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>src/main/resources</outputDirectory> <resources> <resource> <directory>resources</directory> <includes> <include>p2.inf</include> </includes> </resource> </resources> </configuration> </execution> <execution> <id>copy-module-source</id> <phase>generate-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>src/main/resources/module</outputDirectory> <resources> <resource> <directory>../module</directory> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.wso2.maven</groupId> <artifactId>carbon-p2-plugin</artifactId> <executions> <execution> <id>p2-feature-generation</id> <phase>package</phase> <goals> <goal>p2-feature-gen</goal> </goals> <configuration> <id>org.wso2.store.modules.store</id> <propertiesFile>etc/feature.properties</propertiesFile> <importFeatures> <importFeatureDef>org.wso2.store.modules.event:${carbon.store.version}</importFeatureDef> </importFeatures> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>clean_target</id> <phase>install</phase> <configuration> <tasks> <delete dir="src/main/resources" /> <delete dir="src/main" /> <delete dir="src" /> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
{ "content_hash": "9b2bd4b29180d365bf09ca2af133ecf5", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 201, "avg_line_length": 43.369369369369366, "alnum_prop": 0.44038221852928955, "repo_name": "harsha89/carbon-store", "id": "83033ddc7fbf3fb3e920ad4b818d5dbe54ee6a3a", "size": "4814", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "jaggery-modules/store/feature/pom.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "471145" }, { "name": "HTML", "bytes": "20901" }, { "name": "Handlebars", "bytes": "85886" }, { "name": "Java", "bytes": "290837" }, { "name": "JavaScript", "bytes": "4908151" } ], "symlink_target": "" }
<html lang="en"> <head> <title>Prerequisites for GCC</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Prerequisites for GCC"> <meta name="generator" content="makeinfo 4.8"> <link title="Top" rel="top" href="#Top"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- Copyright (C) 1988-2014 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the section entitled "GNU Free Documentation License". (a) The FSF's Front-Cover Text is: A GNU Manual (b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.--> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <h1 class="settitle">Prerequisites for GCC</h1> <a name="index-Prerequisites-1"></a> GCC requires that various tools and packages be available for use in the build procedure. Modifying GCC sources requires additional tools described below. <h3 class="heading"><a name="TOC0"></a>Tools/packages necessary for building GCC</h3> <dl> <dt>ISO C++98 compiler<dd>Necessary to bootstrap GCC, although versions of GCC prior to 4.8 also allow bootstrapping with a ISO C89 compiler and versions of GCC prior to 3.4 also allow bootstrapping with a traditional (K&amp;R) C compiler. <p>To build all languages in a cross-compiler or other configuration where 3-stage bootstrap is not performed, you need to start with an existing GCC binary (version 3.4 or later) because source code for language frontends other than C might use GCC extensions. <p>Note that to bootstrap GCC with versions of GCC earlier than 3.4, you may need to use <samp><span class="option">--disable-stage1-checking</span></samp>, though bootstrapping the compiler with such earlier compilers is strongly discouraged. <br><dt>C standard library and headers<dd> In order to build GCC, the C standard library and headers must be present for all target variants for which target libraries will be built (and not only the variant of the host C++ compiler). <p>This affects the popular `<samp><span class="samp">x86_64-unknown-linux-gnu</span></samp>' platform (among other multilib targets), for which 64-bit (`<samp><span class="samp">x86_64</span></samp>') and 32-bit (`<samp><span class="samp">i386</span></samp>') libc headers are usually packaged separately. If you do a build of a native compiler on `<samp><span class="samp">x86_64-unknown-linux-gnu</span></samp>', make sure you either have the 32-bit libc developer package properly installed (the exact name of the package depends on your distro) or you must build GCC as a 64-bit only compiler by configuring with the option <samp><span class="option">--disable-multilib</span></samp>. Otherwise, you may encounter an error such as `<samp><span class="samp">fatal error: gnu/stubs-32.h: No such file</span></samp>' <br><dt>GNAT<dd> In order to build the Ada compiler (GNAT) you must already have GNAT installed because portions of the Ada frontend are written in Ada (with GNAT extensions.) Refer to the Ada installation instructions for more specific information. <br><dt>A &ldquo;working&rdquo; POSIX compatible shell, or GNU bash<dd> Necessary when running <samp><span class="command">configure</span></samp> because some <samp><span class="command">/bin/sh</span></samp> shells have bugs and may crash when configuring the target libraries. In other cases, <samp><span class="command">/bin/sh</span></samp> or <samp><span class="command">ksh</span></samp> have disastrous corner-case performance problems. This can cause target <samp><span class="command">configure</span></samp> runs to literally take days to complete in some cases. <p>So on some platforms <samp><span class="command">/bin/ksh</span></samp> is sufficient, on others it isn't. See the host/target specific instructions for your platform, or use <samp><span class="command">bash</span></samp> to be sure. Then set <samp><span class="env">CONFIG_SHELL</span></samp> in your environment to your &ldquo;good&rdquo; shell prior to running <samp><span class="command">configure</span></samp>/<samp><span class="command">make</span></samp>. <p><samp><span class="command">zsh</span></samp> is not a fully compliant POSIX shell and will not work when configuring GCC. <br><dt>A POSIX or SVR4 awk<dd> Necessary for creating some of the generated source files for GCC. If in doubt, use a recent GNU awk version, as some of the older ones are broken. GNU awk version 3.1.5 is known to work. <br><dt>GNU binutils<dd> Necessary in some circumstances, optional in others. See the host/target specific instructions for your platform for the exact requirements. <br><dt>gzip version 1.2.4 (or later) or<dt>bzip2 version 1.0.2 (or later)<dd> Necessary to uncompress GCC <samp><span class="command">tar</span></samp> files when source code is obtained via FTP mirror sites. <br><dt>GNU make version 3.80 (or later)<dd> You must have GNU make installed to build GCC. <br><dt>GNU tar version 1.14 (or later)<dd> Necessary (only on some platforms) to untar the source code. Many systems' <samp><span class="command">tar</span></samp> programs will also work, only try GNU <samp><span class="command">tar</span></samp> if you have problems. <br><dt>Perl version 5.6.1 (or later)<dd> Necessary when targeting Darwin, building `<samp><span class="samp">libstdc++</span></samp>', and not using <samp><span class="option">--disable-symvers</span></samp>. Necessary when targeting Solaris 2 with Sun <samp><span class="command">ld</span></samp> and not using <samp><span class="option">--disable-symvers</span></samp>. The bundled <samp><span class="command">perl</span></samp> in Solaris&nbsp;<!-- /@w -->8 and up works. <p>Necessary when regenerating <samp><span class="file">Makefile</span></samp> dependencies in libiberty. Necessary when regenerating <samp><span class="file">libiberty/functions.texi</span></samp>. Necessary when generating manpages from Texinfo manuals. Used by various scripts to generate some files included in SVN (mainly Unicode-related and rarely changing) from source tables. <br><dt><samp><span class="command">jar</span></samp>, or InfoZIP (<samp><span class="command">zip</span></samp> and <samp><span class="command">unzip</span></samp>)<dd> Necessary to build libgcj, the GCJ runtime. </dl> <p>Several support libraries are necessary to build GCC, some are required, others optional. While any sufficiently new version of required tools usually work, library requirements are generally stricter. Newer versions may work in some cases, but it's safer to use the exact versions documented. We appreciate bug reports about problems with newer versions, though. If your OS vendor provides packages for the support libraries then using those packages may be the simplest way to install the libraries. <dl> <dt>GNU Multiple Precision Library (GMP) version 4.3.2 (or later)<dd> Necessary to build GCC. If a GMP source distribution is found in a subdirectory of your GCC sources named <samp><span class="file">gmp</span></samp>, it will be built together with GCC. Alternatively, if GMP is already installed but it is not in your library search path, you will have to configure with the <samp><span class="option">--with-gmp</span></samp> configure option. See also <samp><span class="option">--with-gmp-lib</span></samp> and <samp><span class="option">--with-gmp-include</span></samp>. <br><dt>MPFR Library version 2.4.2 (or later)<dd> Necessary to build GCC. It can be downloaded from <a href="http://www.mpfr.org/">http://www.mpfr.org/</a>. If an MPFR source distribution is found in a subdirectory of your GCC sources named <samp><span class="file">mpfr</span></samp>, it will be built together with GCC. Alternatively, if MPFR is already installed but it is not in your default library search path, the <samp><span class="option">--with-mpfr</span></samp> configure option should be used. See also <samp><span class="option">--with-mpfr-lib</span></samp> and <samp><span class="option">--with-mpfr-include</span></samp>. <br><dt>MPC Library version 0.8.1 (or later)<dd> Necessary to build GCC. It can be downloaded from <a href="http://www.multiprecision.org/">http://www.multiprecision.org/</a>. If an MPC source distribution is found in a subdirectory of your GCC sources named <samp><span class="file">mpc</span></samp>, it will be built together with GCC. Alternatively, if MPC is already installed but it is not in your default library search path, the <samp><span class="option">--with-mpc</span></samp> configure option should be used. See also <samp><span class="option">--with-mpc-lib</span></samp> and <samp><span class="option">--with-mpc-include</span></samp>. <br><dt>ISL Library version 0.12.2<dd> Necessary to build GCC with the Graphite loop optimizations. It can be downloaded from <a href="ftp://gcc.gnu.org/pub/gcc/infrastructure/">ftp://gcc.gnu.org/pub/gcc/infrastructure/</a> as <samp><span class="file">isl-0.12.2.tar.bz2</span></samp>. If an ISL source distribution is found in a subdirectory of your GCC sources named <samp><span class="file">isl</span></samp>, it will be built together with GCC. Alternatively, the <samp><span class="option">--with-isl</span></samp> configure option should be used if ISL is not installed in your default library search path. <br><dt>CLooG 0.18.1<dd> Necessary to build GCC with the Graphite loop optimizations. It can be downloaded from <a href="ftp://gcc.gnu.org/pub/gcc/infrastructure/">ftp://gcc.gnu.org/pub/gcc/infrastructure/</a> as <samp><span class="file">cloog-0.18.1.tar.gz</span></samp>. If a CLooG source distribution is found in a subdirectory of your GCC sources named <samp><span class="file">cloog</span></samp>, it will be built together with GCC. Alternatively, the <samp><span class="option">--with-cloog</span></samp> configure option should be used if CLooG is not installed in your default library search path. <p>If you want to install CLooG separately it needs to be built against ISL 0.12.2 by using the <samp><span class="option">--with-isl=system</span></samp> to direct CLooG to pick up an already installed ISL. Using the ISL library as bundled with CLooG is not supported. </dl> <h3 class="heading"><a name="TOC1"></a>Tools/packages necessary for modifying GCC</h3> <dl> <dt>autoconf version 2.64<dt>GNU m4 version 1.4.6 (or later)<dd> Necessary when modifying <samp><span class="file">configure.ac</span></samp>, <samp><span class="file">aclocal.m4</span></samp>, etc. to regenerate <samp><span class="file">configure</span></samp> and <samp><span class="file">config.in</span></samp> files. <br><dt>automake version 1.11.1<dd> Necessary when modifying a <samp><span class="file">Makefile.am</span></samp> file to regenerate its associated <samp><span class="file">Makefile.in</span></samp>. <p>Much of GCC does not use automake, so directly edit the <samp><span class="file">Makefile.in</span></samp> file. Specifically this applies to the <samp><span class="file">gcc</span></samp>, <samp><span class="file">intl</span></samp>, <samp><span class="file">libcpp</span></samp>, <samp><span class="file">libiberty</span></samp>, <samp><span class="file">libobjc</span></samp> directories as well as any of their subdirectories. <p>For directories that use automake, GCC requires the latest release in the 1.11 series, which is currently 1.11.1. When regenerating a directory to a newer version, please update all the directories using an older 1.11 to the latest released version. <br><dt>gettext version 0.14.5 (or later)<dd> Needed to regenerate <samp><span class="file">gcc.pot</span></samp>. <br><dt>gperf version 2.7.2 (or later)<dd> Necessary when modifying <samp><span class="command">gperf</span></samp> input files, e.g. <samp><span class="file">gcc/cp/cfns.gperf</span></samp> to regenerate its associated header file, e.g. <samp><span class="file">gcc/cp/cfns.h</span></samp>. <br><dt>DejaGnu 1.4.4<dt>Expect<dt>Tcl<dd> Necessary to run the GCC testsuite; see the section on testing for details. Tcl 8.6 has a known regression in RE pattern handling that make parts of the testsuite fail. See <a href="http://core.tcl.tk/tcl/tktview/267b7e2334ee2e9de34c4b00d6e72e2f1997085f">http://core.tcl.tk/tcl/tktview/267b7e2334ee2e9de34c4b00d6e72e2f1997085f</a> for more information. <br><dt>autogen version 5.5.4 (or later) and<dt>guile version 1.4.1 (or later)<dd> Necessary to regenerate <samp><span class="file">fixinc/fixincl.x</span></samp> from <samp><span class="file">fixinc/inclhack.def</span></samp> and <samp><span class="file">fixinc/*.tpl</span></samp>. <p>Necessary to run `<samp><span class="samp">make check</span></samp>' for <samp><span class="file">fixinc</span></samp>. <p>Necessary to regenerate the top level <samp><span class="file">Makefile.in</span></samp> file from <samp><span class="file">Makefile.tpl</span></samp> and <samp><span class="file">Makefile.def</span></samp>. <br><dt>Flex version 2.5.4 (or later)<dd> Necessary when modifying <samp><span class="file">*.l</span></samp> files. <p>Necessary to build GCC during development because the generated output files are not included in the SVN repository. They are included in releases. <br><dt>Texinfo version 4.7 (or later)<dd> Necessary for running <samp><span class="command">makeinfo</span></samp> when modifying <samp><span class="file">*.texi</span></samp> files to test your changes. <p>Necessary for running <samp><span class="command">make dvi</span></samp> or <samp><span class="command">make pdf</span></samp> to create printable documentation in DVI or PDF format. Texinfo version 4.8 or later is required for <samp><span class="command">make pdf</span></samp>. <p>Necessary to build GCC documentation during development because the generated output files are not included in the SVN repository. They are included in releases. <br><dt>TeX (any working version)<dd> Necessary for running <samp><span class="command">texi2dvi</span></samp> and <samp><span class="command">texi2pdf</span></samp>, which are used when running <samp><span class="command">make dvi</span></samp> or <samp><span class="command">make pdf</span></samp> to create DVI or PDF files, respectively. <br><dt>SVN (any version)<dt>SSH (any version)<dd> Necessary to access the SVN repository. Public releases and weekly snapshots of the development sources are also available via FTP. <br><dt>GNU diffutils version 2.7 (or later)<dd> Useful when submitting patches for the GCC source code. <br><dt>patch version 2.5.4 (or later)<dd> Necessary when applying patches, created with <samp><span class="command">diff</span></samp>, to one's own sources. <br><dt>ecj1<dt>gjavah<dd> If you wish to modify <samp><span class="file">.java</span></samp> files in libjava, you will need to configure with <samp><span class="option">--enable-java-maintainer-mode</span></samp>, and you will need to have executables named <samp><span class="command">ecj1</span></samp> and <samp><span class="command">gjavah</span></samp> in your path. The <samp><span class="command">ecj1</span></samp> executable should run the Eclipse Java compiler via the GCC-specific entry point. You can download a suitable jar from <a href="ftp://sourceware.org/pub/java/">ftp://sourceware.org/pub/java/</a>, or by running the script <samp><span class="command">contrib/download_ecj</span></samp>. <br><dt>antlr.jar version 2.7.1 (or later)<dt>antlr binary<dd> If you wish to build the <samp><span class="command">gjdoc</span></samp> binary in libjava, you will need to have an <samp><span class="file">antlr.jar</span></samp> library available. The library is searched for in system locations but can be specified with <samp><span class="option">--with-antlr-jar=</span></samp> instead. When configuring with <samp><span class="option">--enable-java-maintainer-mode</span></samp>, you will need to have one of the executables named <samp><span class="command">cantlr</span></samp>, <samp><span class="command">runantlr</span></samp> or <samp><span class="command">antlr</span></samp> in your path. </dl> <p><hr /> <p><a href="./index.html">Return to the GCC Installation page</a> <!-- ***Downloading the source************************************************** --> <!-- ***Configuration*********************************************************** --> <!-- ***Building**************************************************************** --> <!-- ***Testing***************************************************************** --> <!-- ***Final install*********************************************************** --> <!-- ***Binaries**************************************************************** --> <!-- ***Specific**************************************************************** --> <!-- ***Old documentation****************************************************** --> <!-- ***GFDL******************************************************************** --> <!-- *************************************************************************** --> <!-- Part 6 The End of the Document --> </body></html>
{ "content_hash": "a3951be6a42105d4dfe4206d33517e23", "timestamp": "", "source": "github", "line_count": 320, "max_line_length": 174, "avg_line_length": 57.153125, "alnum_prop": 0.7004756957734157, "repo_name": "ARMmbed/yotta_osx_installer", "id": "3e2418e7610629a099fda754d887a2b4fe9c8358", "size": "18289", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "prerequisites/gcc-arm-none-eabi-4_9-2015q3/share/doc/gcc-arm-none-eabi/html/gccinstall/prerequisites.html", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "ActionScript", "bytes": "46" }, { "name": "Assembly", "bytes": "29493" }, { "name": "Batchfile", "bytes": "1321" }, { "name": "C", "bytes": "3589917" }, { "name": "C++", "bytes": "10603800" }, { "name": "CMake", "bytes": "2408460" }, { "name": "CSS", "bytes": "17863" }, { "name": "Emacs Lisp", "bytes": "14305" }, { "name": "FORTRAN", "bytes": "2105" }, { "name": "Groff", "bytes": "3889491" }, { "name": "HTML", "bytes": "31505361" }, { "name": "JavaScript", "bytes": "90647" }, { "name": "Logos", "bytes": "8877" }, { "name": "Makefile", "bytes": "2798" }, { "name": "Objective-C", "bytes": "254392" }, { "name": "Python", "bytes": "7903768" }, { "name": "Shell", "bytes": "36795" }, { "name": "VimL", "bytes": "8478" }, { "name": "XC", "bytes": "8384" }, { "name": "XS", "bytes": "8334" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ProjectModuleManager"> <modules> <module fileurl="file://$PROJECT_DIR$/.idea/simple-passport.iml" filepath="$PROJECT_DIR$/.idea/simple-passport.iml" /> </modules> </component> </project>
{ "content_hash": "3d921b08e42726724575c540f61a5f54", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 124, "avg_line_length": 31.555555555555557, "alnum_prop": 0.6654929577464789, "repo_name": "gastrodia/simple-passport", "id": "edc58955993d6771a76e0499b67ea30fb0b4a916", "size": "284", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": ".idea/modules.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "205" }, { "name": "JavaScript", "bytes": "9771" } ], "symlink_target": "" }
<?php namespace metastore; /** * Autogenerated by Thrift Compiler (0.16.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ use Thrift\Base\TBase; use Thrift\Type\TType; use Thrift\Type\TMessageType; use Thrift\Exception\TException; use Thrift\Exception\TProtocolException; use Thrift\Protocol\TProtocol; use Thrift\Protocol\TBinaryProtocolAccelerated; use Thrift\Exception\TApplicationException; class UnknownPartitionException extends TException { static public $isValidate = false; static public $_TSPEC = array( 1 => array( 'var' => 'message', 'isRequired' => false, 'type' => TType::STRING, ), ); /** * @var string */ public $message = null; public function __construct($vals = null) { if (is_array($vals)) { if (isset($vals['message'])) { $this->message = $vals['message']; } } } public function getName() { return 'UnknownPartitionException'; } public function read($input) { $xfer = 0; $fname = null; $ftype = 0; $fid = 0; $xfer += $input->readStructBegin($fname); while (true) { $xfer += $input->readFieldBegin($fname, $ftype, $fid); if ($ftype == TType::STOP) { break; } switch ($fid) { case 1: if ($ftype == TType::STRING) { $xfer += $input->readString($this->message); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; } public function write($output) { $xfer = 0; $xfer += $output->writeStructBegin('UnknownPartitionException'); if ($this->message !== null) { $xfer += $output->writeFieldBegin('message', TType::STRING, 1); $xfer += $output->writeString($this->message); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; } }
{ "content_hash": "0cb81be15ef2ed66bc68a8e82960713d", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 75, "avg_line_length": 25.9468085106383, "alnum_prop": 0.5002050020500205, "repo_name": "sankarh/hive", "id": "6be88a76f1ca0c994cf26f0c243ff339366eae71", "size": "2439", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/UnknownPartitionException.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "55440" }, { "name": "Batchfile", "bytes": "845" }, { "name": "C", "bytes": "28218" }, { "name": "C++", "bytes": "96657" }, { "name": "CSS", "bytes": "4742" }, { "name": "GAP", "bytes": "204254" }, { "name": "HTML", "bytes": "24102" }, { "name": "HiveQL", "bytes": "8290287" }, { "name": "Java", "bytes": "59285075" }, { "name": "JavaScript", "bytes": "44139" }, { "name": "M4", "bytes": "2276" }, { "name": "PHP", "bytes": "148097" }, { "name": "PLSQL", "bytes": "9105" }, { "name": "PLpgSQL", "bytes": "294996" }, { "name": "Perl", "bytes": "319742" }, { "name": "PigLatin", "bytes": "12333" }, { "name": "Python", "bytes": "383647" }, { "name": "ReScript", "bytes": "3460" }, { "name": "Roff", "bytes": "5379" }, { "name": "SQLPL", "bytes": "1190" }, { "name": "Shell", "bytes": "271549" }, { "name": "TSQL", "bytes": "14126" }, { "name": "Thrift", "bytes": "164235" }, { "name": "XSLT", "bytes": "1329" }, { "name": "q", "bytes": "289182" } ], "symlink_target": "" }
static int verify_certificate_callback (gnutls_session_t); //////////////////////////////////////////////////////////////////////////////// static void gnutls_log_function (int level, const char* message) { std::cout << "c: " << level << " " << message; } //////////////////////////////////////////////////////////////////////////////// static int verify_certificate_callback (gnutls_session_t session) { const TLSClient* client = (TLSClient*) gnutls_session_get_ptr (session); return client->verify_certificate (); } //////////////////////////////////////////////////////////////////////////////// TLSClient::TLSClient () : _ca ("") , _cert ("") , _key ("") , _host ("") , _port ("") , _session(0) , _socket (0) , _limit (0) , _debug (false) , _trust(strict) { } //////////////////////////////////////////////////////////////////////////////// TLSClient::~TLSClient () { gnutls_deinit (_session); gnutls_certificate_free_credentials (_credentials); gnutls_global_deinit (); if (_socket) { shutdown (_socket, SHUT_RDWR); close (_socket); } } //////////////////////////////////////////////////////////////////////////////// void TLSClient::limit (int max) { _limit = max; } //////////////////////////////////////////////////////////////////////////////// // Calling this method results in all subsequent socket traffic being sent to // std::cout, labelled with 'c: ...'. void TLSClient::debug (int level) { if (level) _debug = true; gnutls_global_set_log_function (gnutls_log_function); gnutls_global_set_log_level (level); } //////////////////////////////////////////////////////////////////////////////// void TLSClient::trust (const enum trust_level value) { _trust = value; if (_debug) { if (_trust == allow_all) std::cout << "c: INFO Server certificate will be trusted automatically.\n"; else if (_trust == ignore_hostname) std::cout << "c: INFO Server certificate will be verified but hostname ignored.\n"; else std::cout << "c: INFO Server certificate will be verified.\n"; } } //////////////////////////////////////////////////////////////////////////////// void TLSClient::ciphers (const std::string& cipher_list) { _ciphers = cipher_list; } //////////////////////////////////////////////////////////////////////////////// void TLSClient::init ( const std::string& ca, const std::string& cert, const std::string& key) { _ca = ca; _cert = cert; _key = key; int ret = gnutls_global_init (); if (ret < 0) throw format ("TLS init error. {1}", gnutls_strerror (ret)); ret = gnutls_certificate_allocate_credentials (&_credentials); if (ret < 0) throw format ("TLS allocation error. {1}", gnutls_strerror (ret)); if (_ca != "" && (ret = gnutls_certificate_set_x509_trust_file (_credentials, _ca.c_str (), GNUTLS_X509_FMT_PEM)) < 0) throw format ("Bad CA file. {1}", gnutls_strerror (ret)); if (_cert != "" && _key != "" && (ret = gnutls_certificate_set_x509_key_file (_credentials, _cert.c_str (), _key.c_str (), GNUTLS_X509_FMT_PEM)) < 0) throw format ("Bad CERT file. {1}", gnutls_strerror (ret)); #if GNUTLS_VERSION_NUMBER >= 0x02090a // The automatic verification for the server certificate with // gnutls_certificate_set_verify_function only works with gnutls // >=2.9.10. So with older versions we should call the verify function // manually after the gnutls handshake. gnutls_certificate_set_verify_function (_credentials, verify_certificate_callback); #endif ret = gnutls_init (&_session, GNUTLS_CLIENT); if (ret < 0) throw format ("TLS client init error. {1}", gnutls_strerror (ret)); // Use default priorities unless overridden. if (_ciphers == "") _ciphers = "NORMAL"; const char *err; ret = gnutls_priority_set_direct (_session, _ciphers.c_str (), &err); if (ret < 0) { if (_debug && ret == GNUTLS_E_INVALID_REQUEST) std::cout << "c: ERROR Priority error at: " << err << "\n"; throw format (STRING_TLS_INIT_FAIL, gnutls_strerror (ret)); } // Apply the x509 credentials to the current session. ret = gnutls_credentials_set (_session, GNUTLS_CRD_CERTIFICATE, _credentials); if (ret < 0) throw format ("TLS credentials error. {1}", gnutls_strerror (ret)); } //////////////////////////////////////////////////////////////////////////////// void TLSClient::connect (const std::string& host, const std::string& port) { _host = host; _port = port; // Store the TLSClient instance, so that the verification callback can access // it during the handshake below and call the verifcation method. gnutls_session_set_ptr (_session, (void*) this); // use IPv4 or IPv6, does not matter. struct addrinfo hints {}; hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; // use my IP struct addrinfo* res; int ret = ::getaddrinfo (host.c_str (), port.c_str (), &hints, &res); if (ret != 0) throw std::string (::gai_strerror (ret)); // Try them all, stop on success. struct addrinfo* p; for (p = res; p != NULL; p = p->ai_next) { if ((_socket = ::socket (p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) continue; // When a socket is closed, it remains unavailable for a while (netstat -an). // Setting SO_REUSEADDR allows this program to assume control of a closed, // but unavailable socket. int on = 1; if (::setsockopt (_socket, SOL_SOCKET, SO_REUSEADDR, (const void*) &on, sizeof (on)) == -1) throw std::string (::strerror (errno)); if (::connect (_socket, p->ai_addr, p->ai_addrlen) == -1) continue; break; } free (res); if (p == NULL) throw format (STRING_CMD_SYNC_CONNECT, host, port); #if GNUTLS_VERSION_NUMBER >= 0x030109 gnutls_transport_set_int (_session, _socket); #else gnutls_transport_set_ptr (_session, (gnutls_transport_ptr_t) (intptr_t) _socket); #endif // Perform the TLS handshake do { ret = gnutls_handshake (_session); } while (ret < 0 && gnutls_error_is_fatal (ret) == 0); if (ret < 0) throw format (STRING_CMD_SYNC_HANDSHAKE, gnutls_strerror (ret)); #if GNUTLS_VERSION_NUMBER < 0x02090a // The automatic verification for the server certificate with // gnutls_certificate_set_verify_function does only work with gnutls // >=2.9.10. So with older versions we should call the verify function // manually after the gnutls handshake. ret = verify_certificate (); if (ret < 0) { if (_debug) std::cout << "c: ERROR Certificate verification failed.\n"; throw format (STRING_TLS_INIT_FAIL, gnutls_strerror (ret)); } #endif if (_debug) { #if GNUTLS_VERSION_NUMBER >= 0x03010a char* desc = gnutls_session_get_desc (_session); std::cout << "c: INFO Handshake was completed: " << desc << "\n"; gnutls_free (desc); #else std::cout << "c: INFO Handshake was completed.\n"; #endif } } //////////////////////////////////////////////////////////////////////////////// void TLSClient::bye () { gnutls_bye (_session, GNUTLS_SHUT_RDWR); } //////////////////////////////////////////////////////////////////////////////// int TLSClient::verify_certificate () const { if (_trust == TLSClient::allow_all) return 0; // This verification function uses the trusted CAs in the credentials // structure. So you must have installed one or more CA certificates. unsigned int status = 0; const char* hostname = _host.c_str(); #if GNUTLS_VERSION_NUMBER >= 0x030104 if (_trust == TLSClient::ignore_hostname) hostname = NULL; int ret = gnutls_certificate_verify_peers3 (_session, hostname, &status); if (ret < 0) { if (_debug) std::cout << "c: ERROR Certificate verification peers3 failed. " << gnutls_strerror (ret) << "\n"; return GNUTLS_E_CERTIFICATE_ERROR; } #else int ret = gnutls_certificate_verify_peers2 (_session, &status); if (ret < 0) { if (_debug) std::cout << "c: ERROR Certificate verification peers2 failed. " << gnutls_strerror (ret) << "\n"; return GNUTLS_E_CERTIFICATE_ERROR; } if ((status == 0) && (_trust != TLSClient::ignore_hostname)) { if (gnutls_certificate_type_get (_session) == GNUTLS_CRT_X509) { const gnutls_datum* cert_list; unsigned int cert_list_size; gnutls_x509_crt cert; cert_list = gnutls_certificate_get_peers (_session, &cert_list_size); if (cert_list_size == 0) { if (_debug) std::cout << "c: ERROR Certificate get peers failed. " << gnutls_strerror (ret) << "\n"; return GNUTLS_E_CERTIFICATE_ERROR; } ret = gnutls_x509_crt_init (&cert); if (ret < 0) { if (_debug) std::cout << "c: ERROR x509 init failed. " << gnutls_strerror (ret) << "\n"; return GNUTLS_E_CERTIFICATE_ERROR; } ret = gnutls_x509_crt_import (cert, &cert_list[0], GNUTLS_X509_FMT_DER); if (ret < 0) { if (_debug) std::cout << "c: ERROR x509 cert import. " << gnutls_strerror (ret) << "\n"; gnutls_x509_crt_deinit(cert); return GNUTLS_E_CERTIFICATE_ERROR; } if (gnutls_x509_crt_check_hostname (cert, hostname) == 0) { if (_debug) std::cout << "c: ERROR x509 cert check hostname. " << gnutls_strerror (ret) << "\n"; gnutls_x509_crt_deinit(cert); return GNUTLS_E_CERTIFICATE_ERROR; } } else return GNUTLS_E_CERTIFICATE_ERROR; } #endif #if GNUTLS_VERSION_NUMBER >= 0x030104 gnutls_certificate_type_t type = gnutls_certificate_type_get (_session); gnutls_datum_t out; ret = gnutls_certificate_verification_status_print (status, type, &out, 0); if (ret < 0) { if (_debug) std::cout << "c: ERROR certificate verification status. " << gnutls_strerror (ret) << "\n"; return GNUTLS_E_CERTIFICATE_ERROR; } if (_debug) std::cout << "c: INFO " << out.data << "\n"; gnutls_free (out.data); #endif if (status != 0) return GNUTLS_E_CERTIFICATE_ERROR; // Continue handshake. return 0; } //////////////////////////////////////////////////////////////////////////////// void TLSClient::send (const std::string& data) { std::string packet = "XXXX" + data; // Encode the length. unsigned long l = packet.length (); packet[0] = l >>24; packet[1] = l >>16; packet[2] = l >>8; packet[3] = l; unsigned int total = 0; unsigned int remaining = packet.length (); while (total < packet.length ()) { int status; do { status = gnutls_record_send (_session, packet.c_str () + total, remaining); } while (errno == GNUTLS_E_INTERRUPTED || errno == GNUTLS_E_AGAIN); if (status == -1) break; total += (unsigned int) status; remaining -= (unsigned int) status; } if (_debug) std::cout << "c: INFO Sending 'XXXX" << data.c_str () << "' (" << total << " bytes)" << std::endl; } //////////////////////////////////////////////////////////////////////////////// void TLSClient::recv (std::string& data) { data = ""; // No appending of data. int received = 0; // Get the encoded length. unsigned char header[4] {}; do { received = gnutls_record_recv (_session, header, 4); } while (received > 0 && (errno == GNUTLS_E_INTERRUPTED || errno == GNUTLS_E_AGAIN)); int total = received; // Decode the length. unsigned long expected = (header[0]<<24) | (header[1]<<16) | (header[2]<<8) | header[3]; if (_debug) std::cout << "c: INFO expecting " << expected << " bytes.\n"; // TODO This would be a good place to assert 'expected < _limit'. // Arbitrary buffer size. char buffer[MAX_BUF]; // Keep reading until no more data. Concatenate chunks of data if a) the // read was interrupted by a signal, and b) if there is more data than // fits in the buffer. do { do { received = gnutls_record_recv (_session, buffer, MAX_BUF - 1); } while (received > 0 && (errno == GNUTLS_E_INTERRUPTED || errno == GNUTLS_E_AGAIN)); // Other end closed the connection. if (received == 0) { if (_debug) std::cout << "c: INFO Peer has closed the TLS connection\n"; break; } // Something happened. if (received < 0 && gnutls_error_is_fatal (received) == 0) { if (_debug) std::cout << "c: WARNING " << gnutls_strerror (received) << "\n"; } else if (received < 0) throw std::string (gnutls_strerror (received)); buffer [received] = '\0'; data += buffer; total += received; // Stop at defined limit. if (_limit && total > _limit) break; } while (received > 0 && total < (int) expected); if (_debug) std::cout << "c: INFO Receiving 'XXXX" << data.c_str () << "' (" << total << " bytes)" << std::endl; } //////////////////////////////////////////////////////////////////////////////// #endif
{ "content_hash": "a2d1a93d33b3c80b164768821f10df64", "timestamp": "", "source": "github", "line_count": 456, "max_line_length": 122, "avg_line_length": 29.015350877192983, "alnum_prop": 0.544705615599728, "repo_name": "sheehamj13/task", "id": "c67ed44be731dd697693d03de1ff9a5a4f9ea3d9", "size": "15092", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/TLSClient.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "568374" }, { "name": "C++", "bytes": "1870933" }, { "name": "CMake", "bytes": "17100" }, { "name": "Perl", "bytes": "1100043" }, { "name": "Python", "bytes": "908235" }, { "name": "Shell", "bytes": "39427" }, { "name": "VimL", "bytes": "12757" } ], "symlink_target": "" }
package de.lessvoid.nifty.layout.manager; import static de.lessvoid.nifty.layout.manager.BoxTestHelper.assertBox; import java.util.ArrayList; import java.util.List; import junit.framework.TestCase; import de.lessvoid.nifty.layout.Box; import de.lessvoid.nifty.layout.BoxConstraints; import de.lessvoid.nifty.layout.LayoutPart; import de.lessvoid.nifty.layout.align.HorizontalAlign; import de.lessvoid.nifty.tools.SizeValue; public class VerticalLayoutTest extends TestCase { private VerticalLayout layout= new VerticalLayout(); private LayoutPart root; private List<LayoutPart> elements; private LayoutPart top; private LayoutPart bottom; protected void setUp() throws Exception { root = new LayoutPart(new Box(0, 0, 640, 480), new BoxConstraints()); elements = new ArrayList<LayoutPart>(); top = new LayoutPart(new Box(), new BoxConstraints()); elements.add(top); bottom = new LayoutPart(new Box(), new BoxConstraints()); elements.add(bottom); } public void testUpdateEmpty() throws Exception { layout.layoutElements(null, null); } public void testUpdateWithNullEntriesMakeNoTrouble() { layout.layoutElements(root, null); } public void testLayoutDefault() { performLayout(); assertBox(top.getBox(), 0, 0, 640, 240); assertBox(bottom.getBox(), 0, 240, 640, 240); } public void testLayoutFixedHeight() { top.getBoxConstraints().setHeight(new SizeValue("20px")); performLayout(); assertBox(top.getBox(), 0, 0, 640, 20); assertBox(bottom.getBox(), 0, 20, 640, 460); } public void testLayoutFixedWidth() { top.getBoxConstraints().setWidth(new SizeValue("20px")); performLayout(); assertBox(top.getBox(), 0, 0, 20, 240); } public void testLayoutMaxWidth() { top.getBoxConstraints().setWidth(new SizeValue("100%")); performLayout(); assertBox(top.getBox(), 0, 0, 640, 240); } public void testLayoutMaxWidthWildcard() { top.getBoxConstraints().setWidth(new SizeValue("*")); performLayout(); assertBox(top.getBox(), 0, 0, 640, 240); } public void testLayoutFixedWidthRightAlign() { top.getBoxConstraints().setWidth(new SizeValue("20px")); top.getBoxConstraints().setHorizontalAlign(HorizontalAlign.right); performLayout(); assertBox(top.getBox(), 620, 0, 20, 240); } public void testLayoutFixedWidthCenterAlign() { top.getBoxConstraints().setWidth(new SizeValue("20px")); top.getBoxConstraints().setHorizontalAlign(HorizontalAlign.center); performLayout(); assertBox(top.getBox(), 310, 0, 20, 240); } public void testLayoutWithPercentage() throws Exception { top.getBoxConstraints().setHeight(new SizeValue("25%")); bottom.getBoxConstraints().setHeight(new SizeValue("75%")); performLayout(); assertBox(top.getBox(), 0, 0, 640, 120); assertBox(bottom.getBox(), 0, 120, 640, 360); } public void testLayoutWithPaddingAllEqual() { root.getBoxConstraints().setPadding(new SizeValue("10px")); performLayout(); assertBox(top.getBox(), 10, 10, 620, 230); assertBox(bottom.getBox(), 10, 240, 620, 230); } public void testLayoutWithPaddingLeft() { root.getBoxConstraints().setPaddingLeft(new SizeValue("10px")); performLayout(); assertBox(top.getBox(), 10, 0, 630, 240); assertBox(bottom.getBox(), 10, 240, 630, 240); } public void testLayoutWithPaddingRight() { root.getBoxConstraints().setPaddingRight(new SizeValue("10px")); performLayout(); assertBox(top.getBox(), 0, 0, 630, 240); assertBox(bottom.getBox(), 0, 240, 630, 240); } public void testLayoutWithPaddingTop() { root.getBoxConstraints().setPaddingTop(new SizeValue("10px")); performLayout(); assertBox(top.getBox(), 0, 10, 640, 235); assertBox(bottom.getBox(), 0, 245, 640, 235); } public void testLayoutWithPaddingBottom() { root.getBoxConstraints().setPaddingBottom(new SizeValue("10px")); performLayout(); assertBox(top.getBox(), 0, 0, 640, 235); assertBox(bottom.getBox(), 0, 235, 640, 235); } private void performLayout() { layout.layoutElements(root, elements); } }
{ "content_hash": "ac19805a09be8771d1f617367b654e95", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 73, "avg_line_length": 32.233082706766915, "alnum_prop": 0.6769302542570562, "repo_name": "xranby/nifty-gui", "id": "8cd6e9633af9398386a66af7621e497050e321d8", "size": "4287", "binary": false, "copies": "1", "ref": "refs/heads/1.4", "path": "nifty-core/src/test/java/de/lessvoid/nifty/layout/manager/VerticalLayoutTest.java", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "F#", "bytes": "237" }, { "name": "Java", "bytes": "2672394" } ], "symlink_target": "" }
namespace message_center { // Exported values ///////////////////////////////////////////////////////////// // Square image sizes in pixels. MESSAGE_CENTER_EXPORT extern const int kNotificationButtonIconSize; MESSAGE_CENTER_EXPORT extern const int kNotificationIconSize; MESSAGE_CENTER_EXPORT extern const int kNotificationPreferredImageSize; MESSAGE_CENTER_EXPORT extern const int kSettingsIconSize; // Limits. MESSAGE_CENTER_EXPORT extern const size_t kMaxVisiblePopupNotifications; MESSAGE_CENTER_EXPORT extern const size_t kMaxVisibleMessageCenterNotifications; // Within a notification /////////////////////////////////////////////////////// // Pixel dimensions (H = horizontal, V = vertical). extern const int kControlButtonSize; // Square size of close & expand buttons. extern const int kNotificationWidth; // H size of the whole card. extern const int kIconToTextPadding; // H space between icon & title/message. extern const int kTextTopPadding; // V space between text elements. // Text sizes. extern const int kTitleFontSize; // For title only. extern const int kTitleLineHeight; // In pixels. extern const int kMessageFontSize; // For everything but title. extern const int kMessageLineHeight; // In pixels. // Colors. extern const SkColor kNotificationBackgroundColor; // Background of the card. extern const SkColor kLegacyIconBackgroundColor; // Used behind icons smaller. // than the icon view. extern const SkColor kRegularTextColor; // Title, message, ... extern const SkColor kFocusBorderColor; // The focus border. // Limits. extern const int kNotificationMaximumImageHeight; // For image notifications. extern const size_t kNotificationMaximumItems; // For list notifications. // Timing. extern const int kAutocloseDefaultDelaySeconds; extern const int kAutocloseHighPriorityDelaySeconds; // Buttons. const int kButtonHeight = 38; const int kButtonHorizontalPadding = 16; const int kButtonIconTopPadding = 11; const int kButtonIconToTitlePadding = 16; const SkColor kButtonSeparatorColor = SkColorSetRGB(234, 234, 234); const SkColor kHoveredButtonBackgroundColor = SkColorSetRGB(243, 243, 243); // Around notifications //////////////////////////////////////////////////////// // Pixel dimensions (H = horizontal, V = vertical). MESSAGE_CENTER_EXPORT extern const int kMarginBetweenItems; // H & V space // around & between // notifications. // Colors. extern const SkColor kBackgroundLightColor; // Behind notifications, gradient extern const SkColor kBackgroundDarkColor; // from light to dark. extern const SkColor kShadowColor; // Shadow in the tray. extern const SkColor kMessageCenterBackgroundColor; extern const SkColor kFooterDelimiterColor; // Separator color for the tray. extern const SkColor kFooterTextColor; // Text color for tray labels. } // namespace message_center #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_CONSTANTS_H_
{ "content_hash": "a1878b27a9feb921cfda3f5431f7d82d", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 80, "avg_line_length": 43.943661971830984, "alnum_prop": 0.691025641025641, "repo_name": "loopCM/chromium", "id": "fae5fd7a218f0385c0fc61969b189e32a8f285da", "size": "3533", "binary": false, "copies": "1", "ref": "refs/heads/trunk", "path": "ui/message_center/message_center_constants.h", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
title: Delete a Node with Two Children in a Binary Search Tree --- ## Delete a Node with Two Children in a Binary Search Tree This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/coding-interview-prep/data-structures/delete-a-node-with-two-children-in-a-binary-search-tree/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>. <a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>. <!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
{ "content_hash": "7d17b1470f694bb51f37bda88752db4c", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 269, "avg_line_length": 78.44444444444444, "alnum_prop": 0.7648725212464589, "repo_name": "otavioarc/freeCodeCamp", "id": "f160e6647e6b61b691bc3908be4b5d8085455739", "size": "710", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "guide/english/certifications/coding-interview-prep/data-structures/delete-a-node-with-two-children-in-a-binary-search-tree/index.md", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "35491" }, { "name": "HTML", "bytes": "17600" }, { "name": "JavaScript", "bytes": "777274" } ], "symlink_target": "" }
module TypeCheckSpec where import Control.Monad (forM_) import System.Directory import System.FilePath import Test.Tasty.Hspec import Parser (parseExpr, P(..)) import SpecHelper import TypeCheck (checkExpr) hasError :: Either a b -> Bool hasError (Left _) = True hasError (Right _) = False testCasesPath = "testsuite/tests/shouldnt_typecheck" tcSpec :: Spec tcSpec = do failingCases <- runIO (discoverTestCases testCasesPath) curr <- runIO (getCurrentDirectory) runIO (setCurrentDirectory $ curr </> testCasesPath) describe "Should fail to typecheck" $ forM_ failingCases (\(name, filePath) -> do do source <- runIO (readFile filePath) it ("should reject " ++ name) $ let ParseOk parsed = parseExpr source in checkExpr parsed >>= ((`shouldSatisfy` hasError))) runIO (setCurrentDirectory curr)
{ "content_hash": "1a012826b6e8b203d555a6594dd9c203", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 67, "avg_line_length": 24.942857142857143, "alnum_prop": 0.6918671248568156, "repo_name": "zhiyuanshi/fcore", "id": "d8e30218895fc083c59e02fe6ce6671e229d7af5", "size": "873", "binary": false, "copies": "2", "ref": "refs/heads/develop", "path": "testsuite/TypeCheckSpec.hs", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Haskell", "bytes": "496910" }, { "name": "Java", "bytes": "67475" }, { "name": "Logos", "bytes": "9460" }, { "name": "Makefile", "bytes": "1556" }, { "name": "Ruby", "bytes": "1944" }, { "name": "Shell", "bytes": "148" }, { "name": "Yacc", "bytes": "21267" } ], "symlink_target": "" }
import * as vscode from 'vscode'; import { EditorHighlights } from './highlights'; import { Navigation } from './navigation'; import { SymbolItemDragAndDrop, SymbolTreeInput } from './references-view'; import { ContextKey, isValidRequestPosition, WordAnchor } from './utils'; import * as nls from 'vscode-nls'; const localize = nls.loadMessageBundle(); export class SymbolsTree { readonly viewId = 'references-view.tree'; private readonly _ctxIsActive = new ContextKey<boolean>('reference-list.isActive'); private readonly _ctxHasResult = new ContextKey<boolean>('reference-list.hasResult'); private readonly _ctxInputSource = new ContextKey<string>('reference-list.source'); private readonly _history = new TreeInputHistory(this); private readonly _provider = new TreeDataProviderDelegate(); private readonly _dnd = new TreeDndDelegate(); private readonly _tree: vscode.TreeView<unknown>; private readonly _navigation: Navigation; private _input?: SymbolTreeInput<unknown>; private _sessionDisposable?: vscode.Disposable; constructor() { this._tree = vscode.window.createTreeView<unknown>(this.viewId, { treeDataProvider: this._provider, showCollapseAll: true, dragAndDropController: this._dnd }); this._navigation = new Navigation(this._tree); } dispose(): void { this._history.dispose(); this._tree.dispose(); this._sessionDisposable?.dispose(); } getInput(): SymbolTreeInput<unknown> | undefined { return this._input; } async setInput(input: SymbolTreeInput<unknown>) { if (!await isValidRequestPosition(input.location.uri, input.location.range.start)) { this.clearInput(); return; } this._ctxInputSource.set(input.contextValue); this._ctxIsActive.set(true); this._ctxHasResult.set(true); vscode.commands.executeCommand(`${this.viewId}.focus`); const newInputKind = !this._input || Object.getPrototypeOf(this._input) !== Object.getPrototypeOf(input); this._input = input; this._sessionDisposable?.dispose(); this._tree.title = input.title; this._tree.message = newInputKind ? undefined : this._tree.message; const modelPromise = Promise.resolve(input.resolve()); // set promise to tree data provider to trigger tree loading UI this._provider.update(modelPromise.then(model => model?.provider ?? this._history)); this._dnd.update(modelPromise.then(model => model?.dnd)); const model = await modelPromise; if (this._input !== input) { return; } if (!model) { this.clearInput(); return; } this._history.add(input); this._tree.message = model.message; // navigation this._navigation.update(model.navigation); // reveal & select const selection = model.navigation?.nearest(input.location.uri, input.location.range.start); if (selection && this._tree.visible) { await this._tree.reveal(selection, { select: true, focus: true, expand: true }); } const disposables: vscode.Disposable[] = []; // editor highlights let highlights: EditorHighlights<unknown> | undefined; if (model.highlights) { highlights = new EditorHighlights(this._tree, model.highlights); disposables.push(highlights); } // listener if (model.provider.onDidChangeTreeData) { disposables.push(model.provider.onDidChangeTreeData(() => { this._tree.title = input.title; this._tree.message = model.message; highlights?.update(); })); } if (typeof model.dispose === 'function') { disposables.push(new vscode.Disposable(() => model.dispose!())); } this._sessionDisposable = vscode.Disposable.from(...disposables); } clearInput(): void { this._sessionDisposable?.dispose(); this._input = undefined; this._ctxHasResult.set(false); this._ctxInputSource.reset(); this._tree.title = localize('title', 'References'); this._tree.message = this._history.size === 0 ? localize('noresult', 'No results.') : localize('noresult2', 'No results. Try running a previous search again:'); this._provider.update(Promise.resolve(this._history)); } } // --- tree data interface ActiveTreeDataProviderWrapper { provider: Promise<vscode.TreeDataProvider<any>>; } class TreeDataProviderDelegate implements vscode.TreeDataProvider<undefined> { provider?: Promise<vscode.TreeDataProvider<any>>; private _sessionDispoables?: vscode.Disposable; private _onDidChange = new vscode.EventEmitter<any>(); readonly onDidChangeTreeData = this._onDidChange.event; update(provider: Promise<vscode.TreeDataProvider<any>>) { this._sessionDispoables?.dispose(); this._sessionDispoables = undefined; this._onDidChange.fire(undefined); this.provider = provider; provider.then(value => { if (this.provider === provider && value.onDidChangeTreeData) { this._sessionDispoables = value.onDidChangeTreeData(this._onDidChange.fire, this._onDidChange); } }).catch(err => { this.provider = undefined; console.error(err); }); } async getTreeItem(element: unknown) { this._assertProvider(); return (await this.provider).getTreeItem(element); } async getChildren(parent?: unknown | undefined) { this._assertProvider(); return (await this.provider).getChildren(parent); } async getParent(element: unknown) { this._assertProvider(); const provider = await this.provider; return provider.getParent ? provider.getParent(element) : undefined; } private _assertProvider(): asserts this is ActiveTreeDataProviderWrapper { if (!this.provider) { throw new Error('MISSING provider'); } } } // --- tree dnd class TreeDndDelegate implements vscode.TreeDragAndDropController<undefined> { private _delegate: SymbolItemDragAndDrop<undefined> | undefined; readonly dropMimeTypes: string[] = []; readonly dragMimeTypes: string[] = ['text/uri-list']; update(delegate: Promise<SymbolItemDragAndDrop<unknown> | undefined>) { this._delegate = undefined; delegate.then(value => this._delegate = value); } handleDrag(source: undefined[], data: vscode.DataTransfer) { if (this._delegate) { const urls: string[] = []; for (const item of source) { const uri = this._delegate.getDragUri(item); if (uri) { urls.push(uri.toString()); } } if (urls.length > 0) { data.set('text/uri-list', new vscode.DataTransferItem(urls.join('\r\n'))); } } } handleDrop(): void | Thenable<void> { throw new Error('Method not implemented.'); } } // --- history class HistoryItem { readonly description: string; constructor( readonly key: string, readonly word: string, readonly anchor: WordAnchor, readonly input: SymbolTreeInput<unknown>, ) { this.description = `${vscode.workspace.asRelativePath(input.location.uri)} • ${input.title.toLocaleLowerCase()}`; } } class TreeInputHistory implements vscode.TreeDataProvider<HistoryItem>{ private readonly _onDidChangeTreeData = new vscode.EventEmitter<HistoryItem | undefined>(); readonly onDidChangeTreeData = this._onDidChangeTreeData.event; private readonly _disposables: vscode.Disposable[] = []; private readonly _ctxHasHistory = new ContextKey<boolean>('reference-list.hasHistory'); private readonly _inputs = new Map<string, HistoryItem>(); constructor(private readonly _tree: SymbolsTree) { this._disposables.push( vscode.commands.registerCommand('references-view.clear', () => _tree.clearInput()), vscode.commands.registerCommand('references-view.clearHistory', () => { this.clear(); _tree.clearInput(); }), vscode.commands.registerCommand('references-view.refind', (item) => { if (item instanceof HistoryItem) { this._reRunHistoryItem(item); } }), vscode.commands.registerCommand('references-view.refresh', () => { const item = Array.from(this._inputs.values()).pop(); if (item) { this._reRunHistoryItem(item); } }), vscode.commands.registerCommand('_references-view.showHistoryItem', async (item) => { if (item instanceof HistoryItem) { const position = item.anchor.guessedTrackedPosition() ?? item.input.location.range.start; return vscode.commands.executeCommand('vscode.open', item.input.location.uri, { selection: new vscode.Range(position, position) }); } }), vscode.commands.registerCommand('references-view.pickFromHistory', async () => { interface HistoryPick extends vscode.QuickPickItem { item: HistoryItem; } const entries = await this.getChildren(); const picks = entries.map(item => <HistoryPick>{ label: item.word, description: item.description, item }); const pick = await vscode.window.showQuickPick(picks, { placeHolder: localize('placeholder', 'Select previous reference search') }); if (pick) { this._reRunHistoryItem(pick.item); } }), ); } dispose(): void { vscode.Disposable.from(...this._disposables).dispose(); this._onDidChangeTreeData.dispose(); } private _reRunHistoryItem(item: HistoryItem): void { this._inputs.delete(item.key); const newPosition = item.anchor.guessedTrackedPosition(); let newInput = item.input; // create a new input when having a tracked position which is // different than the original position. if (newPosition && !item.input.location.range.start.isEqual(newPosition)) { newInput = item.input.with(new vscode.Location(item.input.location.uri, newPosition)); } this._tree.setInput(newInput); } async add(input: SymbolTreeInput<unknown>) { const doc = await vscode.workspace.openTextDocument(input.location.uri); const anchor = new WordAnchor(doc, input.location.range.start); const range = doc.getWordRangeAtPosition(input.location.range.start) ?? doc.getWordRangeAtPosition(input.location.range.start, /[^\s]+/); const word = range ? doc.getText(range) : '???'; const item = new HistoryItem(JSON.stringify([range?.start ?? input.location.range.start, input.location.uri, input.title]), word, anchor, input); // use filo-ordering of native maps this._inputs.delete(item.key); this._inputs.set(item.key, item); this._ctxHasHistory.set(true); } clear(): void { this._inputs.clear(); this._ctxHasHistory.set(false); this._onDidChangeTreeData.fire(undefined); } get size() { return this._inputs.size; } // --- tree data provider getTreeItem(item: HistoryItem): vscode.TreeItem { const result = new vscode.TreeItem(item.word); result.description = item.description; result.command = { command: '_references-view.showHistoryItem', arguments: [item], title: localize('title.rerun', 'Rerun') }; result.collapsibleState = vscode.TreeItemCollapsibleState.None; result.contextValue = 'history-item'; return result; } getChildren() { return Promise.all([...this._inputs.values()].reverse()); } getParent() { return undefined; } }
{ "content_hash": "31b02862c30455e76ebdcdbf3b821733", "timestamp": "", "source": "github", "line_count": 351, "max_line_length": 147, "avg_line_length": 30.527065527065528, "alnum_prop": 0.710032664489034, "repo_name": "eamodio/vscode", "id": "b46db07c9ba8405ea9b7fcaddcc1f24649d09bbf", "size": "11068", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "extensions/references-view/src/tree.ts", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "19196" }, { "name": "C", "bytes": "818" }, { "name": "C#", "bytes": "709" }, { "name": "C++", "bytes": "2745" }, { "name": "CSS", "bytes": "620323" }, { "name": "Clojure", "bytes": "1206" }, { "name": "CoffeeScript", "bytes": "590" }, { "name": "Cuda", "bytes": "3634" }, { "name": "Dart", "bytes": "324" }, { "name": "Dockerfile", "bytes": "475" }, { "name": "F#", "bytes": "634" }, { "name": "Go", "bytes": "652" }, { "name": "Groovy", "bytes": "3928" }, { "name": "HLSL", "bytes": "184" }, { "name": "HTML", "bytes": "380999" }, { "name": "Hack", "bytes": "16" }, { "name": "Handlebars", "bytes": "1064" }, { "name": "Inno Setup", "bytes": "304239" }, { "name": "Java", "bytes": "599" }, { "name": "JavaScript", "bytes": "1413253" }, { "name": "Julia", "bytes": "940" }, { "name": "Jupyter Notebook", "bytes": "929" }, { "name": "Less", "bytes": "1029" }, { "name": "Lua", "bytes": "252" }, { "name": "Makefile", "bytes": "2252" }, { "name": "Objective-C", "bytes": "1387" }, { "name": "Objective-C++", "bytes": "1387" }, { "name": "PHP", "bytes": "998" }, { "name": "Perl", "bytes": "1922" }, { "name": "PowerShell", "bytes": "12409" }, { "name": "Pug", "bytes": "654" }, { "name": "Python", "bytes": "2405" }, { "name": "R", "bytes": "362" }, { "name": "Roff", "bytes": "351" }, { "name": "Ruby", "bytes": "1703" }, { "name": "Rust", "bytes": "532" }, { "name": "SCSS", "bytes": "6732" }, { "name": "ShaderLab", "bytes": "330" }, { "name": "Shell", "bytes": "57256" }, { "name": "Swift", "bytes": "284" }, { "name": "TeX", "bytes": "1602" }, { "name": "TypeScript", "bytes": "41954506" }, { "name": "Visual Basic .NET", "bytes": "893" } ], "symlink_target": "" }
<?php namespace Symfony\Bundle\WebProfilerBundle\Controller; use Symfony\Bundle\FullStack; use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler; use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector; use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Profiler\Profiler; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Twig\Environment; /** * @author Fabien Potencier <[email protected]> * * @internal */ class ProfilerController { private $templateManager; private $generator; private $profiler; private $twig; private $templates; private $cspHandler; private $baseDir; public function __construct(UrlGeneratorInterface $generator, Profiler $profiler = null, Environment $twig, array $templates, ContentSecurityPolicyHandler $cspHandler = null, string $baseDir = null) { $this->generator = $generator; $this->profiler = $profiler; $this->twig = $twig; $this->templates = $templates; $this->cspHandler = $cspHandler; $this->baseDir = $baseDir; } /** * Redirects to the last profiles. * * @throws NotFoundHttpException */ public function homeAction(): RedirectResponse { $this->denyAccessIfProfilerDisabled(); return new RedirectResponse($this->generator->generate('_profiler_search_results', ['token' => 'empty', 'limit' => 10]), 302, ['Content-Type' => 'text/html']); } /** * Renders a profiler panel for the given token. * * @throws NotFoundHttpException */ public function panelAction(Request $request, string $token): Response { $this->denyAccessIfProfilerDisabled(); $this->cspHandler?->disableCsp(); $panel = $request->query->get('panel'); $page = $request->query->get('page', 'home'); if ('latest' === $token && $latest = current($this->profiler->find(null, null, 1, null, null, null))) { $token = $latest['token']; } if (!$profile = $this->profiler->loadProfile($token)) { return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', ['about' => 'no_token', 'token' => $token, 'request' => $request]), 200, ['Content-Type' => 'text/html']); } if (null === $panel) { $panel = 'request'; foreach ($profile->getCollectors() as $collector) { if ($collector instanceof ExceptionDataCollector && $collector->hasException()) { $panel = $collector->getName(); break; } if ($collector instanceof DumpDataCollector && $collector->getDumpsCount() > 0) { $panel = $collector->getName(); } } } if (!$profile->hasCollector($panel)) { throw new NotFoundHttpException(sprintf('Panel "%s" is not available for token "%s".', $panel, $token)); } return new Response($this->twig->render($this->getTemplateManager()->getName($profile, $panel), [ 'token' => $token, 'profile' => $profile, 'collector' => $profile->getCollector($panel), 'panel' => $panel, 'page' => $page, 'request' => $request, 'templates' => $this->getTemplateManager()->getNames($profile), 'is_ajax' => $request->isXmlHttpRequest(), 'profiler_markup_version' => 2, // 1 = original profiler, 2 = Symfony 2.8+ profiler ]), 200, ['Content-Type' => 'text/html']); } /** * Renders the Web Debug Toolbar. * * @throws NotFoundHttpException */ public function toolbarAction(Request $request, string $token = null): Response { if (null === $this->profiler) { throw new NotFoundHttpException('The profiler must be enabled.'); } if ($request->hasSession() && ($session = $request->getSession())->isStarted() && $session->getFlashBag() instanceof AutoExpireFlashBag) { // keep current flashes for one more request if using AutoExpireFlashBag $session->getFlashBag()->setAll($session->getFlashBag()->peekAll()); } if ('empty' === $token || null === $token) { return new Response('', 200, ['Content-Type' => 'text/html']); } $this->profiler->disable(); if (!$profile = $this->profiler->loadProfile($token)) { return new Response('', 404, ['Content-Type' => 'text/html']); } $url = null; try { $url = $this->generator->generate('_profiler', ['token' => $token], UrlGeneratorInterface::ABSOLUTE_URL); } catch (\Exception $e) { // the profiler is not enabled } return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/toolbar.html.twig', [ 'full_stack' => class_exists(FullStack::class), 'request' => $request, 'profile' => $profile, 'templates' => $this->getTemplateManager()->getNames($profile), 'profiler_url' => $url, 'token' => $token, 'profiler_markup_version' => 2, // 1 = original toolbar, 2 = Symfony 2.8+ toolbar ]); } /** * Renders the profiler search bar. * * @throws NotFoundHttpException */ public function searchBarAction(Request $request): Response { $this->denyAccessIfProfilerDisabled(); $this->cspHandler?->disableCsp(); if (!$request->hasSession()) { $ip = $method = $statusCode = $url = $start = $end = $limit = $token = null; } else { $session = $request->getSession(); $ip = $request->query->get('ip', $session->get('_profiler_search_ip')); $method = $request->query->get('method', $session->get('_profiler_search_method')); $statusCode = $request->query->get('status_code', $session->get('_profiler_search_status_code')); $url = $request->query->get('url', $session->get('_profiler_search_url')); $start = $request->query->get('start', $session->get('_profiler_search_start')); $end = $request->query->get('end', $session->get('_profiler_search_end')); $limit = $request->query->get('limit', $session->get('_profiler_search_limit')); $token = $request->query->get('token', $session->get('_profiler_search_token')); } return new Response( $this->twig->render('@WebProfiler/Profiler/search.html.twig', [ 'token' => $token, 'ip' => $ip, 'method' => $method, 'status_code' => $statusCode, 'url' => $url, 'start' => $start, 'end' => $end, 'limit' => $limit, 'request' => $request, ]), 200, ['Content-Type' => 'text/html'] ); } /** * Renders the search results. * * @throws NotFoundHttpException */ public function searchResultsAction(Request $request, string $token): Response { $this->denyAccessIfProfilerDisabled(); $this->cspHandler?->disableCsp(); $profile = $this->profiler->loadProfile($token); $ip = $request->query->get('ip'); $method = $request->query->get('method'); $statusCode = $request->query->get('status_code'); $url = $request->query->get('url'); $start = $request->query->get('start', null); $end = $request->query->get('end', null); $limit = $request->query->get('limit'); return new Response($this->twig->render('@WebProfiler/Profiler/results.html.twig', [ 'request' => $request, 'token' => $token, 'profile' => $profile, 'tokens' => $this->profiler->find($ip, $url, $limit, $method, $start, $end, $statusCode), 'ip' => $ip, 'method' => $method, 'status_code' => $statusCode, 'url' => $url, 'start' => $start, 'end' => $end, 'limit' => $limit, 'panel' => null, ]), 200, ['Content-Type' => 'text/html']); } /** * Narrows the search bar. * * @throws NotFoundHttpException */ public function searchAction(Request $request): Response { $this->denyAccessIfProfilerDisabled(); $ip = $request->query->get('ip'); $method = $request->query->get('method'); $statusCode = $request->query->get('status_code'); $url = $request->query->get('url'); $start = $request->query->get('start', null); $end = $request->query->get('end', null); $limit = $request->query->get('limit'); $token = $request->query->get('token'); if ($request->hasSession()) { $session = $request->getSession(); $session->set('_profiler_search_ip', $ip); $session->set('_profiler_search_method', $method); $session->set('_profiler_search_status_code', $statusCode); $session->set('_profiler_search_url', $url); $session->set('_profiler_search_start', $start); $session->set('_profiler_search_end', $end); $session->set('_profiler_search_limit', $limit); $session->set('_profiler_search_token', $token); } if (!empty($token)) { return new RedirectResponse($this->generator->generate('_profiler', ['token' => $token]), 302, ['Content-Type' => 'text/html']); } $tokens = $this->profiler->find($ip, $url, $limit, $method, $start, $end, $statusCode); return new RedirectResponse($this->generator->generate('_profiler_search_results', [ 'token' => $tokens ? $tokens[0]['token'] : 'empty', 'ip' => $ip, 'method' => $method, 'status_code' => $statusCode, 'url' => $url, 'start' => $start, 'end' => $end, 'limit' => $limit, ]), 302, ['Content-Type' => 'text/html']); } /** * Displays the PHP info. * * @throws NotFoundHttpException */ public function phpinfoAction(): Response { $this->denyAccessIfProfilerDisabled(); $this->cspHandler?->disableCsp(); ob_start(); phpinfo(); $phpinfo = ob_get_clean(); return new Response($phpinfo, 200, ['Content-Type' => 'text/html']); } /** * Displays the Xdebug info. * * @throws NotFoundHttpException */ public function xdebugAction(): Response { $this->denyAccessIfProfilerDisabled(); if (!\function_exists('xdebug_info')) { throw new NotFoundHttpException('Xdebug must be installed in version 3.'); } $this->cspHandler?->disableCsp(); ob_start(); xdebug_info(); $xdebugInfo = ob_get_clean(); return new Response($xdebugInfo, 200, ['Content-Type' => 'text/html']); } /** * Displays the source of a file. * * @throws NotFoundHttpException */ public function openAction(Request $request): Response { if (null === $this->baseDir) { throw new NotFoundHttpException('The base dir should be set.'); } $this->profiler?->disable(); $file = $request->query->get('file'); $line = $request->query->get('line'); $filename = $this->baseDir.\DIRECTORY_SEPARATOR.$file; if (preg_match("'(^|[/\\\\])\.'", $file) || !is_readable($filename)) { throw new NotFoundHttpException(sprintf('The file "%s" cannot be opened.', $file)); } return new Response($this->twig->render('@WebProfiler/Profiler/open.html.twig', [ 'filename' => $filename, 'file' => $file, 'line' => $line, ]), 200, ['Content-Type' => 'text/html']); } protected function getTemplateManager(): TemplateManager { if (null === $this->templateManager) { $this->templateManager = new TemplateManager($this->profiler, $this->twig, $this->templates); } return $this->templateManager; } private function denyAccessIfProfilerDisabled() { if (null === $this->profiler) { throw new NotFoundHttpException('The profiler must be enabled.'); } $this->profiler->disable(); } private function renderWithCspNonces(Request $request, string $template, array $variables, int $code = 200, array $headers = ['Content-Type' => 'text/html']): Response { $response = new Response('', $code, $headers); $nonces = $this->cspHandler ? $this->cspHandler->getNonces($request, $response) : []; $variables['csp_script_nonce'] = $nonces['csp_script_nonce'] ?? null; $variables['csp_style_nonce'] = $nonces['csp_style_nonce'] ?? null; $response->setContent($this->twig->render($template, $variables)); return $response; } }
{ "content_hash": "14c407b4983c2c7f9220cbcdd3df020d", "timestamp": "", "source": "github", "line_count": 393, "max_line_length": 202, "avg_line_length": 34.69211195928753, "alnum_prop": 0.5564031098723778, "repo_name": "hhamon/symfony", "id": "6b73f21ec2b41608cd9203bb4e17e595a77eee6a", "size": "13863", "binary": false, "copies": "5", "ref": "refs/heads/6.1", "path": "src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "49788" }, { "name": "HTML", "bytes": "16735" }, { "name": "Hack", "bytes": "26" }, { "name": "JavaScript", "bytes": "29541" }, { "name": "PHP", "bytes": "37631410" }, { "name": "Shell", "bytes": "6529" }, { "name": "Twig", "bytes": "398842" } ], "symlink_target": "" }
FROM balenalib/aio-3288c-ubuntu:xenial-run # A few reasons for installing distribution-provided OpenJDK: # # 1. Oracle. Licensing prevents us from redistributing the official JDK. # # 2. Compiling OpenJDK also requires the JDK to be installed, and it gets # really hairy. # # For some sample build times, see Debian's buildd logs: # https://buildd.debian.org/status/logs.php?pkg=openjdk-7 # Default to UTF-8 file.encoding ENV LANG C.UTF-8 # add a simple script that can auto-detect the appropriate JAVA_HOME value # based on whether the JDK or only the JRE is installed RUN { \ echo '#!/bin/sh'; \ echo 'set -e'; \ echo; \ echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \ } > /usr/local/bin/docker-java-home \ && chmod +x /usr/local/bin/docker-java-home # do some fancy footwork to create a JAVA_HOME that's cross-architecture-safe RUN ln -svT "/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)" /docker-java-home ENV JAVA_HOME /docker-java-home RUN set -ex; \ \ # deal with slim variants not having man page directories (which causes "update-alternatives" to fail) if [ ! -d /usr/share/man/man1 ]; then \ mkdir -p /usr/share/man/man1; \ fi; \ \ apt-get update; \ apt-get install -y --no-install-recommends \ software-properties-common \ ; \ add-apt-repository ppa:openjdk-r/ppa; \ apt-get update; \ apt-get install -y --no-install-recommends \ openjdk-8-jre \ ; \ rm -rf /var/lib/apt/lists/*; \ \ # verify that "docker-java-home" returns what we expect [ "$(readlink -f "$JAVA_HOME")" = "$(docker-java-home)" ]; \ \ # update-alternatives so that future installs of other OpenJDK versions don't change /usr/bin/java update-alternatives --get-selections | awk -v home="$(readlink -f "$JAVA_HOME")" 'index($3, home) == 1 { $2 = "manual"; print | "update-alternatives --set-selections" }'; \ # ... and verify that it actually worked for one of the alternatives we care about update-alternatives --query java | grep -q 'Status: manual' CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"] RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Ubuntu xenial \nVariant: run variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nOpenJDK v8-jre \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \ && chmod +x /bin/sh-shim \ && cp /bin/sh /bin/sh.real \ && mv /bin/sh-shim /bin/sh
{ "content_hash": "8d2c94d89b9a871fe724a2b5dc99d9f6", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 676, "avg_line_length": 48.80952380952381, "alnum_prop": 0.7017886178861789, "repo_name": "nghiant2710/base-images", "id": "30f618450a9e5f965cc283771655e6e8e1d317ec", "size": "3096", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "balena-base-images/openjdk/aio-3288c/ubuntu/xenial/8-jre/run/Dockerfile", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "144558581" }, { "name": "JavaScript", "bytes": "16316" }, { "name": "Shell", "bytes": "368690" } ], "symlink_target": "" }
static const double precision = 1.0e-6; @interface CPTLayerTests() -(void)testPositionsWithScale:(CGFloat)scale anchorPoint:(CGPoint)anchor expected:(CPTNumberArray *)expected; @end #pragma mark - @implementation CPTLayerTests @synthesize layer; @synthesize positions; #pragma mark - #pragma mark Setup -(void)setUp { // starting layer positions for each test self.positions = @[@10.49999, @10.5, @10.50001, @10.99999, @11.0, @11.00001]; CPTLayer *newLayer = [[CPTLayer alloc] initWithFrame:CPTRectMake(0.0, 0.0, 99.0, 99.0)]; self.layer = newLayer; } -(void)tearDown { } #pragma mark - Pixel alignment @1x -(void)testPixelAlign1xLeft { CPTNumberArray *expected = @[@10.0, @10.0, @11.0, @11.0, @11.0, @11.0]; [self testPositionsWithScale:CPTFloat(1.0) anchorPoint:CGPointZero expected:expected]; } -(void)testPixelAlign1xLeftMiddle { CPTNumberArray *expected = @[@10.75, @10.75, @10.75, @10.75, @10.75, @10.75]; [self testPositionsWithScale:CPTFloat(1.0) anchorPoint:CPTPointMake(0.25, 0.25) expected:expected]; } -(void)testPixelAlign1xMiddle { CPTNumberArray *expected = @[@10.5, @10.5, @10.5, @10.5, @10.5, @11.5]; [self testPositionsWithScale:CPTFloat(1.0) anchorPoint:CPTPointMake(0.5, 0.5) expected:expected]; } -(void)testPixelAlign1xRightMiddle { CPTNumberArray *expected = @[@10.25, @10.25, @10.25, @11.25, @11.25, @11.25]; [self testPositionsWithScale:CPTFloat(1.0) anchorPoint:CPTPointMake(0.75, 0.75) expected:expected]; } -(void)testPixelAlign1xRight { CPTNumberArray *expected = @[@10.0, @10.0, @11.0, @11.0, @11.0, @11.0]; [self testPositionsWithScale:CPTFloat(1.0) anchorPoint:CPTPointMake(1.0, 1.0) expected:expected]; } #pragma mark - Pixel alignment @2x -(void)testPixelAlign2xLeft { CPTNumberArray *expected = @[@10.5, @10.5, @10.5, @11.0, @11.0, @11.0]; [self testPositionsWithScale:CPTFloat(2.0) anchorPoint:CGPointZero expected:expected]; } -(void)testPixelAlign2xLeftMiddle { CPTNumberArray *expected = @[@10.25, @10.25, @10.75, @10.75, @10.75, @11.25]; [self testPositionsWithScale:CPTFloat(2.0) anchorPoint:CPTPointMake(0.25, 0.25) expected:expected]; } -(void)testPixelAlign2xMiddle { CPTNumberArray *expected = @[@10.5, @10.5, @10.5, @11.0, @11.0, @11.0]; [self testPositionsWithScale:CPTFloat(2.0) anchorPoint:CPTPointMake(0.5, 0.5) expected:expected]; } -(void)testPixelAlign2xRightMiddle { CPTNumberArray *expected = @[@10.25, @10.25, @10.75, @10.75, @10.75, @11.25]; [self testPositionsWithScale:CPTFloat(2.0) anchorPoint:CPTPointMake(0.75, 0.75) expected:expected]; } -(void)testPixelAlign2xRight { CPTNumberArray *expected = @[@10.5, @10.5, @10.5, @11.0, @11.0, @11.0]; [self testPositionsWithScale:CPTFloat(2.0) anchorPoint:CPTPointMake(1.0, 1.0) expected:expected]; } #pragma mark - Utility methods -(void)testPositionsWithScale:(CGFloat)scale anchorPoint:(CGPoint)anchor expected:(CPTNumberArray *)expectedValues { NSUInteger positionCount = self.positions.count; NSParameterAssert(expectedValues.count == positionCount); self.layer.contentsScale = scale; self.layer.anchorPoint = anchor; for ( NSUInteger i = 0; i < positionCount; i++ ) { CGFloat position = ( (NSNumber *)( (self.positions)[i] ) ).cgFloatValue; CGPoint layerPosition = CGPointMake(position, position); self.layer.position = layerPosition; [self.layer pixelAlign]; CGPoint alignedPoint = self.layer.position; CGFloat expected = ( (NSNumber *)(expectedValues[i]) ).cgFloatValue; NSString *errMessage; errMessage = [NSString stringWithFormat:@"pixelAlign at x = %g with scale %g and anchor %@", position, scale, CPTStringFromPoint(anchor)]; XCTAssertEqualWithAccuracy(alignedPoint.x, expected, precision, @"%@", errMessage); errMessage = [NSString stringWithFormat:@"pixelAlign at y = %g with scale %g and anchor %@", position, scale, CPTStringFromPoint(anchor)]; XCTAssertEqualWithAccuracy(alignedPoint.y, expected, precision, @"%@", errMessage); } } @end
{ "content_hash": "3e2328ff682e25eeee33213aa69ebb01", "timestamp": "", "source": "github", "line_count": 157, "max_line_length": 146, "avg_line_length": 29.11464968152866, "alnum_prop": 0.622839641216364, "repo_name": "voelkerb/iHouse", "id": "ad279c43cfc5ce870b14f676ea2c244e07ca0f88", "size": "4676", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "iHouse/iHouse/Other Sources/core-plot-master/framework/Source/CPTLayerTests.m", "mode": "33261", "license": "mit", "language": [ { "name": "Arduino", "bytes": "61927" }, { "name": "C", "bytes": "111145" }, { "name": "C++", "bytes": "115906" }, { "name": "DTrace", "bytes": "692" }, { "name": "Objective-C", "bytes": "6540399" }, { "name": "Objective-C++", "bytes": "11630" }, { "name": "Python", "bytes": "23800" }, { "name": "Ruby", "bytes": "8366" }, { "name": "Shell", "bytes": "1262" }, { "name": "Swift", "bytes": "39025" } ], "symlink_target": "" }
<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Dcoin</source> <translation>در مورد Dcoin</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;Dcoin&lt;/b&gt; version</source> <translation>نسخه Dcoin</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>⏎ ⏎ این نسخه نرم افزار آزمایشی است⏎ ⏎ نرم افزار تحت لیسانس MIT/X11 منتشر شده است. به فایل coping یا آدرس http://www.opensource.org/licenses/mit-license.php. مراجعه شود⏎ ⏎ این محصول شامل نرم افزاری است که با OpenSSL برای استفاده از OpenSSL Toolkit (http://www.openssl.org/) و نرم افزار نوشته شده توسط اریک یانگ ([email protected] ) و UPnP توسط توماس برنارد طراحی شده است.</translation> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The Dcoin developers</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>فهرست آدرس</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>برای ویرایش آدرس یا بر چسب دو بار کلیک کنید</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>آدرس جدید ایجاد کنید</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دار کپی کنید</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>آدرس جدید</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your Dcoin 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>این آدرسها، آدرسهای dcoin شما برای دریافت وجوه هستند. شما ممکن است آدرسهای متفاوت را به هر گیرنده اختصاص دهید که بتوانید مواردی که پرداخت می کنید را پیگیری نمایید</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>کپی آدرس</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>نمایش &amp;کد QR</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a Dcoin address</source> <translation>پیام را برای اثبات آدرس Dcoin خود امضا کنید</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>امضا و پیام</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دا حذف</translation> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation>داده ها نوارِ جاری را به فایل انتقال دهید</translation> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified Dcoin address</source> <translation>یک پیام را برای حصول اطمینان از ورود به سیستم با آدرس dcoin مشخص، شناسایی کنید</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>شناسایی پیام</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>حذف</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your Dcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation>کپی و برچسب گذاری</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>ویرایش</translation> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation type="unfinished"/> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دار کپی کنید</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma separated file (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>خطای صدور</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>تا فایل %1 نمی شود نوشت</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>بر چسب</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>آدرس</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>بدون برچسب</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>دیالوگ Passphrase </translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>وارد عبارت عبور</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>عبارت عبور نو</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>تکرار عبارت عبور نو</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>وارد کنید..&amp;lt;br/&amp;gt عبارت عبور نو در پنجره 10 یا بیشتر کاراکتورهای تصادفی استفاده کنید &amp;lt;b&amp;gt لطفا عبارت عبور</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>رمز بندی پنجره</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>این عملیت نیاز عبارت عبور پنجره شما دارد برای رمز گشایی آن</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>تکرار عبارت عبور نو</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>این عملیت نیاز عبارت عبور شما دارد برای رمز بندی آن</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>رمز بندی پنجره</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>تغییر عبارت عبور</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>عبارت عبور نو و قدیم در پنجره وارد کنید</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>تایید رمز گذاری</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DCOINS&lt;/b&gt;!</source> <translation>هشدار: اگر wallet رمزگذاری شود و شما passphrase را گم کنید شما همه اطلاعات dcoin را از دست خواهید داد.</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>آیا اطمینان دارید که می خواهید wallet رمزگذاری شود؟</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 type="unfinished"/> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>هشدار: Caps lock key روشن است</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>تغییر عبارت عبور</translation> </message> <message> <location line="-56"/> <source>Dcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dcoins from being stolen by malware infecting your computer.</source> <translation>Biticon هم اکنون بسته می‌شود تا فرایند رمزگذاری را تمام کند. به خاطر داشته باشید که رمزگذاری کیف پولتان نمی‌تواند به طور کامل بیتیکون‌های شما را در برابر دزدیده شدن توسط بدافزارهایی که رایانه شما را آلوده می‌کنند، محافظت نماید.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>عبارت عبور نو و قدیم در پنجره وارد کنید</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>تنا موفق رمز بندی پنجره ناشی از خطای داخل شد. پنجره شما مرز بندی نشده است</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>عبارت عبور عرضه تطابق نشد</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>نجره رمز گذار شد</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>اموفق رمز بندی پنجر</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>ناموفق رمز بندی پنجره</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>wallet passphrase با موفقیت تغییر یافت</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>امضا و پیام</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>همگام سازی با شبکه ...</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>بررسی اجمالی</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>نمای کلی پنجره نشان بده</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;معاملات</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>نمایش تاریخ معاملات</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>ویرایش لیست آدرسها و بر چسب های ذخیره ای</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>نمایش لیست آدرس ها برای در یافت پر داخت ها</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>خروج</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>خروج از برنامه </translation> </message> <message> <location line="+4"/> <source>Show information about Dcoin</source> <translation>نمایش اطلاعات در مورد بیتکویین</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>درباره &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>نمایش اطلاعات درباره Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>تنظیمات...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>رمزگذاری wallet</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>پشتیبان گیری از wallet</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>تغییر Passphrase</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-347"/> <source>Send coins to a Dcoin address</source> <translation>سکه ها را به آدرس bitocin ارسال کن</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for Dcoin</source> <translation>انتخابهای پیکربندی را برای dcoin اصلاح کن</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>نسخه پیشتیبان wallet را به محل دیگر انتقال دهید</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>عبارت عبور رمز گشایی پنجره تغییر کنید</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>اشکال زدایی از صفحه</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>کنسول اشکال زدایی و تشخیص را باز کنید</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>بازبینی پیام</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>Dcoin</source> <translation>یت کویین </translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>wallet</translation> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>&amp;About Dcoin</source> <translation>در مورد dcoin</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>&amp;نمایش/ عدم نمایش</translation> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign messages with your Dcoin addresses to prove you own them</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified Dcoin addresses</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>فایل</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>تنظیمات</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>کمک</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>نوار ابزار زبانه ها</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>آزمایش شبکه</translation> </message> <message> <location line="+47"/> <source>Dcoin client</source> <translation>مشتری Dcoin</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to Dcoin network</source> <translation><numerusform>در صد ارتباطات فعال بیتکویین با شبکه %n</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>تا تاریخ</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>ابتلا به بالا</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>هزینه تراکنش را تایید کنید</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>معامله ارسال شده</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>معامله در یافت شده</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>تاریخ %1 مبلغ%2 نوع %3 آدرس %4</translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation>مدیریت URI</translation> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid Dcoin address or malformed URI parameters.</source> <translation>URI قابل تحلیل نیست. این خطا ممکن است به دلیل ادرس DCOIN اشتباه یا پارامترهای اشتباه URI رخ داده باشد</translation> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>زمایش شبکهه</translation> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>زمایش شبکه</translation> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. Dcoin can no longer continue safely and will quit.</source> <translation>خطا روی داده است. Dcoin نمی تواند بدون مشکل ادامه دهد و باید بسته شود</translation> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>پیام شبکه</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>اصلاح آدرس</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>بر چسب</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>بر چسب با دفتر آدرس ورود مرتبط است</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>آدرس</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>آدرس با دفتر آدرس ورودی مرتبط است. این فقط در مورد آدرسهای ارسال شده است</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>آدرس در یافت نو</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>آدرس ارسال نو</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>اصلاح آدرس در یافت</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>اصلاح آدرس ارسال</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>%1آدرس وارد شده دیگر در دفتر آدرس است</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid Dcoin address.</source> <translation>آدرس وارد شده %1 یک ادرس صحیح dcoin نیست</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>رمز گشایی پنجره امکان پذیر نیست</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>کلید نسل جدید ناموفق است</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>Dcoin-Qt</source> <translation>Dcoin-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>نسخه</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>ستفاده :</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>انتخابها برای خطوط دستور command line</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>انتخابهای UI </translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>زبان را تنظیم کنید برای مثال &quot;de_DE&quot; (پیش فرض: system locale)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>شروع حد اقل</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>نمایش صفحه splash در STARTUP (پیش فرض:1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>اصلی</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>اصلی</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 type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>دستمزد&amp;پر داخت معامله</translation> </message> <message> <location line="+31"/> <source>Automatically start Dcoin after logging in to the system.</source> <translation>در زمان ورود به سیستم به صورت خودکار dcoin را اجرا کن</translation> </message> <message> <location line="+3"/> <source>&amp;Start Dcoin on system login</source> <translation>اجرای dcoin در زمان ورود به سیستم</translation> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation>شبکه</translation> </message> <message> <location line="+6"/> <source>Automatically open the Dcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>اتوماتیک باز کردن بندر بیتکویین در روتر . این فقط در مواردی می باشد که روتر با کمک یو پ ن پ کار می کند</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>درگاه با استفاده از</translation> </message> <message> <location line="+7"/> <source>Connect to the Dcoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>اتصال به شبکه DCOIN از طریق پراکسی ساکس (برای مثال وقتی از طریق نرم افزار TOR متصل می شوید)</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>اتصال با پراکسی SOCKS</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>پراکسی و آی.پی.</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>درس پروکسی</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>درگاه</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>درگاه پراکسی (مثال 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS و نسخه</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>نسخه SOCKS از پراکسی (مثال 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>صفحه</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>tray icon را تنها بعد از کوچک کردن صفحه نمایش بده</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>حد اقل رساندن در جای نوار ابزار ها</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>حد اقل رساندن در جای خروج بر نامه وقتیکه پنجره بسته است.وقتیکه این فعال است برنامه خاموش می شود بعد از انتخاب دستور خاموش در منیو</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>کوچک کردن صفحه در زمان بستن</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>نمایش</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>میانجی کاربر و زبان</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting Dcoin.</source> <translation>زبان میانجی کاربر می تواند در اینجا تنظیم شود. این تنظیمات بعد از شروع دوباره RESTART در DCOIN اجرایی خواهند بود.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>واحد برای نمایش میزان وجوه در:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>بخش فرعی پیش فرض را برای نمایش میانجی و زمان ارسال سکه ها مشخص و انتخاب نمایید</translation> </message> <message> <location line="+9"/> <source>Whether to show Dcoin addresses in the transaction list or not.</source> <translation>تا آدرسهای bITCOIN در فهرست تراکنش نمایش داده شوند یا نشوند.</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>نمایش آدرسها در فهرست تراکنش</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>تایید</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>رد</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>انجام</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>پیش فرض</translation> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation>هشدار</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting Dcoin.</source> <translation>این تنظیمات پس از اجرای دوباره Dcoin اعمال می شوند</translation> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>آدرس پراکسی داده شده صحیح نیست</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>تراز</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dcoin network after a connection is established, but this process has not completed yet.</source> <translation>اطلاعات نمایش داده شده روزآمد نیستند.wallet شما به صورت خودکار با شبکه dcoin بعد از برقراری اتصال روزآمد می شود اما این فرایند هنوز کامل نشده است.</translation> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>راز:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>تایید نشده</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>wallet</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>نابالغ</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>بالانس/تتمه حساب استخراج شده، نابالغ است /تکمیل نشده است</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>اخرین معاملات&amp;lt</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>تزار جاری شما</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>تعداد معاملات که تایید شده ولی هنوز در تزار جاری شما بر شمار نرفته است</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation>روزآمد نشده</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start dcoin: click-to-pay handler</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation>دیالوگ QR CODE</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>درخواست پرداخت</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>مقدار:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>برچسب:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>پیام</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>&amp;ذخیره به عنوان...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>خطا در زمان رمزدار کردن URI در کد QR</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>میزان وجه وارد شده صحیح نیست، لطفا بررسی نمایید</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>URI ذکر شده بسیار طولانی است، متن برچسب/پیام را کوتاه کنید</translation> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>ذخیره کد QR</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>تصاویر با فرمت PNG (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>نام مشتری</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>-</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>نسخه مشتری</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>اطلاعات</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>استفاده از نسخه OPENSSL</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>زمان آغاز STARTUP</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>شبکه</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>تعداد اتصالات</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>در testnetکها</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>زنجیره بلاک</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>تعداد کنونی بلاکها</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>تعداد تخمینی بلاکها</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>زمان آخرین بلاک</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>باز کردن</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>گزینه های command-line</translation> </message> <message> <location line="+7"/> <source>Show the Dcoin-Qt help message to get a list with possible Dcoin command-line options.</source> <translation>پیام راهنمای Dcoin-Qt را برای گرفتن فهرست گزینه های command-line نشان بده</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>نمایش</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>کنسول</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>ساخت تاریخ</translation> </message> <message> <location line="-104"/> <source>Dcoin - Debug window</source> <translation>صفحه اشکال زدایی Dcoin </translation> </message> <message> <location line="+25"/> <source>Dcoin Core</source> <translation> هسته Dcoin </translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>فایلِ لاگِ اشکال زدایی</translation> </message> <message> <location line="+7"/> <source>Open the Dcoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>فایلِ لاگِ اشکال زدایی Dcoin را از دایرکتوری جاری داده ها باز کنید. این عملیات ممکن است برای فایلهای لاگِ حجیم طولانی شود.</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>پاکسازی کنسول</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the Dcoin RPC console.</source> <translation>به کنسول Dcoin RPC خوش آمدید</translation> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>دکمه های بالا و پایین برای مرور تاریخچه و Ctrl-L برای پاکسازی صفحه</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>با تایپ عبارت HELP دستورهای در دسترس را مرور خواهید کرد</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>ارسال سکه ها</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>ارسال چندین در یافت ها فورا</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>اضافه کردن دریافت کننده</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>پاک کردن تمام ستون‌های تراکنش</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>پاکسازی همه</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>تزار :</translation> </message> <message> <location line="+10"/> <source>123.456 BTC</source> <translation>123.456 بتس</translation> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>عملیت دوم تایید کنید</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;;ارسال</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation>(%3) تا &lt;b&gt;%1&lt;/b&gt; درصد%2</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>ارسال سکه ها تایید کنید</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation> %1شما متماینید که می خواهید 1% ارسال کنید ؟</translation> </message> <message> <location line="+0"/> <source> and </source> <translation>و</translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>آدرس گیرنده نادرست است، لطفا دوباره بررسی کنید.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>مبلغ پر داخت باید از 0 بیشتر باشد </translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>میزان وجه از بالانس/تتمه حساب شما بیشتر است</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>کل میزان وجه از بالانس/تتمه حساب شما بیشتر می شود وقتی %1 هزینه تراکنش نیز به ین میزان افزوده می شود</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>آدرس تکراری یافت شده است، در زمان انجام عملیات به هر آدرس تنها یکبار می توانید اطلاعات ارسال کنید</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>خطا: تراکنش تایید نشد. این پیام زمانی روی می دهد که مقداری از سکه های WALLET شما استفاده شده اند برای مثال اگر شما از WALLET.DAT استفاده کرده اید، ممکن است سکه ها استفاده شده باشند اما در اینجا نمایش داده نشوند</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>تراز</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>A&amp;مبلغ :</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>به&amp;پر داخت :</translation> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </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>برای آدرس بر پسب وارد کنید که در دفتر آدرس اضافه شود</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>&amp;بر چسب </translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>اآدرسن ازدفتر آدرس انتخاب کنید</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>آدرس از تخته رسم گیره دار پست کنید </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>بر داشتن این در یافت کننده</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a Dcoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس بیتکویین وارد کنید (bijvoorbeeld: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>امضا - امضا کردن /شناسایی یک پیام</translation> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>&amp;امضای پیام</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>شما می توانید پیامها را با آدرس خودتان امضا نمایید تا ثابت شود متعلق به شما هستند. مواظب باشید تا چیزی که بدان مطمئن نیستنید را امضا نکنید زیرا حملات فیشینگ در زمان ورود شما به سیستم فریبنده هستند. تنها مواردی را که حاوی اطلاعات دقیق و قابل قبول برای شما هستند را امضا کنید</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس برای امضا کردن پیام با (برای مثال Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>یک آدرس را از فهرست آدرسها انتخاب کنید</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>آدرس از تخته رسم گیره دار پست کنید </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>پیامی را که می‌خواهید امضا کنید در اینجا وارد کنید</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation>این امضا را در system clipboard کپی کن</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this Dcoin address</source> <translation>پیام را برای اثبات آدرس DCOIN خود امضا کنید</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation>تنظیم دوباره تمامی فیلدهای پیام</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>پاکسازی همه</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>تایید پیام</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>آدرس/پیام خود را وارد کنید (مطمئن شوید که فاصله بین خطوط، فاصله ها، تب ها و ... را دقیقا کپی می کنید) و سپس امضا کنید تا پیام تایید شود. مراقب باشید که پیام را بیشتر از مطالب درون امضا مطالعه نمایید تا فریب شخص سوم/دزدان اینترنتی را نخورید.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس برای امضا کردن پیام با (برای مثال Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified Dcoin address</source> <translation>پیام را برای اطمنان از ورود به سیستم با آدرس DCOIN مشخص خود،تایید کنید</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation>تنظیم دوباره تمامی فیلدهای پیام تایید شده</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a Dcoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس بیتکویین وارد کنید (bijvoorbeeld: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>با کلیک بر &quot;امضای پیام&quot; شما یک امضای جدید درست می کنید</translation> </message> <message> <location line="+3"/> <source>Enter Dcoin signature</source> <translation>امضای BITOCOIN خود را وارد کنید</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>آدرس وارد شده صحیح نیست</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>اطفا آدرس را بررسی کرده و دوباره امتحان کنید</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>آدرس وارد شده با کلید وارد شده مرتبط نیست</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>قفل کردن wallet انجام نشد</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>کلید شخصی برای آدرس وارد شده در دسترس نیست</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>پیام امضا کردن انجام نشد</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>پیام امضا شد</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>امضا نمی تواند رمزگشایی شود</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>لطفا امضا را بررسی و دوباره تلاش نمایید</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>امضا با تحلیلِ پیام مطابقت ندارد</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>عملیات شناسایی پیام انجام نشد</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>پیام شناسایی شد</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The Dcoin developers</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>آزمایش شبکه</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>باز کردن تا%1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation>%1 آفلاین</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1 تایید نشده </translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>ایید %1 </translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>وضعیت</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>انتشار از طریق n% گره انتشار از طریق %n گره</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>تاریخ </translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>منبع</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>تولید شده</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>فرستنده</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>گیرنده</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>آدرس شما</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>برچسب</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>بدهی </translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>بلوغ در n% از بیشتر بلاکها بلوغ در %n از بیشتر بلاکها</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>غیرقابل قبول</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>اعتبار</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>هزینه تراکنش</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>هزینه خالص</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>پیام</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>نظر</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>شناسه کاربری برای تراکنش</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 &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation>سکه های ایجاد شده باید 120 بلاک را قبل از استفاده بالغ کنند. در هنگام ایجاد بلاک، آن بلاک در شبکه منتشر می شود تا به زنجیره بلاکها بپیوندد. اگر در زنجیره قرار نگیرد، پیام وضعیت به غیرقابل قبول تغییر می بپیابد و قابل استفاده نیست. این مورد معمولا زمانی پیش می آید که گره دیگری به طور همزمان بلاکی را با فاصل چند ثانیه ای از شما ایجاد کند.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>اشکال زدایی طلاعات</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>تراکنش</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>درونداد</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>صحیح</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>نادرست</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>هنوز با مو فقیت ارسال نشده</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>مشخص نیست </translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>جزییات معاملات</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>در این قاب شیشه توصیف دقیق معامله نشان می شود</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>تاریخ</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>نوع</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>ایل جدا </translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>از شده تا 1%1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>افلایین (%1)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>تایید نشده (%1/%2)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>تایید شده (%1)</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>بالانس/تتمه حساب استخراج شده زمانی که %n از بیشتر بلاکها بالغ شدند در دسترس خواهد بود بالانس/تتمه حساب استخراج شده زمانی که n% از بیشتر بلاکها بالغ شدند در دسترس خواهد بود</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>این بلوک از دیگر گره ها در یافت نشده بدین دلیل شاید قابل قابول نیست</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>تولید شده ولی قبول نشده</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>در یافت با :</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>دریافتی از</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>ارسال به :</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>پر داخت به خودتان</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>استخراج</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(کاربرد ندارد)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>وضعیت معالمه . عرصه که تعداد تایید نشان می دهد</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>تاریخ و ساعت در یافت معامله</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>نوع معاملات</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>آدرس مقصود معاملات </translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>مبلغ از تزار شما خارج یا وارد شده</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>همه</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>امروز</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>این هفته</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>این ماه</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>ماه گذشته</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>امسال</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>محدوده </translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>در یافت با</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>ارسال به</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>به خودتان </translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>استخراج</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>یگر </translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>برای جست‌‌وجو نشانی یا برچسب را وارد کنید</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>حد اقل مبلغ </translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>کپی آدرس </translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>کپی بر چسب</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>روگرفت مقدار</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>اصلاح بر چسب</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>جزئیات تراکنش را نمایش بده</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>صادرات تاریخ معامله</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma فایل جدا </translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>تایید شده</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>تاریخ </translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>نوع </translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>ر چسب</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>ایل جدا </translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>آی دی</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>خطای صادرت</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>تا فایل %1 نمی شود نوشت</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>&gt;محدوده</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>به</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>ارسال سکه ها</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation>داده ها نوارِ جاری را به فایل انتقال دهید</translation> </message> <message> <location line="+193"/> <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> <location line="+4"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>Dcoin version</source> <translation>سخه بیتکویین</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>ستفاده :</translation> </message> <message> <location line="-29"/> <source>Send command to -server or dcoind</source> <translation>ارسال فرمان به سرور یا باتکویین</translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>لیست فومان ها</translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>کمک برای فرمان </translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>تنظیمات</translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: dcoin.conf)</source> <translation>(: dcoin.confپیش فرض: )فایل تنظیمی خاص </translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: dcoind.pid)</source> <translation>(dcoind.pidپیش فرض : ) فایل پید خاص</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>دایرکتور اطلاعاتی خاص</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>سایز کَش بانک داده را بر حسب مگابایت تنظیم کنید (پیش فرض:25)</translation> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 9333 or testnet: 19333)</source> <translation>برای اتصالات به &lt;port&gt; (پیش‌فرض: 9333 یا تست‌نت: 19333) گوش کنید</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>حداکثر &lt;n&gt; اتصال با همکاران برقرار داشته باشید (پیش‌فرض: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>اتصال به گره برای دریافت آدرسهای قرینه و قطع اتصال</translation> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation>آدرس عمومی خود را ذکر کنید</translation> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>آستانه برای قطع ارتباط با همکاران بدرفتار (پیش‌فرض: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>مدت زمان به ثانیه برای جلوگیری از همکاران بدرفتار برای اتصال دوباره (پیش‌فرض: 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>در زمان تنظیم درگاه RPX %u در فهرست کردن %s اشکالی رخ داده است</translation> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9332 or testnet: 19332)</source> <translation>( 9332پیش فرض :) &amp;lt;poort&amp;gt; JSON-RPC شنوایی برای ارتباطات</translation> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>JSON-RPC قابل فرمانها و</translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>اجرای در پس زمینه به عنوان شبح و قبول فرمان ها</translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>استفاده شبکه آزمایش</translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>پذیرش اتصالات از بیرون (پیش فرض: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=dcoinrpc 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 &quot;Dcoin Alert&quot; [email protected] </source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. Dcoin is probably already running.</source> <translation type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+3"/> <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>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>حجم حداکثر تراکنشهای با/کم اهمیت را به بایت تنظیم کنید (پیش فرض: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 type="unfinished"/> </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>هشدار:paytxfee بسیار بالا تعریف شده است! این هزینه تراکنش است که باید در زمان ارسال تراکنش بپردازید</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>هشدار: تراکنش نمایش داده شده ممکن است صحیح نباشد! شما/یا یکی از گره ها به روزآمد سازی نیاز دارید </translation> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dcoin will not work properly.</source> <translation>هشدار: لطفا زمان و تاریخ رایانه خود را تصحیح نمایید! اگر ساعت رایانه شما اشتباه باشد dcoin ممکن است صحیح کار نکند</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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation>بستن گزینه ایجاد</translation> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>تنها در گره (های) مشخص شده متصل شوید</translation> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>آدرس آی.پی. خود را شناسایی کنید (پیش فرض:1 در زمان when listening وno -externalip)</translation> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>شنیدن هر گونه درگاه انجام پذیر نیست. ازlisten=0 برای اینکار استفاده کیند.</translation> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation>قرینه ها را برای جستجوی DNS بیاب (پیش فرض: 1 مگر در زمان اتصال)</translation> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>آدرس نرم افزار تور غلط است %s</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;* 1000 بایت (پیش فرض:5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;* 1000 بایت (پیش فرض:1000)</translation> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>تنها =به گره ها در شبکه متصا شوید &lt;net&gt; (IPv4, IPv6 or Tor)</translation> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>برونداد اطلاعات اشکال زدایی اضافی. گزینه های اشکال زدایی دیگر رفع شدند</translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>برونداد اطلاعات اشکال زدایی اضافی برای شبکه</translation> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation>به خروجی اشکال‌زدایی برچسب زمان بزنید</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the Dcoin Wiki for SSL setup instructions)</source> <translation>گزینه ssl (به ویکیdcoin برای راهنمای راه اندازی ssl مراجعه شود)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>نسخه ای از پراکسی ساکس را برای استفاده انتخاب کنید (4-5 پیش فرض:5)</translation> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>اطلاعات ردگیری/اشکال‌زدایی را به جای فایل لاگ اشکال‌زدایی به کنسول بفرستید</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>اطلاعات ردگیری/اشکال‌زدایی را به اشکال‌زدا بفرستید</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation>حداکثر سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 250000)</translation> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>حداقل سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 0)</translation> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>فایل debug.log را در startup مشتری کوچک کن (پیش فرض:1 اگر اشکال زدایی روی نداد)</translation> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>(میلی ثانیه )فاصله ارتباط خاص</translation> </message> <message> <location line="+4"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:1 در زمان شنیدن)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation>برای دستیابی به سرویس مخفیانه نرم افزار تور از پراکسی استفاده کنید (پیش فرض:same as -proxy)</translation> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>JSON-RPC شناسه برای ارتباطات</translation> </message> <message> <location line="+4"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>هشدار: این نسخه قدیمی است، روزآمدسازی مورد نیاز است</translation> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>JSON-RPC عبارت عبور برای ارتباطات</translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>از آدرس آی پی خاص JSON-RPC قبول ارتباطات</translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>(127.0.0.1پیش فرض: ) &amp;lt;ip&amp;gt; دادن فرمانها برای استفاده گره ها روی</translation> </message> <message> <location line="-120"/> <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> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>wallet را به جدیدترین فرمت روزآمد کنید</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation> (100پیش فرض:)&amp;lt;n&amp;gt; گذاشتن اندازه کلید روی </translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>اسکان مجدد زنجیر بلوکها برای گم والت معامله</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>JSON-RPCبرای ارتباطات استفاده کنید OpenSSL (https)</translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation> (server.certپیش فرض: )گواهی نامه سرور</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>(server.pemپیش فرض: ) کلید خصوصی سرور</translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>رمز های قابل قبول( TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>پیام کمکی</translation> </message> <message> <location line="+6"/> <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> <location line="-91"/> <source>Connect through socks proxy</source> <translation>اتصال از طریق پراکسی ساکس</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>به DNS اجازه بده تا برای addnode ، seednode و اتصال جستجو کند</translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>بار گیری آدرس ها</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>خطا در بارگیری wallet.dat: کیف پول خراب شده است</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of Dcoin</source> <translation>خطا در بارگیری wallet.dat: کیف پول به ویرایش جدیدتری از Biticon نیاز دارد</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart Dcoin to complete</source> <translation>سلام</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation>خطا در بارگیری wallet.dat</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>آدرس پراکسی اشتباه %s</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>شبکه مشخص شده غیرقابل شناسایی در onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>نسخه پراکسی ساکس غیرقابل شناسایی درخواست شده است: %i</translation> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>آدرس قابل اتصال- شناسایی نیست %s</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>آدرس خارجی قابل اتصال- شناسایی نیست %s</translation> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>میزان وجه اشتباه برای paytxfee=&lt;میزان وجه&gt;: %s</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>میزان وجه اشتباه</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>بود جه نا کافی </translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>بار گیری شاخص بلوک</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>به اتصال یک گره اضافه کنید و اتصال را باز نگاه دارید</translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. Dcoin is probably already running.</source> <translation>اتصال به %s از این رایانه امکان پذیر نیست. Dcoin احتمالا در حال اجراست.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>پر داجت برای هر کیلو بیت برای اضافه به معامله ارسال</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>بار گیری والت</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation>امکان تنزل نسخه در wallet وجود ندارد</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>آدرس پیش فرض قابل ذخیره نیست</translation> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>اسکان مجدد</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>بار گیری انجام شده است</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation>برای استفاده از %s از انتخابات</translation> </message> <message> <location line="-74"/> <source>Error</source> <translation>خطا</translation> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; 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>
{ "content_hash": "4e71fd875d250d92a575fa5287420dbb", "timestamp": "", "source": "github", "line_count": 2925, "max_line_length": 405, "avg_line_length": 37.09264957264957, "alnum_prop": 0.612612446541808, "repo_name": "wolske/dcoin", "id": "c581e49fd1a89bd5cfd3ced55422646086e1eb59", "size": "118910", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/qt/locale/bitcoin_fa.ts", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "32917" }, { "name": "C++", "bytes": "16030131" }, { "name": "CSS", "bytes": "1127" }, { "name": "Makefile", "bytes": "97719" }, { "name": "Objective-C", "bytes": "1052" }, { "name": "Objective-C++", "bytes": "5864" }, { "name": "Python", "bytes": "69699" }, { "name": "Shell", "bytes": "13173" }, { "name": "TypeScript", "bytes": "5223608" } ], "symlink_target": "" }
// This file is automatically generated. package adila.db; /* * Pantech IM-100K * * DEVICE: ef71k * MODEL: IM-100K */ final class ef71k { public static final String DATA = "Pantech|IM-100K|"; }
{ "content_hash": "1564c9cf12decfd92f861b4ae40ea932", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 57, "avg_line_length": 15.76923076923077, "alnum_prop": 0.6634146341463415, "repo_name": "karim/adila", "id": "1fd8e8544cf4bbf4526c29299d7f7f90d1ce85fa", "size": "205", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "database/src/main/java/adila/db/ef71k.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "2903103" }, { "name": "Prolog", "bytes": "489" }, { "name": "Python", "bytes": "3280" } ], "symlink_target": "" }
apt-get update DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade apt-get -y install build-essential libssl-dev pkg-config software-properties-common apt-get -y install git mongodb redis-server curl -sL https://deb.nodesource.com/setup_0.12 | bash - apt-get install -y nodejs apt-get install -y npm # update npm npm install -g npm npm install -g nodemon #install sharp (image manipulation library for node) curl -s https://raw.githubusercontent.com/lovell/sharp/master/preinstall.sh | bash - export NODE_ENV=development cd /vagrant npm install #setup mongoDB sh /vagrant/mongodb_setup.sh #webtranslateit gem install web_translate_it # cd /vagrant/locales # wti init yV9pG7BwaMsfXGNSScvJ7Q
{ "content_hash": "fc7992810271f666c38d260bec97abe4", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 123, "avg_line_length": 26.517241379310345, "alnum_prop": 0.7724317295188556, "repo_name": "geraldbaeck/openFitnessData", "id": "13746b01628d37dc025a41dc066e87df584ca707", "size": "790", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "vagrant_boot.sh", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "29535" }, { "name": "Shell", "bytes": "1061" } ], "symlink_target": "" }
Rollup is released under the MIT license: The MIT License (MIT) Copyright (c) 2017 [these people](https://github.com/rollup/rollup/graphs/contributors) 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. # Licenses of bundled dependencies The published Rollup artifact additionally contains code with the following licenses: MIT, ISC # Bundled dependencies: ## @rollup/pluginutils License: MIT By: Rich Harris Repository: rollup/plugins --------------------------------------- ## acorn License: MIT By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine Repository: https://github.com/acornjs/acorn.git > MIT License > > Copyright (C) 2012-2020 by various contributors (see AUTHORS) > > 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. --------------------------------------- ## acorn-walk License: MIT By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine Repository: https://github.com/acornjs/acorn.git > MIT License > > Copyright (C) 2012-2020 by various contributors (see AUTHORS) > > 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. --------------------------------------- ## anymatch License: ISC By: Elan Shanker Repository: https://github.com/micromatch/anymatch > The ISC License > > Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) > > Permission to use, copy, modify, and/or distribute this software for any > purpose with or without fee is hereby granted, provided that the above > copyright notice and this permission notice appear in all copies. > > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR > ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES > WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN > ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR > IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------- ## binary-extensions License: MIT By: Sindre Sorhus Repository: sindresorhus/binary-extensions > MIT License > > Copyright (c) 2019 Sindre Sorhus <[email protected]> (https://sindresorhus.com), Paul Miller (https://paulmillr.com) > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- ## braces License: MIT By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm Repository: micromatch/braces > The MIT License (MIT) > > Copyright (c) 2014-2018, Jon Schlinkert. > > 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. --------------------------------------- ## chokidar License: MIT By: Paul Miller, Elan Shanker Repository: git+https://github.com/paulmillr/chokidar.git > The MIT License (MIT) > > Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker > > 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. --------------------------------------- ## colorette License: MIT By: Jorge Bucaran Repository: jorgebucaran/colorette > Copyright © Jorge Bucaran <<https://jorgebucaran.com>> > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- ## date-time License: MIT By: Sindre Sorhus Repository: sindresorhus/date-time > MIT License > > Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com) > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- ## fill-range License: MIT By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling Repository: jonschlinkert/fill-range > The MIT License (MIT) > > Copyright (c) 2014-present, Jon Schlinkert. > > 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. --------------------------------------- ## glob-parent License: ISC By: Gulp Team, Elan Shanker, Blaine Bublitz Repository: gulpjs/glob-parent > The ISC License > > Copyright (c) 2015, 2019 Elan Shanker > > Permission to use, copy, modify, and/or distribute this software for any > purpose with or without fee is hereby granted, provided that the above > copyright notice and this permission notice appear in all copies. > > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR > ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES > WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN > ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR > IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------- ## hash.js License: MIT By: Fedor Indutny Repository: [email protected]:indutny/hash.js --------------------------------------- ## inherits License: ISC Repository: git://github.com/isaacs/inherits > The ISC License > > Copyright (c) Isaac Z. Schlueter > > Permission to use, copy, modify, and/or distribute this software for any > purpose with or without fee is hereby granted, provided that the above > copyright notice and this permission notice appear in all copies. > > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH > REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND > FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, > INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM > LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR > OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR > PERFORMANCE OF THIS SOFTWARE. --------------------------------------- ## is-binary-path License: MIT By: Sindre Sorhus Repository: sindresorhus/is-binary-path > MIT License > > Copyright (c) 2019 Sindre Sorhus <[email protected]> (https://sindresorhus.com), Paul Miller (https://paulmillr.com) > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- ## is-extglob License: MIT By: Jon Schlinkert Repository: jonschlinkert/is-extglob > The MIT License (MIT) > > Copyright (c) 2014-2016, Jon Schlinkert > > 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. --------------------------------------- ## is-glob License: MIT By: Jon Schlinkert, Brian Woodward, Daniel Perez Repository: micromatch/is-glob > The MIT License (MIT) > > Copyright (c) 2014-2017, Jon Schlinkert. > > 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. --------------------------------------- ## is-number License: MIT By: Jon Schlinkert, Olsten Larck, Rouven Weßling Repository: jonschlinkert/is-number > The MIT License (MIT) > > Copyright (c) 2014-present, Jon Schlinkert. > > 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. --------------------------------------- ## is-reference License: MIT By: Rich Harris Repository: git+https://github.com/Rich-Harris/is-reference.git --------------------------------------- ## locate-character License: MIT By: Rich Harris Repository: Rich-Harris/locate-character --------------------------------------- ## magic-string License: MIT By: Rich Harris Repository: https://github.com/rich-harris/magic-string > Copyright 2018 Rich Harris > > 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. --------------------------------------- ## minimalistic-assert License: ISC Repository: https://github.com/calvinmetcalf/minimalistic-assert.git > Copyright 2015 Calvin Metcalf > > Permission to use, copy, modify, and/or distribute this software for any purpose > with or without fee is hereby granted, provided that the above copyright notice > and this permission notice appear in all copies. > > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH > REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND > FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, > INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM > LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE > OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR > PERFORMANCE OF THIS SOFTWARE. --------------------------------------- ## normalize-path License: MIT By: Jon Schlinkert, Blaine Bublitz Repository: jonschlinkert/normalize-path > The MIT License (MIT) > > Copyright (c) 2014-2018, Jon Schlinkert. > > 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. --------------------------------------- ## parse-ms License: MIT By: Sindre Sorhus Repository: sindresorhus/parse-ms > MIT License > > Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com) > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- ## picomatch License: MIT By: Jon Schlinkert Repository: micromatch/picomatch > The MIT License (MIT) > > Copyright (c) 2017-present, Jon Schlinkert. > > 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. --------------------------------------- ## pretty-bytes License: MIT By: Sindre Sorhus Repository: sindresorhus/pretty-bytes > MIT License > > Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com) > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- ## pretty-ms License: MIT By: Sindre Sorhus Repository: sindresorhus/pretty-ms > MIT License > > Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com) > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- ## readdirp License: MIT By: Thorsten Lorenz, Paul Miller Repository: git://github.com/paulmillr/readdirp.git > MIT License > > Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) > > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: > > The above copyright notice and this permission notice shall be included in all > copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE > SOFTWARE. --------------------------------------- ## signal-exit License: ISC By: Ben Coe Repository: https://github.com/tapjs/signal-exit.git > The ISC License > > Copyright (c) 2015, Contributors > > Permission to use, copy, modify, and/or distribute this software > for any purpose with or without fee is hereby granted, provided > that the above copyright notice and this permission notice > appear in all copies. > > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES > OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE > LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES > OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, > WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------- ## sourcemap-codec License: MIT By: Rich Harris Repository: https://github.com/Rich-Harris/sourcemap-codec > The MIT License > > Copyright (c) 2015 Rich Harris > > 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. --------------------------------------- ## time-zone License: MIT By: Sindre Sorhus Repository: sindresorhus/time-zone > MIT License > > Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com) > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------- ## to-regex-range License: MIT By: Jon Schlinkert, Rouven Weßling Repository: micromatch/to-regex-range > The MIT License (MIT) > > Copyright (c) 2015-present, Jon Schlinkert. > > 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. --------------------------------------- ## yargs-parser License: ISC By: Ben Coe Repository: https://github.com/yargs/yargs-parser.git > Copyright (c) 2016, Contributors > > Permission to use, copy, modify, and/or distribute this software > for any purpose with or without fee is hereby granted, provided > that the above copyright notice and this permission notice > appear in all copies. > > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES > OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE > LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES > OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, > WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
{ "content_hash": "a175944a7ba559a0b5ecfe0c0ae31ee2", "timestamp": "", "source": "github", "line_count": 702, "max_line_length": 462, "avg_line_length": 50.396011396011396, "alnum_prop": 0.7529820792582961, "repo_name": "GoogleCloudPlatform/prometheus-engine", "id": "1c0540c13aca9522050549dde25729e881aac831", "size": "35412", "binary": false, "copies": "2", "ref": "refs/heads/main", "path": "third_party/prometheus_ui/base/web/ui/node_modules/rollup/LICENSE.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "4035" }, { "name": "Go", "bytes": "574177" }, { "name": "Makefile", "bytes": "5189" }, { "name": "Shell", "bytes": "11915" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>mtac2: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / extra-dev</a></li> <li class="active"><a href="">dev / mtac2 - 1.0.0+8.7</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> mtac2 <small> 1.0.0+8.7 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-03-10 22:06:32 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-10 22:06:32 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 4 Virtual package relying on a GMP lib system installation coq dev Formal proof management system dune 3.0.3 Fast, portable, and opinionated build system ocaml 4.06.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.06.1 Official 4.06.1 release ocaml-config 1 OCaml Switch Configuration ocaml-secondary-compiler 4.08.1-1 OCaml 4.08.1 Secondary Switch Compiler ocamlfind 1.9.1 A library manager for OCaml ocamlfind-secondary 1.9.1 Adds support for ocaml-secondary-compiler to ocamlfind zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;[email protected]&quot; homepage: &quot;https://github.com/Mtac2/Mtac2&quot; dev-repo: &quot;git+https://github.com/Mtac2/Mtac2.git&quot; bug-reports: &quot;https://github.com/Mtac2/Mtac2/issues&quot; authors: [&quot;Beta Ziliani &lt;[email protected]&gt;&quot; &quot;Jan-Oliver Kaiser &lt;[email protected]&gt;&quot; &quot;Robbert Krebbers &lt;[email protected]&gt;&quot; &quot;Yann Régis-Gianas &lt;[email protected]&gt;&quot; &quot;Derek Dreyer &lt;[email protected]&gt;&quot;] license: &quot;MIT&quot; build: [ [&quot;./configure.sh&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;install&quot;] ] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Mtac2&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.7.0&quot; &amp; &lt; &quot;8.8~&quot;} &quot;coq-unicoq&quot; {&gt;= &quot;1.3~&quot; &amp; &lt; &quot;2~&quot;} ] synopsis: &quot;Mtac2: Typed Tactics for Coq&quot; flags: light-uninstall url { src: &quot;https://github.com/Mtac2/Mtac2/archive/v1.0.0-coq8.7.tar.gz&quot; checksum: &quot;md5=10fdc9569e0105d40f4ed22b8f92c2a7&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-mtac2.1.0.0+8.7 coq.dev</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is dev). The following dependencies couldn&#39;t be met: - coq-mtac2 -&gt; coq &lt; 8.8~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-mtac2.1.0.0+8.7</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
{ "content_hash": "7ba2e80ac5d6bce4e8a36edc1dbbf9f9", "timestamp": "", "source": "github", "line_count": 170, "max_line_length": 303, "avg_line_length": 42.34705882352941, "alnum_prop": 0.5370190304208918, "repo_name": "coq-bench/coq-bench.github.io", "id": "351aad3f5ac153a73161084c47c8caf43e5c36e6", "size": "7225", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "clean/Linux-x86_64-4.06.1-2.0.5/extra-dev/dev/mtac2/1.0.0+8.7.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('post', '0001_initial'), ] operations = [ migrations.AlterField( model_name='post', name='start_date', field=models.DateTimeField(default=datetime.datetime(2015, 8, 31, 15, 54, 31, 983451), help_text='Fecha y hora en que aparecera la publicaci\xf3n.'), ), ]
{ "content_hash": "589174c5a97f9faf298cb15913af80d1", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 161, "avg_line_length": 25.94736842105263, "alnum_prop": 0.6247464503042597, "repo_name": "jualjiman/blog-django-campus", "id": "82682484eb817da068361e99e7880924dc1ffc18", "size": "517", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/blog/post/migrations/0002_auto_20150831_1554.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Python", "bytes": "16033" }, { "name": "Shell", "bytes": "5485" } ], "symlink_target": "" }
REST server ====== ####Simple REST server #####This example uses: - [Symfony3](http://symfony.com/what-is-symfony) - [FOSUserBundle](http://symfony.com/doc/current/bundles/FOSUserBundle/index.html) - [FOSRESTBundle](http://symfony.com/doc/current/bundles/FOSRestBundle/index.html) - [LexikJWTAuthenticationBundle](https://github.com/lexik/LexikJWTAuthenticationBundle) - [NelmioApiDocBundle](http://symfony.com/doc/current/bundles/NelmioApiDocBundle/index.html) - [JMSSerializerBundle](http://jmsyst.com/bundles/JMSSerializerBundle) #####Requirements: - PHP 7 - MySQL 5.7 or MariaDB #####How to start: - clone this repo - run `composer install` to install necessary dependencies - run `php bin/console server:start 0.0.0.0:8000` - go to [http://localhost:8000/dev/doc](http://localhost:8000/dev/doc) to see documentation If you are having any permissions problems please follow [this](http://symfony.com/doc/current/setup/file_permissions.html). What you can: 1. Authorize 2. User - CRUD commands for USER - Search for an user - CRUD commands for company contacts - search for an company contact - CRUD commands for company - search for a company ######Please note: this is only a server, you need your [client](https://github.com/qweluke/WizardCRM) to use it.
{ "content_hash": "14ce72599e649f3d17863b8bc5ee3edb", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 124, "avg_line_length": 33.73684210526316, "alnum_prop": 0.7464898595943837, "repo_name": "qweluke/SimpleRestServer", "id": "691276b3089e2e788c741e2e43db604a523f4371", "size": "1282", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "3605" }, { "name": "CSS", "bytes": "5587" }, { "name": "HTML", "bytes": "2031280" }, { "name": "Nginx", "bytes": "872" }, { "name": "PHP", "bytes": "205279" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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. --> <!DOCTYPE document PUBLIC "-//Apache Software Foundation//DTD XDOC 1.0//EN" "http://maven.apache.org/dtd/xdoc_1_0.dtd"> <document> <properties> <title>Welcome</title> </properties> <body> <section name="Expenses Processing - Demonstration application"><p>This demonstration application, written in [[NAME]], allows you to create and process expense claims. It is a much-simplified version of the kind of expense processing application found in many organisations. (As the full source-code of this demonstration is included with the [[NAME]] download, you might like to consider extending/modifying it to meet your own organisation's expense processing requirements.)</p><subsection name="Registering and logging-in"></subsection><p>To use the application you will first need to <a href="http://demo.isis.apache.org/register/create-user.jsp">register a new user</a>. This will allow you to create a new claim. If you want to be able to submit and approve claims then you will need to register more than one user - however, you can register the additional users at any stage.</p><p>Having registered at least one user, you may use the application through one of two different user interfaces. The first is a pure HTML user interface, run from within your browser (we recommend using <a href="http://www.mozilla.com/en-US/firefox/">Firefox</a> or <a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer 7</a>).</p><ul> <li><a href="http://demo.isis.apache.org/expenses/">Login to the HTML demo</a></li> </ul><p>The second is a rich-client interface, which adopts the 'desktop metaphor' and uses 'drag and drop' gestures. It is launched via <a href="http://java.sun.com/products/javawebstart/download.jsp">Java WebStart</a>. (Note: this demo is running client-server over the public internet. Performance is very dependent upon connection speed. The rich-client interface is intended for use primarily within an intranet, where it works very well).</p><ul> <li><a href="http://demo.isis.apache.org/webstart/">Login to the rich-client demo</a></li> </ul><subsection name="Screen movies"></subsection><p>For guidance on how to use the application via each interface, we have provided a series of three short screen-movies for each user interface. These are in <a href="http://www.adobe.com/shockwave/download/">Shockwave</a> format.</p><p>Screen movies for the rich-client user interface:</p><ul> <li><a href="movies/Retrieving and viewing a Claim (DND UI).htm">Retrieving claims</a></li> <li><a href="movies/Creating and submitting a new Claim (DND UI).htm">Creating and submitting a new claim</a></li> <li><a href="movies/Approving claims (DND UI).htm">Approving a claim</a></li> </ul><p>Screen movies for the HTML user interface:</p><ul> <li><a href="movies/Retrieving and viewing a Claim (HTML UI).htm">Retrieving claims</a></li> <li><a href="movies/Creating and submitting a new Claim (HTML UI).htm">Creating and submitting a new claim</a></li> <li><a href="movies/Approving claims (HTML UI).htm">Approving a claim</a></li> </ul><subsection name="Administration"></subsection><p><a href="http://demo.isis.apache.org/register/change-password.jsp">Need to change Password?</a></p><p>Forgotten your username(s) or password? <a href="http://demo.isis.apache.org/register/reset-password.jsp">Enter your email address</a> and we'll send you the user name(s) using that email address, with reset passwords.</p></section> </body> </document>
{ "content_hash": "d35905fd92ac4db29e317fdd30c62189", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 80, "avg_line_length": 51.08791208791209, "alnum_prop": 0.697354269735427, "repo_name": "peridotperiod/isis", "id": "082ae9198e39f6b2d776d80e7adc39982f05b770", "size": "4649", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/site/xdoc/TOREVIEW/expenses-demo.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "169398" }, { "name": "Cucumber", "bytes": "8162" }, { "name": "Groovy", "bytes": "28126" }, { "name": "HTML", "bytes": "601123" }, { "name": "Java", "bytes": "18098201" }, { "name": "JavaScript", "bytes": "118425" }, { "name": "Shell", "bytes": "12793" }, { "name": "XSLT", "bytes": "72290" } ], "symlink_target": "" }
""" byceps.services.language.dbmodels ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2014-2022 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from ...database import db class Language(db.Model): """A language. The code can be just `en` or `de`, but also `en-gb` or `de-de`. """ __tablename__ = 'languages' code = db.Column(db.UnicodeText, primary_key=True) def __init__(self, code: str) -> None: self.code = code
{ "content_hash": "e869741247b6a9a4ddab8af5ecba9639", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 67, "avg_line_length": 21.08695652173913, "alnum_prop": 0.5896907216494846, "repo_name": "homeworkprod/byceps", "id": "b1a5af39c0c0286f4f8f602cffa1ac039740555e", "size": "485", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "byceps/services/language/dbmodels.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "38198" }, { "name": "HTML", "bytes": "318830" }, { "name": "JavaScript", "bytes": "8541" }, { "name": "Python", "bytes": "935249" } ], "symlink_target": "" }
require "vertx" include Vertx NetServer.new.connect_handler do |socket| Pump.new(socket, socket).start end.listen(1234)
{ "content_hash": "5cd3cc96b98202419ee3cd985640c79b", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 41, "avg_line_length": 12.7, "alnum_prop": 0.7480314960629921, "repo_name": "Letractively/collide", "id": "5da0a79d2356043ca3ad998962f54ba363d42fa7", "size": "724", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "deps/vert.x-1.1.0.final/examples/ruby/echo/echo_server.rb", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "1003" }, { "name": "CSS", "bytes": "100508" }, { "name": "HTML", "bytes": "1157" }, { "name": "Java", "bytes": "4618053" }, { "name": "JavaScript", "bytes": "71875" }, { "name": "Shell", "bytes": "942" } ], "symlink_target": "" }
package com.programize.mycustomviews.toolbar; import android.content.Context; import android.content.res.TypedArray; import android.os.Build; import android.support.annotation.AnimRes; import android.support.annotation.StyleRes; import android.text.TextUtils; import android.util.AttributeSet; import android.view.Gravity; import android.view.View; import android.view.animation.Animation; import android.widget.TextSwitcher; import android.widget.TextView; import android.widget.ViewSwitcher; import com.programize.mycustomviews.R; import com.programize.myfunctions.MContext; import java.util.ArrayList; /** * Created by dgar on 17/6/2017. */ public class BackStackEnabledTextSwitcher extends TextSwitcher { private ArrayList<CharSequence> backStack; private CharSequence text; private @StyleRes int textAppearance = 0; private @AnimRes int inAnimation = 0; private Animation inAnimationObj; private @AnimRes int outAnimation = 0; private Animation outAnimationObj; private @AnimRes int inAnimationBack = 0; private Animation inAnimationBackObj; private @AnimRes int outAnimationBack = 0; private Animation outAnimationBackObj; private boolean isAnimating = false; public BackStackEnabledTextSwitcher(Context context) { super(context); init(null); } public BackStackEnabledTextSwitcher(Context context, AttributeSet attrs) { super(context, attrs); init(attrs); } private void init(AttributeSet attrs) { final Context context = getContext(); backStack = new ArrayList<>(); TypedArray a; if (attrs != null) { a = context.obtainStyledAttributes(attrs, R.styleable.CenteredToolbar); int n = a.getIndexCount(); for (int i = 0; i < n; i++) { int attr = a.getIndex(i); if (attr == R.styleable.CenteredToolbar_android_title) text = a.getString(attr); else if (attr == R.styleable.CenteredToolbar_titleTextAppearanceStyle) textAppearance = a.getResourceId(attr, 0); else if (attr == R.styleable.CenteredToolbar_titleInAnimation) inAnimation = a.getResourceId(attr, 0); else if (attr == R.styleable.CenteredToolbar_titleOutAnimation) outAnimation = a.getResourceId(attr, 0); else if (attr == R.styleable.CenteredToolbar_titleInAnimationBack) inAnimationBack = a.getResourceId(attr, 0); else if (attr == R.styleable.CenteredToolbar_titleOutAnimationBack) outAnimationBack = a.getResourceId(attr, 0); } a.recycle(); } if (inAnimation != 0 || outAnimation != 0 || inAnimationBack != 0 || outAnimationBack != 0) loadAnimations(); final int _titleTextAppearance = textAppearance; setFactory(new ViewSwitcher.ViewFactory() { public View makeView() { TextView textTitle = new TextView(getContext()); textTitle.setGravity(Gravity.CENTER); textTitle.setEllipsize(TextUtils.TruncateAt.END); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { textTitle.setTextAppearance(_titleTextAppearance); } else { textTitle.setTextAppearance(context, _titleTextAppearance); } return textTitle; } }); setText(text); } private void loadAnimations() { Context context = getContext(); inAnimationObj = MContext.getAnimation(context, inAnimation); outAnimationObj = MContext.getAnimation(context, outAnimation); inAnimationBackObj = MContext.getAnimation(context, inAnimationBack); outAnimationBackObj = MContext.getAnimation(context, outAnimationBack); Animation[] animations = new Animation[4]; animations[0] = inAnimationObj; animations[1] = outAnimationObj; animations[2] = inAnimationBackObj; animations[3] = outAnimationBackObj; final Animation.AnimationListener listener = new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { isAnimating = true; } @Override public void onAnimationEnd(Animation animation) { isAnimating = false; } @Override public void onAnimationRepeat(Animation animation) {} }; for (Animation a: animations) { a.setAnimationListener(listener); } } @Override public void setText(CharSequence text) { setText(text, true); } public void setText(CharSequence text, boolean addToBackStack) { if (!isAnimating) { setInAnimation(inAnimationObj); setOutAnimation(outAnimationObj); } doSetText(text, addToBackStack); } private void doSetText(CharSequence text, boolean addToBackStack) { super.setText(text); if (addToBackStack) backStack.add(text); } @Override public void showPrevious() { if (!isAnimating) { setInAnimation(inAnimationBackObj); setOutAnimation(outAnimationBackObj); } doShowPrevious(); } private void doShowPrevious() { int backStackSize = backStack.size(); // need to have at least 2 entries to proceed if (backStackSize < 2) return; // set the previous title as current super.setText(backStack.get(backStackSize - 2)); // remove current title from the bacstack backStack.remove(backStackSize - 1); } }
{ "content_hash": "31bf99dfc6fc0820c0b7a32acfb4b117", "timestamp": "", "source": "github", "line_count": 184, "max_line_length": 99, "avg_line_length": 31.875, "alnum_prop": 0.6294970161977834, "repo_name": "mitsest/AndroidKickStart", "id": "8facf05ee041822c7a55124b3d246401c0fe7698", "size": "5865", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "mycustomviews/src/main/java/com/programize/mycustomviews/toolbar/BackStackEnabledTextSwitcher.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "81489" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Cube</title> </head> <body> <canvas id="gl" width="500px" height="500px"></canvas> <script src="../../lib/cuon-matrix.js"></script> <script src="../../lib/webgl-debug.js"></script> <script src="../../lib/webgl-utils.js"></script> <script src="../../lib/cuon-utils.js"></script> <script src="../../lib/constants.js"></script> <script src="index.js"></script> </body> </html>
{ "content_hash": "e66c29fbd1f923e89d6ee25893830d02", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 54, "avg_line_length": 26.823529411764707, "alnum_prop": 0.6074561403508771, "repo_name": "yuanzhaokang/myAwesomeSimpleDemo", "id": "58439599c26503d775551a5bfd31067df64b50c4", "size": "456", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "webgl/chapter7-3D/5-triangle-drawElements/index.html", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "381" }, { "name": "C++", "bytes": "906" }, { "name": "CSS", "bytes": "20500" }, { "name": "HTML", "bytes": "31351" }, { "name": "Java", "bytes": "95" }, { "name": "JavaScript", "bytes": "186943" }, { "name": "Makefile", "bytes": "19496" }, { "name": "Python", "bytes": "27543" } ], "symlink_target": "" }
ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{ "content_hash": "c24a3b965fd7ed2e282910e5d05a51dd", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 10.307692307692308, "alnum_prop": 0.6940298507462687, "repo_name": "mdoering/backbone", "id": "6fd3328dc7822cf61cf4050ea1bba24cb96906f5", "size": "200", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Caryophyllales/Cactaceae/Pilosocereus/Pilosocereus robinii/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //----------------------------------------------------------------------------- var BUGNUMBER = 467495; var summary = 'Do not crash @ js_Interpret'; var actual = ''; var expect = ''; //----------------------------------------------------------------------------- test(); //----------------------------------------------------------------------------- function test() { enterFunc ('test'); printBugNumber(BUGNUMBER); printStatus (summary); try { eval("(function(){const y = 1; function x() '' let functional, x})();"); } catch(ex) { } reportCompare(expect, actual, summary); exitFunc ('test'); }
{ "content_hash": "4a7453e63045da7c35973fd455d91794", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 79, "avg_line_length": 26.852941176470587, "alnum_prop": 0.46221248630887185, "repo_name": "sergecodd/FireFox-OS", "id": "5ee5b29febf01492a946f5732284099e8ff84f1c", "size": "913", "binary": false, "copies": "8", "ref": "refs/heads/master", "path": "B2G/gecko/js/src/tests/js1_8/regress/regress-467495-02.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Ada", "bytes": "443" }, { "name": "ApacheConf", "bytes": "85" }, { "name": "Assembly", "bytes": "5123438" }, { "name": "Awk", "bytes": "46481" }, { "name": "Batchfile", "bytes": "56250" }, { "name": "C", "bytes": "101720951" }, { "name": "C#", "bytes": "38531" }, { "name": "C++", "bytes": "148896543" }, { "name": "CMake", "bytes": "23541" }, { "name": "CSS", "bytes": "2758664" }, { "name": "DIGITAL Command Language", "bytes": "56757" }, { "name": "Emacs Lisp", "bytes": "12694" }, { "name": "Erlang", "bytes": "889" }, { "name": "FLUX", "bytes": "34449" }, { "name": "GLSL", "bytes": "26344" }, { "name": "Gnuplot", "bytes": "710" }, { "name": "Groff", "bytes": "447012" }, { "name": "HTML", "bytes": "43343468" }, { "name": "IDL", "bytes": "1455122" }, { "name": "Java", "bytes": "43261012" }, { "name": "JavaScript", "bytes": "46646658" }, { "name": "Lex", "bytes": "38358" }, { "name": "Logos", "bytes": "21054" }, { "name": "Makefile", "bytes": "2733844" }, { "name": "Matlab", "bytes": "67316" }, { "name": "Max", "bytes": "3698" }, { "name": "NSIS", "bytes": "421625" }, { "name": "Objective-C", "bytes": "877657" }, { "name": "Objective-C++", "bytes": "737713" }, { "name": "PHP", "bytes": "17415" }, { "name": "Pascal", "bytes": "6780" }, { "name": "Perl", "bytes": "1153180" }, { "name": "Perl6", "bytes": "1255" }, { "name": "PostScript", "bytes": "1139" }, { "name": "PowerShell", "bytes": "8252" }, { "name": "Protocol Buffer", "bytes": "26553" }, { "name": "Python", "bytes": "8453201" }, { "name": "Ragel in Ruby Host", "bytes": "3481" }, { "name": "Ruby", "bytes": "5116" }, { "name": "Scilab", "bytes": "7" }, { "name": "Shell", "bytes": "3383832" }, { "name": "SourcePawn", "bytes": "23661" }, { "name": "TeX", "bytes": "879606" }, { "name": "WebIDL", "bytes": "1902" }, { "name": "XSLT", "bytes": "13134" }, { "name": "Yacc", "bytes": "112744" } ], "symlink_target": "" }
(function() { 'use strict'; angular .module('kueJobs') .directive('listJobs', listJobs); listJobs.$inject = []; function listJobs() { return { templateUrl: 'components/jobs/kue/views/list-jobs.view.html', restrict: 'E', scope: { jobType: '@', // if provided the rendered table will list only the jobs of type jobType; otherwise render all jobs no matter of their type perPage: '@', // number of rows to display on a single page when using pagination. - default value is 10 autoRefreshInterval: '@', ontoggle: '&' }, controller: 'ListJobsController', controllerAs: 'listJobsCtrl' }; } })();
{ "content_hash": "01eee1f0ce8e7e3a0a5a092b70ce5a5c", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 146, "avg_line_length": 28.625, "alnum_prop": 0.6142649199417758, "repo_name": "distributev/the-app", "id": "f8e9b699521e497653bae08fa253dfd96c06df3d", "size": "687", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "client/components/jobs/kue/directives/list-jobs.directive.js", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "290" }, { "name": "ApacheConf", "bytes": "24139" }, { "name": "Batchfile", "bytes": "3563" }, { "name": "CSS", "bytes": "382524" }, { "name": "HTML", "bytes": "175347" }, { "name": "JavaScript", "bytes": "577132" }, { "name": "Visual Basic", "bytes": "334" } ], "symlink_target": "" }
Various puzzles and Games in your browser. You can see it in action [HERE](http://bryukh.com/Puzzles/)
{ "content_hash": "aef3b99bd73aaa65f9b0af0517fd2f23", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 59, "avg_line_length": 51.5, "alnum_prop": 0.7572815533980582, "repo_name": "Bryukh/Puzzles", "id": "2be96464d72f2384f376c3b1e1f65bba9582c4ba", "size": "132", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "3925" }, { "name": "HTML", "bytes": "617" }, { "name": "JavaScript", "bytes": "17012" } ], "symlink_target": "" }
google.load("search", "1"); google.load("maps", "2"); var reyooz = reyooz || { }; // create our ui objects var layout = reyooz.Layout(), map = reyooz.Map(), user = reyooz.User(), messages = reyooz.Messages(), items = reyooz.Items( "#listingsWrapper" ), footer = reyooz.Footer(), help = reyooz.Help(); // create our controller singleton, this will handle events reyooz.controller = (function () { return { error: function ( msg, parentId ) { messages.error( msg, parentId ); }, success: function ( msg ) { messages.success( msg ); }, addItem: function () { if ( !user.isLoggedIn() ) { user.loginUserAndListItem(); } else { items.addItem(); } }, openAddItemDialog: function () { map.attachMiniMapAddItem(); }, itemAdded: function ( item ) { map.showItem( item ); user.showEditItemsButton(); }, getItemsForUser: function () { user.getItems(); }, setItems: function ( itemList ) { items.setItemsForUser( itemList ); }, getLatLngFromSearch: function ( search, callback ) { map.getLatLngFromSearch( search, callback ); }, mapMoved: function ( bounds ) { items.getItems( bounds ); }, addItemsToMap: function ( items ) { map.addItems( items ); }, popupItem: function ( id ) { map.popupItem( id ); }, search: function () { map.nudge(); }, mapOverlayChanged: function () { map.overlayChanged(); }, messageSent: function ( msg ) { map.closeInfoWindow(); messages.success( msg ); }, setCurrentUserEmail: function ( email ) { items.setCurrentUserEmail( email ); }, miniMapAddItemLatLngChange: function ( lat, lng ) { items.setAddItemLatLng( lat, lng ); }, zoomMapOut: function () { map.zoomOut(); } }; })(); // inject our controller into our ui objects map.addEventListener( reyooz.controller ); items.addEventListener( reyooz.controller ); user.addEventListener( reyooz.controller ); footer.addEventListener( reyooz.controller ); help.addEventListener( reyooz.controller ); // on dom ready attach ui object behaviours to events $(function () { // fix pngs $( document ).pngFix(); layout.bind(); items.bind(); user.bind(); footer.bind(); help.bind(); if ( user.isLoggedIn() ) { items.setCurrentUserEmail( $(".currentUserEmail").text() ); } // by this stage the dialogs will no longer be in the dom // so can show the remaining components which will have loaded $("#loadingWrapper").removeClass( "hidden" ); // pop the welcome message dialog on page load help.showWelcomeDialog(); // trigger the resize event before binding the map so that // it can correctly determine its dimensions $( window ).trigger( "resize" ); map.bind(); // finally, nudge the map so we pickup the markers map.nudge(); // check to see if this is a redirect from the verification page // if so, popup the signin dialog with a confirmation message // http://localhost:8000/?verified=true&email=test2%40test.com# if ( /\?verified=true&/.test( document.location ) === true ) { var email = /&email=(.*)$/.exec( document.location )[1].replace( "%40", "@" ).replace( "#","" ); user.showVerifiedLoginDialog( email ); } });
{ "content_hash": "e430c6e43715d36d04520fee7d7011a6", "timestamp": "", "source": "github", "line_count": 143, "max_line_length": 109, "avg_line_length": 27.216783216783217, "alnum_prop": 0.5367420349434738, "repo_name": "originalpete/reyooz", "id": "38681b9a7702f29db8cd14cfff8d4d83e830d962", "size": "3892", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "static/js/controller.js", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
require 'bitescript' include BiteScript fb = FileBuilder.build(__FILE__) do public_class "SimpleLoop" do public_static_method "main", [], void, string[] do aload 0 push_int 0 aaload label :top dup aprintln goto :top returnvoid end end end fb.generate do |filename, class_builder| File.open(filename, 'w') do |file| file.write(class_builder.generate) end end
{ "content_hash": "e51d1abb4961fb64159a658360b823ca", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 54, "avg_line_length": 17.875, "alnum_prop": 0.6293706293706294, "repo_name": "headius/bitescript", "id": "140fbc2571ea3ed6c26988c9a7ae422ef9a91eee", "size": "646", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "examples/simple_loop.rb", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Ruby", "bytes": "178971" } ], "symlink_target": "" }
const SedaType = Java.type("org.apache.camel.component.seda.SedaComponent"); s = context.getComponent('seda', SedaType) s.setQueueSize(1234)
{ "content_hash": "734044d82a0da3ac6c3e86a1fdd43478", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 76, "avg_line_length": 35.25, "alnum_prop": 0.7801418439716312, "repo_name": "pax95/camel", "id": "efe56967048d3283b4d7a66329a3084e2e4602b0", "size": "142", "binary": false, "copies": "9", "ref": "refs/heads/CAMEL-17322", "path": "dsl/camel-js-dsl/src/test/resources/routes/routes-with-component-configuration.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Apex", "bytes": "6519" }, { "name": "Batchfile", "bytes": "1518" }, { "name": "CSS", "bytes": "30373" }, { "name": "Elm", "bytes": "10852" }, { "name": "FreeMarker", "bytes": "11410" }, { "name": "Groovy", "bytes": "54390" }, { "name": "HTML", "bytes": "190919" }, { "name": "Java", "bytes": "68575773" }, { "name": "JavaScript", "bytes": "90399" }, { "name": "Makefile", "bytes": "513" }, { "name": "PLSQL", "bytes": "1419" }, { "name": "Python", "bytes": "36" }, { "name": "Ruby", "bytes": "4802" }, { "name": "Scala", "bytes": "323702" }, { "name": "Shell", "bytes": "17107" }, { "name": "Tcl", "bytes": "4974" }, { "name": "Thrift", "bytes": "6979" }, { "name": "XQuery", "bytes": "546" }, { "name": "XSLT", "bytes": "284638" } ], "symlink_target": "" }
package org.ovirt.engine.core.vdsbroker.vdsbroker; import java.util.Map; import java.util.concurrent.Future; import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; import org.apache.commons.httpclient.HttpClient; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.vdsbroker.gluster.GlusterHookContentInfoReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.gluster.GlusterHooksListReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.gluster.GlusterServersListReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.gluster.GlusterTaskInfoReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.gluster.GlusterTasksListReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeOptionsInfoReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeProfileInfoReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeStatusReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumesListReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc; import org.ovirt.engine.core.vdsbroker.irsbroker.StoragePoolInfoReturnForXmlRpc; public interface IVdsServer { HttpClient getHttpClient(); OneVmReturnForXmlRpc create(Map createInfo); StatusOnlyReturnForXmlRpc destroy(String vmId); StatusOnlyReturnForXmlRpc shutdown(String vmId, String timeout, String message); StatusOnlyReturnForXmlRpc shutdown(String vmId, String timeout, String message, boolean reboot); OneVmReturnForXmlRpc pause(String vmId); StatusOnlyReturnForXmlRpc hibernate(String vmId, String hiberVolHandle); OneVmReturnForXmlRpc resume(String vmId); VMListReturnForXmlRpc list(); VMListReturnForXmlRpc list(String isFull, String[] vmIds); VDSInfoReturnForXmlRpc getCapabilities(); VDSInfoReturnForXmlRpc getHardwareInfo(); VDSInfoReturnForXmlRpc getVdsStats(); StatusOnlyReturnForXmlRpc setMOMPolicyParameters(Map<String, Object> key_value_store); StatusOnlyReturnForXmlRpc setHaMaintenanceMode(String mode, boolean enabled); StatusOnlyReturnForXmlRpc desktopLogin(String vmId, String domain, String user, String password); StatusOnlyReturnForXmlRpc desktopLogoff(String vmId, String force); VMInfoListReturnForXmlRpc getVmStats(String vmId); VMInfoListReturnForXmlRpc getAllVmStats(); StatusOnlyReturnForXmlRpc migrate(Map<String, String> migrationInfo); StatusOnlyReturnForXmlRpc migrateStatus(String vmId); StatusOnlyReturnForXmlRpc migrateCancel(String vmId); OneVmReturnForXmlRpc changeDisk(String vmId, String imageLocation); OneVmReturnForXmlRpc changeFloppy(String vmId, String imageLocation); @Deprecated StatusOnlyReturnForXmlRpc heartBeat(); StatusOnlyReturnForXmlRpc monitorCommand(String vmId, String monitorCommand); StatusOnlyReturnForXmlRpc setVmTicket(String vmId, String otp64, String sec); StatusOnlyReturnForXmlRpc setVmTicket(String vmId, String otp64, String sec, String connectionAction, Map<String, String> params); StatusOnlyReturnForXmlRpc startSpice(String vdsIp, int port, String ticket); StatusOnlyReturnForXmlRpc addNetwork(String bridge, String vlan, String bond, String[] nics, Map<String, String> options); StatusOnlyReturnForXmlRpc delNetwork(String bridge, String vlan, String bond, String[] nics); StatusOnlyReturnForXmlRpc editNetwork(String oldBridge, String newBridge, String vlan, String bond, String[] nics, Map<String, String> options); Future<Map<String, Object>> setupNetworks(Map networks, Map bonding, Map options); StatusOnlyReturnForXmlRpc setSafeNetworkConfig(); FenceStatusReturnForXmlRpc fenceNode(String ip, String port, String type, String user, String password, String action, String secured, String options, Map<String, Object> fencingPolicy); ServerConnectionStatusReturnForXmlRpc connectStorageServer(int serverType, String spUUID, Map<String, String>[] args); ServerConnectionStatusReturnForXmlRpc disconnectStorageServer(int serverType, String spUUID, Map<String, String>[] args); ServerConnectionListReturnForXmlRpc getStorageConnectionsList(String spUUID); StatusOnlyReturnForXmlRpc createStorageDomain(int domainType, String sdUUID, String domainName, String arg, int storageType, String storageFormatType); StatusOnlyReturnForXmlRpc formatStorageDomain(String sdUUID); StatusOnlyReturnForXmlRpc connectStoragePool(String spUUID, int hostSpmId, String SCSIKey, String masterdomainId, int masterVersion, Map<String, String> storageDomains); StatusOnlyReturnForXmlRpc disconnectStoragePool(String spUUID, int hostSpmId, String SCSIKey); // The poolType parameter is ignored by VDSM StatusOnlyReturnForXmlRpc createStoragePool(int poolType, String spUUID, String poolName, String msdUUID, String[] domList, int masterVersion, String lockPolicy, int lockRenewalIntervalSec, int leaseTimeSec, int ioOpTimeoutSec, int leaseRetries); StatusOnlyReturnForXmlRpc reconstructMaster(String spUUID, String poolName, String masterDom, Map<String, String> domDict, int masterVersion, String lockPolicy, int lockRenewalIntervalSec, int leaseTimeSec, int ioOpTimeoutSec, int leaseRetries, int hostSpmId); OneStorageDomainStatsReturnForXmlRpc getStorageDomainStats(String sdUUID); OneStorageDomainInfoReturnForXmlRpc getStorageDomainInfo(String sdUUID); StorageDomainListReturnForXmlRpc getStorageDomainsList(String spUUID, int domainType, String poolType, String path); FileStatsReturnForXmlRpc getIsoList(String spUUID); OneUuidReturnForXmlRpc createVG(String sdUUID, String[] deviceList); OneUuidReturnForXmlRpc createVG(String sdUUID, String[] deviceList, boolean force); VGListReturnForXmlRpc getVGList(); OneVGReturnForXmlRpc getVGInfo(String vgUUID); LUNListReturnForXmlRpc getDeviceList(int storageType); DevicesVisibilityMapReturnForXmlRpc getDevicesVisibility(String[] devicesList); IQNListReturnForXmlRpc discoverSendTargets(Map<String, String> args); OneUuidReturnForXmlRpc spmStart(String spUUID, int prevID, String prevLVER, int recoveryMode, String SCSIFencing, int maxHostId, String storagePoolFormatType); StatusOnlyReturnForXmlRpc spmStop(String spUUID); SpmStatusReturnForXmlRpc spmStatus(String spUUID); StatusOnlyReturnForXmlRpc refreshStoragePool(String spUUID, String msdUUID, int masterVersion); TaskStatusReturnForXmlRpc getTaskStatus(String taskUUID); TaskStatusListReturnForXmlRpc getAllTasksStatuses(); TaskInfoListReturnForXmlRpc getAllTasksInfo(); StatusOnlyReturnForXmlRpc stopTask(String taskUUID); StatusOnlyReturnForXmlRpc clearTask(String taskUUID); StatusOnlyReturnForXmlRpc revertTask(String taskUUID); StatusOnlyReturnForXmlRpc hotplugDisk(Map info); StatusOnlyReturnForXmlRpc hotunplugDisk(Map info); StatusOnlyReturnForXmlRpc hotPlugNic(Map info); StatusOnlyReturnForXmlRpc hotUnplugNic(Map info); StatusOnlyReturnForXmlRpc vmUpdateDevice(String vmId, Map device); FutureTask<Map<String, Object>> poll(); FutureTask<Map<String, Object>> timeBoundPoll(long timeout, TimeUnit unit); StatusOnlyReturnForXmlRpc snapshot(String vmId, Map<String, String>[] disks); StatusOnlyReturnForXmlRpc snapshot(String vmId, Map<String, String>[] disks, String memory); AlignmentScanReturnForXmlRpc getDiskAlignment(String vmId, Map<String, String> driveSpecs); ImageSizeReturnForXmlRpc diskSizeExtend(String vmId, Map<String, String> diskParams, String newSize); StatusOnlyReturnForXmlRpc merge(String vmId, Map<String, String> drive, String baseVolUUID, String topVolUUID, String bandwidth, String jobUUID); // Gluster vdsm Commands OneUuidReturnForXmlRpc glusterVolumeCreate(String volumeName, String[] brickList, int replicaCount, int stripeCount, String[] transportList); OneUuidReturnForXmlRpc glusterVolumeCreate(String volumeName, String[] brickList, int replicaCount, int stripeCount, String[] transportList, boolean force); StatusOnlyReturnForXmlRpc glusterVolumeSet(String volumeName, String key, String value); StatusOnlyReturnForXmlRpc glusterVolumeStart(String volumeName, Boolean force); StatusOnlyReturnForXmlRpc glusterVolumeStop(String volumeName, Boolean force); StatusOnlyReturnForXmlRpc glusterVolumeDelete(String volumeName); StatusOnlyReturnForXmlRpc glusterVolumeReset(String volumeName, String volumeOption, Boolean force); GlusterVolumeOptionsInfoReturnForXmlRpc glusterVolumeSetOptionsList(); GlusterTaskInfoReturnForXmlRpc glusterVolumeRemoveBricksStart(String volumeName, String[] brickList, int replicaCount, Boolean forceRemove); GlusterVolumeTaskReturnForXmlRpc glusterVolumeRemoveBricksStop(String volumeName, String[] brickList, int replicaCount); StatusOnlyReturnForXmlRpc glusterVolumeRemoveBricksCommit(String volumeName, String[] brickList, int replicaCount); StatusOnlyReturnForXmlRpc glusterVolumeBrickAdd(String volumeName, String[] bricks, int replicaCount, int stripeCount); StatusOnlyReturnForXmlRpc glusterVolumeBrickAdd(String volumeName, String[] bricks, int replicaCount, int stripeCount, boolean force); GlusterTaskInfoReturnForXmlRpc glusterVolumeRebalanceStart(String volumeName, Boolean fixLayoutOnly, Boolean force); GlusterVolumeTaskReturnForXmlRpc glusterVolumeRebalanceStop(String volumeName); StatusOnlyReturnForXmlRpc glusterVolumeReplaceBrickStart(String volumeName, String existingBrickDir, String newBrickDir); StatusOnlyReturnForXmlRpc glusterHostRemove(String hostName, Boolean force); StatusOnlyReturnForXmlRpc glusterHostAdd(String hostName); GlusterServersListReturnForXmlRpc glusterServersList(); StatusOnlyReturnForXmlRpc diskReplicateStart(String vmUUID, Map srcDisk, Map dstDisk); StatusOnlyReturnForXmlRpc diskReplicateFinish(String vmUUID, Map srcDisk, Map dstDisk); StatusOnlyReturnForXmlRpc glusterVolumeProfileStart(String volumeName); StatusOnlyReturnForXmlRpc glusterVolumeProfileStop(String volumeName); GlusterVolumeStatusReturnForXmlRpc glusterVolumeStatus(Guid clusterId, String volumeName, String brickName, String volumeStatusOption); GlusterVolumesListReturnForXmlRpc glusterVolumesList(Guid clusterId); GlusterVolumeProfileInfoReturnForXmlRpc glusterVolumeProfileInfo(Guid clusterId, String volumeName, boolean nfs); StatusOnlyReturnForXmlRpc glusterHookEnable(String glusterCommand, String stage, String hookName); StatusOnlyReturnForXmlRpc glusterHookDisable(String glusterCommand, String stage, String hookName); GlusterHooksListReturnForXmlRpc glusterHooksList(); OneUuidReturnForXmlRpc glusterHostUUIDGet(); GlusterServicesReturnForXmlRpc glusterServicesList(Guid serverId, String[] serviceNames); GlusterHookContentInfoReturnForXmlRpc glusterHookRead(String glusterCommand, String stage, String hookName); StatusOnlyReturnForXmlRpc glusterHookUpdate(String glusterCommand, String stage, String hookName, String content, String checksum); StatusOnlyReturnForXmlRpc glusterHookAdd(String glusterCommand, String stage, String hookName, String content, String checksum, Boolean enabled); StatusOnlyReturnForXmlRpc glusterHookRemove(String glusterCommand, String stage, String hookName); GlusterServicesReturnForXmlRpc glusterServicesAction(Guid serverId, String [] serviceList, String actionType); StoragePoolInfoReturnForXmlRpc getStoragePoolInfo(String spUUID); GlusterTasksListReturnForXmlRpc glusterTasksList(); GlusterVolumeTaskReturnForXmlRpc glusterVolumeRebalanceStatus(String volumeName); GlusterVolumeTaskReturnForXmlRpc glusterVolumeRemoveBrickStatus(String volumeName, String[] bricksList); StatusOnlyReturnForXmlRpc setNumberOfCpus(String vmId, String numberOfCpus); StatusOnlyReturnForXmlRpc updateVmPolicy(Map info); }
{ "content_hash": "aab937ac248a0360a18e161fa0453a36", "timestamp": "", "source": "github", "line_count": 314, "max_line_length": 149, "avg_line_length": 40.92356687898089, "alnum_prop": 0.7852918287937743, "repo_name": "phoenixsbk/kvmmgr", "id": "89f34042f9c799933c6304e0d5d7fc48e10dd4f8", "size": "12850", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/IVdsServer.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "2890497" }, { "name": "Groff", "bytes": "10684" }, { "name": "HTML", "bytes": "343765" }, { "name": "Java", "bytes": "24621295" }, { "name": "JavaScript", "bytes": "3433498" }, { "name": "Makefile", "bytes": "23292" }, { "name": "PLSQL", "bytes": "102200" }, { "name": "PLpgSQL", "bytes": "62779" }, { "name": "Python", "bytes": "757075" }, { "name": "SQLPL", "bytes": "352649" }, { "name": "Shell", "bytes": "119317" }, { "name": "SourcePawn", "bytes": "1565" }, { "name": "XSLT", "bytes": "18407" } ], "symlink_target": "" }
import logging from ..all_steps.event_handler import EventHandler as TopEventHandler from ..step1.data_handler import DataHandler from ..step1.plot import Step1Plot from .gui_handler import Step3GuiHandler from ..utilities.retrieve_data_infos import RetrieveGeneralDataInfos from .. import DataType class EventHandler(TopEventHandler): def import_button_clicked(self): logging.info(f"{self.data_type} import button clicked") self.parent.loading_flag = True o_load = DataHandler(parent=self.parent, data_type=self.data_type) _folder = o_load.select_folder() o_load.import_files_from_folder(folder=_folder, extension=[".tif", ".fits", ".tiff"]) o_load.import_time_spectra() if not (self.parent.data_metadata[self.data_type]['data'] is None): self.update_ui_after_loading_data(folder=_folder) self.check_time_spectra_status() def sample_list_selection_changed(self): if not self.parent.loading_flag: o_retrieve_data_infos = RetrieveGeneralDataInfos(parent=self.parent, data_type=DataType.normalized) o_retrieve_data_infos.update() self.parent.roi_normalized_image_view_changed(mouse_selection=False) else: self.parent.loading_flag = False def import_button_clicked_automatically(self, folder=None): o_load = DataHandler(parent=self.parent, data_type=self.data_type) o_load.import_files_from_folder(folder=folder, extension=[".tif", ".fits", ".tiff"]) o_load.import_time_spectra() if self.parent.data_metadata[self.data_type]['data'].any(): self.update_ui_after_loading_data(folder=folder) def update_ui_after_loading_data(self, folder=None): self.parent.data_metadata[self.data_type]['folder'] = folder self.parent.select_load_data_row(data_type=self.data_type, row=0) self.parent.retrieve_general_infos(data_type=self.data_type) self.parent.retrieve_general_data_infos(data_type=self.data_type) o_plot = Step1Plot(parent=self.parent, data_type=self.data_type) o_plot.initialize_default_roi() o_plot.display_bragg_edge(mouse_selection=False) o_gui = Step3GuiHandler(parent=self.parent) o_gui.check_widgets() self.check_time_spectra_status() def check_time_spectra_status(self): if str(self.parent.ui.time_spectra_2.text()): self.parent.ui.display_warning_2.setVisible(False) else: self.parent.ui.display_warning_2.setVisible(True)
{ "content_hash": "a12c7503bd8f9c671dcfdb715fa0d028", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 111, "avg_line_length": 41.015625, "alnum_prop": 0.6659047619047619, "repo_name": "ornlneutronimaging/iBeatles", "id": "0fa72a9db3db8d1802704853782149ee9f8523a1", "size": "2625", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ibeatles/step3/event_handler.py", "mode": "33188", "license": "mit", "language": [ { "name": "Python", "bytes": "870567" } ], "symlink_target": "" }
title: How-To (Recommendation) --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You 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. --> Here are the pages that show you how you can customize the Recommendation engine template. - [Read Custom Events](/templates/recommendation/reading-custom-events/) - [Customize Data Preparator](/templates/recommendation/customize-data-prep/) - [Customize Serving](/templates/recommendation/customize-serving/) - [Train with Implicit Preference](/templates/recommendation/training-with-implicit-preference/) - [Filter Recommended Items by Blacklist in Query](/templates/recommendation/blacklist-items/) - [Batch Persistable Evaluator](/templates/recommendation/batch-evaluator/)
{ "content_hash": "e5659a6720086f75a0eb9dfb1f4c5437", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 96, "avg_line_length": 49.32142857142857, "alnum_prop": 0.7972483707458363, "repo_name": "PredictionIO/PredictionIO", "id": "54a6851227ba17e0e6f619762bc67397ea3f6090", "size": "1385", "binary": false, "copies": "7", "ref": "refs/heads/develop", "path": "docs/manual/source/templates/recommendation/how-to.html.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "6900" }, { "name": "Java", "bytes": "7061" }, { "name": "Scala", "bytes": "768325" }, { "name": "Shell", "bytes": "78453" } ], "symlink_target": "" }
package edu.petrov.gojavaonline.module07; /** * Created by Anton on 23.03.2016. */ public interface Observer { void update(Object... args); }
{ "content_hash": "1d254d7a701b6ea2bf7da79dbcbf58f3", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 41, "avg_line_length": 18.625, "alnum_prop": 0.6912751677852349, "repo_name": "anton-petrov/GoJavaOnline", "id": "5c4fac57b7dcff8a27892256c2757df262495387", "size": "149", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/edu/petrov/gojavaonline/module07/Observer.java", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "97" }, { "name": "Java", "bytes": "29015" }, { "name": "Shell", "bytes": "47" } ], "symlink_target": "" }
module.exports = TestMesh; function TestMesh() {} TestMesh.prototype.method1 = function($happn, options, callback) { options.methodName = 'method1'; callback(null, options); }; if (global.TESTING_USER_MANAGEMENT) return; // When 'requiring' the module above, describe( require('../../__fixtures/utils/test_helper') .create() .testName(__filename, 3), function() { this.timeout(120000); var expect = require('expect.js'); require('chai').should(); var mesh; var Mesh = require('../../..'); var adminClient = new Mesh.MeshClient({ secure: true, port: 8003 }); var test_id = Date.now() + '_' + require('shortid').generate(); before(function(done) { global.TESTING_USER_MANAGEMENT = true; //............. mesh = this.mesh = new Mesh(); mesh.initialize( { name: 'user-management', happn: { secure: true, adminPassword: test_id, port: 8003 }, modules: { TestMesh: { path: __filename } }, components: { TestMesh: { moduleName: 'TestMesh', schema: { exclusive: false, methods: {} } } } }, function(err) { if (err) return done(err); mesh.start(function(err) { if (err) { return done(err); } // Credentials for the login method var credentials = { username: '_ADMIN', // pending password: test_id }; adminClient .login(credentials) .then(function() { done(); }) .catch(done); }); } ); }); after(function(done) { delete global.TESTING_USER_MANAGEMENT; //............. adminClient.disconnect(() => { mesh.stop({ reconnect: false }, done); }); }); it('adds a test user, modifies the users password with the admin user, logs in with the test user', function(done) { var testGroup = { name: 'TESTGROUP1' + test_id, custom_data: { customString: 'custom1', customNumber: 0 }, permissions: { methods: {} } }; var testGroupSaved; var testUserSaved; var testUserClient; adminClient.exchange.security.addGroup(testGroup, function(e, result) { if (e) return done(e); testGroupSaved = result; var testUser = { username: 'TESTUSER1' + test_id, password: 'TEST PWD', custom_data: { something: 'useful' } }; adminClient.exchange.security.addUser(testUser, function(e, result) { if (e) return done(e); expect(result.username).to.be(testUser.username); testUserSaved = result; adminClient.exchange.security.linkGroup(testGroupSaved, testUserSaved, function(e) { //we'll need to fetch user groups, do that later if (e) return done(e); testUser.password = 'NEW PWD'; testUser.custom_data = { changedCustom: 'changedCustom' }; adminClient.exchange.security.updateUser(testUser, function(e) { if (e) return done(e); testUserClient = new Mesh.MeshClient({ secure: true, port: 8003 }); return testUserClient .login(testUser) .then(done) .catch(done); }); }); }); }); }); it('test updating an undefined user', function(done) { adminClient.exchange.security.updateUser(undefined, function(e) { expect(e.message).to.be('user is null or not an object'); done(); }); }); it('test updating an undefined group', function(done) { adminClient.exchange.security.updateGroup(undefined, function(e) { expect(e.message).to.be('group is null or not an object'); done(); }); }); it('adds a test user, logs in with the test user - modifies the users password, fetches modified user and ensures oldPassword is not present', function(done) { var testGroup = { name: 'TESTGROUP2' + test_id, custom_data: { customString: 'custom1', customNumber: 0 }, permissions: { methods: {} } }; var testGroupSaved; var testUserSaved; var testUserClient; adminClient.exchange.security.addGroup(testGroup, function(e, result) { if (e) return done(e); testGroupSaved = result; var testUser = { username: 'TESTUSER2' + test_id, password: 'TEST PWD', custom_data: { something: 'useful' } }; adminClient.exchange.security.addUser(testUser, function(e, result) { if (e) return done(e); expect(result.username).to.be(testUser.username); testUserSaved = result; adminClient.exchange.security.linkGroup(testGroupSaved, testUserSaved, function(e) { //we'll need to fetch user groups, do that later if (e) return done(e); testUserClient = new Mesh.MeshClient({ secure: true, port: 8003 }); testUserClient .login(testUser) .then(function() { testUser.oldPassword = 'TEST PWD'; testUser.password = 'NEW PWD'; testUser.custom_data = { changedCustom: 'changedCustom' }; testUserClient.exchange.security.updateOwnUser(testUser, function(e, result) { if (e) return done(e); expect(result.custom_data.changedCustom).to.be('changedCustom'); testUserClient .login(testUser) .then(function() { adminClient.exchange.security .getUser(testUser.username) .then(function(fetchedUser) { expect(fetchedUser.oldPassword).to.be(undefined); done(); }); }) .catch(done); }); }) .catch(function(e) { done(e); }); }); }); }); }); it('adds a test user, logs in with the test user - fails to modify the user using updateUser on another user', function(done) { var testGroup = { name: 'TESTGROUP3' + test_id, custom_data: { customString: 'custom1', customNumber: 0 }, permissions: { methods: {} } }; var testGroupSaved; var testUserSaved; var testUserClient; adminClient.exchange.security.addGroup(testGroup, function(e, result) { if (e) return done(e); testGroupSaved = result; var testUser = { username: 'TESTUSER3' + test_id, password: 'TEST PWD', custom_data: { something: 'useful' } }; adminClient.exchange.security.addUser(testUser, function(e, result) { if (e) return done(e); expect(result.username).to.be(testUser.username); testUserSaved = result; adminClient.exchange.security.linkGroup(testGroupSaved, testUserSaved, function(e) { //we'll need to fetch user groups, do that later if (e) return done(e); testUserClient = new Mesh.MeshClient({ secure: true, port: 8003 }); testUserClient .login(testUser) .then(function() { testUser.oldPassword = 'TEST PWD'; testUser.password = 'NEW PWD'; testUser.custom_data = { changedCustom: 'changedCustom' }; testUserClient.exchange.security.updateUser(testUser, function(e) { expect(e.toString()).to.be('AccessDenied: unauthorized'); done(); }); }) .catch(function(e) { done(e); }); }); }); }); }); it('adds a test user, logs in with the test user - fails to modify the password, as old password was not included', function(done) { var testGroup = { name: 'TESTGROUP4' + test_id, custom_data: { customString: 'custom1', customNumber: 0 }, permissions: { methods: {} } }; var testGroupSaved; var testUserSaved; var testUserClient; adminClient.exchange.security.addGroup(testGroup, function(e, result) { if (e) return done(e); testGroupSaved = result; var testUser = { username: 'TESTUSER4' + test_id, password: 'TEST PWD', custom_data: { something: 'useful' } }; adminClient.exchange.security.addUser(testUser, function(e, result) { if (e) return done(e); expect(result.username).to.be(testUser.username); testUserSaved = result; adminClient.exchange.security.linkGroup(testGroupSaved, testUserSaved, function(e) { //we'll need to fetch user groups, do that later if (e) return done(e); testUserClient = new Mesh.MeshClient({ secure: true, port: 8003 }); testUserClient .login(testUser) .then(function() { testUser.password = 'NEW PWD'; testUser.custom_data = { changedCustom: 'changedCustom' }; testUserClient.exchange.security.updateOwnUser(testUser, function(e) { expect(e.toString()).to.be('Error: missing oldPassword parameter'); done(); }); }) .catch(function(e) { done(e); }); }); }); }); }); it('adds a test user, logs in with the test user - fails to modify the password, as old password does not match the current one', function(done) { var testGroup = { name: 'TESTGROUP5' + test_id, custom_data: { customString: 'custom1', customNumber: 0 }, permissions: { methods: {} } }; var testGroupSaved; var testUserSaved; var testUserClient; adminClient.exchange.security.addGroup(testGroup, function(e, result) { if (e) return done(e); testGroupSaved = result; var testUser = { username: 'TESTUSER5' + test_id, password: 'TEST PWD', custom_data: { something: 'useful' } }; adminClient.exchange.security.addUser(testUser, function(e, result) { if (e) return done(e); expect(result.username).to.be(testUser.username); testUserSaved = result; adminClient.exchange.security.linkGroup(testGroupSaved, testUserSaved, function(e) { //we'll need to fetch user groups, do that later if (e) return done(e); testUserClient = new Mesh.MeshClient({ secure: true, port: 8003 }); testUserClient .login(testUser) .then(function() { testUser.oldPassword = 'NEW PWD'; testUser.password = 'NEW PWD'; testUser.custom_data = { changedCustom: 'changedCustom' }; testUserClient.exchange.security.updateOwnUser(testUser, function(e) { expect(e.toString()).to.be('Error: old password incorrect'); done(); }); }) .catch(function(e) { done(e); }); }); }); }); }); it('adds a test user, logs in with the test user - modifies the user details without the users password changing', function(done) { var testGroup = { name: 'TESTGROUP6' + test_id, custom_data: { customString: 'custom1', customNumber: 0 }, permissions: { methods: {} } }; var testGroupSaved; var testUserSaved; var testUserClient; adminClient.exchange.security.addGroup(testGroup, function(e, result) { if (e) return done(e); testGroupSaved = result; var testUser = { username: 'TESTUSER6' + test_id, password: 'TEST PWD', custom_data: { something: 'useful' }, application_data: { something: 'sacred' } }; adminClient.exchange.security.addUser(testUser, function(e, result) { if (e) return done(e); expect(result.username).to.be(testUser.username); testUserSaved = result; adminClient.exchange.security.linkGroup(testGroupSaved, testUserSaved, function(e) { if (e) return done(e); testUserClient = new Mesh.MeshClient({ secure: true, port: 8003 }); testUserClient .login(testUser) .then(function() { delete testUser.password; testUser.custom_data = { changedCustom: 'changedCustom' }; testUser.application_data = { something: 'profane' }; return testUserClient.exchange.security.updateOwnUser(testUser); }) .then(function(result) { expect(result.custom_data.changedCustom).to.be('changedCustom'); expect(result.application_data.something).to.be('sacred'); return adminClient.exchange.security.getUser(testUser.username); }) .then(function(result) { expect(result.application_data.something).to.be('sacred'); testUser.application_data = { something: 'profane' }; return adminClient.exchange.security.updateUser(testUser); }) .then(function() { return adminClient.exchange.security.getUser(testUser.username); }) .then(function(result) { expect(result.application_data.something).to.be('profane'); done(); }) .catch(done); }); }); }); }); it('adds a test user, we fetch the user using the listUsersByGroup method', function(done) { var testGroup = { name: 'TESTGROUP7' + test_id, custom_data: { customString: 'custom1', customNumber: 0 }, permissions: { methods: {} } }; var testGroupSaved; var testUserSaved; adminClient.exchange.security.addGroup(testGroup, function(e, result) { if (e) return done(e); testGroupSaved = result; var testUser = { username: 'TESTUSER7' + test_id, password: 'TEST PWD', custom_data: { something: 'useful', extra: 8 } }; var steps = []; adminClient.exchange.security.addUser(testUser, function(e, result) { if (e) return done(e); expect(result.username).to.be(testUser.username); testUserSaved = result; adminClient.exchange.security.linkGroup(testGroupSaved, testUserSaved, function(e) { //we'll need to fetch user groups, do that later if (e) return done(e); adminClient.exchange.security .listUsersByGroup('TESTGROUP7' + test_id) .then(function(users) { expect(users.length).to.be(1); expect(users[0].username).to.be('TESTUSER7' + test_id); expect(users[0].custom_data).to.eql({ something: 'useful', extra: 8 }); steps.push(1); return adminClient.exchange.security.listUsersByGroup('TESTGROUP7' + test_id, { criteria: { 'custom_data.extra': 8 } }); }) .then(function(users) { expect(users.length).to.be(1); expect(users[0].username).to.be('TESTUSER7' + test_id); expect(users[0].custom_data).to.eql({ something: 'useful', extra: 8 }); steps.push(2); return adminClient.exchange.security.listUsersByGroup('TESTGROUP50' + test_id); }) .then(function(users) { expect(users.length).to.be(0); steps.push(3); return adminClient.exchange.security.listUsersByGroup('TESTGROUP7' + test_id, { criteria: { 'custom_data.extra': 9 } }); }) .then(function(users) { expect(users.length).to.be(0); steps.push(4); return adminClient.exchange.security.listUserNamesByGroup('TESTGROUP7' + test_id); }) .then(function(usernames) { expect(usernames.length).to.be(1); expect(usernames[0]).to.be('TESTUSER7' + test_id); steps.push(5); return adminClient.exchange.security.listUsersByGroup(null); }) .catch(function(e) { expect(e.toString()).to.be('Error: validation error: groupName must be specified'); expect(steps.length).to.be(5); done(); }); }); }); }); }); it('tests the listUsers method with and without criteria', async () => { await adminClient.exchange.security.addUser({ username: 'TESTUSER_LIST1', password: 'TEST PWD', custom_data: { something: 'useful' } }); await adminClient.exchange.security.addUser({ username: 'TESTUSER_LIST2', password: 'TEST PWD', custom_data: { something: 'useful' } }); await adminClient.exchange.security.addUser({ username: 'TESTUSER_LIST3', password: 'TEST PWD', custom_data: { something: 'else' } }); await adminClient.exchange.security.addUser({ username: 'TESTUSER_LIST4', password: 'TEST PWD', custom_data: { something: 'else' } }); let usersFiltered = await adminClient.exchange.security.listUsers('TESTUSER_LIST*', { criteria: { 'custom_data.something': { $eq: 'useful' } } }); let usersUnFiltered = await adminClient.exchange.security.listUsers('TESTUSER_LIST*'); expect(usersFiltered.length).to.be(2); expect(usersUnFiltered.length).to.be(4); }); it('tests the listGroups method with and without criteria', async () => { await adminClient.exchange.security.addGroup({ name: 'TESTGROUP_LIST1', custom_data: { something: 'useful' }, permissions: { methods: {} } }); await adminClient.exchange.security.addGroup({ name: 'TESTGROUP_LIST2', custom_data: { something: 'useful' }, permissions: { methods: {} } }); await adminClient.exchange.security.addGroup({ name: 'TESTGROUP_LIST3', custom_data: { something: 'else' }, permissions: { methods: {} } }); await adminClient.exchange.security.addGroup({ name: 'TESTGROUP_LIST4', custom_data: { something: 'else' }, permissions: { methods: {} } }); let groupsFiltered = await adminClient.exchange.security.listGroups('TESTGROUP_LIST*', { criteria: { 'custom_data.something': { $eq: 'useful' } } }); let groupsUnFiltered = await adminClient.exchange.security.listGroups('TESTGROUP_LIST*'); expect(groupsUnFiltered.length).to.be(4); expect(groupsFiltered.length).to.be(2); }); it('should get groups matching special criteria with limit, skip and count', async () => { await adminClient.exchange.security.addGroup({ name: 'TESTGROUP_SEARCH1', custom_data: { cadre: 0 }, permissions: { methods: {} } }); await adminClient.exchange.security.addGroup({ name: 'TESTGROUP_SEARCH2', custom_data: { cadre: 0 }, permissions: { methods: {} } }); await adminClient.exchange.security.addGroup({ name: 'TESTGROUP_SEARCH3', custom_data: { cadre: 1 }, permissions: { methods: {} } }); await adminClient.exchange.security.addGroup({ name: 'TESTGROUP_SEARCH4', custom_data: { cadre: 2 }, permissions: { methods: {} } }); let results1 = await adminClient.exchange.security.listGroups('TESTGROUP_SEARCH*', { criteria: { 'custom_data.cadre': { $gt: 0 } }, limit: 1 }); let results2 = await adminClient.exchange.security.listGroups('TESTGROUP_SEARCH*', { criteria: { 'custom_data.cadre': { $gt: 0 } }, skip: 1 }); let resultscontrol = await adminClient.exchange.security.listGroups('TESTGROUP_SEARCH*', { criteria: { 'custom_data.cadre': { $gt: 0 } } }); let results3 = await adminClient.exchange.security.listGroups('TESTGROUP_SEARCH*', { criteria: { 'custom_data.cadre': { $gt: 0 } }, count: true }); expect(results1.length).to.be(1); expect(results2.length).to.be(1); expect(resultscontrol.length).to.be(2); expect(results3.value).to.be(2); }); it('should get users matching special criteria with limit, skip and count', async () => { await adminClient.exchange.security.addUser({ username: 'TESTUSER_SEARCH1', password: 'TEST PWD', custom_data: { cadre: 0 } }); await adminClient.exchange.security.addUser({ username: 'TESTUSER_SEARCH2', password: 'TEST PWD', custom_data: { cadre: 0 } }); await adminClient.exchange.security.addUser({ username: 'TESTUSER_SEARCH3', password: 'TEST PWD', custom_data: { cadre: 1 } }); await adminClient.exchange.security.addUser({ username: 'TESTUSER_SEARCH4', password: 'TEST PWD', custom_data: { cadre: 2 } }); let results1 = await adminClient.exchange.security.listUsers('TESTUSER_SEARCH*', { criteria: { 'custom_data.cadre': { $gt: 0 } }, limit: 1 }); let results2 = await adminClient.exchange.security.listUsers('TESTUSER_SEARCH*', { criteria: { 'custom_data.cadre': { $gt: 0 } }, skip: 1 }); let resultscontrol = await adminClient.exchange.security.listUsers('TESTUSER_SEARCH*', { criteria: { 'custom_data.cadre': { $gt: 0 } } }); let results3 = await adminClient.exchange.security.listUsers('TESTUSER_SEARCH*', { criteria: { 'custom_data.cadre': { $gt: 0 } }, count: true }); expect(results1.length).to.be(1); expect(results2.length).to.be(1); expect(resultscontrol.length).to.be(2); expect(results3.value).to.be(2); }); } );
{ "content_hash": "b457797ee62a4c5cae50ad6d73c871bd", "timestamp": "", "source": "github", "line_count": 822, "max_line_length": 163, "avg_line_length": 29.2992700729927, "alnum_prop": 0.5170237502076067, "repo_name": "happner/happner-2", "id": "53d11d27c2596cff612fef8c70ea3d1dde571048", "size": "24084", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/integration/security/user-group-management.js", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "1961" }, { "name": "JavaScript", "bytes": "1485529" } ], "symlink_target": "" }
import glob import os import re import sys import tempfile from oslo_config import cfg BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", "..")) CONTRIB_DIR = os.path.join(ROOT, 'contrib') PLUGIN_DIRS = glob.glob(os.path.join(CONTRIB_DIR, '*')) ENV_DIR = os.path.join(ROOT, "etc", "heat", "environment.d") TEMP_ENV_DIR = tempfile.mkdtemp() for f in glob.glob(os.path.join(ENV_DIR, "*.yaml")): with open(f, "r") as fin: name = os.path.split(f)[-1] with open(os.path.join(TEMP_ENV_DIR, name), "w") as fout: fout.write(fin.read().replace("file:///", "file://%s/" % ROOT)) sys.path.insert(0, ROOT) sys.path.insert(0, BASE_DIR) cfg.CONF.import_opt('plugin_dirs', 'heat.common.config') cfg.CONF.set_override(name='plugin_dirs', override=PLUGIN_DIRS) cfg.CONF.import_opt('environment_dir', 'heat.common.config') cfg.CONF.set_override(name='environment_dir', override=TEMP_ENV_DIR) # This is required for ReadTheDocs.org, but isn't a bad idea anyway. os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings' def write_autodoc_index(): def find_autodoc_modules(module_name, sourcedir): """Return a list of modules in the SOURCE directory.""" modlist = [] os.chdir(os.path.join(sourcedir, module_name)) print("SEARCHING %s" % sourcedir) for root, dirs, files in os.walk("."): for filename in files: if filename.endswith(".py"): # remove the pieces of the root elements = root.split(os.path.sep) # replace the leading "." with the module name elements[0] = module_name # and get the base module name base, extension = os.path.splitext(filename) if not (base == "__init__"): elements.append(base) result = ".".join(elements) modlist.append(result) return modlist RSTDIR = os.path.abspath(os.path.join(BASE_DIR, "sourcecode")) SOURCES = {'heat': {'module': 'heat', 'path': ROOT}} EXCLUDED_MODULES = ('heat.testing', 'heat.cmd', 'heat.common', 'heat.cloudinit', 'heat.cfn_client', 'heat.doc', 'heat.db', 'heat.engine.resources', 'heat.locale', 'heat.openstack', '.*\.tests', '.*\.resources') CURRENT_SOURCES = {} if not(os.path.exists(RSTDIR)): os.mkdir(RSTDIR) CURRENT_SOURCES[RSTDIR] = ['autoindex.rst', '.gitignore'] INDEXOUT = open(os.path.join(RSTDIR, "autoindex.rst"), "w") INDEXOUT.write("=================\n") INDEXOUT.write("Source Code Index\n") INDEXOUT.write("=================\n") for title, info in SOURCES.items(): path = info['path'] modulename = info['module'] sys.stdout.write("Generating source documentation for %s\n" % title) INDEXOUT.write("\n%s\n" % title.capitalize()) INDEXOUT.write("%s\n" % ("=" * len(title),)) INDEXOUT.write(".. toctree::\n") INDEXOUT.write(" :maxdepth: 1\n") INDEXOUT.write("\n") MOD_DIR = os.path.join(RSTDIR, title) CURRENT_SOURCES[MOD_DIR] = [] if not(os.path.exists(MOD_DIR)): os.makedirs(MOD_DIR) for module in find_autodoc_modules(modulename, path): if any([re.match(exclude, module) for exclude in EXCLUDED_MODULES]): print("Excluded module %s." % module) continue mod_path = os.path.join(path, *module.split(".")) generated_file = os.path.join(MOD_DIR, "%s.rst" % module) INDEXOUT.write(" %s/%s\n" % (title, module)) # Find the __init__.py module if this is a directory if os.path.isdir(mod_path): source_file = ".".join((os.path.join(mod_path, "__init__"), "py",)) else: source_file = ".".join((os.path.join(mod_path), "py")) CURRENT_SOURCES[MOD_DIR].append("%s.rst" % module) # Only generate a new file if the source has changed or we don't # have a doc file to begin with. if not os.access(generated_file, os.F_OK) or \ os.stat(generated_file).st_mtime < \ os.stat(source_file).st_mtime: print("Module %s updated, generating new documentation." % module) FILEOUT = open(generated_file, "w") header = "The :mod:`%s` Module" % module FILEOUT.write("%s\n" % ("=" * len(header),)) FILEOUT.write("%s\n" % header) FILEOUT.write("%s\n" % ("=" * len(header),)) FILEOUT.write(".. automodule:: %s\n" % module) FILEOUT.write(" :members:\n") FILEOUT.write(" :undoc-members:\n") FILEOUT.write(" :show-inheritance:\n") FILEOUT.write(" :noindex:\n") FILEOUT.close() INDEXOUT.close() # Delete auto-generated .rst files for sources which no longer exist for directory, subdirs, files in list(os.walk(RSTDIR)): for old_file in files: if old_file not in CURRENT_SOURCES.get(directory, []): print("Removing outdated file for %s" % old_file) os.remove(os.path.join(directory, old_file)) write_autodoc_index() # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) # -- General configuration ---------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.viewcode', 'sphinx.ext.doctest', 'oslosphinx', 'ext.resources'] todo_include_todos = True # Add any paths that contain templates here, relative to this directory. if os.getenv('HUDSON_PUBLISH_DOCS'): templates_path = ['_ga', '_templates'] else: templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'Heat' copyright = u'2012,2013 Heat Developers' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['**/#*', '**~', '**/#*#'] # The reST default role (used for this markup: `text`) # to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] primary_domain = 'py' nitpicky = False # -- Options for HTML output -------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme_path = ['.'] # html_theme = '_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. html_theme_options = { "nosidebar": "false" } # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1" html_last_updated_fmt = os.popen(git_cmd).read() # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a <link> tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'Heatdoc' # -- Options for LaTeX output ------------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]) latex_documents = [ ('index', 'Heat.tex', u'Heat Documentation', u'Heat Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output ------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('man/heat-api', 'heat-api', u'REST API service to the heat project.', [u'Heat Developers'], 1), ('man/heat-api-cfn', 'heat-api-cfn', u'CloudFormation compatible API service to the heat project.', [u'Heat Developers'], 1), ('man/heat-api-cloudwatch', 'heat-api-cloudwatch', u'CloudWatch alike API service to the heat project', [u'Heat Developers'], 1), ('man/heat-db-setup', 'heat-db-setup', u'Command line utility to setup the Heat database', [u'Heat Developers'], 1), ('man/heat-engine', 'heat-engine', u'Service which performs the actions from the API calls made by the user', [u'Heat Developers'], 1), ('man/heat-keystone-setup', 'heat-keystone-setup', u'Script which sets up keystone for usage by Heat', [u'Heat Developers'], 1), ('man/heat-keystone-setup-domain', 'heat-keystone-setup-domain', u'Script which sets up a keystone domain for heat users and projects', [u'Heat Developers'], 1), ('man/heat-manage', 'heat-manage', u'Script which helps manage specific database operations', [u'Heat Developers'], 1), ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ----------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'Heat', u'Heat Documentation', u'Heat Developers', 'Heat', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote'
{ "content_hash": "993c9954d7be1dfa2e02549fedc9921f", "timestamp": "", "source": "github", "line_count": 410, "max_line_length": 79, "avg_line_length": 35.47560975609756, "alnum_prop": 0.6167755242351324, "repo_name": "rdo-management/heat", "id": "f57621c7c45c7faa98eb211f232d782e85c9460c", "size": "15536", "binary": false, "copies": "2", "ref": "refs/heads/mgt-master", "path": "doc/source/conf.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Python", "bytes": "5970886" }, { "name": "Shell", "bytes": "25070" } ], "symlink_target": "" }
'use strict'; /**@type {{[k: string]: TemplateFormatsData}} */ let BattleFormatsData = { bulbasaur: { randomBattleMoves: ["sleeppowder", "bodyslam"], essentialMove: "razorleaf", exclusiveMoves: ["megadrain", "swordsdance", "swordsdance"], tier: "LC", }, ivysaur: { randomBattleMoves: ["sleeppowder", "swordsdance", "bodyslam"], essentialMove: "razorleaf", tier: "NFE", }, venusaur: { randomBattleMoves: ["sleeppowder", "swordsdance", "bodyslam", "hyperbeam"], essentialMove: "razorleaf", tier: "UU", }, charmander: { randomBattleMoves: ["bodyslam", "slash"], essentialMove: "fireblast", exclusiveMoves: ["counter", "seismictoss"], comboMoves: ["swordsdance", "bodyslam", "submission", "fireblast"], tier: "LC", }, charmeleon: { randomBattleMoves: ["bodyslam", "slash"], essentialMove: "fireblast", exclusiveMoves: ["counter", "swordsdance"], comboMoves: ["swordsdance", "bodyslam", "submission", "fireblast"], tier: "NFE", }, charizard: { randomBattleMoves: ["earthquake", "bodyslam", "slash"], essentialMove: "fireblast", comboMoves: ["swordsdance", "hyperbeam"], tier: "UU", }, squirtle: { randomBattleMoves: ["blizzard", "seismictoss", "surf", "hydropump"], exclusiveMoves: ["counter", "bodyslam"], tier: "LC", }, wartortle: { randomBattleMoves: ["surf", "blizzard", "bodyslam", "hydropump"], exclusiveMoves: ["counter", "rest", "seismictoss"], tier: "NFE", }, blastoise: { randomBattleMoves: ["surf", "blizzard", "bodyslam", "hydropump"], exclusiveMoves: ["earthquake", "rest"], tier: "UU", }, caterpie: { randomBattleMoves: ["stringshot", "tackle"], tier: "LC", }, metapod: { randomBattleMoves: ["stringshot", "tackle", "harden"], tier: "NFE", }, butterfree: { randomBattleMoves: ["psychic", "sleeppowder", "stunspore"], exclusiveMoves: ["megadrain", "psywave"], tier: "UU", }, weedle: { randomBattleMoves: ["poisonsting", "stringshot"], tier: "LC", }, kakuna: { randomBattleMoves: ["poisonsting", "stringshot", "harden"], tier: "NFE", }, beedrill: { randomBattleMoves: ["twineedle", "megadrain", "swordsdance"], exclusiveMoves: ["doubleedge", "doubleedge", "hyperbeam"], comboMoves: ["twineedle", "hyperbeam", "swordsdance", "agility"], tier: "UU", }, pidgey: { randomBattleMoves: ["agility", "skyattack", "doubleedge"], exclusiveMoves: ["reflect", "sandattack", "mirrormove", "mimic", "toxic", "substitute"], tier: "LC", }, pidgeotto: { randomBattleMoves: ["agility", "skyattack", "doubleedge"], exclusiveMoves: ["reflect", "sandattack", "mirrormove", "mimic", "toxic", "substitute"], tier: "NFE", }, pidgeot: { randomBattleMoves: ["agility", "hyperbeam", "doubleedge"], exclusiveMoves: ["reflect", "sandattack", "mirrormove", "mimic", "toxic", "skyattack", "skyattack", "substitute"], tier: "UU", }, rattata: { randomBattleMoves: ["bodyslam", "blizzard", "thunderbolt"], essentialMove: "superfang", tier: "LC", }, raticate: { randomBattleMoves: ["bodyslam", "hyperbeam", "blizzard"], essentialMove: "superfang", tier: "UU", }, spearow: { randomBattleMoves: ["drillpeck", "doubleedge", "agility"], exclusiveMoves: ["leer", "toxic", "mirrormove", "mimic", "substitute"], tier: "LC", }, fearow: { randomBattleMoves: ["drillpeck", "doubleedge", "hyperbeam", "agility"], eventPokemon: [ {"generation": 1, "level": 20, "moves": ["growl", "leer", "furyattack", "payday"]}, ], tier: "UU", }, ekans: { randomBattleMoves: ["glare", "earthquake", "bodyslam", "rockslide"], tier: "LC", }, arbok: { randomBattleMoves: ["earthquake", "glare", "hyperbeam"], exclusiveMoves: ["bodyslam", "rockslide"], tier: "UU", }, pikachu: { randomBattleMoves: ["thunderwave", "surf"], essentialMove: "thunderbolt", exclusiveMoves: ["bodyslam", "thunder", "agility", "seismictoss"], eventPokemon: [ {"generation": 1, "level": 5, "moves": ["surf"]}, {"generation": 1, "level": 5, "moves": ["fly"]}, {"generation": 1, "level": 5, "moves": ["thundershock", "growl", "surf"]}, ], tier: "LC", }, raichu: { randomBattleMoves: ["thunderwave", "surf"], essentialMove: "thunderbolt", exclusiveMoves: ["bodyslam", "thunder", "agility", "seismictoss", "hyperbeam"], tier: "UU", }, sandshrew: { randomBattleMoves: ["swordsdance", "bodyslam", "rockslide"], essentialMove: "earthquake", tier: "LC", }, sandslash: { randomBattleMoves: ["swordsdance", "bodyslam", "rockslide"], essentialMove: "earthquake", tier: "UU", }, nidoranf: { randomBattleMoves: ["bodyslam", "blizzard", "thunderbolt"], exclusiveMoves: ["doubleedge", "doublekick"], tier: "LC", }, nidorina: { randomBattleMoves: ["bodyslam", "blizzard", "thunderbolt"], exclusiveMoves: ["bubblebeam", "doublekick", "doubleedge"], tier: "NFE", }, nidoqueen: { randomBattleMoves: ["blizzard", "thunderbolt", "bodyslam"], essentialMove: "earthquake", tier: "UU", }, nidoranm: { randomBattleMoves: ["bodyslam", "blizzard", "thunderbolt"], exclusiveMoves: ["doubleedge", "doublekick"], tier: "LC", }, nidorino: { randomBattleMoves: ["bodyslam", "blizzard", "thunderbolt"], exclusiveMoves: ["bubblebeam", "doublekick", "doubleedge"], tier: "NFE", }, nidoking: { randomBattleMoves: ["blizzard", "bodyslam"], essentialMove: "earthquake", exclusiveMoves: ["thunder", "thunderbolt", "rockslide"], tier: "UU", }, clefairy: { randomBattleMoves: ["bodyslam", "thunderwave", "thunderbolt"], essentialMove: "blizzard", exclusiveMoves: ["counter", "sing", "sing", "psychic", "seismictoss"], tier: "LC", }, clefable: { randomBattleMoves: ["bodyslam", "thunderwave", "thunderbolt"], essentialMove: "blizzard", exclusiveMoves: ["counter", "sing", "sing", "psychic", "hyperbeam"], tier: "UU", }, vulpix: { randomBattleMoves: ["bodyslam", "confuseray", "fireblast"], exclusiveMoves: ["flamethrower", "reflect", "substitute"], tier: "LC", }, ninetales: { randomBattleMoves: ["bodyslam", "confuseray", "fireblast"], exclusiveMoves: ["flamethrower", "reflect", "hyperbeam", "substitute"], tier: "UU", }, jigglypuff: { randomBattleMoves: ["thunderwave", "bodyslam", "seismictoss", "blizzard"], exclusiveMoves: ["counter", "sing"], tier: "LC", }, wigglytuff: { randomBattleMoves: ["thunderwave", "bodyslam", "blizzard"], exclusiveMoves: ["counter", "sing", "hyperbeam"], tier: "UU", }, zubat: { randomBattleMoves: ["toxic", "confuseray", "doubleedge", "megadrain"], tier: "LC", }, golbat: { randomBattleMoves: ["confuseray", "doubleedge", "hyperbeam", "megadrain"], tier: "UU", }, oddish: { randomBattleMoves: ["sleeppowder", "doubleedge"], essentialMove: "megadrain", exclusiveMoves: ["swordsdance", "stunspore", "stunspore"], tier: "LC", }, gloom: { randomBattleMoves: ["sleeppowder", "doubleedge"], essentialMove: "megadrain", exclusiveMoves: ["swordsdance", "stunspore", "stunspore"], tier: "NFE", }, vileplume: { randomBattleMoves: ["sleeppowder", "bodyslam", "stunspore", "swordsdance"], essentialMove: "megadrain", tier: "UU", }, paras: { randomBattleMoves: ["bodyslam", "megadrain"], essentialMove: "spore", exclusiveMoves: ["stunspore", "stunspore", "swordsdance", "growth", "slash"], tier: "LC", }, parasect: { randomBattleMoves: ["bodyslam", "megadrain"], essentialMove: "spore", exclusiveMoves: ["stunspore", "stunspore", "swordsdance", "growth", "slash", "hyperbeam"], tier: "UU", }, venonat: { randomBattleMoves: ["psychic", "sleeppowder", "stunspore"], exclusiveMoves: ["megadrain", "psywave", "doubleedge"], tier: "LC", }, venomoth: { randomBattleMoves: ["psychic", "sleeppowder", "stunspore"], exclusiveMoves: ["megadrain", "megadrain", "doubleedge"], tier: "UU", }, diglett: { randomBattleMoves: ["slash", "rockslide", "bodyslam"], essentialMove: "earthquake", tier: "LC", }, dugtrio: { randomBattleMoves: ["slash", "rockslide", "bodyslam"], essentialMove: "earthquake", tier: "UU", }, meowth: { randomBattleMoves: ["bubblebeam", "bodyslam"], essentialMove: "slash", exclusiveMoves: ["thunder", "thunderbolt"], tier: "LC", }, persian: { randomBattleMoves: ["bubblebeam", "bodyslam"], essentialMove: "slash", exclusiveMoves: ["thunderbolt", "thunder", "hyperbeam", "hyperbeam"], tier: "UU", }, psyduck: { randomBattleMoves: ["blizzard", "amnesia"], essentialMove: "surf", exclusiveMoves: ["bodyslam", "seismictoss", "rest", "hydropump"], eventPokemon: [ {"generation": 1, "level": 15, "moves": ["scratch", "amnesia"]}, ], tier: "LC", }, golduck: { randomBattleMoves: ["blizzard", "amnesia"], essentialMove: "surf", exclusiveMoves: ["bodyslam", "seismictoss", "rest", "hydropump"], tier: "UU", }, mankey: { randomBattleMoves: ["submission", "rockslide", "bodyslam"], exclusiveMoves: ["counter", "megakick"], tier: "LC", }, primeape: { randomBattleMoves: ["submission", "rockslide", "bodyslam"], exclusiveMoves: ["counter", "hyperbeam", "hyperbeam"], tier: "UU", }, growlithe: { randomBattleMoves: ["fireblast", "bodyslam", "flamethrower", "reflect"], tier: "LC", }, arcanine: { randomBattleMoves: ["fireblast", "bodyslam", "hyperbeam"], exclusiveMoves: ["flamethrower", "reflect"], tier: "UU", }, poliwag: { randomBattleMoves: ["blizzard", "surf"], essentialMove: "amnesia", exclusiveMoves: ["psychic", "hypnosis", "hypnosis"], tier: "LC", }, poliwhirl: { randomBattleMoves: ["blizzard", "surf"], essentialMove: "amnesia", exclusiveMoves: ["psychic", "hypnosis", "hypnosis", "counter"], tier: "NFE", }, poliwrath: { randomBattleMoves: ["bodyslam", "earthquake", "submission", "blizzard"], essentialMove: "surf", exclusiveMoves: ["psychic", "hypnosis", "hypnosis"], comboMoves: ["amnesia", "blizzard"], tier: "UU", }, abra: { randomBattleMoves: ["psychic", "thunderwave", "seismictoss"], exclusiveMoves: ["reflect", "counter"], tier: "LC", }, kadabra: { randomBattleMoves: ["psychic", "thunderwave", "recover"], exclusiveMoves: ["reflect", "reflect", "counter", "seismictoss", "seismictoss"], tier: "UU", }, alakazam: { randomBattleMoves: ["psychic", "thunderwave", "recover"], exclusiveMoves: ["reflect", "reflect", "counter", "seismictoss", "seismictoss"], tier: "OU", }, machop: { randomBattleMoves: ["bodyslam", "earthquake", "submission"], exclusiveMoves: ["counter", "rockslide", "rockslide"], tier: "LC", }, machoke: { randomBattleMoves: ["bodyslam", "earthquake", "submission"], exclusiveMoves: ["counter", "rockslide", "rockslide"], tier: "NFE", }, machamp: { randomBattleMoves: ["bodyslam", "earthquake", "submission"], exclusiveMoves: ["counter", "rockslide", "rockslide", "hyperbeam"], tier: "UU", }, bellsprout: { randomBattleMoves: ["sleeppowder", "swordsdance", "doubleedge", "stunspore"], essentialMove: "razorleaf", tier: "LC", }, weepinbell: { randomBattleMoves: ["sleeppowder", "swordsdance", "doubleedge", "stunspore"], essentialMove: "razorleaf", tier: "NFE", }, victreebel: { randomBattleMoves: ["sleeppowder", "bodyslam", "stunspore"], essentialMove: "razorleaf", comboMoves: ["swordsdance", "hyperbeam"], tier: "OU", }, tentacool: { randomBattleMoves: ["barrier", "hydropump", "surf"], essentialMove: "blizzard", exclusiveMoves: ["megadrain", "megadrain"], comboMoves: ["surf", "hydropump"], tier: "LC", }, tentacruel: { randomBattleMoves: ["blizzard", "hydropump", "surf", "hyperbeam"], essentialMove: "swordsdance", tier: "UU", }, geodude: { randomBattleMoves: ["bodyslam", "earthquake", "rockslide", "explosion"], tier: "LC", }, graveler: { randomBattleMoves: ["bodyslam", "earthquake", "rockslide", "explosion"], tier: "UU", }, golem: { randomBattleMoves: ["explosion", "bodyslam", "earthquake", "rockslide"], tier: "UU", }, ponyta: { randomBattleMoves: ["fireblast", "agility", "bodyslam", "reflect"], tier: "LC", }, rapidash: { randomBattleMoves: ["fireblast", "agility", "bodyslam", "hyperbeam"], eventPokemon: [ {"generation": 1, "level": 40, "moves": ["ember", "firespin", "stomp", "payday"]}, ], tier: "UU", }, slowpoke: { randomBattleMoves: ["earthquake", "surf"], essentialMove: "thunderwave", exclusiveMoves: ["blizzard", "psychic", "rest"], comboMoves: ["amnesia", "surf"], tier: "LC", }, slowbro: { randomBattleMoves: ["amnesia", "surf", "thunderwave"], exclusiveMoves: ["rest", "rest", "psychic", "blizzard"], tier: "OU", }, magnemite: { randomBattleMoves: ["thunderwave", "thunder", "thunderbolt"], exclusiveMoves: ["mimic", "doubleedge", "toxic", "substitute"], tier: "LC", }, magneton: { randomBattleMoves: ["thunderwave", "thunder", "thunderbolt"], exclusiveMoves: ["mimic", "doubleedge", "toxic", "hyperbeam", "hyperbeam", "substitute"], tier: "UU", }, farfetchd: { randomBattleMoves: ["agility", "swordsdance", "bodyslam"], essentialMove: "slash", tier: "UU", }, doduo: { randomBattleMoves: ["drillpeck", "bodyslam", "agility", "doubleedge"], tier: "LC", }, dodrio: { randomBattleMoves: ["drillpeck", "bodyslam", "agility", "hyperbeam"], tier: "UU", }, seel: { randomBattleMoves: ["surf", "blizzard", "bodyslam"], exclusiveMoves: ["rest", "mimic"], tier: "LC", }, dewgong: { randomBattleMoves: ["surf", "blizzard", "bodyslam"], exclusiveMoves: ["rest", "rest", "mimic", "hyperbeam"], tier: "UU", }, grimer: { randomBattleMoves: ["sludge", "bodyslam"], essentialMove: "explosion", exclusiveMoves: ["megadrain", "megadrain", "fireblast", "screech"], tier: "LC", }, muk: { randomBattleMoves: ["sludge", "bodyslam"], essentialMove: "explosion", exclusiveMoves: ["megadrain", "megadrain", "fireblast", "hyperbeam"], tier: "UU", }, shellder: { randomBattleMoves: ["surf", "blizzard", "doubleedge", "explosion"], tier: "LC", }, cloyster: { randomBattleMoves: ["surf", "blizzard", "explosion"], exclusiveMoves: ["hyperbeam", "hyperbeam", "doubleedge"], tier: "OU", }, gastly: { randomBattleMoves: ["explosion", "megadrain", "nightshade", "psychic"], essentialMove: "thunderbolt", exclusiveMoves: ["hypnosis", "hypnosis", "confuseray"], tier: "LC", }, haunter: { randomBattleMoves: ["explosion", "megadrain", "nightshade", "psychic"], essentialMove: "thunderbolt", exclusiveMoves: ["hypnosis", "hypnosis", "confuseray"], tier: "UU", }, gengar: { randomBattleMoves: ["explosion", "megadrain", "nightshade", "psychic"], essentialMove: "thunderbolt", exclusiveMoves: ["hypnosis", "hypnosis", "confuseray"], tier: "OU", }, onix: { randomBattleMoves: ["earthquake", "explosion", "rockslide", "bodyslam"], tier: "UU", }, drowzee: { randomBattleMoves: ["hypnosis", "psychic", "thunderwave"], exclusiveMoves: ["seismictoss", "seismictoss", "counter", "reflect", "rest"], tier: "LC", }, hypno: { randomBattleMoves: ["hypnosis", "psychic", "thunderwave"], exclusiveMoves: ["seismictoss", "seismictoss", "counter", "rest", "rest", "reflect"], tier: "UU", }, krabby: { randomBattleMoves: ["bodyslam", "crabhammer", "swordsdance", "blizzard"], tier: "LC", }, kingler: { randomBattleMoves: ["bodyslam", "hyperbeam", "swordsdance", "crabhammer"], tier: "UU", }, voltorb: { randomBattleMoves: ["thunderbolt", "thunderwave", "explosion"], exclusiveMoves: ["thunder", "screech", "toxic"], tier: "LC", }, electrode: { randomBattleMoves: ["thunderbolt", "thunderwave", "explosion"], exclusiveMoves: ["thunder", "screech", "toxic", "hyperbeam"], tier: "UU", }, exeggcute: { randomBattleMoves: ["sleeppowder", "stunspore"], essentialMove: "psychic", exclusiveMoves: ["explosion", "explosion", "doubleedge"], tier: "LC", }, exeggutor: { randomBattleMoves: ["psychic", "explosion", "sleeppowder"], exclusiveMoves: ["stunspore", "stunspore", "stunspore", "megadrain", "megadrain", "eggbomb", "doubleedge", "hyperbeam"], tier: "OU", }, cubone: { randomBattleMoves: ["earthquake", "blizzard", "bodyslam", "seismictoss"], tier: "LC", }, marowak: { randomBattleMoves: ["earthquake", "blizzard", "bodyslam", "seismictoss"], tier: "UU", }, hitmonlee: { randomBattleMoves: ["bodyslam", "highjumpkick", "seismictoss"], exclusiveMoves: ["counter", "counter", "meditate"], tier: "UU", }, hitmonchan: { randomBattleMoves: ["bodyslam", "submission", "seismictoss"], exclusiveMoves: ["counter", "counter", "agility"], tier: "UU", }, lickitung: { randomBattleMoves: ["swordsdance", "hyperbeam"], essentialMove: "bodyslam", exclusiveMoves: ["earthquake", "earthquake", "earthquake", "blizzard"], tier: "UU", }, koffing: { randomBattleMoves: ["sludge", "explosion", "thunderbolt", "fireblast"], tier: "LC", }, weezing: { randomBattleMoves: ["sludge", "explosion", "thunderbolt", "fireblast"], tier: "UU", }, rhyhorn: { randomBattleMoves: ["earthquake", "rockslide", "substitute", "bodyslam"], tier: "LC", }, rhydon: { randomBattleMoves: ["earthquake", "rockslide", "bodyslam"], exclusiveMoves: ["substitute", "substitute", "hyperbeam"], tier: "OU", }, chansey: { randomBattleMoves: ["icebeam", "thunderwave"], essentialMove: "softboiled", exclusiveMoves: ["counter", "sing", "reflect", "thunderbolt", "thunderbolt", "thunderbolt", "seismictoss"], tier: "OU", }, tangela: { randomBattleMoves: ["sleeppowder", "bodyslam", "swordsdance"], essentialMove: "megadrain", comboMoves: ["growth", "stunspore"], tier: "UU", }, kangaskhan: { randomBattleMoves: ["bodyslam", "hyperbeam", "earthquake"], exclusiveMoves: ["surf", "rockslide", "rockslide", "counter"], tier: "UU", }, horsea: { randomBattleMoves: ["agility", "blizzard"], essentialMove: "surf", exclusiveMoves: ["doubleedge", "smokescreen", "hydropump"], tier: "LC", }, seadra: { randomBattleMoves: ["agility", "blizzard"], essentialMove: "surf", exclusiveMoves: ["doubleedge", "smokescreen", "hyperbeam", "hydropump"], tier: "UU", }, goldeen: { randomBattleMoves: ["surf", "blizzard", "agility", "doubleedge"], tier: "LC", }, seaking: { randomBattleMoves: ["surf", "blizzard", "doubleedge"], exclusiveMoves: ["hyperbeam", "agility", "agility"], tier: "UU", }, staryu: { randomBattleMoves: ["blizzard", "thunderbolt", "thunderwave"], essentialMove: "recover", exclusiveMoves: ["surf", "surf", "hydropump"], tier: "LC", }, starmie: { randomBattleMoves: ["blizzard", "thunderbolt", "thunderwave"], essentialMove: "recover", exclusiveMoves: ["surf", "hydropump", "psychic", "surf"], tier: "OU", }, mrmime: { randomBattleMoves: ["psychic", "thunderwave", "thunderbolt", "seismictoss"], tier: "UU", }, scyther: { randomBattleMoves: ["slash", "swordsdance", "agility", "hyperbeam"], tier: "UU", }, jynx: { randomBattleMoves: ["lovelykiss", "blizzard", "psychic"], exclusiveMoves: ["mimic", "bodyslam", "seismictoss", "counter", "counter"], tier: "OU", }, electabuzz: { randomBattleMoves: ["thunderbolt", "thunderwave", "psychic", "seismictoss"], tier: "UU", }, magmar: { randomBattleMoves: ["confuseray", "fireblast", "bodyslam"], exclusiveMoves: ["psychic", "hyperbeam"], tier: "UU", }, pinsir: { randomBattleMoves: ["swordsdance", "hyperbeam", "bodyslam"], exclusiveMoves: ["submission", "submission", "seismictoss"], tier: "UU", }, tauros: { randomBattleMoves: ["bodyslam", "hyperbeam", "earthquake"], exclusiveMoves: ["blizzard", "blizzard", "blizzard", "thunderbolt"], tier: "OU", }, magikarp: { randomBattleMoves: ["tackle", "dragonrage"], eventPokemon: [ {"generation": 1, "level": 5, "moves": ["dragonrage"]}, ], tier: "LC", }, gyarados: { randomBattleMoves: ["blizzard", "thunderbolt", "bodyslam", "hyperbeam"], exclusiveMoves: ["surf", "hydropump"], tier: "UU", }, lapras: { randomBattleMoves: ["surf", "bodyslam", "sing", "rest", "confuseray"], essentialMove: "blizzard", exclusiveMoves: ["thunderbolt", "thunderbolt"], tier: "OU", }, ditto: { randomBattleMoves: ["transform"], tier: "UU", }, eevee: { randomBattleMoves: ["doubleedge", "reflect", "quickattack"], essentialMove: "bodyslam", exclusiveMoves: ["mimic", "sandattack", "tailwhip", "bide"], tier: "LC", }, vaporeon: { randomBattleMoves: ["rest", "blizzard"], essentialMove: "surf", exclusiveMoves: ["bodyslam", "mimic", "hydropump"], tier: "UU", }, jolteon: { randomBattleMoves: ["thunderwave", "bodyslam", "thunderbolt"], exclusiveMoves: ["pinmissile", "pinmissile", "doublekick", "agility", "agility"], tier: "OU", }, flareon: { randomBattleMoves: ["fireblast", "bodyslam", "hyperbeam", "quickattack"], tier: "UU", }, porygon: { randomBattleMoves: ["thunderwave", "blizzard"], essentialMove: "recover", exclusiveMoves: ["psychic", "thunderbolt", "triattack", "doubleedge"], tier: "UU", }, omanyte: { randomBattleMoves: ["hydropump", "surf", "bodyslam", "rest"], essentialMove: "blizzard", comboMoves: ["surf", "hydropump"], tier: "LC", }, omastar: { randomBattleMoves: ["hydropump", "surf", "seismictoss", "blizzard"], exclusiveMoves: ["bodyslam", "rest"], tier: "UU", }, kabuto: { randomBattleMoves: ["blizzard", "bodyslam", "surf", "slash"], tier: "LC", }, kabutops: { randomBattleMoves: ["swordsdance", "surf", "hyperbeam"], exclusiveMoves: ["bodyslam", "slash"], tier: "UU", }, aerodactyl: { randomBattleMoves: ["skyattack", "fireblast", "doubleedge", "hyperbeam"], tier: "UU", }, snorlax: { randomBattleMoves: ["rest", "thunderbolt", "bodyslam", "selfdestruct"], essentialMove: "amnesia", exclusiveMoves: ["blizzard", "blizzard"], comboMoves: ["earthquake", "hyperbeam", "bodyslam", "selfdestruct"], tier: "OU", }, articuno: { randomBattleMoves: ["hyperbeam", "agility", "mimic", "reflect", "icebeam"], essentialMove: "blizzard", comboMoves: ["icebeam", "rest", "reflect"], tier: "UU", }, zapdos: { randomBattleMoves: ["thunderbolt", "drillpeck", "thunderwave", "agility"], tier: "OU", }, moltres: { randomBattleMoves: ["agility", "hyperbeam", "fireblast"], exclusiveMoves: ["doubleedge", "reflect", "skyattack"], tier: "UU", }, dratini: { randomBattleMoves: ["hyperbeam", "thunderbolt", "bodyslam", "thunderwave"], essentialMove: "blizzard", tier: "LC", }, dragonair: { randomBattleMoves: ["hyperbeam", "thunderbolt", "bodyslam", "thunderwave"], essentialMove: "blizzard", tier: "NFE", }, dragonite: { randomBattleMoves: ["hyperbeam", "thunderbolt", "bodyslam", "thunderwave"], essentialMove: "blizzard", tier: "UU", }, mewtwo: { randomBattleMoves: ["thunderbolt", "blizzard", "recover"], essentialMove: "amnesia", exclusiveMoves: ["psychic", "psychic"], comboMoves: ["rest", "barrier"], tier: "Uber", }, mew: { randomBattleMoves: ["thunderwave", "thunderbolt", "blizzard", "earthquake"], essentialMove: "psychic", exclusiveMoves: ["softboiled", "softboiled", "explosion"], comboMoves: ["swordsdance", "earthquake", "hyperbeam"], eventPokemon: [ {"generation": 1, "level": 5, "moves": ["pound"]}, ], eventOnly: true, tier: "Uber", }, missingno: { isNonstandard: "Unobtainable", tier: "Illegal", }, }; exports.BattleFormatsData = BattleFormatsData;
{ "content_hash": "96163fc84b148869ddd41dba7a9b1eaa", "timestamp": "", "source": "github", "line_count": 806, "max_line_length": 122, "avg_line_length": 29.00620347394541, "alnum_prop": 0.6416014371872193, "repo_name": "QuiteQuiet/Pokemon-Showdown", "id": "8353bc8826f8f5febd841c1a667c76e4565363e0", "size": "23379", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "data/mods/gen1/formats-data.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "351" }, { "name": "HTML", "bytes": "655" }, { "name": "JavaScript", "bytes": "10721785" }, { "name": "TypeScript", "bytes": "1379941" } ], "symlink_target": "" }
using UnityEngine; using System.Collections; public class CheckPointData : MonoBehaviour { public bool IsOn { get; set; } public MeshRenderer Renderer; public Transform CheckPos; }
{ "content_hash": "9fef3e7baad556a9a039b35bf20f8b31", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 43, "avg_line_length": 21.555555555555557, "alnum_prop": 0.7474226804123711, "repo_name": "superusercode/hedgephysics", "id": "1884877a0c4ed7d574c85730ef79e6d8a4f4dc19", "size": "196", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "HedgePhysics/Assets/GameplayScripts/CheckPointData.cs", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C#", "bytes": "839475" }, { "name": "GLSL", "bytes": "6820" }, { "name": "HLSL", "bytes": "208158" }, { "name": "ShaderLab", "bytes": "278076" } ], "symlink_target": "" }
<?php namespace PHPExiftool\Driver\Tag\Canon; use JMS\Serializer\Annotation\ExclusionPolicy; use PHPExiftool\Driver\AbstractTag; /** * @ExclusionPolicy("all") */ class ZoomSourceWidth extends AbstractTag { protected $Id = 36; protected $Name = 'ZoomSourceWidth'; protected $FullName = 'Canon::CameraSettings'; protected $GroupName = 'Canon'; protected $g0 = 'MakerNotes'; protected $g1 = 'Canon'; protected $g2 = 'Camera'; protected $Type = 'int16s'; protected $Writable = true; protected $Description = 'Zoom Source Width'; protected $flag_Permanent = true; }
{ "content_hash": "0456bf7b4f4c5d12f9f08434b158ea8b", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 50, "avg_line_length": 16.42105263157895, "alnum_prop": 0.6730769230769231, "repo_name": "bburnichon/PHPExiftool", "id": "5100c15792476b1743b7a94c5a2ef1ff92dd74e9", "size": "848", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "lib/PHPExiftool/Driver/Tag/Canon/ZoomSourceWidth.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "22076400" } ], "symlink_target": "" }
/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* $Source: src/usr/diag/prdf/common/prdfTrace.C $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ /* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* 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. */ /* */ /* IBM_PROLOG_END_TAG */ /** * @file prdfTrace.C * @brief prdf trace descriptor */ #include "prdfTrace.H" #include <limits.h> namespace PRDF { tracDesc_t traceDesc = 0; #ifdef __HOSTBOOT_MODULE TRAC_INIT( &traceDesc, PRDF_COMP_NAME, KILOBYTE ); #else TRAC_INIT( &traceDesc, PRDF_COMP_NAME, 4096 ); #endif } //End namespace PRDF
{ "content_hash": "7e2aa508908b90d6a60af44f461b36f1", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 76, "avg_line_length": 49.170731707317074, "alnum_prop": 0.40128968253968256, "repo_name": "Over-enthusiastic/hostboot", "id": "ee1123c7eb199eb376e26e68e14a13792772504c", "size": "2016", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "src/usr/diag/prdf/common/prdfTrace.C", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "Assembly", "bytes": "74135" }, { "name": "C", "bytes": "26891739" }, { "name": "C++", "bytes": "56430357" }, { "name": "Lex", "bytes": "8996" }, { "name": "Makefile", "bytes": "770191" }, { "name": "Objective-C", "bytes": "26026" }, { "name": "Perl", "bytes": "2084722" }, { "name": "Python", "bytes": "53583" }, { "name": "Shell", "bytes": "163413" }, { "name": "Tcl", "bytes": "108997" }, { "name": "XSLT", "bytes": "4041" }, { "name": "Yacc", "bytes": "29296" } ], "symlink_target": "" }
/// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the /// "Use Terms"). Any redistribution of this code must retain the above /// copyright and this notice and otherwise comply with the Use Terms. /** * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js * @description String.prototype.trim handles whitepace and lineterminators (\u2029abc\u2029) */ function testcase() { if ("\u2029abc\u2029".trim() === "abc") { return true; } } runTestCase(testcase);
{ "content_hash": "5894d5206bdec9e75eb316e73c133577", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 93, "avg_line_length": 39, "alnum_prop": 0.6907993966817496, "repo_name": "mbebenita/shumway.ts", "id": "930df36783378aaddd54f4cb1e64d471c3c3967b", "size": "663", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "tests/Fidelity/test262/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Elixir", "bytes": "3294" }, { "name": "JavaScript", "bytes": "24658966" }, { "name": "Shell", "bytes": "386" }, { "name": "TypeScript", "bytes": "18287003" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_75) on Tue May 19 17:12:38 PDT 2015 --> <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> <title>org.apache.hadoop.mapred.pipes Class Hierarchy (Apache Hadoop Main 2.6.0-cdh5.4.2 API)</title> <meta name="date" content="2015-05-19"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="org.apache.hadoop.mapred.pipes Class Hierarchy (Apache Hadoop Main 2.6.0-cdh5.4.2 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/apache/hadoop/mapred/nativetask/util/package-tree.html">Prev</a></li> <li><a href="../../../../../org/apache/hadoop/mapred/proto/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/hadoop/mapred/pipes/package-tree.html" target="_top">Frames</a></li> <li><a href="package-tree.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h1 class="title">Hierarchy For Package org.apache.hadoop.mapred.pipes</h1> <span class="strong">Package Hierarchies:</span> <ul class="horizontal"> <li><a href="../../../../../overview-tree.html">All Packages</a></li> </ul> </div> <div class="contentContainer"> <h2 title="Class Hierarchy">Class Hierarchy</h2> <ul> <li type="circle">java.lang.<a href="http://download.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="strong">Object</span></a> <ul> <li type="circle">org.apache.hadoop.conf.<a href="../../../../../org/apache/hadoop/conf/Configured.html" title="class in org.apache.hadoop.conf"><span class="strong">Configured</span></a> (implements org.apache.hadoop.conf.<a href="../../../../../org/apache/hadoop/conf/Configurable.html" title="interface in org.apache.hadoop.conf">Configurable</a>) <ul> <li type="circle">org.apache.hadoop.mapred.pipes.<a href="../../../../../org/apache/hadoop/mapred/pipes/Submitter.html" title="class in org.apache.hadoop.mapred.pipes"><span class="strong">Submitter</span></a> (implements org.apache.hadoop.util.<a href="../../../../../org/apache/hadoop/util/Tool.html" title="interface in org.apache.hadoop.util">Tool</a>)</li> </ul> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/apache/hadoop/mapred/nativetask/util/package-tree.html">Prev</a></li> <li><a href="../../../../../org/apache/hadoop/mapred/proto/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/hadoop/mapred/pipes/package-tree.html" target="_top">Frames</a></li> <li><a href="package-tree.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2015 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.</small></p> </body> </html>
{ "content_hash": "eacb2a233fbb9ae099688645e3bf64fb", "timestamp": "", "source": "github", "line_count": 134, "max_line_length": 361, "avg_line_length": 40.92537313432836, "alnum_prop": 0.6261852662290299, "repo_name": "ZhangXFeng/hadoop", "id": "b37d95c329e43ad62dc184b26c64f30f1a21f57a", "size": "5484", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "share/doc/api/org/apache/hadoop/mapred/pipes/package-tree.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "AspectJ", "bytes": "189381" }, { "name": "Batchfile", "bytes": "215694" }, { "name": "C", "bytes": "3575939" }, { "name": "C++", "bytes": "2163041" }, { "name": "CMake", "bytes": "100256" }, { "name": "CSS", "bytes": "621096" }, { "name": "HTML", "bytes": "96504707" }, { "name": "Java", "bytes": "111573402" }, { "name": "JavaScript", "bytes": "228374" }, { "name": "Makefile", "bytes": "7278" }, { "name": "Objective-C", "bytes": "118273" }, { "name": "PHP", "bytes": "152555" }, { "name": "Perl", "bytes": "187872" }, { "name": "Protocol Buffer", "bytes": "561225" }, { "name": "Python", "bytes": "1166492" }, { "name": "Ruby", "bytes": "28485" }, { "name": "Shell", "bytes": "912677" }, { "name": "Smalltalk", "bytes": "56562" }, { "name": "TeX", "bytes": "45082" }, { "name": "Thrift", "bytes": "3965" }, { "name": "XSLT", "bytes": "183042" } ], "symlink_target": "" }
using Agiil.BDD.Abilities; using Agiil.BDD.WebDriver; using CSF.Screenplay; using CSF.Screenplay.Integration; using CSF.Screenplay.ReportFormatting; using CSF.Screenplay.Reporting; using CSF.Screenplay.Selenium; using CSF.Screenplay.Selenium.Abilities; using CSF.Screenplay.Selenium.Reporting; using CSF.Screenplay.SpecFlow; using CSF.Screenplay.WebApis; [assembly: ScreenplayAssembly(typeof(Agiil.Tests.BDD.ScreenplayIntegrationConfig))] namespace Agiil.Tests.BDD { public class ScreenplayIntegrationConfig : IIntegrationConfig { const string ApplicationBaseUri = "http://localhost:8080/", ApiBaseUri = ApplicationBaseUri + "api/v1/"; public void Configure(IIntegrationConfigBuilder builder) { builder.UseSharedUriTransformer(new RootUriPrependingTransformer(ApplicationBaseUri)); builder.UseAgiilWebDriverFromConfiguration(); builder.UseWebBrowser(); builder.UseBrowserFlags(); builder.UseWebApis(ApiBaseUri); builder.UseAutofacContainer(); ConfigureReporting(builder); } void ConfigureReporting(IIntegrationConfigBuilder builder) { builder.UseReporting(reporting => { reporting .WithFormatter<StringCollectionFormattingStrategy>() .WithFormatter<OptionCollectionFormatter>() .WithFormatter<ElementCollectionFormatter>() .WithReportJsonFile("Agiil.Tests.BDD.report.json"); }); } } }
{ "content_hash": "90fc3bd7b5f95dda9473bc5419d619db", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 92, "avg_line_length": 31.282608695652176, "alnum_prop": 0.7470465601111883, "repo_name": "csf-dev/agiil", "id": "8e822c9b634e1b4201c3b744d517265de4c2f504", "size": "1441", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Tests/Agiil.Tests.BDD/ScreenplayIntegrationConfig.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ANTLR", "bytes": "3019" }, { "name": "ASP", "bytes": "50" }, { "name": "C#", "bytes": "1370880" }, { "name": "CSS", "bytes": "35831" }, { "name": "Gherkin", "bytes": "25979" }, { "name": "Java", "bytes": "40868" }, { "name": "JavaScript", "bytes": "263683" }, { "name": "PLSQL", "bytes": "211" }, { "name": "PLpgSQL", "bytes": "533" }, { "name": "PowerShell", "bytes": "2814" }, { "name": "Shell", "bytes": "9845" }, { "name": "TSQL", "bytes": "2633" } ], "symlink_target": "" }
package com.cmput301f17t07.ingroove; import android.support.test.espresso.DataInteraction; import android.support.test.espresso.ViewInteraction; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; import android.test.suitebuilder.annotation.LargeTest; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; import org.hamcrest.core.IsInstanceOf; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import static android.support.test.espresso.Espresso.onData; import static android.support.test.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.pressBack; import static android.support.test.espresso.action.ViewActions.click; import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard; import static android.support.test.espresso.action.ViewActions.replaceText; import static android.support.test.espresso.assertion.ViewAssertions.matches; import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; import static android.support.test.espresso.matcher.ViewMatchers.withClassName; import static android.support.test.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withText; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.anything; import static org.hamcrest.Matchers.is; @LargeTest @RunWith(AndroidJUnit4.class) public class AddEventTest { @Rule public ActivityTestRule<MainActivity> mActivityTestRule = new ActivityTestRule<>(MainActivity.class); @Test public void addEventTest() { ViewInteraction floatingActionButton = onView( allOf(withId(R.id.AddHabitButton), childAtPosition( childAtPosition( withClassName(is("android.support.constraint.ConstraintLayout")), 0), 1), isDisplayed())); floatingActionButton.perform(click()); ViewInteraction appCompatEditText = onView( allOf(withId(R.id.add_habit_name), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 0), isDisplayed())); appCompatEditText.perform(replaceText("Drink Water"), closeSoftKeyboard()); ViewInteraction appCompatEditText2 = onView( allOf(withId(R.id.add_habit_comment), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 2), isDisplayed())); appCompatEditText2.perform(replaceText("alot of it"), closeSoftKeyboard()); ViewInteraction appCompatCheckBox = onView( allOf(withId(R.id.add_habit_day_mon), withText("Monday"), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 4), isDisplayed())); appCompatCheckBox.perform(click()); ViewInteraction appCompatCheckBox2 = onView( allOf(withId(R.id.add_habit_day_tues), withText("Tuesday"), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 5), isDisplayed())); appCompatCheckBox2.perform(click()); ViewInteraction appCompatCheckBox3 = onView( allOf(withId(R.id.add_habit_day_wed), withText("Wednesday"), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 6), isDisplayed())); appCompatCheckBox3.perform(click()); ViewInteraction appCompatCheckBox4 = onView( allOf(withId(R.id.add_habit_day_thur), withText("Thursday"), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 7), isDisplayed())); appCompatCheckBox4.perform(click()); ViewInteraction appCompatCheckBox5 = onView( allOf(withId(R.id.add_habit_day_fri), withText("Friday"), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 8), isDisplayed())); appCompatCheckBox5.perform(click()); ViewInteraction appCompatCheckBox6 = onView( allOf(withId(R.id.add_habit_day_sat), withText("Saturday"), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 9), isDisplayed())); appCompatCheckBox6.perform(click()); ViewInteraction appCompatCheckBox7 = onView( allOf(withId(R.id.add_habit_day_sun), withText("Sunday"), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 10), isDisplayed())); appCompatCheckBox7.perform(click()); ViewInteraction appCompatButton = onView( allOf(withId(R.id.add_save_btn), withText("Save"), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 14), isDisplayed())); appCompatButton.perform(click()); ViewInteraction textView = onView( allOf(withId(android.R.id.text1), withText("Drink Water"), childAtPosition( allOf(withId(R.id.HabitViewer), childAtPosition( IsInstanceOf.<View>instanceOf(android.widget.LinearLayout.class), 1)), 0), isDisplayed())); textView.check(matches(withText("Drink Water"))); DataInteraction appCompatTextView = onData(anything()) .inAdapterView(allOf(withId(R.id.HabitViewer), childAtPosition( withClassName(is("android.widget.LinearLayout")), 1))) .atPosition(0); appCompatTextView.perform(click()); ViewInteraction textView2 = onView( allOf(withId(R.id.view_habit_name), withText("Drink Water"), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 0), isDisplayed())); textView2.check(matches(withText("Drink Water"))); ViewInteraction textView3 = onView( allOf(withId(R.id.view_habit_comment), withText("alot of it"), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 2), isDisplayed())); textView3.check(matches(withText("alot of it"))); ViewInteraction appCompatButton2 = onView( allOf(withId(R.id.view_habit_log_event_btn), withText("Log Event"), childAtPosition( childAtPosition( withId(android.R.id.content), 0), 7), isDisplayed())); appCompatButton2.perform(click()); ViewInteraction appCompatEditText3 = onView( allOf(withId(R.id.nameTextBox), childAtPosition( childAtPosition( withClassName(is("android.widget.LinearLayout")), 0), 1), isDisplayed())); appCompatEditText3.perform(replaceText("Drank"), closeSoftKeyboard()); ViewInteraction appCompatEditText4 = onView( allOf(withId(R.id.commentText), childAtPosition( childAtPosition( withClassName(is("android.support.constraint.ConstraintLayout")), 0), 4), isDisplayed())); appCompatEditText4.perform(replaceText("yus"), closeSoftKeyboard()); ViewInteraction appCompatButton3 = onView( allOf(withId(R.id.SaveButton), withText("Save"), childAtPosition( childAtPosition( withClassName(is("android.widget.LinearLayout")), 5), 1), isDisplayed())); appCompatButton3.perform(click()); ViewInteraction textView4 = onView( allOf(withId(android.R.id.text1), withText("Drank"), childAtPosition( allOf(withId(R.id.view_habit_events), childAtPosition( IsInstanceOf.<View>instanceOf(android.widget.LinearLayout.class), 0)), 0), isDisplayed())); textView4.check(matches(withText("Drank"))); } private static Matcher<View> childAtPosition( final Matcher<View> parentMatcher, final int position) { return new TypeSafeMatcher<View>() { @Override public void describeTo(Description description) { description.appendText("Child at position " + position + " in parent "); parentMatcher.describeTo(description); } @Override public boolean matchesSafely(View view) { ViewParent parent = view.getParent(); return parent instanceof ViewGroup && parentMatcher.matches(parent) && view.equals(((ViewGroup) parent).getChildAt(position)); } }; } }
{ "content_hash": "21956cb659af47a14eb92f81adef2694", "timestamp": "", "source": "github", "line_count": 265, "max_line_length": 113, "avg_line_length": 44.924528301886795, "alnum_prop": 0.4787904241915162, "repo_name": "CMPUT301F17T07/inGroove", "id": "e73b1f4dcafc461de5638ce2a33f38b93d2947f5", "size": "11905", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "inGroove/app/src/androidTest/java/com/cmput301f17t07/ingroove/AddEventTest.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "453028" } ], "symlink_target": "" }
package org.apache.hyracks.algebricks.core.algebra.expressions; import java.util.List; import org.apache.commons.lang3.mutable.Mutable; import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException; import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression; import org.apache.hyracks.algebricks.core.algebra.functions.IFunctionInfo; import org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty; import org.apache.hyracks.algebricks.core.algebra.properties.IPropertiesComputer; import org.apache.hyracks.algebricks.core.algebra.visitors.ILogicalExpressionVisitor; public class StatefulFunctionCallExpression extends AbstractFunctionCallExpression { private final IPropertiesComputer propertiesComputer; public StatefulFunctionCallExpression(IFunctionInfo finfo, IPropertiesComputer propertiesComputer) { super(FunctionKind.STATEFUL, finfo); this.propertiesComputer = propertiesComputer; } public StatefulFunctionCallExpression(IFunctionInfo finfo, IPropertiesComputer propertiesComputer, List<Mutable<ILogicalExpression>> arguments) { super(FunctionKind.STATEFUL, finfo, arguments); this.propertiesComputer = propertiesComputer; } public StatefulFunctionCallExpression(IFunctionInfo finfo, IPropertiesComputer propertiesComputer, Mutable<ILogicalExpression>... expressions) { super(FunctionKind.STATEFUL, finfo, expressions); this.propertiesComputer = propertiesComputer; } @Override public StatefulFunctionCallExpression cloneExpression() { cloneAnnotations(); List<Mutable<ILogicalExpression>> clonedArgs = cloneArguments(); return new StatefulFunctionCallExpression(finfo, propertiesComputer, clonedArgs); } // can be null public IPartitioningProperty getRequiredPartitioningProperty() { return propertiesComputer.computePartitioningProperty(this); } @Override public <R, T> R accept(ILogicalExpressionVisitor<R, T> visitor, T arg) throws AlgebricksException { return visitor.visitStatefulFunctionCallExpression(this, arg); } public IPropertiesComputer getPropertiesComputer() { return propertiesComputer; } }
{ "content_hash": "7f3b6fefe20e2d661db29fc231fc608d", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 104, "avg_line_length": 41.21818181818182, "alnum_prop": 0.7807675341861491, "repo_name": "waans11/incubator-asterixdb", "id": "fe91ed315a2aebd5ad9c6dcd7a8ad075525414e1", "size": "3074", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/expressions/StatefulFunctionCallExpression.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "16145" }, { "name": "C", "bytes": "421" }, { "name": "CSS", "bytes": "17665" }, { "name": "Crystal", "bytes": "453" }, { "name": "FreeMarker", "bytes": "68104" }, { "name": "Gnuplot", "bytes": "89" }, { "name": "HTML", "bytes": "131935" }, { "name": "Java", "bytes": "20780094" }, { "name": "JavaScript", "bytes": "636055" }, { "name": "Python", "bytes": "281315" }, { "name": "Ruby", "bytes": "3078" }, { "name": "Scheme", "bytes": "1105" }, { "name": "Shell", "bytes": "232529" }, { "name": "Smarty", "bytes": "31412" }, { "name": "TeX", "bytes": "1059" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_74) on Tue Aug 01 07:19:26 CST 2017 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class us.codecraft.webmagic.pipeline.ConsolePipeline (webmagic-parent 0.7.3 API)</title> <meta name="date" content="2017-08-01"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class us.codecraft.webmagic.pipeline.ConsolePipeline (webmagic-parent 0.7.3 API)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../us/codecraft/webmagic/pipeline/ConsolePipeline.html" title="class in us.codecraft.webmagic.pipeline">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?us/codecraft/webmagic/pipeline/class-use/ConsolePipeline.html" target="_top">Frames</a></li> <li><a href="ConsolePipeline.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class us.codecraft.webmagic.pipeline.ConsolePipeline" class="title">Uses of Class<br>us.codecraft.webmagic.pipeline.ConsolePipeline</h2> </div> <div class="classUseContainer">No usage of us.codecraft.webmagic.pipeline.ConsolePipeline</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../us/codecraft/webmagic/pipeline/ConsolePipeline.html" title="class in us.codecraft.webmagic.pipeline">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?us/codecraft/webmagic/pipeline/class-use/ConsolePipeline.html" target="_top">Frames</a></li> <li><a href="ConsolePipeline.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2017. All rights reserved.</small></p> </body> </html>
{ "content_hash": "1a3b3888e6e6dd07f4844be465145dbb", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 155, "avg_line_length": 37.095238095238095, "alnum_prop": 0.6228070175438597, "repo_name": "webmagic-io/webmagic-io.github.io", "id": "3db03c75376f200f137a0294eb4afbb17e644818", "size": "4674", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "apidocs/us/codecraft/webmagic/pipeline/class-use/ConsolePipeline.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "241013" }, { "name": "HTML", "bytes": "17545116" }, { "name": "JavaScript", "bytes": "1376970" }, { "name": "Ruby", "bytes": "5657" } ], "symlink_target": "" }
package org.elasticsearch.search.aggregations.bucket.geogrid; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.SortedNumericDocValues; import org.apache.lucene.search.ScoreMode; import org.elasticsearch.common.lease.Releasables; import org.elasticsearch.search.aggregations.Aggregator; import org.elasticsearch.search.aggregations.AggregatorFactories; import org.elasticsearch.search.aggregations.CardinalityUpperBound; import org.elasticsearch.search.aggregations.InternalAggregation; import org.elasticsearch.search.aggregations.LeafBucketCollector; import org.elasticsearch.search.aggregations.LeafBucketCollectorBase; import org.elasticsearch.search.aggregations.bucket.BucketsAggregator; import org.elasticsearch.search.aggregations.bucket.terms.LongKeyedBucketOrds; import org.elasticsearch.search.aggregations.support.AggregationContext; import org.elasticsearch.search.aggregations.support.ValuesSource; import java.io.IOException; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; /** * Aggregates data expressed as longs (for efficiency's sake) but formats results as aggregation-specific strings. */ public abstract class GeoGridAggregator<T extends InternalGeoGrid> extends BucketsAggregator { protected final int requiredSize; protected final int shardSize; protected final ValuesSource.Numeric valuesSource; protected final LongKeyedBucketOrds bucketOrds; GeoGridAggregator(String name, AggregatorFactories factories, ValuesSource.Numeric valuesSource, int requiredSize, int shardSize, AggregationContext aggregationContext, Aggregator parent, CardinalityUpperBound cardinality, Map<String, Object> metadata) throws IOException { super(name, factories, aggregationContext, parent, CardinalityUpperBound.MANY, metadata); this.valuesSource = valuesSource; this.requiredSize = requiredSize; this.shardSize = shardSize; bucketOrds = LongKeyedBucketOrds.build(bigArrays(), cardinality); } @Override public ScoreMode scoreMode() { if (valuesSource != null && valuesSource.needsScores()) { return ScoreMode.COMPLETE; } return super.scoreMode(); } @Override public LeafBucketCollector getLeafCollector(LeafReaderContext ctx, final LeafBucketCollector sub) throws IOException { SortedNumericDocValues values = valuesSource.longValues(ctx); return new LeafBucketCollectorBase(sub, null) { @Override public void collect(int doc, long owningBucketOrd) throws IOException { if (values.advanceExact(doc)) { final int valuesCount = values.docValueCount(); long previous = Long.MAX_VALUE; for (int i = 0; i < valuesCount; ++i) { final long val = values.nextValue(); if (previous != val || i == 0) { long bucketOrdinal = bucketOrds.add(owningBucketOrd, val); if (bucketOrdinal < 0) { // already seen bucketOrdinal = -1 - bucketOrdinal; collectExistingBucket(sub, doc, bucketOrdinal); } else { collectBucket(sub, doc, bucketOrdinal); } previous = val; } } } } }; } abstract T buildAggregation(String name, int requiredSize, List<InternalGeoGridBucket> buckets, Map<String, Object> metadata); /** * This method is used to return a re-usable instance of the bucket when building * the aggregation. * @return a new {@link InternalGeoGridBucket} implementation with empty parameters */ abstract InternalGeoGridBucket newEmptyBucket(); @Override public InternalAggregation[] buildAggregations(long[] owningBucketOrds) throws IOException { InternalGeoGridBucket[][] topBucketsPerOrd = new InternalGeoGridBucket[owningBucketOrds.length][]; for (int ordIdx = 0; ordIdx < owningBucketOrds.length; ordIdx++) { int size = (int) Math.min(bucketOrds.bucketsInOrd(owningBucketOrds[ordIdx]), shardSize); BucketPriorityQueue<InternalGeoGridBucket> ordered = new BucketPriorityQueue<>(size); InternalGeoGridBucket spare = null; LongKeyedBucketOrds.BucketOrdsEnum ordsEnum = bucketOrds.ordsEnum(owningBucketOrds[ordIdx]); while (ordsEnum.next()) { if (spare == null) { spare = newEmptyBucket(); } // need a special function to keep the source bucket // up-to-date so it can get the appropriate key spare.hashAsLong = ordsEnum.value(); spare.docCount = bucketDocCount(ordsEnum.ord()); spare.bucketOrd = ordsEnum.ord(); spare = ordered.insertWithOverflow(spare); } topBucketsPerOrd[ordIdx] = new InternalGeoGridBucket[ordered.size()]; for (int i = ordered.size() - 1; i >= 0; --i) { topBucketsPerOrd[ordIdx][i] = ordered.pop(); } } buildSubAggsForAllBuckets(topBucketsPerOrd, b -> b.bucketOrd, (b, aggs) -> b.aggregations = aggs); InternalAggregation[] results = new InternalAggregation[owningBucketOrds.length]; for (int ordIdx = 0; ordIdx < owningBucketOrds.length; ordIdx++) { results[ordIdx] = buildAggregation(name, requiredSize, Arrays.asList(topBucketsPerOrd[ordIdx]), metadata()); } return results; } @Override public InternalGeoGrid buildEmptyAggregation() { return buildAggregation(name, requiredSize, Collections.emptyList(), metadata()); } @Override public void doClose() { Releasables.close(bucketOrds); } }
{ "content_hash": "bfe3227b8e38f19e8c7183db9ef45143", "timestamp": "", "source": "github", "line_count": 135, "max_line_length": 130, "avg_line_length": 45.111111111111114, "alnum_prop": 0.6581280788177339, "repo_name": "nknize/elasticsearch", "id": "9a7425d34a0d5fb2feda896bc0b17b96a3d83655", "size": "6878", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoGridAggregator.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "12298" }, { "name": "Batchfile", "bytes": "16353" }, { "name": "Emacs Lisp", "bytes": "3341" }, { "name": "FreeMarker", "bytes": "45" }, { "name": "Groovy", "bytes": "251795" }, { "name": "HTML", "bytes": "5348" }, { "name": "Java", "bytes": "36849935" }, { "name": "Perl", "bytes": "7116" }, { "name": "Python", "bytes": "76127" }, { "name": "Shell", "bytes": "102829" } ], "symlink_target": "" }
package com.facebook.buck.cxx.toolchain; import com.facebook.buck.core.toolchain.tool.DelegatingTool; import com.facebook.buck.core.toolchain.tool.Tool; import com.facebook.buck.io.file.FileScrubber; import com.google.common.collect.ImmutableList; /** Archiver implementation for the Windows toolchain. */ public class WindowsArchiver extends DelegatingTool implements Archiver { public WindowsArchiver(Tool tool) { super(tool); } @Override public ImmutableList<FileScrubber> getScrubbers() { return ImmutableList.of(); } @Override public boolean supportsThinArchives() { return false; } @Override public ImmutableList<String> getArchiveOptions(boolean isThinArchive) { return ImmutableList.of(); } @Override public ImmutableList<String> outputArgs(String outputPath) { return ImmutableList.of("/OUT:" + outputPath); } @Override public boolean isRanLibStepRequired() { return false; } @Override public boolean isArgfileRequired() { return true; } }
{ "content_hash": "efa72843e4c3c84b44de509e1b9923e0", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 73, "avg_line_length": 22.822222222222223, "alnum_prop": 0.7429406037000974, "repo_name": "rmaz/buck", "id": "c0f64407593dabe63a6c98bedca21065083ed010", "size": "1632", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "src/com/facebook/buck/cxx/toolchain/WindowsArchiver.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Assembly", "bytes": "1585" }, { "name": "Batchfile", "bytes": "3875" }, { "name": "C", "bytes": "281295" }, { "name": "C#", "bytes": "237" }, { "name": "C++", "bytes": "18966" }, { "name": "CSS", "bytes": "56106" }, { "name": "D", "bytes": "1017" }, { "name": "Dockerfile", "bytes": "2081" }, { "name": "Go", "bytes": "10020" }, { "name": "Groovy", "bytes": "3362" }, { "name": "HTML", "bytes": "11252" }, { "name": "Haskell", "bytes": "1008" }, { "name": "IDL", "bytes": "480" }, { "name": "Java", "bytes": "29307150" }, { "name": "JavaScript", "bytes": "938678" }, { "name": "Kotlin", "bytes": "25755" }, { "name": "Lex", "bytes": "12772" }, { "name": "MATLAB", "bytes": "47" }, { "name": "Makefile", "bytes": "1916" }, { "name": "OCaml", "bytes": "4935" }, { "name": "Objective-C", "bytes": "176972" }, { "name": "Objective-C++", "bytes": "34" }, { "name": "PowerShell", "bytes": "2244" }, { "name": "Prolog", "bytes": "2087" }, { "name": "Python", "bytes": "2075938" }, { "name": "Roff", "bytes": "1207" }, { "name": "Rust", "bytes": "5716" }, { "name": "Scala", "bytes": "5082" }, { "name": "Shell", "bytes": "77999" }, { "name": "Smalltalk", "bytes": "194" }, { "name": "Swift", "bytes": "11393" }, { "name": "Thrift", "bytes": "48632" }, { "name": "Yacc", "bytes": "323" } ], "symlink_target": "" }
package com.speedment.runtime.config.internal; import com.speedment.runtime.config.Column; import com.speedment.runtime.config.Table; import java.util.Map; /** * * @author Emil Forslund */ public final class ColumnImpl extends AbstractChildDocument<Table> implements Column { public ColumnImpl(Table parent, Map<String, Object> data) { super(parent, data); } }
{ "content_hash": "399268dbd229e33684551384d459d42b", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 86, "avg_line_length": 21.333333333333332, "alnum_prop": 0.7395833333333334, "repo_name": "speedment/speedment", "id": "138f15e94e29f40f0ef44fc53fb22b6185f36b5a", "size": "1013", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "runtime-parent/runtime-config/src/main/java/com/speedment/runtime/config/internal/ColumnImpl.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "17142" }, { "name": "Java", "bytes": "13137551" }, { "name": "Shell", "bytes": "7494" } ], "symlink_target": "" }
SYNONYM #### According to Index Fungorum #### Published in null #### Original name Monotospora Sacc. ### Remarks null
{ "content_hash": "731319d900f8857c712376bb4d22bf09", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 18, "avg_line_length": 9.307692307692308, "alnum_prop": 0.6942148760330579, "repo_name": "mdoering/backbone", "id": "ae18553268c18d5bbe232ec03db44913724414c8", "size": "160", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Fungi/Ascomycota/Dothideomycetes/Hysteriales/Hysteriaceae/Acrogenospora/ Syn. Monotospora/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
package com.mobilesolutionworks.android.httpcache.v4; import android.content.Context; import android.support.v4.content.Loader; import com.mobilesolutionworks.android.httpcache.HttpCache; import com.mobilesolutionworks.android.httpcache.HttpCacheRequest; import com.mobilesolutionworks.android.httpcache.HttpCacheLoaderImpl; public class HttpCacheLoader extends Loader<HttpCache> implements HttpCacheLoaderImpl.Callback { HttpCacheLoaderImpl mImplementation; final ForceLoadContentObserver mObserver; HttpCache mTag; public HttpCacheLoader(Context context, HttpCacheRequest builder) { super(context); mImplementation = new HttpCacheLoaderImpl(context, builder, this); mObserver = new ForceLoadContentObserver(); } @Override protected void onForceLoad() { deliverResult(mImplementation.onForceLoad(mObserver)); } @Override public void deliverResult(HttpCache tag) { if (isStarted() && mImplementation.deliverResult(tag)) { super.deliverResult(tag); } } @Override protected void onStartLoading() { if (mTag != null) { deliverResult(mTag); } if (takeContentChanged() || mTag == null) { forceLoad(); } } /** * Must be called from the UI thread */ @Override protected void onStopLoading() { mImplementation.onStopLoading(); } @Override protected void onReset() { super.onReset(); onStopLoading(); mImplementation.onReset(); mTag = null; } public void stopChangeNotificaton() { mImplementation.stopChangeNotificaton(mObserver); } @Override public boolean willDispatch(HttpCacheRequest builder) { return false; } }
{ "content_hash": "233ce3a61ef26defa7dda99fbaa2318a", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 96, "avg_line_length": 24.173333333333332, "alnum_prop": 0.670711527854385, "repo_name": "massiveinfinity/works-http-cache", "id": "06e1136b46bcdba5c2d2d90ab6077dc564df975f", "size": "2410", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "library/src/main/java/com/mobilesolutionworks/android/httpcache/v4/HttpCacheLoader.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "62319" } ], "symlink_target": "" }
package org.apereo.cas.adaptors.yubikey.web.flow; import org.apereo.cas.adaptors.yubikey.YubiKeyCredential; import org.apereo.cas.configuration.CasConfigurationProperties; import org.apereo.cas.util.CollectionUtils; import org.apereo.cas.web.flow.CasWebflowConstants; import org.apereo.cas.web.flow.configurer.AbstractCasMultifactorWebflowConfigurer; import org.apereo.cas.web.flow.configurer.CasMultifactorWebflowCustomizer; import lombok.val; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; import org.springframework.webflow.engine.builder.support.FlowBuilderServices; import java.util.List; import java.util.Map; import java.util.Optional; /** * This is {@link YubiKeyMultifactorWebflowConfigurer}. * * @author Misagh Moayyed * @since 5.0.0 */ public class YubiKeyMultifactorWebflowConfigurer extends AbstractCasMultifactorWebflowConfigurer { /** * Webflow event id. */ public static final String MFA_YUBIKEY_EVENT_ID = "mfa-yubikey"; public YubiKeyMultifactorWebflowConfigurer(final FlowBuilderServices flowBuilderServices, final FlowDefinitionRegistry loginFlowDefinitionRegistry, final FlowDefinitionRegistry flowDefinitionRegistry, final ConfigurableApplicationContext applicationContext, final CasConfigurationProperties casProperties, final List<CasMultifactorWebflowCustomizer> mfaFlowCustomizers) { super(flowBuilderServices, loginFlowDefinitionRegistry, applicationContext, casProperties, Optional.of(flowDefinitionRegistry), mfaFlowCustomizers); } @Override protected void doInitialize() { val yubiProps = casProperties.getAuthn().getMfa().getYubikey(); multifactorAuthenticationFlowDefinitionRegistries.forEach(registry -> { val flow = getFlow(registry, MFA_YUBIKEY_EVENT_ID); createFlowVariable(flow, CasWebflowConstants.VAR_ID_CREDENTIAL, YubiKeyCredential.class); flow.getStartActionList().add(createEvaluateAction(CasWebflowConstants.ACTION_ID_INITIAL_FLOW_SETUP)); createEndState(flow, CasWebflowConstants.STATE_ID_SUCCESS); val initLoginFormState = createActionState(flow, CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM, createEvaluateAction("prepareYubiKeyAuthenticationLoginAction"), createEvaluateAction(CasWebflowConstants.ACTION_ID_INIT_LOGIN_ACTION)); createTransitionForState(initLoginFormState, CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_CHECK_ACCOUNT_REGISTRATION); setStartState(flow, initLoginFormState); val acctRegCheckState = createActionState(flow, CasWebflowConstants.STATE_ID_CHECK_ACCOUNT_REGISTRATION, createEvaluateAction("yubiKeyAccountRegistrationAction")); createTransitionForState(acctRegCheckState, CasWebflowConstants.TRANSITION_ID_REGISTER, CasWebflowConstants.STATE_ID_VIEW_REGISTRATION); createTransitionForState(acctRegCheckState, CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM); val saveState = createActionState(flow, CasWebflowConstants.STATE_ID_SAVE_REGISTRATION, createEvaluateAction("yubiKeySaveAccountRegistrationAction")); createTransitionForState(saveState, CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM); createTransitionForState(saveState, CasWebflowConstants.TRANSITION_ID_ERROR, CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM); val realSubmitState = createActionState(flow, CasWebflowConstants.STATE_ID_REAL_SUBMIT, createEvaluateAction("yubikeyAuthenticationWebflowAction")); createTransitionForState(realSubmitState, CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_SUCCESS); createTransitionForState(realSubmitState, CasWebflowConstants.TRANSITION_ID_ERROR, CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM); val setPrincipalAction = createSetAction("viewScope.principal", "conversationScope.authentication.principal"); val viewRegState = createViewState(flow, CasWebflowConstants.STATE_ID_VIEW_REGISTRATION, "yubikey/casYubiKeyRegistrationView"); viewRegState.getEntryActionList().addAll(setPrincipalAction); createTransitionForState(viewRegState, CasWebflowConstants.TRANSITION_ID_SUBMIT, CasWebflowConstants.STATE_ID_SAVE_REGISTRATION); val loginProperties = CollectionUtils.wrapList("token"); val loginBinder = createStateBinderConfiguration(loginProperties); val viewLoginFormState = createViewState(flow, CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM, "yubikey/casYubiKeyLoginView", loginBinder); createStateModelBinding(viewLoginFormState, CasWebflowConstants.VAR_ID_CREDENTIAL, YubiKeyCredential.class); viewLoginFormState.getEntryActionList().addAll(setPrincipalAction); if (yubiProps.isMultipleDeviceRegistrationEnabled()) { createTransitionForState(viewLoginFormState, CasWebflowConstants.TRANSITION_ID_REGISTER, CasWebflowConstants.STATE_ID_VIEW_REGISTRATION, Map.of("bind", Boolean.FALSE, "validate", Boolean.FALSE)); } createTransitionForState(viewLoginFormState, CasWebflowConstants.TRANSITION_ID_SUBMIT, CasWebflowConstants.STATE_ID_REAL_SUBMIT, Map.of("bind", Boolean.TRUE, "validate", Boolean.TRUE)); }); registerMultifactorProviderAuthenticationWebflow(getLoginFlow(), MFA_YUBIKEY_EVENT_ID, yubiProps.getId()); } }
{ "content_hash": "b78211b8562394c5c9e4639b0aa9f604", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 157, "avg_line_length": 62.010416666666664, "alnum_prop": 0.7397950613136234, "repo_name": "fogbeam/cas_mirror", "id": "24ffe711acddfedc4664afb9de10916e2d7d77d1", "size": "5953", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "support/cas-server-support-yubikey-core/src/main/java/org/apereo/cas/adaptors/yubikey/web/flow/YubiKeyMultifactorWebflowConfigurer.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "13992" }, { "name": "Dockerfile", "bytes": "75" }, { "name": "Groovy", "bytes": "31399" }, { "name": "HTML", "bytes": "195237" }, { "name": "Java", "bytes": "12509257" }, { "name": "JavaScript", "bytes": "85879" }, { "name": "Python", "bytes": "26699" }, { "name": "Ruby", "bytes": "1323" }, { "name": "Shell", "bytes": "177491" } ], "symlink_target": "" }
module.exports = function() { var bannerId = $('.attorneyBanner').attr('id'), topOffset = 0; if (bannerId) { topOffset = $('#' + bannerId).parent().height(); } $('.error-summary a').on('click', function(e) { e.preventDefault(); var focusId = $(this).attr('data-focuses'), inputToFocus = $('#' + focusId), inputTagName = inputToFocus.prop("tagName").toLowerCase(), nodeToScrollTo = inputToFocus; if (["input", "select", "button"].indexOf(inputTagName) !== -1) { nodeToScrollTo = inputToFocus.parent(); } $('html, body').animate({ scrollTop: nodeToScrollTo.offset().top - topOffset }, 500); nodeToScrollTo.find(':input').first().focus(); }); };
{ "content_hash": "b60c6cd8322a4b208caa4e1a4fb13ce8", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 71, "avg_line_length": 28.40740740740741, "alnum_prop": 0.5580182529335072, "repo_name": "tmikus/assets-frontend", "id": "b9baf862da4a7f81a70731370266c0c8acd42853", "size": "767", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "assets/javascripts/modules/validatorFocus.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "294506" }, { "name": "HTML", "bytes": "111952" }, { "name": "JavaScript", "bytes": "229219" }, { "name": "Shell", "bytes": "785" } ], "symlink_target": "" }
<section class="content-header"> <h1 > <i class="fa fa-fw fa-calendar-check-o text-primary"></i> Software List </h1> </section><!-- /.page-header --> <!-- Add Softwares form toggle button --> <div class="row"> <div id="form_toggle" class="col-md-5 col-md-offset-5"> <button type="button" class="btn btn-primary btn-sm pull-right" onclick="show_form()"> <i class="fa fa-plus"></i>&nbsp; Add Softwares </button> </div> </div> <div class="col-sm-7 col-sm-offset-3"> <div id="form_widget" class="box box-default"> <div class="box-header with-border"> <h3 class="box-title">Add Softwares</h3> <div class="box-tools pull-right"> <button class="btn btn-box-tool" onclick="show_button()"><i class="fa fa-times"></i></button> </div> </div><!-- /.box-header --> <div class="box-body"> <?php if($softwares) : ?> <form class="form-horizontal" id="form" role="form" method="POST" action="<?php echo base_url();?>index.php/software_list/add_softwares"> <!-- Name--> <div class="form-group"> <label class="col-sm-3 col-sm-offset-1 control-label no-padding-right" for="name">Name</label> <div class="col-sm-5"> <input type="text" id="name" class="form-control" name="name" placeholder="Enter here..." required /> </div> <span class="text-danger">*</span> </div> <!-- Description --> <div class="form-group"> <label class="col-sm-3 col-sm-offset-1 control-label no-padding-right" for="description"> Description </label> <div class="col-sm-5"> <input type="text" id="description" class="form-control" name="description" placeholder="Enter here..." required /> </div> <span class="text-danger">*</span> </div> <!-- Version --> <div class="form-group"> <label class="col-sm-3 col-sm-offset-1 control-label no-padding-right" for="version"> Version </label> <div class="col-sm-5"> <input type="text" id="version" class="form-control" name="version" placeholder="Enter here..." required /> </div> <span class="text-danger">*</span> </div> <!-- Buttons --> <div class="clearfix"> <div class="col-md-offset-4 col-md-8"> <button class="btn btn-info btn-sm" type="submit"> <i class="ace-icon fa fa-check bigger-110"></i> Create </button> &nbsp; &nbsp; <button class="btn btn-sm" type="reset"> <i class="ace-icon fa fa-undo bigger-110"></i> Reset </button> </div> </div> </form> <?php endif; ?> </div> </div> </div> <br> <?php // Notification for software added SUCCESSFULLY if (isset($result)) { if ($result == 1) { ?> <div class="col-md-6 col-md-offset-3"> <div class="alert alert-success"> <button type="button" class="close" data-dismiss="alert"> <i class="ace-icon fa fa-times"></i> </button> <strong> <i class="ace-icon fa fa-check"></i> Done! </strong> Software added successfully. <br /> </div> </div> <?php } } ?> <div class="space-10"></div> <div class="row"> <div id="table_box" class="col-md-8 col-md-offset-2"> <div class="box box-primary"> <div class="box-body"> <table id="table" class="table table-striped table-hover table-borderedx "> <thead> <tr><!--<th ><p align ="justify">ID</p></th>--> <th ><p align ="justify">Name</p></th> <th><p align ="justify">Description</p></th> <th><p align ="justify">Version</p></th> <th><p align ="center">Action</p></th> </tr> </thead> <tbody> <?php foreach ($softwares as $software) { ?> <tr> <!--<td align ="justify"><?php echo $software->id; ?></td>--> <td align ="justify"><?php echo $software->name; ?></td> <td align ="justify"><?php echo $software->description; ?></td> <td align ="justify"><?php echo $software->version; ?></td> <td align ="center"> <button class="btn btn-link btn-sm" data-rel="tooltip" title="Edit" onclick="software_editModel(<?php echo "'".$software->id."','".$software->name."','".$software->description."','".$software->version."'"; ?>)"><i class="fa fa-pencil"></i></button> <form onsubmit="return confirm('Are you sure you want to delete this record?')" action="<?php echo base_url();?>index.php/Software_List/delete_software" method="post" style="display:inline"> <input type="hidden" name="id" value=<?php echo $software->id; ?> > <button type="submit" class="btn btn-link btn-sm" data-rel="tooltip" title="Delete Record"> <i class="fa fa-trash text-danger"></i> </button> </form> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> < <form action="<?php echo base_url();?>index.php/Software_List/edit_software" method="POST" id="form2"> <div class="modal fade modal-default" > <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title "><i class="fa fa-pencil-square-o"> Edit Details</i></h4> </div> <div class="modal-body"> <div class="row"> <!-- current room code --> <input type="hidden" id="modal_id" name="id"> <!-- Room Code --> <div class="form-group"> <label class="col-sm-3 col-sm-offset-2 control-label no-padding-right" for="modal_name"> Name </label> <div class="col-sm-5"> <input type="text" id="modal_name" class="form-control" name="name" placeholder="Enter here..." required /> </div> <span class="text-danger">*</span> </div> <!-- Description --> <div class="form-group"> <label class="col-sm-3 col-sm-offset-2 control-label no-padding-right" for="modal_description"> Description </label> <div class="col-sm-5"> <input type="text" id="modal_description" class="form-control" name="description" placeholder="Enter here..." required /> </div> <span class="text-danger">*</span> </div> <!-- Special Devices --> <div class="form-group"> <label class="col-sm-3 col-sm-offset-2 control-label no-padding-right" for="modal_version"> Version </label> <div class="col-sm-5"> <input type="text" id="modal_version" class="form-control" name="version" value="n/a" required /> </div> <span class="text-danger">*</span> </div> </div> </div> <div class="modal-footer"> <button class="btn btn-flat btn-default " data-dismiss="modal">Cancel</button> <button id="pass_btn" type="submit" class="btn btn-flat btn-primary pull-right" enabled>Update</button> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- /.modal --> </form> <script type="text/javascript"> var current_page = "Software List" $(function () { $('#form_widget').hide(); $('#table').DataTable({ "paging": true, "lengthChange": true, "searching": true, "ordering": true, "info": true, "autoWidth": true }); $('[data-rel=tooltip]').tooltip(); }); function show_form() { $('#table_box').hide(); $('#form_toggle').hide(); $('#form_widget').slideDown(); } function show_button() { $('#form_widget').slideUp(); $('#form_toggle').fadeIn(); $('#table_box').fadeIn(); } function software_editModel(id, name,description,version) { $('.modal').modal('show'); $('#modal_id').val(id); $('#modal_name').val(name); $('#modal_description').val(description); $('#modal_version').val(version); } </script>
{ "content_hash": "071b4838ee05c6ffdc2a50c18fdb3e6a", "timestamp": "", "source": "github", "line_count": 249, "max_line_length": 258, "avg_line_length": 30.819277108433734, "alnum_prop": 0.5731039874902267, "repo_name": "PrasithL/SPARK", "id": "025fbb1b1c6580af8e69f0d41a8ec40865353f4d", "size": "7676", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "application/views/software_list_view.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "826823" }, { "name": "HTML", "bytes": "5633" }, { "name": "JavaScript", "bytes": "486376" }, { "name": "PHP", "bytes": "2016399" } ], "symlink_target": "" }
std::string resolvePath_Internal(std::string const& path) { // if( path.find( '[' ) != std::string::npos ) { return std::string(XSI::CUtils::ResolveTokenString(XSI::CString(path.c_str()), XSI::CTime(), false) .GetAsciiString()); //} // return path; } #pragma warning(disable : 4996)
{ "content_hash": "2fc85227678fe34a94f9b61cea5652b7", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 80, "avg_line_length": 33.63636363636363, "alnum_prop": 0.5135135135135135, "repo_name": "SqueezeStudioAnimation/ExocortexCrate", "id": "012c85209cf88c01c30382161a0909e503412d65", "size": "485", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Softimage/AlembicArchiveStorage.cpp", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "AMPL", "bytes": "469" }, { "name": "Ada", "bytes": "89080" }, { "name": "Assembly", "bytes": "137857" }, { "name": "Batchfile", "bytes": "89522" }, { "name": "C", "bytes": "14560191" }, { "name": "C#", "bytes": "54011" }, { "name": "C++", "bytes": "7375796" }, { "name": "CLIPS", "bytes": "6933" }, { "name": "CMake", "bytes": "279532" }, { "name": "CSS", "bytes": "7532" }, { "name": "DIGITAL Command Language", "bytes": "24911" }, { "name": "Fortran", "bytes": "211556" }, { "name": "Groff", "bytes": "4235" }, { "name": "HTML", "bytes": "41160" }, { "name": "Lex", "bytes": "6877" }, { "name": "M4", "bytes": "20429" }, { "name": "MAXScript", "bytes": "68273" }, { "name": "Makefile", "bytes": "1036683" }, { "name": "Module Management System", "bytes": "1545" }, { "name": "Objective-C", "bytes": "36732" }, { "name": "Pascal", "bytes": "61168" }, { "name": "Perl", "bytes": "19814" }, { "name": "Python", "bytes": "107954" }, { "name": "SAS", "bytes": "1847" }, { "name": "Shell", "bytes": "401729" }, { "name": "Yacc", "bytes": "20428" } ], "symlink_target": "" }
<?php declare(strict_types=1); namespace Sonata\PageBundle\Service\Contract; use Sonata\PageBundle\Model\PageInterface; use Sonata\PageBundle\Model\SnapshotInterface; interface CreateSnapshotByPageInterface { public function createByPage(PageInterface $page): SnapshotInterface; }
{ "content_hash": "5b0f73886939aa935633f7fadd82044b", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 73, "avg_line_length": 19.4, "alnum_prop": 0.8178694158075601, "repo_name": "sonata-project/SonataPageBundle", "id": "4e088102af1cc6220bc58ca5bf18c92daf589564", "size": "538", "binary": false, "copies": "1", "ref": "refs/heads/3.x", "path": "src/Service/Contract/CreateSnapshotByPageInterface.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "18862" }, { "name": "JavaScript", "bytes": "109021" }, { "name": "Makefile", "bytes": "2652" }, { "name": "PHP", "bytes": "821181" }, { "name": "SCSS", "bytes": "18198" }, { "name": "Twig", "bytes": "55787" } ], "symlink_target": "" }
DELETE FROM t1 WHERE rowid=1
{ "content_hash": "89e777fa024ceee9b558bf763cd7fa59", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 28, "avg_line_length": 28, "alnum_prop": 0.8214285714285714, "repo_name": "bkiers/sqlite-parser", "id": "e0c478c96decb19d767726cd926aa6e96b139a41", "size": "92", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/test/resources/corrupt.test_11.sql", "mode": "33188", "license": "mit", "language": [ { "name": "ANTLR", "bytes": "20112" }, { "name": "Java", "bytes": "6273" }, { "name": "PLpgSQL", "bytes": "324108" } ], "symlink_target": "" }
package com.grpc.java.kernel.entity; public class manager_role_info { private Integer id; private Integer managerId; private Integer roleId; public manager_role_info(){ } public manager_role_info(Integer id, Integer managerId, Integer roleId) { this.id = id; this.managerId = managerId; this.roleId = roleId; } public Integer getId() { return id; } public Integer getManagerId() { return managerId; } public Integer getRoleId() { return roleId; } public void setId(Integer id) { this.id = id; } public void setManagerId(Integer managerId) { this.managerId = managerId; } public void setRoleId(Integer roleId) { this.roleId = roleId; } }
{ "content_hash": "dbbba8c8dd6d7273f96d2e4984d38ea9", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 77, "avg_line_length": 18.511627906976745, "alnum_prop": 0.6042713567839196, "repo_name": "ccfish86/sctalk", "id": "8eee5e8679f633469f6f751c59db96a58562e936", "size": "796", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "server/admin/talk-grpc/src/main/java/com/grpc/java/kernel/entity/manager_role_info.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "2184" }, { "name": "C", "bytes": "884129" }, { "name": "C++", "bytes": "5974" }, { "name": "CSS", "bytes": "11442" }, { "name": "HTML", "bytes": "25329" }, { "name": "Java", "bytes": "2610239" }, { "name": "JavaScript", "bytes": "1225847" }, { "name": "MATLAB", "bytes": "2076" }, { "name": "Makefile", "bytes": "58030" }, { "name": "SCSS", "bytes": "9533" }, { "name": "Vue", "bytes": "161061" } ], "symlink_target": "" }
package oi; import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; /** * Created by sherxon on 4/28/17. */ public class UsingRandomAccess { public static void main(String[] args) throws IOException { //-------------- Test reading 1 MB file. -------------------- StopWatch.start(); RandomAccessFile file1=new RandomAccessFile(new File(DumpDataWriter.input1MB), "r"); while (file1.read()!=-1); long duration = StopWatch.stop(); System.out.println(duration); StopWatch.start(); RandomAccessFile file2=new RandomAccessFile(new File(DumpDataWriter.input10MB), "r"); while (file2.read()!=-1); long duration2 = StopWatch.stop(); System.out.println(duration2); } }
{ "content_hash": "96d683e698d309d6319be65ee19afcb3", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 93, "avg_line_length": 31.4, "alnum_prop": 0.6254777070063694, "repo_name": "sherxon/AlgoDS", "id": "74545907bd8cb317e9fd9f2502e42459ef9d9ebb", "size": "785", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/oi/UsingRandomAccess.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "819010" } ], "symlink_target": "" }
package shm import ( "fmt" "gvisor.dev/gvisor/pkg/abi/linux" "gvisor.dev/gvisor/pkg/context" "gvisor.dev/gvisor/pkg/errors/linuxerr" "gvisor.dev/gvisor/pkg/hostarch" "gvisor.dev/gvisor/pkg/log" "gvisor.dev/gvisor/pkg/sentry/kernel/auth" "gvisor.dev/gvisor/pkg/sentry/kernel/ipc" ktime "gvisor.dev/gvisor/pkg/sentry/kernel/time" "gvisor.dev/gvisor/pkg/sentry/memmap" "gvisor.dev/gvisor/pkg/sentry/pgalloc" "gvisor.dev/gvisor/pkg/sentry/usage" "gvisor.dev/gvisor/pkg/sentry/vfs" "gvisor.dev/gvisor/pkg/sync" ) // Registry tracks all shared memory segments in an IPC namespace. The registry // provides the mechanisms for creating and finding segments, and reporting // global shm parameters. // // +stateify savable type Registry struct { // userNS owns the IPC namespace this registry belong to. Immutable. userNS *auth.UserNamespace // mu protects all fields below. mu sync.Mutex `state:"nosave"` // reg defines basic fields and operations needed for all SysV registries. // // Withing reg, there are two maps, Objects and KeysToIDs. // // reg.objects holds all referenced segments, which are removed on the last // DecRef. Thus, it cannot itself hold a reference on the Shm. // // Since removal only occurs after the last (unlocked) DecRef, there // exists a short window during which a Shm still exists in Shm, but is // unreferenced. Users must use TryIncRef to determine if the Shm is // still valid. // // keysToIDs maps segment keys to IDs. // // Shms in keysToIDs are guaranteed to be referenced, as they are // removed by disassociateKey before the last DecRef. reg *ipc.Registry // Sum of the sizes of all existing segments rounded up to page size, in // units of page size. totalPages uint64 } // NewRegistry creates a new shm registry. func NewRegistry(userNS *auth.UserNamespace) *Registry { return &Registry{ userNS: userNS, reg: ipc.NewRegistry(userNS), } } // FindByID looks up a segment given an ID. // // FindByID returns a reference on Shm. func (r *Registry) FindByID(id ipc.ID) *Shm { r.mu.Lock() defer r.mu.Unlock() mech := r.reg.FindByID(id) if mech == nil { return nil } s := mech.(*Shm) // Take a reference on s. If TryIncRef fails, s has reached the last // DecRef, but hasn't quite been removed from r.reg.objects yet. if s != nil && s.TryIncRef() { return s } return nil } // dissociateKey removes the association between a segment and its key, // preventing it from being discovered in the registry. This doesn't necessarily // mean the segment is about to be destroyed. This is analogous to unlinking a // file; the segment can still be used by a process already referencing it, but // cannot be discovered by a new process. func (r *Registry) dissociateKey(s *Shm) { r.mu.Lock() defer r.mu.Unlock() s.mu.Lock() defer s.mu.Unlock() if s.obj.Key != linux.IPC_PRIVATE { r.reg.DissociateKey(s.obj.Key) s.obj.Key = linux.IPC_PRIVATE } } // FindOrCreate looks up or creates a segment in the registry. It's functionally // analogous to open(2). // // FindOrCreate returns a reference on Shm. func (r *Registry) FindOrCreate(ctx context.Context, pid int32, key ipc.Key, size uint64, mode linux.FileMode, private, create, exclusive bool) (*Shm, error) { if (create || private) && (size < linux.SHMMIN || size > linux.SHMMAX) { // "A new segment was to be created and size is less than SHMMIN or // greater than SHMMAX." - man shmget(2) // // Note that 'private' always implies the creation of a new segment // whether IPC_CREAT is specified or not. return nil, linuxerr.EINVAL } r.mu.Lock() defer r.mu.Unlock() if r.reg.ObjectCount() >= linux.SHMMNI { // "All possible shared memory IDs have been taken (SHMMNI) ..." // - man shmget(2) return nil, linuxerr.ENOSPC } if !private { shm, err := r.reg.Find(ctx, key, mode, create, exclusive) if err != nil { return nil, err } // Validate shm-specific parameters. if shm != nil { shm := shm.(*Shm) if size > shm.size { // "A segment for the given key exists, but size is greater than // the size of that segment." - man shmget(2) return nil, linuxerr.EINVAL } shm.IncRef() return shm, nil } } var sizeAligned uint64 if val, ok := hostarch.Addr(size).RoundUp(); ok { sizeAligned = uint64(val) } else { return nil, linuxerr.EINVAL } if numPages := sizeAligned / hostarch.PageSize; r.totalPages+numPages > linux.SHMALL { // "... allocating a segment of the requested size would cause the // system to exceed the system-wide limit on shared memory (SHMALL)." // - man shmget(2) return nil, linuxerr.ENOSPC } // Need to create a new segment. s, err := r.newShmLocked(ctx, pid, key, auth.CredentialsFromContext(ctx), mode, size) if err != nil { return nil, err } // The initial reference is held by s itself. Take another to return to // the caller. s.IncRef() return s, nil } // newShmLocked creates a new segment in the registry. // // Precondition: Caller must hold r.mu. func (r *Registry) newShmLocked(ctx context.Context, pid int32, key ipc.Key, creator *auth.Credentials, mode linux.FileMode, size uint64) (*Shm, error) { mfp := pgalloc.MemoryFileProviderFromContext(ctx) if mfp == nil { panic(fmt.Sprintf("context.Context %T lacks non-nil value for key %T", ctx, pgalloc.CtxMemoryFileProvider)) } effectiveSize := uint64(hostarch.Addr(size).MustRoundUp()) fr, err := mfp.MemoryFile().Allocate(effectiveSize, pgalloc.AllocOpts{Kind: usage.Anonymous}) if err != nil { return nil, err } shm := &Shm{ mfp: mfp, registry: r, size: size, effectiveSize: effectiveSize, obj: ipc.NewObject(r.reg.UserNS, ipc.Key(key), creator, creator, mode), fr: fr, creatorPID: pid, changeTime: ktime.NowFromContext(ctx), } shm.InitRefs() if err := r.reg.Register(shm); err != nil { return nil, err } r.totalPages += effectiveSize / hostarch.PageSize return shm, nil } // IPCInfo reports global parameters for sysv shared memory segments on this // system. See shmctl(IPC_INFO). func (r *Registry) IPCInfo() *linux.ShmParams { return &linux.ShmParams{ ShmMax: linux.SHMMAX, ShmMin: linux.SHMMIN, ShmMni: linux.SHMMNI, ShmSeg: linux.SHMSEG, ShmAll: linux.SHMALL, } } // ShmInfo reports linux-specific global parameters for sysv shared memory // segments on this system. See shmctl(SHM_INFO). func (r *Registry) ShmInfo() *linux.ShmInfo { r.mu.Lock() defer r.mu.Unlock() return &linux.ShmInfo{ UsedIDs: int32(r.reg.LastIDUsed()), ShmTot: r.totalPages, ShmRss: r.totalPages, // We could probably get a better estimate from memory accounting. ShmSwp: 0, // No reclaim at the moment. } } // remove deletes a segment from this registry, deaccounting the memory used by // the segment. // // Precondition: Must follow a call to r.dissociateKey(s). func (r *Registry) remove(s *Shm) { r.mu.Lock() defer r.mu.Unlock() s.mu.Lock() defer s.mu.Unlock() if s.obj.Key != linux.IPC_PRIVATE { panic(fmt.Sprintf("Attempted to remove %s from the registry whose key is still associated", s.debugLocked())) } r.reg.DissociateID(s.obj.ID) r.totalPages -= s.effectiveSize / hostarch.PageSize } // Release drops the self-reference of each active shm segment in the registry. // It is called when the kernel.IPCNamespace containing r is being destroyed. func (r *Registry) Release(ctx context.Context) { // Because Shm.DecRef() may acquire the same locks, collect the segments to // release first. Note that this should not race with any updates to r, since // the IPC namespace containing it has no more references. toRelease := make([]*Shm, 0) r.mu.Lock() r.reg.ForAllObjects( func(o ipc.Mechanism) { s := o.(*Shm) s.mu.Lock() if !s.pendingDestruction { toRelease = append(toRelease, s) } s.mu.Unlock() }, ) r.mu.Unlock() for _, s := range toRelease { r.dissociateKey(s) s.DecRef(ctx) } } // Shm represents a single shared memory segment. // // Shm segments are backed directly by an allocation from platform memory. // Segments are always mapped as a whole, greatly simplifying how mappings are // tracked. However note that mremap and munmap calls may cause the vma for a // segment to become fragmented; which requires special care when unmapping a // segment. See mm/shm.go. // // Segments persist until they are explicitly marked for destruction via // MarkDestroyed(). // // Shm implements memmap.Mappable and memmap.MappingIdentity. // // +stateify savable type Shm struct { // ShmRefs tracks the number of references to this segment. // // A segment holds a reference to itself until it is marked for // destruction. // // In addition to direct users, the MemoryManager will hold references // via MappingIdentity. ShmRefs mfp pgalloc.MemoryFileProvider // registry points to the shm registry containing this segment. Immutable. registry *Registry // size is the requested size of the segment at creation, in // bytes. Immutable. size uint64 // effectiveSize of the segment, rounding up to the next page // boundary. Immutable. // // Invariant: effectiveSize must be a multiple of hostarch.PageSize. effectiveSize uint64 // fr is the offset into mfp.MemoryFile() that backs this contents of this // segment. Immutable. fr memmap.FileRange // mu protects all fields below. mu sync.Mutex `state:"nosave"` obj *ipc.Object // attachTime is updated on every successful shmat. attachTime ktime.Time // detachTime is updated on every successful shmdt. detachTime ktime.Time // changeTime is updated on every successful changes to the segment via // shmctl(IPC_SET). changeTime ktime.Time // creatorPID is the PID of the process that created the segment. creatorPID int32 // lastAttachDetachPID is the pid of the process that issued the last shmat // or shmdt syscall. lastAttachDetachPID int32 // pendingDestruction indicates the segment was marked as destroyed through // shmctl(IPC_RMID). When marked as destroyed, the segment will not be found // in the registry and can no longer be attached. When the last user // detaches from the segment, it is destroyed. pendingDestruction bool } // ID returns object's ID. func (s *Shm) ID() ipc.ID { return s.obj.ID } // Object implements ipc.Mechanism.Object. func (s *Shm) Object() *ipc.Object { return s.obj } // Destroy implements ipc.Mechanism.Destroy. No work is performed on shm.Destroy // because a different removal mechanism is used in shm. See Shm.MarkDestroyed. func (s *Shm) Destroy() { } // Lock implements ipc.Mechanism.Lock. func (s *Shm) Lock() { s.mu.Lock() } // Unlock implements ipc.mechanism.Unlock. // // +checklocksignore func (s *Shm) Unlock() { s.mu.Unlock() } // Precondition: Caller must hold s.mu. func (s *Shm) debugLocked() string { return fmt.Sprintf("Shm{id: %d, key: %d, size: %d bytes, refs: %d, destroyed: %v}", s.obj.ID, s.obj.Key, s.size, s.ReadRefs(), s.pendingDestruction) } // MappedName implements memmap.MappingIdentity.MappedName. func (s *Shm) MappedName(ctx context.Context) string { s.mu.Lock() defer s.mu.Unlock() return fmt.Sprintf("SYSV%08d", s.obj.Key) } // DeviceID implements memmap.MappingIdentity.DeviceID. func (s *Shm) DeviceID() uint64 { return shmDevice.DeviceID() } // InodeID implements memmap.MappingIdentity.InodeID. func (s *Shm) InodeID() uint64 { // "shmid gets reported as "inode#" in /proc/pid/maps. proc-ps tools use // this. Changing this will break them." -- Linux, ipc/shm.c:newseg() return uint64(s.obj.ID) } // DecRef drops a reference on s. // // Precondition: Caller must not hold s.mu. func (s *Shm) DecRef(ctx context.Context) { s.ShmRefs.DecRef(func() { s.mfp.MemoryFile().DecRef(s.fr) s.registry.remove(s) }) } // Msync implements memmap.MappingIdentity.Msync. Msync is a no-op for shm // segments. func (s *Shm) Msync(context.Context, memmap.MappableRange) error { return nil } // AddMapping implements memmap.Mappable.AddMapping. func (s *Shm) AddMapping(ctx context.Context, _ memmap.MappingSpace, _ hostarch.AddrRange, _ uint64, _ bool) error { s.mu.Lock() defer s.mu.Unlock() s.attachTime = ktime.NowFromContext(ctx) if pid, ok := auth.ThreadGroupIDFromContext(ctx); ok { s.lastAttachDetachPID = pid } else { // AddMapping is called during a syscall, so ctx should always be a task // context. log.Warningf("Adding mapping to %s but couldn't get the current pid; not updating the last attach pid", s.debugLocked()) } return nil } // RemoveMapping implements memmap.Mappable.RemoveMapping. func (s *Shm) RemoveMapping(ctx context.Context, _ memmap.MappingSpace, _ hostarch.AddrRange, _ uint64, _ bool) { s.mu.Lock() defer s.mu.Unlock() // RemoveMapping may be called during task exit, when ctx // is context.Background. Gracefully handle missing clocks. Failing to // update the detach time in these cases is ok, since no one can observe the // omission. if clock := ktime.RealtimeClockFromContext(ctx); clock != nil { s.detachTime = clock.Now() } // If called from a non-task context we also won't have a threadgroup // id. Silently skip updating the lastAttachDetachPid in that case. if pid, ok := auth.ThreadGroupIDFromContext(ctx); ok { s.lastAttachDetachPID = pid } else { log.Debugf("Couldn't obtain pid when removing mapping to %s, not updating the last detach pid.", s.debugLocked()) } } // CopyMapping implements memmap.Mappable.CopyMapping. func (*Shm) CopyMapping(context.Context, memmap.MappingSpace, hostarch.AddrRange, hostarch.AddrRange, uint64, bool) error { return nil } // Translate implements memmap.Mappable.Translate. func (s *Shm) Translate(ctx context.Context, required, optional memmap.MappableRange, at hostarch.AccessType) ([]memmap.Translation, error) { var err error if required.End > s.fr.Length() { err = &memmap.BusError{linuxerr.EFAULT} } if source := optional.Intersect(memmap.MappableRange{0, s.fr.Length()}); source.Length() != 0 { return []memmap.Translation{ { Source: source, File: s.mfp.MemoryFile(), Offset: s.fr.Start + source.Start, Perms: hostarch.AnyAccess, }, }, err } return nil, err } // InvalidateUnsavable implements memmap.Mappable.InvalidateUnsavable. func (s *Shm) InvalidateUnsavable(ctx context.Context) error { return nil } // AttachOpts describes various flags passed to shmat(2). type AttachOpts struct { Execute bool Readonly bool Remap bool } // ConfigureAttach creates an mmap configuration for the segment with the // requested attach options. // // Postconditions: The returned MMapOpts are valid only as long as a reference // continues to be held on s. func (s *Shm) ConfigureAttach(ctx context.Context, addr hostarch.Addr, opts AttachOpts) (memmap.MMapOpts, error) { s.mu.Lock() defer s.mu.Unlock() if s.pendingDestruction && s.ReadRefs() == 0 { return memmap.MMapOpts{}, linuxerr.EIDRM } creds := auth.CredentialsFromContext(ctx) ats := vfs.MayRead if !opts.Readonly { ats |= vfs.MayWrite } if opts.Execute { ats |= vfs.MayExec } if !s.obj.CheckPermissions(creds, ats) { // "The calling process does not have the required permissions for the // requested attach type, and does not have the CAP_IPC_OWNER capability // in the user namespace that governs its IPC namespace." - man shmat(2) return memmap.MMapOpts{}, linuxerr.EACCES } return memmap.MMapOpts{ Length: s.size, Offset: 0, Addr: addr, Fixed: opts.Remap, Perms: hostarch.AccessType{ Read: true, Write: !opts.Readonly, Execute: opts.Execute, }, MaxPerms: hostarch.AnyAccess, Mappable: s, MappingIdentity: s, }, nil } // EffectiveSize returns the size of the underlying shared memory segment. This // may be larger than the requested size at creation, due to rounding to page // boundaries. func (s *Shm) EffectiveSize() uint64 { return s.effectiveSize } // IPCStat returns information about a shm. See shmctl(IPC_STAT). func (s *Shm) IPCStat(ctx context.Context) (*linux.ShmidDS, error) { s.mu.Lock() defer s.mu.Unlock() // "The caller must have read permission on the shared memory segment." // - man shmctl(2) creds := auth.CredentialsFromContext(ctx) if !s.obj.CheckPermissions(creds, vfs.MayRead) { // "IPC_STAT or SHM_STAT is requested and shm_perm.mode does not allow // read access for shmid, and the calling process does not have the // CAP_IPC_OWNER capability in the user namespace that governs its IPC // namespace." - man shmctl(2) return nil, linuxerr.EACCES } var mode uint16 if s.pendingDestruction { mode |= linux.SHM_DEST } // Use the reference count as a rudimentary count of the number of // attaches. We exclude: // // 1. The reference the caller holds. // 2. The self-reference held by s prior to destruction. // // Note that this may still overcount by including transient references // used in concurrent calls. nattach := uint64(s.ReadRefs()) - 1 if !s.pendingDestruction { nattach-- } ds := &linux.ShmidDS{ ShmPerm: linux.IPCPerm{ Key: uint32(s.obj.Key), UID: uint32(creds.UserNamespace.MapFromKUID(s.obj.OwnerUID)), GID: uint32(creds.UserNamespace.MapFromKGID(s.obj.OwnerGID)), CUID: uint32(creds.UserNamespace.MapFromKUID(s.obj.CreatorUID)), CGID: uint32(creds.UserNamespace.MapFromKGID(s.obj.CreatorGID)), Mode: mode | uint16(s.obj.Mode), Seq: 0, // IPC sequences not supported. }, ShmSegsz: s.size, ShmAtime: s.attachTime.TimeT(), ShmDtime: s.detachTime.TimeT(), ShmCtime: s.changeTime.TimeT(), ShmCpid: s.creatorPID, ShmLpid: s.lastAttachDetachPID, ShmNattach: nattach, } return ds, nil } // Set modifies attributes for a segment. See shmctl(IPC_SET). func (s *Shm) Set(ctx context.Context, ds *linux.ShmidDS) error { s.mu.Lock() defer s.mu.Unlock() if err := s.obj.Set(ctx, &ds.ShmPerm); err != nil { return err } s.changeTime = ktime.NowFromContext(ctx) return nil } // MarkDestroyed marks a segment for destruction. The segment is actually // destroyed once it has no references. MarkDestroyed may be called multiple // times, and is safe to call after a segment has already been destroyed. See // shmctl(IPC_RMID). func (s *Shm) MarkDestroyed(ctx context.Context) { s.registry.dissociateKey(s) s.mu.Lock() if s.pendingDestruction { s.mu.Unlock() return } s.pendingDestruction = true s.mu.Unlock() // Drop the self-reference so destruction occurs when all // external references are gone. // // N.B. This cannot be the final DecRef, as the caller also // holds a reference. s.DecRef(ctx) return }
{ "content_hash": "4a7a421c4c1d529f4cc8b60afac528f9", "timestamp": "", "source": "github", "line_count": 621, "max_line_length": 159, "avg_line_length": 30.057971014492754, "alnum_prop": 0.7108111003964427, "repo_name": "google/gvisor", "id": "af5674dbb8c42462c7b08267b7170291f316840c", "size": "20045", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "pkg/sentry/kernel/shm/shm.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Assembly", "bytes": "153442" }, { "name": "C", "bytes": "32010" }, { "name": "C++", "bytes": "3956729" }, { "name": "Dockerfile", "bytes": "11649" }, { "name": "Go", "bytes": "14556808" }, { "name": "HTML", "bytes": "18035" }, { "name": "Handlebars", "bytes": "103" }, { "name": "JavaScript", "bytes": "983" }, { "name": "Makefile", "bytes": "40575" }, { "name": "Python", "bytes": "6200" }, { "name": "Ruby", "bytes": "2430" }, { "name": "SCSS", "bytes": "4134" }, { "name": "Shell", "bytes": "60834" }, { "name": "Starlark", "bytes": "655995" } ], "symlink_target": "" }
ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{ "content_hash": "bd70e99b9556ae6c7dd027c17c5e62b5", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 10.307692307692308, "alnum_prop": 0.6940298507462687, "repo_name": "mdoering/backbone", "id": "e7473048870966366e039aef2852fe73cf40bcd7", "size": "178", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Fabales/Fabaceae/Adesmia/Adesmia obovata/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="PagerSlidingTabStrip"> <attr name="pstsIndicatorColor" format="color" /> <attr name="pstsUnderlineColor" format="color" /> <attr name="pstsDividerColor" format="color" /> <attr name="pstsIndicatorHeight" format="dimension" /> <attr name="pstsUnderlineHeight" format="dimension" /> <attr name="pstsDividerPadding" format="dimension" /> <attr name="pstsTabPaddingLeftRight" format="dimension" /> <attr name="pstsIndicatiorPaddingLeftRight" format="dimension" /> <attr name="pstsScrollOffset" format="dimension" /> <attr name="pstsTabBackground" format="reference" /> <attr name="pstsShouldExpand" format="boolean" /> <attr name="pstsTextAllCaps" format="boolean" /> </declare-styleable> </resources>
{ "content_hash": "467eb4c421473eb4b6feb0371a6ac46b", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 73, "avg_line_length": 47.21052631578947, "alnum_prop": 0.6499442586399108, "repo_name": "zhangfy068/LazyFetchDataViewPagerDemo", "id": "93d7aeb02acb7acc62cdafe2a9befd368e2b6bae", "size": "897", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "res/values/attrs.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "36138" } ], "symlink_target": "" }
kid_readout.analysis.resonator.test package =========================================== Submodules ---------- kid_readout.analysis.resonator.test.resonator_test module --------------------------------------------------------- .. automodule:: kid_readout.analysis.resonator.test.resonator_test :members: :undoc-members: :show-inheritance: kid_readout.analysis.resonator.test.test_lmfit_resonator module --------------------------------------------------------------- .. automodule:: kid_readout.analysis.resonator.test.test_lmfit_resonator :members: :undoc-members: :show-inheritance: Module contents --------------- .. automodule:: kid_readout.analysis.resonator.test :members: :undoc-members: :show-inheritance:
{ "content_hash": "ee1f58cc0c3b78177d7f5b3532c82928", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 72, "avg_line_length": 25.233333333333334, "alnum_prop": 0.5587846763540291, "repo_name": "ColumbiaCMB/kid_readout", "id": "e9cd307abbb550fe5e5f534e029daaffb6548adc", "size": "757", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/kid_readout.analysis.resonator.test.rst", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "C", "bytes": "13672" }, { "name": "Python", "bytes": "2033932" } ], "symlink_target": "" }
package com.evolveum.midpoint.model.impl.lens; import com.evolveum.midpoint.model.api.context.AssignmentPath; import com.evolveum.midpoint.model.api.context.EvaluatedConstruction; import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.util.DebugUtil; import com.evolveum.midpoint.util.exception.ObjectNotFoundException; import com.evolveum.midpoint.util.exception.SchemaException; import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentHolderType; import com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType; import com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowKindType; /** * @author mederly */ public class EvaluatedConstructionImpl implements EvaluatedConstruction { final private PrismObject<ResourceType> resource; final private ShadowKindType kind; final private String intent; final private boolean directlyAssigned; final private AssignmentPath assignmentPath; final private boolean weak; public <AH extends AssignmentHolderType> EvaluatedConstructionImpl(Construction<AH> construction, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException { resource = construction.getResource(task, result).asPrismObject(); kind = construction.getKind(); intent = construction.getIntent(); assignmentPath = construction.getAssignmentPath(); directlyAssigned = assignmentPath == null || assignmentPath.size() == 1; weak = construction.isWeak(); } @Override public PrismObject<ResourceType> getResource() { return resource; } @Override public ShadowKindType getKind() { return kind; } @Override public String getIntent() { return intent; } @Override public boolean isDirectlyAssigned() { return directlyAssigned; } @Override public AssignmentPath getAssignmentPath() { return assignmentPath; } @Override public boolean isWeak() { return weak; } @Override public String debugDump(int indent) { StringBuilder sb = new StringBuilder(); DebugUtil.debugDumpLabelLn(sb, "EvaluatedConstruction", indent); DebugUtil.debugDumpWithLabelLn(sb, "resource", resource, indent + 1); DebugUtil.debugDumpWithLabelLn(sb, "kind", kind.value(), indent + 1); DebugUtil.debugDumpWithLabelLn(sb, "intent", intent, indent + 1); DebugUtil.debugDumpWithLabelLn(sb, "directlyAssigned", directlyAssigned, indent + 1); DebugUtil.debugDumpWithLabel(sb, "weak", weak, indent + 1); return sb.toString(); } @Override public String toString() { return "EvaluatedConstruction(" + "resource=" + resource + ", kind=" + kind + ", intent='" + intent + ')'; } }
{ "content_hash": "a40265725607dbed9f3d914674e32341", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 186, "avg_line_length": 33.94318181818182, "alnum_prop": 0.7010378305992635, "repo_name": "bshp/midPoint", "id": "ae038d1e6d2a02f574ccabc2b99f5cdf9b7fc94c", "size": "3176", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/EvaluatedConstructionImpl.java", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
package com.heart.bean; public class RegularPosition { private double longtitude; private double latitude; private String area; private long date; private String oldmanPhone; private String degree; private String imgUrl; private String tianqi; private String pm25; public double getLongtitude() { return longtitude; } public void setLongtitude(double longtitude) { this.longtitude = longtitude; } public double getLatitude() { return latitude; } public void setLatitude(double latitude) { this.latitude = latitude; } public String getArea() { return area; } public void setArea(String area) { this.area = area; } public long getDate() { return date; } public void setDate(long date) { this.date = date; } public String getOldmanPhone() { return oldmanPhone; } public void setOldmanPhone(String oldmanPhone) { this.oldmanPhone = oldmanPhone; } public String getDegree() { return degree; } public void setDegree(String degree) { this.degree = degree; } public String getImgUrl() { return imgUrl; } public void setImgUrl(String imgUrl) { this.imgUrl = imgUrl; } public String getTianqi() { return tianqi; } public void setTianqi(String tianqi) { this.tianqi = tianqi; } public String getPm25() { return pm25; } public void setPm25(String pm25) { this.pm25 = pm25; } }
{ "content_hash": "a94b23c7a8412e5b3f53d1b16bb37b5e", "timestamp": "", "source": "github", "line_count": 97, "max_line_length": 49, "avg_line_length": 14.556701030927835, "alnum_prop": 0.68342776203966, "repo_name": "Mrsunsunshine/ForElder", "id": "cc7bbf2739169fceb988513252fe3ada07cf048c", "size": "1412", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Heart/src/com/heart/bean/RegularPosition.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "10784" }, { "name": "HTML", "bytes": "7294" }, { "name": "Java", "bytes": "929176" }, { "name": "JavaScript", "bytes": "7752" } ], "symlink_target": "" }
package com.github.mkopylec.recaptcha; import com.github.mkopylec.recaptcha.validation.ErrorCode; import org.springframework.boot.context.properties.ConfigurationProperties; import java.time.Duration; import java.util.ArrayList; import java.util.List; import static java.time.Duration.ofMillis; import static org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.DEFAULT_LOGIN_PAGE_URL; /** * reCAPTCHA configuration properties. */ @ConfigurationProperties("recaptcha") public class RecaptchaProperties { /** * Properties responsible for reCAPTCHA validation on Google's servers. */ private Validation validation = new Validation(); /** * Properties responsible for integration with Spring Security. */ private Security security = new Security(); /** * Properties responsible for testing mode behaviour. */ private Testing testing = new Testing(); public Validation getValidation() { return validation; } public void setValidation(Validation validation) { this.validation = validation; } public Security getSecurity() { return security; } public void setSecurity(Security security) { this.security = security; } public Testing getTesting() { return testing; } public void setTesting(Testing testing) { this.testing = testing; } public static class Validation { /** * reCAPTCHA secret key. */ private String secretKey; /** * HTTP request parameter name containing user reCAPTCHA response. */ private String responseParameter = "g-recaptcha-response"; /** * reCAPTCHA validation endpoint. */ private String verificationUrl = "https://www.google.com/recaptcha/api/siteverify"; /** * Properties responsible for reCAPTCHA validation request timeout. */ private Timeout timeout = new Timeout(); public String getSecretKey() { return secretKey; } public void setSecretKey(String secretKey) { this.secretKey = secretKey; } public String getResponseParameter() { return responseParameter; } public void setResponseParameter(String responseParameter) { this.responseParameter = responseParameter; } public String getVerificationUrl() { return verificationUrl; } public void setVerificationUrl(String verificationUrl) { this.verificationUrl = verificationUrl; } public Timeout getTimeout() { return timeout; } public void setTimeout(Timeout timeout) { this.timeout = timeout; } public static class Timeout { /** * reCAPTCHA validation request connect timeout. */ private Duration connect = ofMillis(500); /** * reCAPTCHA validation request read timeout. */ private Duration read = ofMillis(1000); /** * reCAPTCHA validation request write timeout. */ private Duration write = ofMillis(1000); public Duration getConnect() { return connect; } public void setConnect(Duration connect) { this.connect = connect; } public Duration getRead() { return read; } public void setRead(Duration read) { this.read = read; } public Duration getWrite() { return write; } public void setWrite(Duration write) { this.write = write; } } } public static class Security { /** * URL to redirect to when user authentication fails. */ private String failureUrl = DEFAULT_LOGIN_PAGE_URL; /** * Number of allowed login failures before reCAPTCHA must be displayed. */ private int loginFailuresThreshold = 5; /** * Permits on denies continuing user authentication process after reCAPTCHA validation fails because of HTTP error. */ private boolean continueOnValidationHttpError = true; public String getFailureUrl() { return failureUrl; } public void setFailureUrl(String failureUrl) { this.failureUrl = failureUrl; } public int getLoginFailuresThreshold() { return loginFailuresThreshold; } public void setLoginFailuresThreshold(int loginFailuresThreshold) { this.loginFailuresThreshold = loginFailuresThreshold; } public boolean isContinueOnValidationHttpError() { return continueOnValidationHttpError; } public void setContinueOnValidationHttpError(boolean continueOnValidationHttpError) { this.continueOnValidationHttpError = continueOnValidationHttpError; } } public static class Testing { /** * Flag for enabling and disabling testing mode. */ private boolean enabled = false; /** * Defines successful or unsuccessful validation result, can be changed during tests. */ private boolean successResult = true; /** * Fixed errors in validation result, can be changed during tests. */ private List<ErrorCode> resultErrorCodes = new ArrayList<>(); public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public boolean isSuccessResult() { return successResult; } public void setSuccessResult(boolean successResult) { this.successResult = successResult; } public List<ErrorCode> getResultErrorCodes() { return resultErrorCodes; } public void setResultErrorCodes(List<ErrorCode> resultErrorCodes) { this.resultErrorCodes = resultErrorCodes; } } }
{ "content_hash": "6955de5edf92abbe25e3960685ee0c1f", "timestamp": "", "source": "github", "line_count": 227, "max_line_length": 123, "avg_line_length": 27.841409691629956, "alnum_prop": 0.6001582278481012, "repo_name": "mkopylec/recaptcha-spring-boot-starter", "id": "afd589c4bbc3b7dfe589a1af3bce946a2f356fdb", "size": "6320", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/github/mkopylec/recaptcha/RecaptchaProperties.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Groovy", "bytes": "22461" }, { "name": "Java", "bytes": "43928" } ], "symlink_target": "" }
namespace BiodexExcel.Visualizations.Common { #region -- Using Directives -- using System.IO; using System.Reflection; using System.Windows; using System.Windows.Media.Imaging; using System; #endregion -- Using Directives -- /// <summary> /// AboutDialog class will display copyright information /// about Excel Workbench. /// </summary> public partial class AboutDialog : Window { /// <summary> /// Stores the name of "Bio.dll" /// </summary> private static string bioDll = "Bio.Core"; #region -- Constructor -- /// <summary> /// Initializes a new instance of the AboutDialog class. /// </summary> public AboutDialog() { this.InitializeComponent(); MemoryStream ms = new MemoryStream(); System.Drawing.Bitmap icon = Properties.Resources.about; icon.Save(ms, System.Drawing.Imaging.ImageFormat.Png); BitmapImage image = new BitmapImage(); image.BeginInit(); image.StreamSource = ms; image.EndInit(); this.imgAbout.Source = image; this.btnOk.Focus(); // Assign the version txtVersionNumber.Text = string.Format(" {0}, using Bio.Core.dll {1}", GetDllVersion("BioExcel"), GetDllVersion(bioDll)); } /// <summary> /// Gets the version of Bio.dll and displays that as the version of /// the excel workbench. /// </summary> private string GetDllVersion(string dllName) { var assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly referencedAssembly in assemblies) { AssemblyName assemblyName = referencedAssembly.GetName(); if (assemblyName.Name.Equals(dllName)) { return assemblyName.Version.ToString(); } } return "(n/a)"; } #endregion -- Constructor -- /// <summary> /// Open .NET Bio page in codeplex /// </summary> /// <param name="sender">sender object</param> /// <param name="e">Event argument</param> private void OnRequestNavigateToMBFSite(object sender, RoutedEventArgs e) { System.Diagnostics.Process.Start(Properties.Resources.CodeplexURL); } } }
{ "content_hash": "de827f32d33f4f9fc2454c4d8cf8a1be", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 132, "avg_line_length": 30.725, "alnum_prop": 0.5650935720097641, "repo_name": "dotnetbio/bio", "id": "86abf19cb52a2224cb3087de79529b03f6ed1b47", "size": "2460", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Tools/BioExcel.Visualizations.Common/DialogBox/AboutDialog.xaml.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "9905234" }, { "name": "Visual Basic", "bytes": "1424" } ], "symlink_target": "" }
package com.mxgraph.swing.view; import java.awt.Dimension; import java.awt.Image; import java.awt.Rectangle; import java.awt.Shape; import java.awt.image.ImageObserver; import com.mxgraph.canvas.mxGraphics2DCanvas; import com.mxgraph.shape.mxBasicShape; import com.mxgraph.shape.mxIShape; import com.mxgraph.swing.mxGraphComponent; import com.mxgraph.util.mxConstants; import com.mxgraph.util.mxPoint; import com.mxgraph.util.mxUtils; import com.mxgraph.view.mxCellState; public class mxInteractiveCanvas extends mxGraphics2DCanvas { /** * */ protected ImageObserver imageObserver = null; /** * */ public mxInteractiveCanvas() { this(null); } /** * */ public mxInteractiveCanvas(ImageObserver imageObserver) { setImageObserver(imageObserver); } /** * */ public void setImageObserver(ImageObserver value) { imageObserver = value; } /** * */ public ImageObserver getImageObserver() { return imageObserver; } /** * Overrides graphics call to use image observer. */ protected void drawImageImpl(Image image, int x, int y) { g.drawImage(image, x, y, imageObserver); } /** * Returns the size for the given image. */ protected Dimension getImageSize(Image image) { return new Dimension(image.getWidth(imageObserver), image.getHeight(imageObserver)); } /** * */ public boolean contains(mxGraphComponent graphComponent, Rectangle rect, mxCellState state) { return state != null && state.getX() >= rect.x && state.getY() >= rect.y && state.getX() + state.getWidth() <= rect.x + rect.width && state.getY() + state.getHeight() <= rect.y + rect.height; } /** * */ public boolean intersects(mxGraphComponent graphComponent, Rectangle rect, mxCellState state) { if (state != null) { // Checks if the label intersects if (state.getLabelBounds() != null && state.getLabelBounds().getRectangle().intersects(rect)) { return true; } int pointCount = state.getAbsolutePointCount(); // Checks if the segments of the edge intersect if (pointCount > 0) { rect = (Rectangle) rect.clone(); int tolerance = graphComponent.getTolerance(); rect.grow(tolerance, tolerance); Shape realShape = null; // FIXME: Check if this should be used for all shapes if (mxUtils.getString(state.getStyle(), mxConstants.STYLE_SHAPE, "").equals( mxConstants.SHAPE_ARROW)) { mxIShape shape = getShape(state.getStyle()); if (shape instanceof mxBasicShape) { realShape = ((mxBasicShape) shape).createShape(this, state); } } if (realShape != null && realShape.intersects(rect)) { return true; } else { mxPoint p0 = state.getAbsolutePoint(0); for (int i = 0; i < pointCount; i++) { mxPoint p1 = state.getAbsolutePoint(i); if (rect.intersectsLine(p0.getX(), p0.getY(), p1.getX(), p1.getY())) { return true; } p0 = p1; } } } else { // Checks if the bounds of the shape intersect return state.getRectangle().intersects(rect); } } return false; } /** * Returns true if the given point is inside the content area of the given * swimlane. (The content area of swimlanes is transparent to events.) This * implementation does not check if the given state is a swimlane, it is * assumed that the caller has checked this before using this method. */ public boolean hitSwimlaneContent(mxGraphComponent graphComponent, mxCellState swimlane, int x, int y) { if (swimlane != null) { int start = (int) Math.max(2, Math.round(mxUtils.getInt( swimlane.getStyle(), mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE) * graphComponent.getGraph().getView().getScale())); Rectangle rect = swimlane.getRectangle(); if (mxUtils.isTrue(swimlane.getStyle(), mxConstants.STYLE_HORIZONTAL, true)) { rect.y += start; rect.height -= start; } else { rect.x += start; rect.width -= start; } return rect.contains(x, y); } return false; } }
{ "content_hash": "83d2abc436a97d0f16dda197c6c10d5b", "timestamp": "", "source": "github", "line_count": 194, "max_line_length": 76, "avg_line_length": 21.262886597938145, "alnum_prop": 0.6591515151515152, "repo_name": "alect/Puzzledice", "id": "20393a6395e73039b77b5d23bb817d9ae4891588", "size": "4261", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "Tools/PuzzleMapEditor/src/com/mxgraph/swing/view/mxInteractiveCanvas.java", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "279216" }, { "name": "Java", "bytes": "2576188" } ], "symlink_target": "" }
layout: post author: jwarrich title: "Javairia's Refactoring Tetris Turtle" --- <iframe src="https://trinket.io/embed/python/80913c550c" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe> Reflection: When refactoring the code, one of the first things I did was make a dictionary for the colors and peices. This was an obvious choice. I then looked at other parts of the code to see if there were anything else that I could group. The visual aspects of the display were a huge part of the main code. I took it out and created another page for it so that it would help with readability.
{ "content_hash": "0e7dfc74a7bb623c5ee222e14f3e5e72", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 384, "avg_line_length": 58.09090909090909, "alnum_prop": 0.7715179968701096, "repo_name": "silshack/spring2016", "id": "f40f14463f91de536fb63a10efe558d57a3c79ed", "size": "643", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "_posts/jwarrich/2016-02-15-Javairias-Refactoring-Tetris-Turtles.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "42632" }, { "name": "HTML", "bytes": "10482" }, { "name": "JavaScript", "bytes": "1004" }, { "name": "Python", "bytes": "1004" }, { "name": "Ruby", "bytes": "4349" }, { "name": "Shell", "bytes": "103" } ], "symlink_target": "" }
#include "CTiglShapeCache.h" #include <sstream> namespace tigl { CTiglShapeCache::CTiglShapeCache() { Reset(); } void CTiglShapeCache::Insert(const TopoDS_Shape &shape, const std::string& id) { shapeContainer[id] = shape; } TopoDS_Shape& CTiglShapeCache::GetShape(const std::string& id) { ShapeContainer::iterator it = shapeContainer.find(id); if (it == shapeContainer.end()) { return nullShape; } else { return it->second; } } /// Returns true, if the shape with id is in the cache bool CTiglShapeCache::HasShape(const std::string& id) { ShapeContainer::iterator it = shapeContainer.find(id); return it != shapeContainer.end(); } unsigned int CTiglShapeCache::GetNShape() const { return shapeContainer.size(); } void CTiglShapeCache::Clear() { shapeContainer.clear(); } void CTiglShapeCache::Remove(const std::string& id) { ShapeContainer::iterator it = shapeContainer.find(id); if (it != shapeContainer.end()) { shapeContainer.erase(it); } } void CTiglShapeCache::Reset() { nullShape.Nullify(); Clear(); } CTiglShapeCache::ShapeContainer& CTiglShapeCache::GetContainer() { return shapeContainer; } } // namespace tigl
{ "content_hash": "9b31e271c340398648484ce9c8a3009f", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 78, "avg_line_length": 18.402985074626866, "alnum_prop": 0.6772100567721006, "repo_name": "codingpoets/tigl", "id": "49410f0640f1febfe878d84f09cdf9a962e3a008", "size": "1904", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/geometry/CTiglShapeCache.cpp", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "238054" }, { "name": "C++", "bytes": "1847151" }, { "name": "CMake", "bytes": "131142" }, { "name": "Java", "bytes": "147460" }, { "name": "JavaScript", "bytes": "5149" }, { "name": "Python", "bytes": "216603" }, { "name": "Shell", "bytes": "8201" } ], "symlink_target": "" }
@interface NSObject (DeallocNotification) - (void)setDeallocNotificationInBlock:(dispatch_block_t)block; - (void)removeDeallocNotification; - (void)setDeallocNotificationWithKey:(const char *)key andBlock:(dispatch_block_t)block; - (void)removeDeallocNotificationForKey:(const char *)key; @end
{ "content_hash": "ff2dfe758c1a5ac3e70a5b845411c7dd", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 89, "avg_line_length": 27.181818181818183, "alnum_prop": 0.7993311036789298, "repo_name": "SheepYo/SheepYo", "id": "19ca4492f8dbfeeb6b4bbafd159178b34f605de9", "size": "753", "binary": false, "copies": "9", "ref": "refs/heads/master", "path": "iOS/Pods/Typhoon/Source/Utils/NSObject+DeallocNotification.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "91955" }, { "name": "C++", "bytes": "8241" }, { "name": "JavaScript", "bytes": "610" }, { "name": "M", "bytes": "1154278" }, { "name": "Objective-C", "bytes": "3375886" }, { "name": "Shell", "bytes": "7390" }, { "name": "Swift", "bytes": "13826" } ], "symlink_target": "" }
#ifndef METHCLA_PLUGIN_H_INCLUDED #define METHCLA_PLUGIN_H_INCLUDED #include <methcla/common.h> #include <methcla/file.h> #include <methcla/log.h> #include <assert.h> #include <stdbool.h> #include <stddef.h> #if defined(__cplusplus) extern "C" { #endif #define METHCLA_PLUGINS_URI "http://methc.la/plugins" #if METHCLA_STATIC_PLUGIN # define METHCLA_PLUGIN_LOAD(func) func #else # define METHCLA_PLUGIN_LOAD(func) methcla_plugin_load #endif // METHCLA_STATIC_PLUGIN //* Realtime interface. typedef struct Methcla_World Methcla_World; //* Non-realtime interface. typedef struct Methcla_Host Methcla_Host; //* Synth handle managed by a plugin. typedef void Methcla_Synth; //* Callback function type for performing commands in the non-realtime context. typedef void (*Methcla_HostPerformFunction)(Methcla_Host* host, void* data); //* Callback function type for performing commands in the realtime context. typedef void (*Methcla_WorldPerformFunction)(Methcla_World* world, void* data); //* Realtime interface struct Methcla_World { //* Handle for implementation specific data. void* handle; //* Return engine sample rate. double (*samplerate)(const Methcla_World* world); //* Return maximum audio block size. size_t (*block_size)(const Methcla_World* world); //* Return the time at the start of the current audio block in seconds. Methcla_Time (*current_time)(const Methcla_World* world); // Realtime memory allocation void* (*alloc)(Methcla_World* world, size_t size); void (*free)(Methcla_World* world, void* ptr); void* (*alloc_aligned)(Methcla_World* world, size_t alignment, size_t size); void (*free_aligned)(Methcla_World* world, void* ptr); //* Schedule a command for execution in the non-realtime context. void (*perform_command)(Methcla_World* world, Methcla_HostPerformFunction perform, void* data); //* Log a message and a newline character. void (*log_line)(Methcla_World* world, Methcla_LogLevel level, const char* message); //* Free synth. void (*synth_done)(Methcla_World* world, Methcla_Synth* synth); }; static inline double methcla_world_samplerate(const Methcla_World* world) { assert(world && world->samplerate); return world->samplerate(world); } static inline size_t methcla_world_block_size(const Methcla_World* world) { assert(world && world->block_size); return world->block_size(world); } static inline Methcla_Time methcla_world_current_time(const Methcla_World* world) { assert(world); assert(world->current_time); return world->current_time(world); } static inline void* methcla_world_alloc(Methcla_World* world, size_t size) { assert(world && world->alloc); return world->alloc(world, size); } static inline void methcla_world_free(Methcla_World* world, void* ptr) { assert(world && world->free); world->free(world, ptr); } static inline void* methcla_world_alloc_aligned(Methcla_World* world, size_t alignment, size_t size) { assert(world && world->alloc_aligned); return world->alloc_aligned(world, alignment, size); } static inline void methcla_world_free_aligned(Methcla_World* world, void* ptr) { assert(world && world->free_aligned); world->free_aligned(world, ptr); } static inline void methcla_world_perform_command(Methcla_World* world, Methcla_HostPerformFunction perform, void* data) { assert(world && world->perform_command); assert(perform); world->perform_command(world, perform, data); } static inline void methcla_world_log_line(Methcla_World* world, Methcla_LogLevel level, const char* message) { assert(world); assert(world->log_line); assert(message); world->log_line(world, level, message); } static inline void methcla_world_synth_done(Methcla_World* world, Methcla_Synth* synth) { assert(world); assert(world->synth_done); assert(synth); world->synth_done(world, synth); } typedef enum { kMethcla_Input, kMethcla_Output } Methcla_PortDirection; typedef enum { kMethcla_ControlPort, kMethcla_AudioPort } Methcla_PortType; typedef enum { kMethcla_PortFlags = 0x0, kMethcla_Trigger = 0x1 } Methcla_PortFlags; typedef struct Methcla_PortDescriptor Methcla_PortDescriptor; struct Methcla_PortDescriptor { Methcla_PortDirection direction; Methcla_PortType type; Methcla_PortFlags flags; }; typedef uint16_t Methcla_PortCount; typedef void Methcla_SynthOptions; typedef struct Methcla_SynthDef Methcla_SynthDef; struct Methcla_SynthDef { //* Synth definition URI. const char* uri; //* Size of an instance in bytes. size_t instance_size; //* Size of options struct in bytes. size_t options_size; //* Parse OSC options and fill options struct. void (*configure)(const void* tag_buffer, size_t tag_size, const void* arg_buffer, size_t arg_size, Methcla_SynthOptions* options); //* Get port descriptor at index. bool (*port_descriptor)(const Methcla_SynthOptions* options, Methcla_PortCount index, Methcla_PortDescriptor* port); //* Construct a synth instance at the location given. void (*construct)(Methcla_World* world, const Methcla_SynthDef* def, const Methcla_SynthOptions* options, Methcla_Synth* synth); //* Connect port at index to data. void (*connect)(Methcla_Synth* synth, Methcla_PortCount index, void* data); //* Activate the synth instance just before starting to call `process`. void (*activate)(Methcla_World* world, Methcla_Synth* synth); //* Process numFrames of audio samples. void (*process)(Methcla_World* world, Methcla_Synth* synth, size_t numFrames); //* Destroy a synth instance. void (*destroy)(Methcla_World* world, Methcla_Synth* synth); }; struct Methcla_Host { //* Handle for implementation specific data. void* handle; //* Register a synth definition. void (*register_synthdef)(Methcla_Host* host, const Methcla_SynthDef* synthDef); //* Register sound file API. void (*register_soundfile_api)(Methcla_Host* host, Methcla_SoundFileAPI* api); //* Allocate a block of memory void* (*alloc)(Methcla_Host* context, size_t size); //* Free a block of memory previously allocated by alloc or alloc_aligned. void (*free)(Methcla_Host* context, void* ptr); //* Allocate a block of aligned memory. void* (*alloc_aligned)(Methcla_Host* context, size_t alignment, size_t size); //* Free a block of memory previously allocated by alloc or alloc_aligned. void (*free_aligned)(Methcla_Host* context, void* ptr); //* Open sound file. Methcla_Error (*soundfile_open)(const Methcla_Host* host, const char* path, Methcla_FileMode mode, Methcla_SoundFile** file, Methcla_SoundFileInfo* info); //* Schedule a command for execution in the realtime context. void (*perform_command)(Methcla_Host* host, const Methcla_WorldPerformFunction perform, void* data); //* Send an OSC notification packet to the client. void (*notify)(Methcla_Host* host, const void* packet, size_t size); //* Log a message and a newline character. void (*log_line)(Methcla_Host* host, Methcla_LogLevel level, const char* message); }; static inline void methcla_host_register_synthdef(Methcla_Host* host, const Methcla_SynthDef* synthDef) { assert(host && host->register_synthdef); assert(synthDef); host->register_synthdef(host, synthDef); } static inline void methcla_host_register_soundfile_api(Methcla_Host* host, Methcla_SoundFileAPI* api) { assert(host && host->register_soundfile_api && api); host->register_soundfile_api(host, api); } static inline void* methcla_host_alloc(Methcla_Host* context, size_t size) { assert(context); assert(context->alloc); return context->alloc(context, size); } static inline void* methcla_host_alloc_aligned(Methcla_Host* context, size_t alignment, size_t size) { assert(context); assert(context->alloc_aligned); return context->alloc_aligned(context, alignment, size); } static inline void methcla_host_free(Methcla_Host* context, void* ptr) { assert(context); assert(context->free); context->free(context, ptr); } static inline Methcla_Error methcla_host_soundfile_open(const Methcla_Host* host, const char* path, Methcla_FileMode mode, Methcla_SoundFile** file, Methcla_SoundFileInfo* info) { assert(host && host->soundfile_open); assert(path); assert(file); assert(info); return host->soundfile_open(host, path, mode, file, info); } static inline void methcla_host_perform_command(Methcla_Host* host, Methcla_WorldPerformFunction perform, void* data) { assert(host && host->perform_command); host->perform_command(host, perform, data); } static inline void methcla_host_log_line(Methcla_Host* host, Methcla_LogLevel level, const char* message) { assert(host); assert(host->log_line); assert(message); host->log_line(host, level, message); } typedef struct Methcla_Library Methcla_Library; struct Methcla_Library { //* Handle for implementation specific data. void* handle; //* Destroy the library and clean up associated resources. void (*destroy)(Methcla_Library* library); }; typedef Methcla_Library* (*Methcla_LibraryFunction)(Methcla_Host* host, const char* bundlePath); static inline void methcla_library_destroy(Methcla_Library* library) { assert(library); if (library->destroy) library->destroy(library); } #if defined(__cplusplus) } #endif #endif /* METHCLA_PLUGIN_H_INCLUDED */
{ "content_hash": "c563a53666a0b91a2dfce2ea9016456c", "timestamp": "", "source": "github", "line_count": 359, "max_line_length": 80, "avg_line_length": 29.98607242339833, "alnum_prop": 0.6313980492336275, "repo_name": "samplecount/methcla", "id": "e068b46743786d5ffea980195b289bdc7da16d3a", "size": "11372", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "include/methcla/plugin.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "290188" }, { "name": "C++", "bytes": "21976402" }, { "name": "CMake", "bytes": "19903" }, { "name": "CSS", "bytes": "989" }, { "name": "HTML", "bytes": "266240" }, { "name": "Haskell", "bytes": "24845" }, { "name": "JavaScript", "bytes": "1143" }, { "name": "Makefile", "bytes": "1352" }, { "name": "Objective-C", "bytes": "4504" }, { "name": "Perl", "bytes": "1297" }, { "name": "Shell", "bytes": "6588" } ], "symlink_target": "" }
const randomColor = require('randomcolor'); const colorSettings = {luminosity: 'light'}; /** * Generates a random set of (nicely selected!) colors and selects one to be returned. * * @export * @return {string} */ export default function getIconColor(excludedColor) { let color = randomColor(colorSettings); // Make sure our generated colors don't contain the color // that's already set. while (excludedColor === color) { color = randomColor(colorSettings); } return color; };
{ "content_hash": "872dfa3a22fbc7636262a5fdc8e9794f", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 86, "avg_line_length": 25.85, "alnum_prop": 0.6808510638297872, "repo_name": "felixrieseberg/Ghost-Desktop", "id": "f1262af425c04ec44f7f3dc5e970227f148b9fe1", "size": "517", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/utils/color-picker.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "48689" }, { "name": "HTML", "bytes": "16013" }, { "name": "JavaScript", "bytes": "240903" }, { "name": "Shell", "bytes": "766" } ], "symlink_target": "" }
package org.apache.spark.examples; import org.apache.spark.SparkJobInfo; import org.apache.spark.SparkStageInfo; import org.apache.spark.api.java.JavaFutureAction; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.api.java.JavaSparkContext; import org.apache.spark.api.java.function.Function; import org.apache.spark.sql.SparkSession; import java.util.Arrays; import java.util.List; /** * Example of using Spark's status APIs from Java. */ public final class JavaStatusTrackerDemo { public static final String APP_NAME = "JavaStatusAPIDemo"; public static final class IdentityWithDelay<T> implements Function<T, T> { @Override public T call(T x) throws Exception { Thread.sleep(2 * 1000); // 2 seconds return x; } } public static void main(String[] args) throws Exception { SparkSession spark = SparkSession .builder() .appName(APP_NAME) .getOrCreate(); final JavaSparkContext jsc = new JavaSparkContext(spark.sparkContext()); // Example of implementing a progress reporter for a simple job. JavaRDD<Integer> rdd = jsc.parallelize(Arrays.asList(1, 2, 3, 4, 5), 5).map( new IdentityWithDelay<Integer>()); JavaFutureAction<List<Integer>> jobFuture = rdd.collectAsync(); while (!jobFuture.isDone()) { Thread.sleep(1000); // 1 second List<Integer> jobIds = jobFuture.jobIds(); if (jobIds.isEmpty()) { continue; } int currentJobId = jobIds.get(jobIds.size() - 1); SparkJobInfo jobInfo = jsc.statusTracker().getJobInfo(currentJobId); SparkStageInfo stageInfo = jsc.statusTracker().getStageInfo(jobInfo.stageIds()[0]); System.out.println(stageInfo.numTasks() + " tasks total: " + stageInfo.numActiveTasks() + " active, " + stageInfo.numCompletedTasks() + " complete"); } System.out.println("Job results are: " + jobFuture.get()); spark.stop(); } }
{ "content_hash": "888ddbd4cb5c9129dc46d6f28f2fe0f8", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 101, "avg_line_length": 35.15, "alnum_prop": 0.6348980559506875, "repo_name": "chgm1006/spark-app", "id": "d9267e7d5e0d5c4c11edc60d0ede5d284a18d639", "size": "2909", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/main/java/org/apache/spark/examples/JavaStatusTrackerDemo.java", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "528061" }, { "name": "Python", "bytes": "273609" }, { "name": "R", "bytes": "36658" }, { "name": "Scala", "bytes": "607362" } ], "symlink_target": "" }
import './module.js'; // TODO rename to popup angular.module('anol.featurepopup') /** * @ngdoc object * @name anol.map.PopupsServiceProvider */ .provider('PopupsService', [function() { this.$get = [function() { var Popups = function() { this.popupScopes = []; this.dragPopupOptions = []; }; Popups.prototype.register = function(popupScope) { this.popupScopes.push(popupScope); }; Popups.prototype.closeAll = function() { angular.forEach(this.popupScopes, function(popupScope) { popupScope.close(); }); }; Popups.prototype.makeDraggable = function(popupScope, position, feature, layer, selects, event) { var dragPopupOptions = { screenPosition: position, feature: feature, layer: layer, selects: selects, event: event }; popupScope.close(); this.dragPopupOptions.push(dragPopupOptions); }; return new Popups(); }]; }]);
{ "content_hash": "49e4f142f79dc788484b2aac564de28a", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 109, "avg_line_length": 33.861111111111114, "alnum_prop": 0.4913863822805578, "repo_name": "omniscale/anol", "id": "8af6858ca4362c7b5ade4712415a1f3f1a7572ae", "size": "1219", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/modules/featurepopup/featurepopup-service.js", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "22930" }, { "name": "JavaScript", "bytes": "582723" }, { "name": "Sass", "bytes": "8786" } ], "symlink_target": "" }
<?php /** * Caching final static class * * @final * @package Core * @access public */ final class Cache extends Licencing { /** * Patch for save array cache * * @var string */ public static $array_cache_path = ''; /** * Patch for save HTML data * * @var string */ public static $HTML_cache_path = ''; /** * Geting array cache * * @param string $name * @param int $safe_time - seconds of time for save cache * @return array */ public static function GetArrayCache($name, $safe_time = 0) { if (!$name) return array(); if (!file_exists(self::$array_cache_path . $name . ".php") || !filesize(self::$array_cache_path . $name . ".php")) return array(); if ($safe_time && !self::SafeTime(self::$array_cache_path . $name . ".php", $safe_time)) return array(); $array = @unserialize(file_get_contents(self::$array_cache_path . $name . ".php")); return ($array)?$array:array(); } /** * Geting HTML cache * * @param string $name * @param int $safe_time - seconds of time for save cache * @return mixed - string or bool */ public static static function GetHTMLCache($name, $safe_time = 0) { if (!$name) return false; if (!file_exists(self::$HTML_cache_path . $name . ".tmp") && !filesize(self::$HTML_cache_path . $name . ".tmp")) return false; if ($safe_time && !self::SafeTime(self::$HTML_cache_path . $name . ".tmp", $safe_time)) return false; return file_get_contents(self::$HTML_cache_path . $name . ".tmp"); } /** * Saving array cache * * @param string $name * @param array $data * @return void */ public static function SetArrayCache($name, $data) { if (!$name || !$data) return ; $fp = fopen(self::$array_cache_path . $name . '.php', 'wb+'); fwrite($fp, serialize($data) ); fclose($fp); @chmod(self::$array_cache_path . $name . '.php', 0666); } /** * Saving HTML(string) cache * * @param string $name * @param string $data * @return void */ public static function SetHTMLCache($name, $data) { if (!$name || !$data) return ; $fp = fopen(self::$HTML_cache_path . $name . '.tmp', 'wb+'); fwrite($fp, $data); fclose($fp); @chmod(self::$HTML_cache_path . $name . '.tmp', 0666); } /** * Clear all or for name array cache * * @param sting $name */ public static function ClearArrayCache() { $args = func_get_args(); if ($args) { foreach ($args as $cache_name) { @unlink(self::$array_cache_path . $cache_name . ".php"); } } else { $dir = opendir(self::$array_cache_path); while ($file = readdir($dir)) { if ($file != "." && $file != ".." && !is_dir(self::$array_cache_path . $file)) { @unlink(self::$array_cache_path . $file); } } } } /** * Clear all or for name HTML(scting) cache * * @param string $name */ public static function ClearHTMLCache() { $args = func_get_args(); if ($args) { foreach ($args as $cache_name) { @unlink(self::$HTML_cache_path . $cache_name . ".tmp"); } } else { $dir = opendir(self::$HTML_cache_path); while ($file = readdir($dir)) { if ($file != "." && $file != ".." && !is_dir(self::$HTML_cache_path . $file)) { @unlink(self::$HTML_cache_path . $file); } } } } /** * Clear all cache? array and HTML(string) * */ public static function ClearAllCache() { self::ClearArrayCache(); self::ClearHTMLCache(); } /** * Check cache file for safe time * * @access private * @param string $file * @param int $time - seconds of time for save time * @return bool */ private static function SafeTime($file, $time) { return (time() - filemtime($file) > $time); } } ?>
{ "content_hash": "927a9c52b7c08af965330ee646f4e98c", "timestamp": "", "source": "github", "line_count": 192, "max_line_length": 122, "avg_line_length": 23.807291666666668, "alnum_prop": 0.4672938087945745, "repo_name": "dautushenka/Job_Centre", "id": "c208ed519b3bcca39da69a57044c1fffd9a895ed", "size": "4720", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "uploads/engine/Core_modules/Cache.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ApacheConf", "bytes": "64" }, { "name": "CSS", "bytes": "9443" }, { "name": "HTML", "bytes": "1167" }, { "name": "JavaScript", "bytes": "39505" }, { "name": "PHP", "bytes": "1862071" }, { "name": "Smarty", "bytes": "41697" } ], "symlink_target": "" }