text stringlengths 2 1.04M | meta dict |
|---|---|
NSString *const BTClientChallengeResponseKeyPostalCode = @"postal_code";
NSString *const BTClientChallengeResponseKeyCVV = @"cvv";
@interface BTClient ()
- (void)setMetadata:(BTClientMetadata *)metadata;
@end
@implementation BTClient
- (instancetype)initWithClientToken:(NSString *)clientTokenString {
if(![clientTokenString isKindOfClass: NSString.class]){
NSString *reason = @"BTClient could not initialize because the provided clientToken was of an invalid type";
[[BTLogger sharedLogger] log:reason];
return nil;
}
self = [self init];
if (self) {
NSError *error;
self.clientToken = [[BTClientToken alloc] initWithClientTokenString:clientTokenString error:&error];
if (!self.clientToken) {
NSString *reason = @"BTClient could not initialize because the provided clientToken was invalid";
[[BTLogger sharedLogger] log:reason];
#ifdef DEBUG
@throw [NSException exceptionWithName:NSInvalidArgumentException
reason:reason
userInfo:nil];
#endif
return nil;
}
self.clientApiHttp = [[BTHTTP alloc] initWithBaseURL:self.clientToken.clientApiURL];
[self.clientApiHttp setProtocolClasses:@[[BTOfflineModeURLProtocol class]]];
if (self.clientToken.analyticsEnabled) {
self.analyticsHttp = [[BTHTTP alloc] initWithBaseURL:self.clientToken.analyticsURL];
}
self.metadata = [[BTClientMetadata alloc] init];
}
return self;
}
- (id)copyWithZone:(NSZone *)zone {
BTClient *copiedClient = [[BTClient allocWithZone:zone] init];
copiedClient.clientToken = [_clientToken copy];
copiedClient.clientApiHttp = [_clientApiHttp copy];
copiedClient.analyticsHttp = [_analyticsHttp copy];
copiedClient.metadata = [self.metadata copy];
return copiedClient;
}
#pragma mark - Configuration
- (NSSet *)challenges {
return self.clientToken.challenges;
}
- (NSString *)merchantId {
return self.clientToken.merchantId;
}
#pragma mark - NSCoding methods
- (void)encodeWithCoder:(NSCoder *)coder{
[coder encodeObject:self.clientToken forKey:@"clientToken"];
}
- (id)initWithCoder:(NSCoder *)decoder{
self = [super init];
if (self){
self.clientToken = [decoder decodeObjectForKey:@"clientToken"];
self.clientApiHttp = [[BTHTTP alloc] initWithBaseURL:self.clientToken.clientApiURL];
[self.clientApiHttp setProtocolClasses:@[[BTOfflineModeURLProtocol class]]];
if (self.clientToken.analyticsEnabled) {
self.analyticsHttp = [[BTHTTP alloc] initWithBaseURL:self.clientToken.analyticsURL];
}
}
return self;
}
#pragma mark - API Methods
- (void)fetchPaymentMethodsWithSuccess:(BTClientPaymentMethodListSuccessBlock)successBlock
failure:(BTClientFailureBlock)failureBlock {
NSDictionary *parameters = @{
@"authorization_fingerprint": self.clientToken.authorizationFingerprint,
};
[self.clientApiHttp GET:@"v1/payment_methods" parameters:parameters completion:^(BTHTTPResponse *response, NSError *error) {
if (response.isSuccess) {
if (successBlock) {
NSArray *responsePaymentMethods = response.object[@"paymentMethods"];
NSMutableArray *paymentMethods = [NSMutableArray array];
for (NSDictionary *paymentMethodDictionary in responsePaymentMethods) {
BTPaymentMethod *paymentMethod = [[self class] paymentMethodFromAPIResponseDictionary:paymentMethodDictionary];
if (paymentMethod == nil) {
NSLog(@"Unable to create payment method from %@", paymentMethodDictionary);
} else {
[paymentMethods addObject:paymentMethod];
}
}
successBlock(paymentMethods);
}
} else {
if (failureBlock) {
failureBlock(error);
}
}
}];
}
- (void)fetchPaymentMethodWithNonce:(NSString *)nonce
success:(BTClientPaymentMethodSuccessBlock)successBlock
failure:(BTClientFailureBlock)failureBlock {
NSDictionary *parameters = @{
@"authorization_fingerprint": self.clientToken.authorizationFingerprint,
};
[self.clientApiHttp GET:[NSString stringWithFormat:@"v1/payment_methods/%@", nonce]
parameters:parameters
completion:^(BTHTTPResponse *response, NSError *error) {
if (response.isSuccess) {
if (successBlock) {
NSArray *paymentMethods = response.object[@"paymentMethods"];
BTPaymentMethod *paymentMethod = [[self class] paymentMethodFromAPIResponseDictionary:[paymentMethods firstObject]];
successBlock(paymentMethod);
}
} else {
if (failureBlock) {
failureBlock(error);
}
}
}];
}
- (void)saveCardWithNumber:(NSString *)creditCardNumber
expirationMonth:(NSString *)expirationMonth
expirationYear:(NSString *)expirationYear
cvv:(NSString *)cvv
postalCode:(NSString *)postalCode
validate:(BOOL)shouldValidate
success:(BTClientCardSuccessBlock)successBlock
failure:(BTClientFailureBlock)failureBlock {
NSMutableDictionary *requestParameters = [self metaPostParameters];
NSMutableDictionary *creditCardParams = [@{ @"number": creditCardNumber,
@"expiration_month": expirationMonth,
@"expiration_year": expirationYear,
@"options": @{
@"validate": @(shouldValidate)
}
} mutableCopy];
[requestParameters addEntriesFromDictionary:@{ @"credit_card": creditCardParams,
@"authorization_fingerprint": self.clientToken.authorizationFingerprint
}];
if (cvv) {
requestParameters[@"credit_card"][@"cvv"] = cvv;
}
if (postalCode) {
requestParameters[@"credit_card"][@"billing_address"] = @{ @"postal_code": postalCode };
}
[self.clientApiHttp POST:@"v1/payment_methods/credit_cards" parameters:requestParameters completion:^(BTHTTPResponse *response, NSError *error) {
if (response.isSuccess) {
NSDictionary *creditCardResponse = response.object[@"creditCards"][0];
BTCardPaymentMethod *paymentMethod = [[self class] cardFromAPIResponseDictionary:creditCardResponse];
if (successBlock) {
successBlock(paymentMethod);
}
} else {
NSError *returnedError = error;
if (error.domain == BTBraintreeAPIErrorDomain && error.code == BTCustomerInputErrorInvalid) {
returnedError = [NSError errorWithDomain:error.domain
code:error.code
userInfo:@{BTCustomerInputBraintreeValidationErrorsKey: response.object}];
}
if (failureBlock) {
failureBlock(returnedError);
}
}
}];
}
- (void)savePaypalPaymentMethodWithAuthCode:(NSString*)authCode
applicationCorrelationID:(NSString *)correlationId
success:(BTClientPaypalSuccessBlock)successBlock
failure:(BTClientFailureBlock)failureBlock {
NSMutableDictionary *requestParameters = [self metaPostParameters];
[requestParameters addEntriesFromDictionary:@{ @"paypal_account": @{
@"consent_code": authCode ?: NSNull.null,
@"correlation_id": correlationId ?: NSNull.null
},
@"authorization_fingerprint": self.clientToken.authorizationFingerprint,
}];
[self.clientApiHttp POST:@"v1/payment_methods/paypal_accounts" parameters:requestParameters completion:^(BTHTTPResponse *response, NSError *error){
if (response.isSuccess) {
if (successBlock){
NSDictionary *paypalPaymentMethodResponse = response.object[@"paypalAccounts"][0];
BTPayPalPaymentMethod *payPalPaymentMethod = [[self class] payPalPaymentMethodFromAPIResponseDictionary:paypalPaymentMethodResponse];
successBlock(payPalPaymentMethod);
}
} else {
if (failureBlock) {
failureBlock([NSError errorWithDomain:error.domain code:BTUnknownError userInfo:nil]);
}
}
}];
}
// Deprecated
- (void)savePaypalPaymentMethodWithAuthCode:(NSString *)authCode
success:(BTClientPaypalSuccessBlock)successBlock
failure:(BTClientFailureBlock)failureBlock {
[self savePaypalPaymentMethodWithAuthCode:authCode
applicationCorrelationID:nil
success:successBlock
failure:failureBlock];
}
// Deprecated
- (void)savePaypalPaymentMethodWithAuthCode:(NSString *)authCode
correlationId:(NSString *)correlationId
success:(BTClientPaypalSuccessBlock)successBlock
failure:(BTClientFailureBlock)failureBlock {
[self savePaypalPaymentMethodWithAuthCode:authCode
applicationCorrelationID:correlationId
success:successBlock
failure:failureBlock];
}
- (void)postAnalyticsEvent:(NSString *)eventKind
success:(BTClientAnalyticsSuccessBlock)successBlock
failure:(BTClientFailureBlock)failureBlock {
if (self.clientToken.analyticsEnabled) {
NSMutableDictionary *requestParameters = [self metaAnalyticsParameters];
[requestParameters addEntriesFromDictionary:@{ @"analytics": @[@{ @"kind": eventKind }],
@"authorization_fingerprint": self.clientToken.authorizationFingerprint
}];
[self.analyticsHttp POST:@"/"
parameters:requestParameters
completion:^(BTHTTPResponse *response, NSError *error) {
if (response.isSuccess) {
if (successBlock) {
successBlock();
}
} else {
if (failureBlock) {
failureBlock(error);
}
}
}];
} else {
if (successBlock) {
successBlock();
}
}
}
- (void)postAnalyticsEvent:(NSString *)eventKind {
[self postAnalyticsEvent:eventKind success:nil failure:nil];
}
#pragma mark - Response Parsing
+ (BTPaymentMethod *)paymentMethodFromAPIResponseDictionary:(NSDictionary *)response {
if ([response[@"type"] isEqual:@"CreditCard"]) {
return [self cardFromAPIResponseDictionary:response];
} else if ([response[@"type"] isEqual:@"PayPalAccount"]) {
return [self payPalPaymentMethodFromAPIResponseDictionary:response];
} else {
return nil;
}
}
+ (BTPayPalPaymentMethod *)payPalPaymentMethodFromAPIResponseDictionary:(NSDictionary *)response {
BTMutablePayPalPaymentMethod *payPalPaymentMethod;
if ([response respondsToSelector:@selector(objectForKeyedSubscript:)]) {
payPalPaymentMethod = [BTMutablePayPalPaymentMethod new];
payPalPaymentMethod.nonce = response[@"nonce"];
payPalPaymentMethod.locked = [response[@"isLocked"] boolValue];
id email = response[@"details"][@"email"];
payPalPaymentMethod.email = [email isKindOfClass:[NSString class]] ? email : nil;
id description = response[@"description"];
if ([description isKindOfClass:[NSString class]]) {
// Braintree gateway has some inconsistent behavior depending on
// the type of nonce, and sometimes returns "PayPal" for description,
// and sometimes returns a real identifying string. The former is not
// desirable for display. The latter is.
// As a workaround, we ignore descriptions that look like "PayPal".
if (![[description lowercaseString] isEqualToString:@"paypal"]) {
payPalPaymentMethod.description = description;
}
}
}
return payPalPaymentMethod;
}
+ (BTCardPaymentMethod *)cardFromAPIResponseDictionary:(NSDictionary *)responseObject {
BTMutableCardPaymentMethod *card = [[BTMutableCardPaymentMethod alloc] init];
card.description = responseObject[@"description"];
card.typeString = responseObject[@"details"][@"cardType"];
card.lastTwo = responseObject[@"details"][@"lastTwo"];
card.locked = [responseObject[@"isLocked"] boolValue];
card.nonce = responseObject[@"nonce"];
card.challengeQuestions = [NSSet setWithArray:responseObject[@"securityQuestions"]];
return card;
}
- (NSMutableDictionary *)metaPostParameters {
return [self mutableDictionaryCopyWithClientMetadata:nil];
}
- (NSMutableDictionary *)metaAnalyticsParameters {
return [self mutableDictionaryCopyWithClientMetadata:@{@"_meta": [BTAnalyticsMetadata metadata]}];
}
- (NSMutableDictionary *)mutableDictionaryCopyWithClientMetadata:(NSDictionary *)parameters {
NSMutableDictionary *result = parameters ? [parameters mutableCopy] : [NSMutableDictionary dictionary];
NSDictionary *metaValue = result[@"_meta"];
if (![metaValue isKindOfClass:[NSDictionary class]]) {
metaValue = @{};
}
NSMutableDictionary *mutableMetaValue = [metaValue mutableCopy];
mutableMetaValue[@"integration"] = self.metadata.integrationString;
mutableMetaValue[@"source"] = self.metadata.sourceString;
result[@"_meta"] = mutableMetaValue;
return result;
}
#pragma mark - Debug
- (NSString *)description {
return [NSString stringWithFormat:@"<BTClient:%p clientApiHttp:%@, analyticsHttp:%@>", self, self.clientApiHttp, self.analyticsHttp];
}
#pragma mark - Library Version
+ (NSString *)libraryVersion {
return BRAINTREE_VERSION;
}
- (BOOL)isEqualToClient:(BTClient *)client {
return (self.clientToken == client.clientToken) || [self.clientToken isEqual:client.clientToken];
}
- (BOOL)isEqual:(id)object {
if (self == object) {
return YES;
}
if ([object isKindOfClass:[BTClient class]]) {
return [self isEqualToClient:object];
}
return NO;
}
#pragma mark - BTClient_Metadata
- (void)setMetadata:(BTClientMetadata *)metadata {
_metadata = metadata;
}
- (instancetype)copyWithMetadata:(void (^)(BTClientMutableMetadata *metadata))metadataBlock {
BTClientMutableMetadata *mutableMetadata = [self.metadata mutableCopy];
if (metadataBlock) {
metadataBlock(mutableMetadata);
}
BTClient *copiedClient = [self copy];
copiedClient.metadata = mutableMetadata;
return copiedClient;
}
@end
| {
"content_hash": "99d1b2f7f701b4134d19b5a5e658c374",
"timestamp": "",
"source": "github",
"line_count": 389,
"max_line_length": 151,
"avg_line_length": 41.75064267352185,
"alnum_prop": 0.5931900745028016,
"repo_name": "dashjose/braintree",
"id": "53c7e6b7ad87bc0273a69413de7b26d1e93d55cf",
"size": "16603",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Braintree/API/Braintree-API/Client/BTClient.m",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "37"
},
{
"name": "C++",
"bytes": "54202"
},
{
"name": "Matlab",
"bytes": "111544"
},
{
"name": "Objective-C",
"bytes": "1482399"
},
{
"name": "Ruby",
"bytes": "18684"
},
{
"name": "Shell",
"bytes": "3716"
}
],
"symlink_target": ""
} |
import de.sergio.stormeye.model.Model.{Ability, Build, Hero, Talent}
import org.rogach.scallop._
import org.json4s._
import org.json4s.native.JsonMethods._
import de.sergio.stormeye.utils.Presentation._
object Main extends App with DefaultFormats {
implicit val formats = DefaultFormats
val opts = new ScallopConf(args) {
banner( """
|Storm Eye v0.1
|
|Simple command line interface for information about heroes of the storm.
|Configure your own builds for your favorite heroes and quickly visualize them when needed.
|
|Usage example:
| run --abilities stitches
|
|""".stripMargin)
val hero = trailArg[String]("hero", descr = "The hero you want to get info about", required = true)
val info = opt[Boolean]("info", short = 'i', descr = "Shows the hero's info")
val abilities = opt[Boolean]("abilities", short = 'a', descr = "Shows the hero's abilities")
val talents = opt[Boolean]("talents", short = 't', descr = "Shows the hero's talents")
val builds = opt[Boolean]("builds", short = 'b', descr = "Shows the hero's builds")
val help = opt[Boolean]("help", noshort = true, descr = "Show this message")
}
// save the hero name as a variable
val heroName: String = opts.hero.get.getOrElse("").toLowerCase()
// load the heroes data
val heroesData: List[Hero] = parse(scala.io.Source.fromFile("src/main/resources/heroes.json").mkString).extract[List[Hero]]
// load the heroes builds
val buildsData: List[Build] = parse(scala.io.Source.fromFile("src/main/resources/builds.json").mkString).extract[List[Build]]
// full data
val heroesFullData: List[Hero] = heroesData map { hero =>
hero.copy(builds = Some(buildsData.filter(_.hero.equalsIgnoreCase(heroName))))
}
// get the hero by name
val hero = heroesFullData.find(_.name.toLowerCase == heroName)
if(opts.info.get.getOrElse(false)) {
printInfo(hero.get)
}
if(opts.abilities.get.getOrElse(false)) {
printAbilities(hero.get.abilities)
}
if(opts.talents.get.getOrElse(false)) {
printTalents(hero.get.talents)
}
if (opts.builds.get.getOrElse(false)) {
printBuilds(hero.get.builds.get)
}
} | {
"content_hash": "966d4f2e733d84e789cde645b167b52a",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 127,
"avg_line_length": 34.546875,
"alnum_prop": 0.6779737675260064,
"repo_name": "asgoncalves/storm-eye",
"id": "afaa216f834f4b1cacc11b7678e84cb36b26b18d",
"size": "2211",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/scala/de/sergio/stormeye/Main.scala",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Scala",
"bytes": "6663"
}
],
"symlink_target": ""
} |
package org.eclipse.winery.common.ids;
import org.eclipse.winery.common.Util;
/**
* Superclass for all IDs appearing in Winery. These are:
* <ul>
* <li>All IDs of elements directly nested in a Definitions element</li>
* <li>Subelements of those</li>
* </ul>
*
* We assume that TOSCAcomponentId is always the root node of nested IDs
*
*/
public abstract class GenericId implements Comparable<GenericId> {
private final XMLId xmlId;
protected GenericId(XMLId xmlId) {
this.xmlId = xmlId;
}
/**
* @return null if (this instanceof TOSCAcomponentId). In that case, the
* element is already the root element
*/
public abstract GenericId getParent();
/**
* @return the XML id of this thing
*/
public XMLId getXmlId() {
return this.xmlId;
}
@Override
public abstract boolean equals(Object obj);
@Override
public abstract int hashCode();
@Override
public String toString() {
String idName = Util.getEverythingBetweenTheLastDotAndBeforeId(this.getClass());
return idName + " / " + this.getXmlId().toString();
}
}
| {
"content_hash": "4f9b822b8edca1f8f48ad9e1101ef7b9",
"timestamp": "",
"source": "github",
"line_count": 49,
"max_line_length": 82,
"avg_line_length": 21.714285714285715,
"alnum_prop": 0.7048872180451128,
"repo_name": "YannicSowoidnich/winery",
"id": "6fb2015eb802c1cb692dd3e14888ee32d9edf419",
"size": "1672",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "org.eclipse.winery.common/src/main/java/org/eclipse/winery/common/ids/GenericId.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "770"
},
{
"name": "CSS",
"bytes": "96676"
},
{
"name": "HTML",
"bytes": "273259"
},
{
"name": "Java",
"bytes": "1743710"
},
{
"name": "JavaScript",
"bytes": "85796"
},
{
"name": "Shell",
"bytes": "1174"
},
{
"name": "TypeScript",
"bytes": "458830"
}
],
"symlink_target": ""
} |
package ufop
import (
"encoding/json"
"errors"
"fmt"
"os"
)
//default ufop config
var defaultUfopConfig UfopConfig = UfopConfig{
ListenPort: 9100,
ListenHost: "0.0.0.0",
ReadTimeout: 60,
WriteTimeout: 60,
MaxHeaderBytes: 1 << 12,
}
type UfopConfig struct {
ListenPort int `json:"listen_port,omitempty"`
ListenHost string `json:"listen_host,omitempty"`
ReadTimeout int `json:"read_timeout,omitempty"`
WriteTimeout int `json:"write_timeout,omitempty"`
MaxHeaderBytes int `json:"max_header_bytes,omitempty"`
//make you ufop instance name unique
UfopPrefix string `json:"ufop_prefix"`
}
func (this *UfopConfig) LoadFromFile(configFilePath string) (err error) {
confFp, openErr := os.Open(configFilePath)
if openErr != nil {
err = errors.New(fmt.Sprintf("Open ufop config failed, %s", openErr))
return
}
defer confFp.Close()
decoder := json.NewDecoder(confFp)
decodeErr := decoder.Decode(this)
if decodeErr != nil {
err = errors.New(fmt.Sprintf("Parse ufop config failed, %s", decodeErr))
}
if this.ListenPort <= 0 {
this.ListenPort = defaultUfopConfig.ListenPort
}
if this.ReadTimeout <= 0 {
this.ReadTimeout = defaultUfopConfig.ReadTimeout
}
if this.WriteTimeout <= 0 {
this.WriteTimeout = defaultUfopConfig.WriteTimeout
}
return
}
| {
"content_hash": "e3dae90fb0d167c90025c4530793491f",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 74,
"avg_line_length": 23.581818181818182,
"alnum_prop": 0.7162683114880494,
"repo_name": "Zhangjd/ufop-application",
"id": "32c4c735f3f83868c29ed01ccd4cb28fc1c01263",
"size": "1297",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/ufop/config.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Go",
"bytes": "36605"
},
{
"name": "Shell",
"bytes": "125"
}
],
"symlink_target": ""
} |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// ------------------------------------------------------------------------
/**
* Loader Class
*
* Loads views and files
*
* @package CodeIgniter
* @subpackage Libraries
* @author ExpressionEngine Dev Team
* @category Loader
* @link http://codeigniter.com/user_guide/libraries/loader.html
*/
class CI_Loader {
// All these are set automatically. Don't mess with them.
/**
* Nesting level of the output buffering mechanism
*
* @var int
* @access protected
*/
protected $_ci_ob_level;
/**
* List of paths to load views from
*
* @var array
* @access protected
*/
protected $_ci_view_paths = array();
/**
* List of paths to load libraries from
*
* @var array
* @access protected
*/
protected $_ci_library_paths = array();
/**
* List of paths to load models from
*
* @var array
* @access protected
*/
protected $_ci_model_paths = array();
/**
* List of paths to load helpers from
*
* @var array
* @access protected
*/
protected $_ci_helper_paths = array();
/**
* List of loaded base classes
* Set by the controller class
*
* @var array
* @access protected
*/
protected $_base_classes = array(); // Set by the controller class
/**
* List of cached variables
*
* @var array
* @access protected
*/
protected $_ci_cached_vars = array();
/**
* List of loaded classes
*
* @var array
* @access protected
*/
protected $_ci_classes = array();
/**
* List of loaded files
*
* @var array
* @access protected
*/
protected $_ci_loaded_files = array();
/**
* List of loaded models
*
* @var array
* @access protected
*/
protected $_ci_models = array();
/**
* List of loaded helpers
*
* @var array
* @access protected
*/
protected $_ci_helpers = array();
/**
* List of class name mappings
*
* @var array
* @access protected
*/
protected $_ci_varmap = array('unit_test' => 'unit',
'user_agent' => 'agent');
/**
* Constructor
*
* Sets the path to the view files and gets the initial output buffering level
*/
public function __construct()
{
$this->_ci_ob_level = ob_get_level();
$this->_ci_library_paths = array(APPPATH, BASEPATH);
$this->_ci_helper_paths = array(APPPATH, BASEPATH);
$this->_ci_model_paths = array(APPPATH);
$this->_ci_view_paths = array(APPPATH.'views/' => TRUE);
log_message('debug', "Loader Class Initialized");
}
// --------------------------------------------------------------------
/**
* Initialize the Loader
*
* This method is called once in CI_Controller.
*
* @param array
* @return object
*/
public function initialize()
{
$this->_ci_classes = array();
$this->_ci_loaded_files = array();
$this->_ci_models = array();
$this->_base_classes =& is_loaded();
$this->_ci_autoloader();
return $this;
}
// --------------------------------------------------------------------
/**
* Is Loaded
*
* A utility function to test if a class is in the self::$_ci_classes array.
* This function returns the object name if the class tested for is loaded,
* and returns FALSE if it isn't.
*
* It is mainly used in the form_helper -> _get_validation_object()
*
* @param string class being checked for
* @return mixed class object name on the CI SuperObject or FALSE
*/
public function is_loaded($class)
{
if (isset($this->_ci_classes[$class]))
{
return $this->_ci_classes[$class];
}
return FALSE;
}
// --------------------------------------------------------------------
/**
* Class Loader
*
* This function lets users load and instantiate classes.
* It is designed to be called from a users's app controllers.
*
* @param string the name of the class
* @param mixed the optional parameters
* @param string an optional object name
* @return void
*/
public function library($library = '', $params = NULL, $object_name = NULL)
{
if (is_array($library))
{
foreach ($library as $class)
{
$this->library($class, $params);
}
return;
}
if ($library == '' OR isset($this->_base_classes[$library]))
{
return FALSE;
}
if ( ! is_null($params) && ! is_array($params))
{
$params = NULL;
}
$this->_ci_load_class($library, $params, $object_name);
}
// --------------------------------------------------------------------
/**
* Model Loader
*
* This function lets users load and instantiate models.
*
* @param string the name of the class
* @param string name for the model
* @param bool database connection
* @return void
*/
public function model($model, $name = '', $db_conn = FALSE)
{
if (is_array($model))
{
foreach ($model as $babe)
{
$this->model($babe);
}
return;
}
if ($model == '')
{
return;
}
$path = '';
// Is the model in a sub-folder? If so, parse out the filename and path.
if (($last_slash = strrpos($model, '/')) !== FALSE)
{
// The path is in frontend of the last slash
$path = substr($model, 0, $last_slash + 1);
// And the model name behind it
$model = substr($model, $last_slash + 1);
}
if ($name == '')
{
$name = $model;
}
if (in_array($name, $this->_ci_models, TRUE))
{
return;
}
$CI =& get_instance();
if (isset($CI->$name))
{
show_error('The model name you are loading is the name of a resource that is already being used: '.$name);
}
$model = strtolower($model);
foreach ($this->_ci_model_paths as $mod_path)
{
if ( ! file_exists($mod_path.'models/'.$path.$model.'.php'))
{
continue;
}
if ($db_conn !== FALSE AND ! class_exists('CI_DB'))
{
if ($db_conn === TRUE)
{
$db_conn = '';
}
$CI->load->database($db_conn, FALSE, TRUE);
}
if ( ! class_exists('CI_Model'))
{
load_class('Model', 'core');
}
require_once($mod_path.'models/'.$path.$model.'.php');
$model = ucfirst($model);
$CI->$name = new $model();
$this->_ci_models[] = $name;
return;
}
// couldn't find the model
show_error('Unable to locate the model you have specified: '.$model);
}
// --------------------------------------------------------------------
/**
* Database Loader
*
* @param string the DB credentials
* @param bool whether to return the DB object
* @param bool whether to enable active record (this allows us to override the config setting)
* @return object
*/
public function database($params = '', $return = FALSE, $active_record = NULL)
{
// Grab the super object
$CI =& get_instance();
// Do we even need to load the database class?
if (class_exists('CI_DB') AND $return == FALSE AND $active_record == NULL AND isset($CI->db) AND is_object($CI->db))
{
return FALSE;
}
require_once(BASEPATH.'database/DB.php');
if ($return === TRUE)
{
return DB($params, $active_record);
}
// Initialize the db variable. Needed to prevent
// reference errors with some configurations
$CI->db = '';
// Load the DB class
$CI->db =& DB($params, $active_record);
}
// --------------------------------------------------------------------
/**
* Load the Utilities Class
*
* @return string
*/
public function dbutil()
{
if ( ! class_exists('CI_DB'))
{
$this->database();
}
$CI =& get_instance();
// for backwards compatibility, load dbforge so we can extend dbutils off it
// this use is deprecated and strongly discouraged
$CI->load->dbforge();
require_once(BASEPATH.'database/DB_utility.php');
require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_utility.php');
$class = 'CI_DB_'.$CI->db->dbdriver.'_utility';
$CI->dbutil = new $class();
}
// --------------------------------------------------------------------
/**
* Load the Database Forge Class
*
* @return string
*/
public function dbforge()
{
if ( ! class_exists('CI_DB'))
{
$this->database();
}
$CI =& get_instance();
require_once(BASEPATH.'database/DB_forge.php');
require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_forge.php');
$class = 'CI_DB_'.$CI->db->dbdriver.'_forge';
$CI->dbforge = new $class();
}
// --------------------------------------------------------------------
/**
* Load View
*
* This function is used to load a "view" file. It has three parameters:
*
* 1. The name of the "view" file to be included.
* 2. An associative array of data to be extracted for use in the view.
* 3. TRUE/FALSE - whether to return the data or load it. In
* some cases it's advantageous to be able to return data so that
* a developer can process it in some way.
*
* @param string
* @param array
* @param bool
* @return void
*/
public function view($view, $vars = array(), $return = FALSE)
{
return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));
}
// --------------------------------------------------------------------
/**
* Load File
*
* This is a generic file loader
*
* @param string
* @param bool
* @return string
*/
public function file($path, $return = FALSE)
{
return $this->_ci_load(array('_ci_path' => $path, '_ci_return' => $return));
}
// --------------------------------------------------------------------
/**
* Set Variables
*
* Once variables are set they become available within
* the controller class and its "view" files.
*
* @param array
* @param string
* @return void
*/
public function vars($vars = array(), $val = '')
{
if ($val != '' AND is_string($vars))
{
$vars = array($vars => $val);
}
$vars = $this->_ci_object_to_array($vars);
if (is_array($vars) AND count($vars) > 0)
{
foreach ($vars as $key => $val)
{
$this->_ci_cached_vars[$key] = $val;
}
}
}
// --------------------------------------------------------------------
/**
* Get Variable
*
* Check if a variable is set and retrieve it.
*
* @param array
* @return void
*/
public function get_var($key)
{
return isset($this->_ci_cached_vars[$key]) ? $this->_ci_cached_vars[$key] : NULL;
}
// --------------------------------------------------------------------
/**
* Load Helper
*
* This function loads the specified helper file.
*
* @param mixed
* @return void
*/
public function helper($helpers = array())
{
foreach ($this->_ci_prep_filename($helpers, '_helper') as $helper)
{
if (isset($this->_ci_helpers[$helper]))
{
continue;
}
$ext_helper = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.'.php';
// Is this a helper extension request?
if (file_exists($ext_helper))
{
$base_helper = BASEPATH.'helpers/'.$helper.'.php';
if ( ! file_exists($base_helper))
{
show_error('Unable to load the requested file: helpers/'.$helper.'.php');
}
include_once($ext_helper);
include_once($base_helper);
$this->_ci_helpers[$helper] = TRUE;
log_message('debug', 'Helper loaded: '.$helper);
continue;
}
// Try to load the helper
foreach ($this->_ci_helper_paths as $path)
{
if (file_exists($path.'helpers/'.$helper.'.php'))
{
include_once($path.'helpers/'.$helper.'.php');
$this->_ci_helpers[$helper] = TRUE;
log_message('debug', 'Helper loaded: '.$helper);
break;
}
}
// unable to load the helper
if ( ! isset($this->_ci_helpers[$helper]))
{
show_error('Unable to load the requested file: helpers/'.$helper.'.php');
}
}
}
// --------------------------------------------------------------------
/**
* Load Helpers
*
* This is simply an alias to the above function in case the
* users has written the plural form of this function.
*
* @param array
* @return void
*/
public function helpers($helpers = array())
{
$this->helper($helpers);
}
// --------------------------------------------------------------------
/**
* Loads a language file
*
* @param array
* @param string
* @return void
*/
public function language($file = array(), $lang = '')
{
$CI =& get_instance();
if ( ! is_array($file))
{
$file = array($file);
}
foreach ($file as $langfile)
{
$CI->lang->load($langfile, $lang);
}
}
// --------------------------------------------------------------------
/**
* Loads a config file
*
* @param string
* @param bool
* @param bool
* @return void
*/
public function config($file = '', $use_sections = FALSE, $fail_gracefully = FALSE)
{
$CI =& get_instance();
$CI->config->load($file, $use_sections, $fail_gracefully);
}
// --------------------------------------------------------------------
/**
* Driver
*
* Loads a driver library
*
* @param string the name of the class
* @param mixed the optional parameters
* @param string an optional object name
* @return void
*/
public function driver($library = '', $params = NULL, $object_name = NULL)
{
if ( ! class_exists('CI_Driver_Library'))
{
// we aren't instantiating an object here, that'll be done by the Library itself
require BASEPATH.'libraries/Driver.php';
}
if ($library == '')
{
return FALSE;
}
// We can save the loader some time since Drivers will *always* be in a subfolder,
// and typically identically named to the library
if ( ! strpos($library, '/'))
{
$library = ucfirst($library).'/'.$library;
}
return $this->library($library, $params, $object_name);
}
// --------------------------------------------------------------------
/**
* Add Package Path
*
* Prepends a parent path to the library, model, helper, and config path arrays
*
* @param string
* @param boolean
* @return void
*/
public function add_package_path($path, $view_cascade=TRUE)
{
$path = rtrim($path, '/').'/';
array_unshift($this->_ci_library_paths, $path);
array_unshift($this->_ci_model_paths, $path);
array_unshift($this->_ci_helper_paths, $path);
$this->_ci_view_paths = array($path.'views/' => $view_cascade) + $this->_ci_view_paths;
// Add config file path
$config =& $this->_ci_get_component('config');
array_unshift($config->_config_paths, $path);
}
// --------------------------------------------------------------------
/**
* Get Package Paths
*
* Return a list of all package paths, by default it will ignore BASEPATH.
*
* @param string
* @return void
*/
public function get_package_paths($include_base = FALSE)
{
return $include_base === TRUE ? $this->_ci_library_paths : $this->_ci_model_paths;
}
// --------------------------------------------------------------------
/**
* Remove Package Path
*
* Remove a path from the library, model, and helper path arrays if it exists
* If no path is provided, the most recently added path is removed.
*
* @param type
* @param bool
* @return type
*/
public function remove_package_path($path = '', $remove_config_path = TRUE)
{
$config =& $this->_ci_get_component('config');
if ($path == '')
{
$void = array_shift($this->_ci_library_paths);
$void = array_shift($this->_ci_model_paths);
$void = array_shift($this->_ci_helper_paths);
$void = array_shift($this->_ci_view_paths);
$void = array_shift($config->_config_paths);
}
else
{
$path = rtrim($path, '/').'/';
foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var)
{
if (($key = array_search($path, $this->{$var})) !== FALSE)
{
unset($this->{$var}[$key]);
}
}
if (isset($this->_ci_view_paths[$path.'views/']))
{
unset($this->_ci_view_paths[$path.'views/']);
}
if (($key = array_search($path, $config->_config_paths)) !== FALSE)
{
unset($config->_config_paths[$key]);
}
}
// make sure the application default paths are still in the array
$this->_ci_library_paths = array_unique(array_merge($this->_ci_library_paths, array(APPPATH, BASEPATH)));
$this->_ci_helper_paths = array_unique(array_merge($this->_ci_helper_paths, array(APPPATH, BASEPATH)));
$this->_ci_model_paths = array_unique(array_merge($this->_ci_model_paths, array(APPPATH)));
$this->_ci_view_paths = array_merge($this->_ci_view_paths, array(APPPATH.'views/' => TRUE));
$config->_config_paths = array_unique(array_merge($config->_config_paths, array(APPPATH)));
}
// --------------------------------------------------------------------
/**
* Loader
*
* This function is used to load views and files.
* Variables are prefixed with _ci_ to avoid symbol collision with
* variables made available to view files
*
* @param array
* @return void
*/
protected function _ci_load($_ci_data)
{
// Set the default data variables
foreach (array('_ci_view', '_ci_vars', '_ci_path', '_ci_return') as $_ci_val)
{
$$_ci_val = ( ! isset($_ci_data[$_ci_val])) ? FALSE : $_ci_data[$_ci_val];
}
$file_exists = FALSE;
// Set the path to the requested file
if ($_ci_path != '')
{
$_ci_x = explode('/', $_ci_path);
$_ci_file = end($_ci_x);
}
else
{
$_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
$_ci_file = ($_ci_ext == '') ? $_ci_view.'.php' : $_ci_view;
foreach ($this->_ci_view_paths as $view_file => $cascade)
{
if (file_exists($view_file.$_ci_file))
{
$_ci_path = $view_file.$_ci_file;
$file_exists = TRUE;
break;
}
if ( ! $cascade)
{
break;
}
}
}
if ( ! $file_exists && ! file_exists($_ci_path))
{
show_error('Unable to load the requested file: '.$_ci_path.$_ci_file);
}
// This allows anything loaded using $this->load (views, files, etc.)
// to become accessible from within the Controller and Model functions.
$_ci_CI =& get_instance();
foreach (get_object_vars($_ci_CI) as $_ci_key => $_ci_var)
{
if ( ! isset($this->$_ci_key))
{
$this->$_ci_key =& $_ci_CI->$_ci_key;
}
}
/*
* Extract and cache variables
*
* You can either set variables using the dedicated $this->load_vars()
* function or via the second parameter of this function. We'll merge
* the two types and cache them so that views that are embedded within
* other views can have access to these variables.
*/
if (is_array($_ci_vars))
{
$this->_ci_cached_vars = array_merge($this->_ci_cached_vars, $_ci_vars);
}
extract($this->_ci_cached_vars);
/*
* Buffer the output
*
* We buffer the output for two reasons:
* 1. Speed. You get a significant speed boost.
* 2. So that the final rendered template can be
* post-processed by the output class. Why do we
* need post processing? For one thing, in order to
* show the elapsed page load time. Unless we
* can intercept the content right before it's sent to
* the browser and then stop the timer it won't be accurate.
*/
ob_start();
// If the PHP installation does not support short tags we'll
// do a little string replacement, changing the short tags
// to standard PHP echo statements.
if ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE)
{
echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
}
else
{
include($_ci_path); // include() vs include_once() allows for multiple views with the same name
}
log_message('debug', 'File loaded: '.$_ci_path);
// Return the file data if requested
if ($_ci_return === TRUE)
{
$buffer = ob_get_contents();
@ob_end_clean();
return $buffer;
}
/*
* Flush the buffer... or buff the flusher?
*
* In order to permit views to be nested within
* other views, we need to flush the content backend out whenever
* we are beyond the first level of output buffering so that
* it can be seen and included properly by the first included
* template and any subsequent ones. Oy!
*
*/
if (ob_get_level() > $this->_ci_ob_level + 1)
{
ob_end_flush();
}
else
{
$_ci_CI->output->append_output(ob_get_contents());
@ob_end_clean();
}
}
// --------------------------------------------------------------------
/**
* Load class
*
* This function loads the requested class.
*
* @param string the item that is being loaded
* @param mixed any additional parameters
* @param string an optional object name
* @return void
*/
protected function _ci_load_class($class, $params = NULL, $object_name = NULL)
{
// Get the class name, and while we're at it trim any slashes.
// The directory path can be included as part of the class name,
// but we don't want a leading slash
$class = str_replace('.php', '', trim($class, '/'));
// Was the path included with the class name?
// We look for a slash to determine this
$subdir = '';
if (($last_slash = strrpos($class, '/')) !== FALSE)
{
// Extract the path
$subdir = substr($class, 0, $last_slash + 1);
// Get the filename from the path
$class = substr($class, $last_slash + 1);
}
// We'll test for both lowercase and capitalized versions of the file name
foreach (array(ucfirst($class), strtolower($class)) as $class)
{
$subclass = APPPATH.'libraries/'.$subdir.config_item('subclass_prefix').$class.'.php';
// Is this a class extension request?
if (file_exists($subclass))
{
$baseclass = BASEPATH.'libraries/'.ucfirst($class).'.php';
if ( ! file_exists($baseclass))
{
log_message('error', "Unable to load the requested class: ".$class);
show_error("Unable to load the requested class: ".$class);
}
// Safety: Was the class already loaded by a previous call?
if (in_array($subclass, $this->_ci_loaded_files))
{
// Before we deem this to be a duplicate request, let's see
// if a custom object name is being supplied. If so, we'll
// return a new instance of the object
if ( ! is_null($object_name))
{
$CI =& get_instance();
if ( ! isset($CI->$object_name))
{
return $this->_ci_init_class($class, config_item('subclass_prefix'), $params, $object_name);
}
}
$is_duplicate = TRUE;
log_message('debug', $class." class already loaded. Second attempt ignored.");
return;
}
include_once($baseclass);
include_once($subclass);
$this->_ci_loaded_files[] = $subclass;
return $this->_ci_init_class($class, config_item('subclass_prefix'), $params, $object_name);
}
// Lets search for the requested library file and load it.
$is_duplicate = FALSE;
foreach ($this->_ci_library_paths as $path)
{
$filepath = $path.'libraries/'.$subdir.$class.'.php';
// Does the file exist? No? Bummer...
if ( ! file_exists($filepath))
{
continue;
}
// Safety: Was the class already loaded by a previous call?
if (in_array($filepath, $this->_ci_loaded_files))
{
// Before we deem this to be a duplicate request, let's see
// if a custom object name is being supplied. If so, we'll
// return a new instance of the object
if ( ! is_null($object_name))
{
$CI =& get_instance();
if ( ! isset($CI->$object_name))
{
return $this->_ci_init_class($class, '', $params, $object_name);
}
}
$is_duplicate = TRUE;
log_message('debug', $class." class already loaded. Second attempt ignored.");
return;
}
include_once($filepath);
$this->_ci_loaded_files[] = $filepath;
return $this->_ci_init_class($class, '', $params, $object_name);
}
} // END FOREACH
// One last attempt. Maybe the library is in a subdirectory, but it wasn't specified?
if ($subdir == '')
{
$path = strtolower($class).'/'.$class;
return $this->_ci_load_class($path, $params);
}
// If we got this far we were unable to find the requested class.
// We do not issue errors if the load call failed due to a duplicate request
if ($is_duplicate == FALSE)
{
log_message('error', "Unable to load the requested class: ".$class);
show_error("Unable to load the requested class: ".$class);
}
}
// --------------------------------------------------------------------
/**
* Instantiates a class
*
* @param string
* @param string
* @param bool
* @param string an optional object name
* @return null
*/
protected function _ci_init_class($class, $prefix = '', $config = FALSE, $object_name = NULL)
{
// Is there an associated config file for this class? Note: these should always be lowercase
if ($config === NULL)
{
// Fetch the config paths containing any package paths
$config_component = $this->_ci_get_component('config');
if (is_array($config_component->_config_paths))
{
// Break on the first found file, thus package files
// are not overridden by default paths
foreach ($config_component->_config_paths as $path)
{
// We test for both uppercase and lowercase, for servers that
// are case-sensitive with regard to file names. Check for environment
// first, global next
if (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php'))
{
include($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
break;
}
elseif (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
{
include($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
break;
}
elseif (file_exists($path .'config/'.strtolower($class).'.php'))
{
include($path .'config/'.strtolower($class).'.php');
break;
}
elseif (file_exists($path .'config/'.ucfirst(strtolower($class)).'.php'))
{
include($path .'config/'.ucfirst(strtolower($class)).'.php');
break;
}
}
}
}
if ($prefix == '')
{
if (class_exists('CI_'.$class))
{
$name = 'CI_'.$class;
}
elseif (class_exists(config_item('subclass_prefix').$class))
{
$name = config_item('subclass_prefix').$class;
}
else
{
$name = $class;
}
}
else
{
$name = $prefix.$class;
}
// Is the class name valid?
if ( ! class_exists($name))
{
log_message('error', "Non-existent class: ".$name);
show_error("Non-existent class: ".$class);
}
// Set the variable name we will assign the class to
// Was a custom class name supplied? If so we'll use it
$class = strtolower($class);
if (is_null($object_name))
{
$classvar = ( ! isset($this->_ci_varmap[$class])) ? $class : $this->_ci_varmap[$class];
}
else
{
$classvar = $object_name;
}
// Save the class name and object name
$this->_ci_classes[$class] = $classvar;
// Instantiate the class
$CI =& get_instance();
if ($config !== NULL)
{
$CI->$classvar = new $name($config);
}
else
{
$CI->$classvar = new $name;
}
}
// --------------------------------------------------------------------
/**
* Autoloader
*
* The config/autoload.php file contains an array that permits sub-systems,
* libraries, and helpers to be loaded automatically.
*
* @param array
* @return void
*/
private function _ci_autoloader()
{
if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload.php'))
{
include(APPPATH.'config/'.ENVIRONMENT.'/autoload.php');
}
else
{
include(APPPATH.'config/autoload.php');
}
if ( ! isset($autoload))
{
return FALSE;
}
// Autoload packages
if (isset($autoload['packages']))
{
foreach ($autoload['packages'] as $package_path)
{
$this->add_package_path($package_path);
}
}
// Load any custom config file
if (count($autoload['config']) > 0)
{
$CI =& get_instance();
foreach ($autoload['config'] as $key => $val)
{
$CI->config->load($val);
}
}
// Autoload helpers and languages
foreach (array('helper', 'language') as $type)
{
if (isset($autoload[$type]) AND count($autoload[$type]) > 0)
{
$this->$type($autoload[$type]);
}
}
// A little tweak to remain backward compatible
// The $autoload['core'] item was deprecated
if ( ! isset($autoload['libraries']) AND isset($autoload['core']))
{
$autoload['libraries'] = $autoload['core'];
}
// Load libraries
if (isset($autoload['libraries']) AND count($autoload['libraries']) > 0)
{
// Load the database driver.
if (in_array('database', $autoload['libraries']))
{
$this->database();
$autoload['libraries'] = array_diff($autoload['libraries'], array('database'));
}
// Load all other libraries
foreach ($autoload['libraries'] as $item)
{
$this->library($item);
}
}
// Autoload models
if (isset($autoload['model']))
{
$this->model($autoload['model']);
}
}
// --------------------------------------------------------------------
/**
* Object to Array
*
* Takes an object as input and converts the class variables to array key/vals
*
* @param object
* @return array
*/
protected function _ci_object_to_array($object)
{
return (is_object($object)) ? get_object_vars($object) : $object;
}
// --------------------------------------------------------------------
/**
* Get a reference to a specific library or model
*
* @param string
* @return bool
*/
protected function &_ci_get_component($component)
{
$CI =& get_instance();
return $CI->$component;
}
// --------------------------------------------------------------------
/**
* Prep filename
*
* This function preps the name of various items to make loading them more reliable.
*
* @param mixed
* @param string
* @return array
*/
protected function _ci_prep_filename($filename, $extension)
{
if ( ! is_array($filename))
{
return array(strtolower(str_replace('.php', '', str_replace($extension, '', $filename)).$extension));
}
else
{
foreach ($filename as $key => $val)
{
$filename[$key] = strtolower(str_replace('.php', '', str_replace($extension, '', $val)).$extension);
}
return $filename;
}
}
}
/* End of file Loader.php */
/* Location: ./system/core/Loader.php */ | {
"content_hash": "a35119acdc44bcf746418f5d26dffa25",
"timestamp": "",
"source": "github",
"line_count": 1236,
"max_line_length": 127,
"avg_line_length": 24.466828478964402,
"alnum_prop": 0.5653913561059489,
"repo_name": "rrajesh011/pricometer",
"id": "77ea9e90e745aac02fafe45fb047de517e1ebd7b",
"size": "30594",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "system/core/Loader.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "3128"
},
{
"name": "CSS",
"bytes": "381333"
},
{
"name": "HTML",
"bytes": "6836"
},
{
"name": "JavaScript",
"bytes": "505609"
},
{
"name": "PHP",
"bytes": "1678616"
}
],
"symlink_target": ""
} |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System.Web.Http;
namespace System.Web.OData.Builder
{
/// <summary>
/// Encapsulates a self link factory and whether the link factory follows conventions or not.
/// </summary>
/// <typeparam name="T">The type of the self link generated. This should be <see cref="string"/> for ID links and <see cref="Uri"/> for read and edit links.</typeparam>
public class SelfLinkBuilder<T>
{
/// <summary>
/// Constructs a new instance of <see cref="SelfLinkBuilder{T}"/>.
/// </summary>
/// <param name="linkFactory">The link factory.</param>
/// <param name="followsConventions">Whether the factory follows odata conventions for link generation.</param>
public SelfLinkBuilder(Func<EntityInstanceContext, T> linkFactory, bool followsConventions)
{
if (linkFactory == null)
{
throw Error.ArgumentNull("linkFactory");
}
Factory = linkFactory;
FollowsConventions = followsConventions;
}
/// <summary>
/// Gets the factory for generating links.
/// </summary>
public Func<EntityInstanceContext, T> Factory { get; private set; }
/// <summary>
/// Gets a boolean indicating whether the link factory follows OData conventions or not.
/// </summary>
public bool FollowsConventions { get; private set; }
}
}
| {
"content_hash": "4b410dc3d012acb74e6bd8b039b4f024",
"timestamp": "",
"source": "github",
"line_count": 39,
"max_line_length": 172,
"avg_line_length": 40.15384615384615,
"alnum_prop": 0.6289910600255428,
"repo_name": "Terminator-Aaron/Katana",
"id": "6e2c0dbd84733646527a7929ea4730d61fc188c4",
"size": "1568",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "OData/src/System.Web.OData/OData/Builder/SelfLinkBuilder.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "10480"
},
{
"name": "C#",
"bytes": "17928568"
},
{
"name": "CSS",
"bytes": "19810"
},
{
"name": "HTML",
"bytes": "2554"
},
{
"name": "JavaScript",
"bytes": "11545"
},
{
"name": "PowerShell",
"bytes": "20946"
},
{
"name": "Shell",
"bytes": "12306"
},
{
"name": "Smalltalk",
"bytes": "50876"
},
{
"name": "Visual Basic",
"bytes": "157681"
}
],
"symlink_target": ""
} |
"""Tests for the DBCore database abstraction.
"""
from __future__ import (division, absolute_import, print_function,
unicode_literals)
import os
import sqlite3
from test._common import unittest
from beets import dbcore
from tempfile import mkstemp
# Fixture: concrete database and model classes. For migration tests, we
# have multiple models with different numbers of fields.
class TestSort(dbcore.query.FieldSort):
pass
class TestModel1(dbcore.Model):
_table = 'test'
_flex_table = 'testflex'
_fields = {
'id': dbcore.types.PRIMARY_ID,
'field_one': dbcore.types.INTEGER,
}
_types = {
'some_float_field': dbcore.types.FLOAT,
}
_sorts = {
'some_sort': TestSort,
}
@classmethod
def _getters(cls):
return {}
def _template_funcs(self):
return {}
class TestDatabase1(dbcore.Database):
_models = (TestModel1,)
pass
class TestModel2(TestModel1):
_fields = {
'id': dbcore.types.PRIMARY_ID,
'field_one': dbcore.types.INTEGER,
'field_two': dbcore.types.INTEGER,
}
class TestDatabase2(dbcore.Database):
_models = (TestModel2,)
pass
class TestModel3(TestModel1):
_fields = {
'id': dbcore.types.PRIMARY_ID,
'field_one': dbcore.types.INTEGER,
'field_two': dbcore.types.INTEGER,
'field_three': dbcore.types.INTEGER,
}
class TestDatabase3(dbcore.Database):
_models = (TestModel3,)
pass
class TestModel4(TestModel1):
_fields = {
'id': dbcore.types.PRIMARY_ID,
'field_one': dbcore.types.INTEGER,
'field_two': dbcore.types.INTEGER,
'field_three': dbcore.types.INTEGER,
'field_four': dbcore.types.INTEGER,
}
class TestDatabase4(dbcore.Database):
_models = (TestModel4,)
pass
class AnotherTestModel(TestModel1):
_table = 'another'
_flex_table = 'anotherflex'
_fields = {
'id': dbcore.types.PRIMARY_ID,
'foo': dbcore.types.INTEGER,
}
class TestDatabaseTwoModels(dbcore.Database):
_models = (TestModel2, AnotherTestModel)
pass
class MigrationTest(unittest.TestCase):
"""Tests the ability to change the database schema between
versions.
"""
def setUp(self):
handle, self.libfile = mkstemp('db')
os.close(handle)
# Set up a database with the two-field schema.
old_lib = TestDatabase2(self.libfile)
# Add an item to the old library.
old_lib._connection().execute(
'insert into test (field_one, field_two) values (4, 2)'
)
old_lib._connection().commit()
del old_lib
def tearDown(self):
os.remove(self.libfile)
def test_open_with_same_fields_leaves_untouched(self):
new_lib = TestDatabase2(self.libfile)
c = new_lib._connection().cursor()
c.execute("select * from test")
row = c.fetchone()
self.assertEqual(len(row.keys()), len(TestModel2._fields))
def test_open_with_new_field_adds_column(self):
new_lib = TestDatabase3(self.libfile)
c = new_lib._connection().cursor()
c.execute("select * from test")
row = c.fetchone()
self.assertEqual(len(row.keys()), len(TestModel3._fields))
def test_open_with_fewer_fields_leaves_untouched(self):
new_lib = TestDatabase1(self.libfile)
c = new_lib._connection().cursor()
c.execute("select * from test")
row = c.fetchone()
self.assertEqual(len(row.keys()), len(TestModel2._fields))
def test_open_with_multiple_new_fields(self):
new_lib = TestDatabase4(self.libfile)
c = new_lib._connection().cursor()
c.execute("select * from test")
row = c.fetchone()
self.assertEqual(len(row.keys()), len(TestModel4._fields))
def test_extra_model_adds_table(self):
new_lib = TestDatabaseTwoModels(self.libfile)
try:
new_lib._connection().execute("select * from another")
except sqlite3.OperationalError:
self.fail("select failed")
class ModelTest(unittest.TestCase):
def setUp(self):
self.db = TestDatabase1(':memory:')
def tearDown(self):
self.db._connection().close()
def test_add_model(self):
model = TestModel1()
model.add(self.db)
rows = self.db._connection().execute('select * from test').fetchall()
self.assertEqual(len(rows), 1)
def test_store_fixed_field(self):
model = TestModel1()
model.add(self.db)
model.field_one = 123
model.store()
row = self.db._connection().execute('select * from test').fetchone()
self.assertEqual(row[b'field_one'], 123)
def test_retrieve_by_id(self):
model = TestModel1()
model.add(self.db)
other_model = self.db._get(TestModel1, model.id)
self.assertEqual(model.id, other_model.id)
def test_store_and_retrieve_flexattr(self):
model = TestModel1()
model.add(self.db)
model.foo = 'bar'
model.store()
other_model = self.db._get(TestModel1, model.id)
self.assertEqual(other_model.foo, 'bar')
def test_delete_flexattr(self):
model = TestModel1()
model['foo'] = 'bar'
self.assertTrue('foo' in model)
del model['foo']
self.assertFalse('foo' in model)
def test_delete_flexattr_via_dot(self):
model = TestModel1()
model['foo'] = 'bar'
self.assertTrue('foo' in model)
del model.foo
self.assertFalse('foo' in model)
def test_delete_flexattr_persists(self):
model = TestModel1()
model.add(self.db)
model.foo = 'bar'
model.store()
model = self.db._get(TestModel1, model.id)
del model['foo']
model.store()
model = self.db._get(TestModel1, model.id)
self.assertFalse('foo' in model)
def test_delete_non_existent_attribute(self):
model = TestModel1()
with self.assertRaises(KeyError):
del model['foo']
def test_delete_fixed_attribute(self):
model = TestModel1()
with self.assertRaises(KeyError):
del model['field_one']
def test_null_value_normalization_by_type(self):
model = TestModel1()
model.field_one = None
self.assertEqual(model.field_one, 0)
def test_null_value_stays_none_for_untyped_field(self):
model = TestModel1()
model.foo = None
self.assertEqual(model.foo, None)
def test_normalization_for_typed_flex_fields(self):
model = TestModel1()
model.some_float_field = None
self.assertEqual(model.some_float_field, 0.0)
def test_load_deleted_flex_field(self):
model1 = TestModel1()
model1['flex_field'] = True
model1.add(self.db)
model2 = self.db._get(TestModel1, model1.id)
self.assertIn('flex_field', model2)
del model1['flex_field']
model1.store()
model2.load()
self.assertNotIn('flex_field', model2)
class FormatTest(unittest.TestCase):
def test_format_fixed_field(self):
model = TestModel1()
model.field_one = u'caf\xe9'
value = model.formatted().get('field_one')
self.assertEqual(value, u'caf\xe9')
def test_format_flex_field(self):
model = TestModel1()
model.other_field = u'caf\xe9'
value = model.formatted().get('other_field')
self.assertEqual(value, u'caf\xe9')
def test_format_flex_field_bytes(self):
model = TestModel1()
model.other_field = u'caf\xe9'.encode('utf8')
value = model.formatted().get('other_field')
self.assertTrue(isinstance(value, unicode))
self.assertEqual(value, u'caf\xe9')
def test_format_unset_field(self):
model = TestModel1()
value = model.formatted().get('other_field')
self.assertEqual(value, u'')
def test_format_typed_flex_field(self):
model = TestModel1()
model.some_float_field = 3.14159265358979
value = model.formatted().get('some_float_field')
self.assertEqual(value, u'3.1')
class FormattedMappingTest(unittest.TestCase):
def test_keys_equal_model_keys(self):
model = TestModel1()
formatted = model.formatted()
self.assertEqual(set(model.keys(True)), set(formatted.keys()))
def test_get_unset_field(self):
model = TestModel1()
formatted = model.formatted()
with self.assertRaises(KeyError):
formatted['other_field']
def test_get_method_with_default(self):
model = TestModel1()
formatted = model.formatted()
self.assertEqual(formatted.get('other_field'), u'')
def test_get_method_with_specified_default(self):
model = TestModel1()
formatted = model.formatted()
self.assertEqual(formatted.get('other_field', 'default'), 'default')
class ParseTest(unittest.TestCase):
def test_parse_fixed_field(self):
value = TestModel1._parse('field_one', u'2')
self.assertIsInstance(value, int)
self.assertEqual(value, 2)
def test_parse_flex_field(self):
value = TestModel1._parse('some_float_field', u'2')
self.assertIsInstance(value, float)
self.assertEqual(value, 2.0)
def test_parse_untyped_field(self):
value = TestModel1._parse('field_nine', u'2')
self.assertEqual(value, u'2')
class QueryParseTest(unittest.TestCase):
def pqp(self, part):
return dbcore.queryparse.parse_query_part(
part,
{'year': dbcore.query.NumericQuery},
{':': dbcore.query.RegexpQuery},
)[:-1] # remove the negate flag
def test_one_basic_term(self):
q = 'test'
r = (None, 'test', dbcore.query.SubstringQuery)
self.assertEqual(self.pqp(q), r)
def test_one_keyed_term(self):
q = 'test:val'
r = ('test', 'val', dbcore.query.SubstringQuery)
self.assertEqual(self.pqp(q), r)
def test_colon_at_end(self):
q = 'test:'
r = ('test', '', dbcore.query.SubstringQuery)
self.assertEqual(self.pqp(q), r)
def test_one_basic_regexp(self):
q = r':regexp'
r = (None, 'regexp', dbcore.query.RegexpQuery)
self.assertEqual(self.pqp(q), r)
def test_keyed_regexp(self):
q = r'test::regexp'
r = ('test', 'regexp', dbcore.query.RegexpQuery)
self.assertEqual(self.pqp(q), r)
def test_escaped_colon(self):
q = r'test\:val'
r = (None, 'test:val', dbcore.query.SubstringQuery)
self.assertEqual(self.pqp(q), r)
def test_escaped_colon_in_regexp(self):
q = r':test\:regexp'
r = (None, 'test:regexp', dbcore.query.RegexpQuery)
self.assertEqual(self.pqp(q), r)
def test_single_year(self):
q = 'year:1999'
r = ('year', '1999', dbcore.query.NumericQuery)
self.assertEqual(self.pqp(q), r)
def test_multiple_years(self):
q = 'year:1999..2010'
r = ('year', '1999..2010', dbcore.query.NumericQuery)
self.assertEqual(self.pqp(q), r)
def test_empty_query_part(self):
q = ''
r = (None, '', dbcore.query.SubstringQuery)
self.assertEqual(self.pqp(q), r)
class QueryFromStringsTest(unittest.TestCase):
def qfs(self, strings):
return dbcore.queryparse.query_from_strings(
dbcore.query.AndQuery,
TestModel1,
{':': dbcore.query.RegexpQuery},
strings,
)
def test_zero_parts(self):
q = self.qfs([])
self.assertIsInstance(q, dbcore.query.AndQuery)
self.assertEqual(len(q.subqueries), 1)
self.assertIsInstance(q.subqueries[0], dbcore.query.TrueQuery)
def test_two_parts(self):
q = self.qfs(['foo', 'bar:baz'])
self.assertIsInstance(q, dbcore.query.AndQuery)
self.assertEqual(len(q.subqueries), 2)
self.assertIsInstance(q.subqueries[0], dbcore.query.AnyFieldQuery)
self.assertIsInstance(q.subqueries[1], dbcore.query.SubstringQuery)
def test_parse_fixed_type_query(self):
q = self.qfs(['field_one:2..3'])
self.assertIsInstance(q.subqueries[0], dbcore.query.NumericQuery)
def test_parse_flex_type_query(self):
q = self.qfs(['some_float_field:2..3'])
self.assertIsInstance(q.subqueries[0], dbcore.query.NumericQuery)
def test_empty_query_part(self):
q = self.qfs([''])
self.assertIsInstance(q.subqueries[0], dbcore.query.TrueQuery)
class SortFromStringsTest(unittest.TestCase):
def sfs(self, strings):
return dbcore.queryparse.sort_from_strings(
TestModel1,
strings,
)
def test_zero_parts(self):
s = self.sfs([])
self.assertIsInstance(s, dbcore.query.NullSort)
self.assertEqual(s, dbcore.query.NullSort())
def test_one_parts(self):
s = self.sfs(['field+'])
self.assertIsInstance(s, dbcore.query.Sort)
def test_two_parts(self):
s = self.sfs(['field+', 'another_field-'])
self.assertIsInstance(s, dbcore.query.MultipleSort)
self.assertEqual(len(s.sorts), 2)
def test_fixed_field_sort(self):
s = self.sfs(['field_one+'])
self.assertIsInstance(s, dbcore.query.FixedFieldSort)
self.assertEqual(s, dbcore.query.FixedFieldSort('field_one'))
def test_flex_field_sort(self):
s = self.sfs(['flex_field+'])
self.assertIsInstance(s, dbcore.query.SlowFieldSort)
self.assertEqual(s, dbcore.query.SlowFieldSort('flex_field'))
def test_special_sort(self):
s = self.sfs(['some_sort+'])
self.assertIsInstance(s, TestSort)
class ParseSortedQueryTest(unittest.TestCase):
def psq(self, parts):
return dbcore.parse_sorted_query(
TestModel1,
parts.split(),
)
def test_and_query(self):
q, s = self.psq('foo bar')
self.assertIsInstance(q, dbcore.query.AndQuery)
self.assertIsInstance(s, dbcore.query.NullSort)
self.assertEqual(len(q.subqueries), 2)
def test_or_query(self):
q, s = self.psq('foo , bar')
self.assertIsInstance(q, dbcore.query.OrQuery)
self.assertIsInstance(s, dbcore.query.NullSort)
self.assertEqual(len(q.subqueries), 2)
def test_no_space_before_comma_or_query(self):
q, s = self.psq('foo, bar')
self.assertIsInstance(q, dbcore.query.OrQuery)
self.assertIsInstance(s, dbcore.query.NullSort)
self.assertEqual(len(q.subqueries), 2)
def test_no_spaces_or_query(self):
q, s = self.psq('foo,bar')
self.assertIsInstance(q, dbcore.query.AndQuery)
self.assertIsInstance(s, dbcore.query.NullSort)
self.assertEqual(len(q.subqueries), 1)
def test_trailing_comma_or_query(self):
q, s = self.psq('foo , bar ,')
self.assertIsInstance(q, dbcore.query.OrQuery)
self.assertIsInstance(s, dbcore.query.NullSort)
self.assertEqual(len(q.subqueries), 3)
def test_leading_comma_or_query(self):
q, s = self.psq(', foo , bar')
self.assertIsInstance(q, dbcore.query.OrQuery)
self.assertIsInstance(s, dbcore.query.NullSort)
self.assertEqual(len(q.subqueries), 3)
def test_only_direction(self):
q, s = self.psq('-')
self.assertIsInstance(q, dbcore.query.AndQuery)
self.assertIsInstance(s, dbcore.query.NullSort)
self.assertEqual(len(q.subqueries), 1)
class ResultsIteratorTest(unittest.TestCase):
def setUp(self):
self.db = TestDatabase1(':memory:')
model = TestModel1()
model['foo'] = 'baz'
model.add(self.db)
model = TestModel1()
model['foo'] = 'bar'
model.add(self.db)
def tearDown(self):
self.db._connection().close()
def test_iterate_once(self):
objs = self.db._fetch(TestModel1)
self.assertEqual(len(list(objs)), 2)
def test_iterate_twice(self):
objs = self.db._fetch(TestModel1)
list(objs)
self.assertEqual(len(list(objs)), 2)
def test_concurrent_iterators(self):
results = self.db._fetch(TestModel1)
it1 = iter(results)
it2 = iter(results)
it1.next()
list(it2)
self.assertEqual(len(list(it1)), 1)
def test_slow_query(self):
q = dbcore.query.SubstringQuery('foo', 'ba', False)
objs = self.db._fetch(TestModel1, q)
self.assertEqual(len(list(objs)), 2)
def test_slow_query_negative(self):
q = dbcore.query.SubstringQuery('foo', 'qux', False)
objs = self.db._fetch(TestModel1, q)
self.assertEqual(len(list(objs)), 0)
def test_iterate_slow_sort(self):
s = dbcore.query.SlowFieldSort('foo')
res = self.db._fetch(TestModel1, sort=s)
objs = list(res)
self.assertEqual(objs[0].foo, 'bar')
self.assertEqual(objs[1].foo, 'baz')
def test_unsorted_subscript(self):
objs = self.db._fetch(TestModel1)
self.assertEqual(objs[0].foo, 'baz')
self.assertEqual(objs[1].foo, 'bar')
def test_slow_sort_subscript(self):
s = dbcore.query.SlowFieldSort('foo')
objs = self.db._fetch(TestModel1, sort=s)
self.assertEqual(objs[0].foo, 'bar')
self.assertEqual(objs[1].foo, 'baz')
def test_length(self):
objs = self.db._fetch(TestModel1)
self.assertEqual(len(objs), 2)
def suite():
return unittest.TestLoader().loadTestsFromName(__name__)
if __name__ == b'__main__':
unittest.main(defaultTest='suite')
| {
"content_hash": "d159dc3b8dc1f67104c6c5941101e1d2",
"timestamp": "",
"source": "github",
"line_count": 581,
"max_line_length": 77,
"avg_line_length": 30.566265060240966,
"alnum_prop": 0.6106762768173883,
"repo_name": "LordSputnik/beets",
"id": "a69ffedbee46af8e39ff14d236e51250656978b2",
"size": "18430",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/test_dbcore.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2951"
},
{
"name": "HTML",
"bytes": "3307"
},
{
"name": "JavaScript",
"bytes": "85950"
},
{
"name": "Python",
"bytes": "1671957"
},
{
"name": "Shell",
"bytes": "7413"
}
],
"symlink_target": ""
} |
package iso20022
type DataModification2Code string
| {
"content_hash": "17f264021c23e53c6c1b0601943340c2",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 33,
"avg_line_length": 17.333333333333332,
"alnum_prop": 0.8846153846153846,
"repo_name": "fgrid/iso20022",
"id": "26189023ba8497ac4bb800caaf1969c765f06258",
"size": "52",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "DataModification2Code.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Go",
"bytes": "21383920"
}
],
"symlink_target": ""
} |
#ifndef __XFS_INODE_H__
#define __XFS_INODE_H__
#include "xfs_inode_buf.h"
#include "xfs_inode_fork.h"
/*
* Kernel only inode definitions
*/
struct xfs_dinode;
struct xfs_inode;
struct xfs_buf;
struct xfs_bmap_free;
struct xfs_bmbt_irec;
struct xfs_inode_log_item;
struct xfs_mount;
struct xfs_trans;
struct xfs_dquot;
typedef struct xfs_inode {
/* Inode linking and identification information. */
struct xfs_mount *i_mount; /* fs mount struct ptr */
struct xfs_dquot *i_udquot; /* user dquot */
struct xfs_dquot *i_gdquot; /* group dquot */
struct xfs_dquot *i_pdquot; /* project dquot */
/* Inode location stuff */
xfs_ino_t i_ino; /* inode number (agno/agino)*/
struct xfs_imap i_imap; /* location for xfs_imap() */
/* Extent information. */
xfs_ifork_t *i_afp; /* attribute fork pointer */
xfs_ifork_t i_df; /* data fork */
/* operations vectors */
const struct xfs_dir_ops *d_ops; /* directory ops vector */
/* Transaction and locking information. */
struct xfs_inode_log_item *i_itemp; /* logging information */
mrlock_t i_lock; /* inode lock */
mrlock_t i_iolock; /* inode IO lock */
mrlock_t i_mmaplock; /* inode mmap IO lock */
atomic_t i_pincount; /* inode pin count */
spinlock_t i_flags_lock; /* inode i_flags lock */
/* Miscellaneous state. */
unsigned long i_flags; /* see defined flags below */
unsigned int i_delayed_blks; /* count of delay alloc blks */
struct xfs_icdinode i_d; /* most of ondisk inode */
/* VFS inode */
struct inode i_vnode; /* embedded VFS inode */
} xfs_inode_t;
/* Convert from vfs inode to xfs inode */
static inline struct xfs_inode *XFS_I(struct inode *inode)
{
return container_of(inode, struct xfs_inode, i_vnode);
}
/* convert from xfs inode to vfs inode */
static inline struct inode *VFS_I(struct xfs_inode *ip)
{
return &ip->i_vnode;
}
/*
* For regular files we only update the on-disk filesize when actually
* writing data back to disk. Until then only the copy in the VFS inode
* is uptodate.
*/
static inline xfs_fsize_t XFS_ISIZE(struct xfs_inode *ip)
{
if (S_ISREG(VFS_I(ip)->i_mode))
return i_size_read(VFS_I(ip));
return ip->i_d.di_size;
}
/*
* If this I/O goes past the on-disk inode size update it unless it would
* be past the current in-core inode size.
*/
static inline xfs_fsize_t
xfs_new_eof(struct xfs_inode *ip, xfs_fsize_t new_size)
{
xfs_fsize_t i_size = i_size_read(VFS_I(ip));
if (new_size > i_size || new_size < 0)
new_size = i_size;
return new_size > ip->i_d.di_size ? new_size : 0;
}
/*
* i_flags helper functions
*/
static inline void
__xfs_iflags_set(xfs_inode_t *ip, unsigned short flags)
{
ip->i_flags |= flags;
}
static inline void
xfs_iflags_set(xfs_inode_t *ip, unsigned short flags)
{
spin_lock(&ip->i_flags_lock);
__xfs_iflags_set(ip, flags);
spin_unlock(&ip->i_flags_lock);
}
static inline void
xfs_iflags_clear(xfs_inode_t *ip, unsigned short flags)
{
spin_lock(&ip->i_flags_lock);
ip->i_flags &= ~flags;
spin_unlock(&ip->i_flags_lock);
}
static inline int
__xfs_iflags_test(xfs_inode_t *ip, unsigned short flags)
{
return (ip->i_flags & flags);
}
static inline int
xfs_iflags_test(xfs_inode_t *ip, unsigned short flags)
{
int ret;
spin_lock(&ip->i_flags_lock);
ret = __xfs_iflags_test(ip, flags);
spin_unlock(&ip->i_flags_lock);
return ret;
}
static inline int
xfs_iflags_test_and_clear(xfs_inode_t *ip, unsigned short flags)
{
int ret;
spin_lock(&ip->i_flags_lock);
ret = ip->i_flags & flags;
if (ret)
ip->i_flags &= ~flags;
spin_unlock(&ip->i_flags_lock);
return ret;
}
static inline int
xfs_iflags_test_and_set(xfs_inode_t *ip, unsigned short flags)
{
int ret;
spin_lock(&ip->i_flags_lock);
ret = ip->i_flags & flags;
if (!ret)
ip->i_flags |= flags;
spin_unlock(&ip->i_flags_lock);
return ret;
}
/*
* Project quota id helpers (previously projid was 16bit only
* and using two 16bit values to hold new 32bit projid was chosen
* to retain compatibility with "old" filesystems).
*/
static inline prid_t
xfs_get_projid(struct xfs_inode *ip)
{
return (prid_t)ip->i_d.di_projid_hi << 16 | ip->i_d.di_projid_lo;
}
static inline void
xfs_set_projid(struct xfs_inode *ip,
prid_t projid)
{
ip->i_d.di_projid_hi = (__uint16_t) (projid >> 16);
ip->i_d.di_projid_lo = (__uint16_t) (projid & 0xffff);
}
static inline prid_t
xfs_get_initial_prid(struct xfs_inode *dp)
{
if (dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)
return xfs_get_projid(dp);
return XFS_PROJID_DEFAULT;
}
/*
* In-core inode flags.
*/
#define XFS_IRECLAIM (1 << 0) /* started reclaiming this inode */
#define XFS_ISTALE (1 << 1) /* inode has been staled */
#define XFS_IRECLAIMABLE (1 << 2) /* inode can be reclaimed */
#define XFS_INEW (1 << 3) /* inode has just been allocated */
#define XFS_ITRUNCATED (1 << 5) /* truncated down so flush-on-close */
#define XFS_IDIRTY_RELEASE (1 << 6) /* dirty release already seen */
#define __XFS_IFLOCK_BIT 7 /* inode is being flushed right now */
#define XFS_IFLOCK (1 << __XFS_IFLOCK_BIT)
#define __XFS_IPINNED_BIT 8 /* wakeup key for zero pin count */
#define XFS_IPINNED (1 << __XFS_IPINNED_BIT)
#define XFS_IDONTCACHE (1 << 9) /* don't cache the inode long term */
/*
* Per-lifetime flags need to be reset when re-using a reclaimable inode during
* inode lookup. This prevents unintended behaviour on the new inode from
* ocurring.
*/
#define XFS_IRECLAIM_RESET_FLAGS \
(XFS_IRECLAIMABLE | XFS_IRECLAIM | \
XFS_IDIRTY_RELEASE | XFS_ITRUNCATED)
/*
* Synchronize processes attempting to flush the in-core inode back to disk.
*/
extern void __xfs_iflock(struct xfs_inode *ip);
static inline int xfs_iflock_nowait(struct xfs_inode *ip)
{
return !xfs_iflags_test_and_set(ip, XFS_IFLOCK);
}
static inline void xfs_iflock(struct xfs_inode *ip)
{
if (!xfs_iflock_nowait(ip))
__xfs_iflock(ip);
}
static inline void xfs_ifunlock(struct xfs_inode *ip)
{
xfs_iflags_clear(ip, XFS_IFLOCK);
smp_mb();
wake_up_bit(&ip->i_flags, __XFS_IFLOCK_BIT);
}
static inline int xfs_isiflocked(struct xfs_inode *ip)
{
return xfs_iflags_test(ip, XFS_IFLOCK);
}
/*
* Flags for inode locking.
* Bit ranges: 1<<1 - 1<<16-1 -- iolock/ilock modes (bitfield)
* 1<<16 - 1<<32-1 -- lockdep annotation (integers)
*/
#define XFS_IOLOCK_EXCL (1<<0)
#define XFS_IOLOCK_SHARED (1<<1)
#define XFS_ILOCK_EXCL (1<<2)
#define XFS_ILOCK_SHARED (1<<3)
#define XFS_MMAPLOCK_EXCL (1<<4)
#define XFS_MMAPLOCK_SHARED (1<<5)
#define XFS_LOCK_MASK (XFS_IOLOCK_EXCL | XFS_IOLOCK_SHARED \
| XFS_ILOCK_EXCL | XFS_ILOCK_SHARED \
| XFS_MMAPLOCK_EXCL | XFS_MMAPLOCK_SHARED)
#define XFS_LOCK_FLAGS \
{ XFS_IOLOCK_EXCL, "IOLOCK_EXCL" }, \
{ XFS_IOLOCK_SHARED, "IOLOCK_SHARED" }, \
{ XFS_ILOCK_EXCL, "ILOCK_EXCL" }, \
{ XFS_ILOCK_SHARED, "ILOCK_SHARED" }, \
{ XFS_MMAPLOCK_EXCL, "MMAPLOCK_EXCL" }, \
{ XFS_MMAPLOCK_SHARED, "MMAPLOCK_SHARED" }
/*
* Flags for lockdep annotations.
*
* XFS_LOCK_PARENT - for directory operations that require locking a
* parent directory inode and a child entry inode. IOLOCK requires nesting,
* MMAPLOCK does not support this class, ILOCK requires a single subclass
* to differentiate parent from child.
*
* XFS_LOCK_RTBITMAP/XFS_LOCK_RTSUM - the realtime device bitmap and summary
* inodes do not participate in the normal lock order, and thus have their
* own subclasses.
*
* XFS_LOCK_INUMORDER - for locking several inodes at the some time
* with xfs_lock_inodes(). This flag is used as the starting subclass
* and each subsequent lock acquired will increment the subclass by one.
* However, MAX_LOCKDEP_SUBCLASSES == 8, which means we are greatly
* limited to the subclasses we can represent via nesting. We need at least
* 5 inodes nest depth for the ILOCK through rename, and we also have to support
* XFS_ILOCK_PARENT, which gives 6 subclasses. Then we have XFS_ILOCK_RTBITMAP
* and XFS_ILOCK_RTSUM, which are another 2 unique subclasses, so that's all
* 8 subclasses supported by lockdep.
*
* This also means we have to number the sub-classes in the lowest bits of
* the mask we keep, and we have to ensure we never exceed 3 bits of lockdep
* mask and we can't use bit-masking to build the subclasses. What a mess.
*
* Bit layout:
*
* Bit Lock Region
* 16-19 XFS_IOLOCK_SHIFT dependencies
* 20-23 XFS_MMAPLOCK_SHIFT dependencies
* 24-31 XFS_ILOCK_SHIFT dependencies
*
* IOLOCK values
*
* 0-3 subclass value
* 4-7 PARENT subclass values
*
* MMAPLOCK values
*
* 0-3 subclass value
* 4-7 unused
*
* ILOCK values
* 0-4 subclass values
* 5 PARENT subclass (not nestable)
* 6 RTBITMAP subclass (not nestable)
* 7 RTSUM subclass (not nestable)
*
*/
#define XFS_IOLOCK_SHIFT 16
#define XFS_IOLOCK_PARENT_VAL 4
#define XFS_IOLOCK_MAX_SUBCLASS (XFS_IOLOCK_PARENT_VAL - 1)
#define XFS_IOLOCK_DEP_MASK 0x000f0000
#define XFS_IOLOCK_PARENT (XFS_IOLOCK_PARENT_VAL << XFS_IOLOCK_SHIFT)
#define XFS_MMAPLOCK_SHIFT 20
#define XFS_MMAPLOCK_NUMORDER 0
#define XFS_MMAPLOCK_MAX_SUBCLASS 3
#define XFS_MMAPLOCK_DEP_MASK 0x00f00000
#define XFS_ILOCK_SHIFT 24
#define XFS_ILOCK_PARENT_VAL 5
#define XFS_ILOCK_MAX_SUBCLASS (XFS_ILOCK_PARENT_VAL - 1)
#define XFS_ILOCK_RTBITMAP_VAL 6
#define XFS_ILOCK_RTSUM_VAL 7
#define XFS_ILOCK_DEP_MASK 0xff000000
#define XFS_ILOCK_PARENT (XFS_ILOCK_PARENT_VAL << XFS_ILOCK_SHIFT)
#define XFS_ILOCK_RTBITMAP (XFS_ILOCK_RTBITMAP_VAL << XFS_ILOCK_SHIFT)
#define XFS_ILOCK_RTSUM (XFS_ILOCK_RTSUM_VAL << XFS_ILOCK_SHIFT)
#define XFS_LOCK_SUBCLASS_MASK (XFS_IOLOCK_DEP_MASK | \
XFS_MMAPLOCK_DEP_MASK | \
XFS_ILOCK_DEP_MASK)
#define XFS_IOLOCK_DEP(flags) (((flags) & XFS_IOLOCK_DEP_MASK) \
>> XFS_IOLOCK_SHIFT)
#define XFS_MMAPLOCK_DEP(flags) (((flags) & XFS_MMAPLOCK_DEP_MASK) \
>> XFS_MMAPLOCK_SHIFT)
#define XFS_ILOCK_DEP(flags) (((flags) & XFS_ILOCK_DEP_MASK) \
>> XFS_ILOCK_SHIFT)
/*
* For multiple groups support: if S_ISGID bit is set in the parent
* directory, group of new file is set to that of the parent, and
* new subdirectory gets S_ISGID bit from parent.
*/
#define XFS_INHERIT_GID(pip) \
(((pip)->i_mount->m_flags & XFS_MOUNT_GRPID) || \
(VFS_I(pip)->i_mode & S_ISGID))
int xfs_release(struct xfs_inode *ip);
void xfs_inactive(struct xfs_inode *ip);
int xfs_lookup(struct xfs_inode *dp, struct xfs_name *name,
struct xfs_inode **ipp, struct xfs_name *ci_name);
int xfs_create(struct xfs_inode *dp, struct xfs_name *name,
umode_t mode, xfs_dev_t rdev, struct xfs_inode **ipp);
int xfs_create_tmpfile(struct xfs_inode *dp, struct dentry *dentry,
umode_t mode, struct xfs_inode **ipp);
int xfs_remove(struct xfs_inode *dp, struct xfs_name *name,
struct xfs_inode *ip);
int xfs_link(struct xfs_inode *tdp, struct xfs_inode *sip,
struct xfs_name *target_name);
int xfs_rename(struct xfs_inode *src_dp, struct xfs_name *src_name,
struct xfs_inode *src_ip, struct xfs_inode *target_dp,
struct xfs_name *target_name,
struct xfs_inode *target_ip, unsigned int flags);
void xfs_ilock(xfs_inode_t *, uint);
int xfs_ilock_nowait(xfs_inode_t *, uint);
void xfs_iunlock(xfs_inode_t *, uint);
void xfs_ilock_demote(xfs_inode_t *, uint);
int xfs_isilocked(xfs_inode_t *, uint);
uint xfs_ilock_data_map_shared(struct xfs_inode *);
uint xfs_ilock_attr_map_shared(struct xfs_inode *);
int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, umode_t,
xfs_nlink_t, xfs_dev_t, prid_t, int,
struct xfs_buf **, xfs_inode_t **);
uint xfs_ip2xflags(struct xfs_inode *);
uint xfs_dic2xflags(struct xfs_dinode *);
int xfs_ifree(struct xfs_trans *, xfs_inode_t *,
struct xfs_bmap_free *);
int xfs_itruncate_extents(struct xfs_trans **, struct xfs_inode *,
int, xfs_fsize_t);
void xfs_iext_realloc(xfs_inode_t *, int, int);
void xfs_iunpin_wait(xfs_inode_t *);
#define xfs_ipincount(ip) ((unsigned int) atomic_read(&ip->i_pincount))
int xfs_iflush(struct xfs_inode *, struct xfs_buf **);
void xfs_lock_inodes(xfs_inode_t **, int, uint);
void xfs_lock_two_inodes(xfs_inode_t *, xfs_inode_t *, uint);
xfs_extlen_t xfs_get_extsz_hint(struct xfs_inode *ip);
int xfs_dir_ialloc(struct xfs_trans **, struct xfs_inode *, umode_t,
xfs_nlink_t, xfs_dev_t, prid_t, int,
struct xfs_inode **, int *);
int xfs_droplink(struct xfs_trans *, struct xfs_inode *);
int xfs_bumplink(struct xfs_trans *, struct xfs_inode *);
/* from xfs_file.c */
enum xfs_prealloc_flags {
XFS_PREALLOC_SET = (1 << 1),
XFS_PREALLOC_CLEAR = (1 << 2),
XFS_PREALLOC_SYNC = (1 << 3),
XFS_PREALLOC_INVISIBLE = (1 << 4),
};
int xfs_update_prealloc_flags(struct xfs_inode *ip,
enum xfs_prealloc_flags flags);
int xfs_zero_eof(struct xfs_inode *ip, xfs_off_t offset,
xfs_fsize_t isize, bool *did_zeroing);
int xfs_iozero(struct xfs_inode *ip, loff_t pos, size_t count);
loff_t __xfs_seek_hole_data(struct inode *inode, loff_t start,
loff_t eof, int whence);
/* from xfs_iops.c */
extern void xfs_setup_inode(struct xfs_inode *ip);
extern void xfs_setup_iops(struct xfs_inode *ip);
/*
* When setting up a newly allocated inode, we need to call
* xfs_finish_inode_setup() once the inode is fully instantiated at
* the VFS level to prevent the rest of the world seeing the inode
* before we've completed instantiation. Otherwise we can do it
* the moment the inode lookup is complete.
*/
static inline void xfs_finish_inode_setup(struct xfs_inode *ip)
{
xfs_iflags_clear(ip, XFS_INEW);
barrier();
unlock_new_inode(VFS_I(ip));
}
static inline void xfs_setup_existing_inode(struct xfs_inode *ip)
{
xfs_setup_inode(ip);
xfs_setup_iops(ip);
xfs_finish_inode_setup(ip);
}
#define IHOLD(ip) \
do { \
ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \
ihold(VFS_I(ip)); \
trace_xfs_ihold(ip, _THIS_IP_); \
} while (0)
#define IRELE(ip) \
do { \
trace_xfs_irele(ip, _THIS_IP_); \
iput(VFS_I(ip)); \
} while (0)
extern struct kmem_zone *xfs_inode_zone;
/*
* Flags for read/write calls
*/
#define XFS_IO_ISDIRECT 0x00001 /* bypass page cache */
#define XFS_IO_INVIS 0x00002 /* don't update inode timestamps */
#define XFS_IO_FLAGS \
{ XFS_IO_ISDIRECT, "DIRECT" }, \
{ XFS_IO_INVIS, "INVIS"}
#endif /* __XFS_INODE_H__ */
| {
"content_hash": "4e0209521a2fbbe6b91bd4759ae568c4",
"timestamp": "",
"source": "github",
"line_count": 476,
"max_line_length": 80,
"avg_line_length": 29.863445378151262,
"alnum_prop": 0.6840661273302849,
"repo_name": "AlbandeCrevoisier/ldd-athens",
"id": "e52d7c7aeb5b7773558a4d218afbb2a69cdaafd4",
"size": "14941",
"binary": false,
"copies": "47",
"ref": "refs/heads/master",
"path": "linux-socfpga/fs/xfs/xfs_inode.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Assembly",
"bytes": "10184236"
},
{
"name": "Awk",
"bytes": "40418"
},
{
"name": "Batchfile",
"bytes": "81753"
},
{
"name": "C",
"bytes": "566858455"
},
{
"name": "C++",
"bytes": "21399133"
},
{
"name": "Clojure",
"bytes": "971"
},
{
"name": "Cucumber",
"bytes": "5998"
},
{
"name": "FORTRAN",
"bytes": "11832"
},
{
"name": "GDB",
"bytes": "18113"
},
{
"name": "Groff",
"bytes": "2686457"
},
{
"name": "HTML",
"bytes": "34688334"
},
{
"name": "Lex",
"bytes": "56961"
},
{
"name": "Logos",
"bytes": "133810"
},
{
"name": "M4",
"bytes": "3325"
},
{
"name": "Makefile",
"bytes": "1685015"
},
{
"name": "Objective-C",
"bytes": "920162"
},
{
"name": "Perl",
"bytes": "752477"
},
{
"name": "Perl6",
"bytes": "3783"
},
{
"name": "Python",
"bytes": "533352"
},
{
"name": "Shell",
"bytes": "468244"
},
{
"name": "SourcePawn",
"bytes": "2711"
},
{
"name": "UnrealScript",
"bytes": "12824"
},
{
"name": "XC",
"bytes": "33970"
},
{
"name": "XS",
"bytes": "34909"
},
{
"name": "Yacc",
"bytes": "113516"
}
],
"symlink_target": ""
} |
require "f1/engine"
module F1
end
| {
"content_hash": "6c7a4dc29f93d50da05a0cf173edcad5",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 19,
"avg_line_length": 8.75,
"alnum_prop": 0.7428571428571429,
"repo_name": "highlands/f1_ruby",
"id": "599feba6d4b2e2ae95f51ae325bcf46b700b162b",
"size": "35",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/f1.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1366"
},
{
"name": "HTML",
"bytes": "8333"
},
{
"name": "JavaScript",
"bytes": "1198"
},
{
"name": "Ruby",
"bytes": "40962"
}
],
"symlink_target": ""
} |
package cn.howardliu.monitor.cynomys.net;
import cn.howardliu.monitor.cynomys.net.netty.ResponseFuture;
/**
* <br>created at 17-8-10
*
* @author liuxh
* @version 0.0.1
* @since 0.0.1
*/
public interface InvokeCallBack {
void operationComplete(final ResponseFuture responseFuture);
}
| {
"content_hash": "9fe4e831125b0073fd72a9b73088fc4d",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 64,
"avg_line_length": 21.071428571428573,
"alnum_prop": 0.7322033898305085,
"repo_name": "howardliu-cn/cynomys",
"id": "62e83657999cec3a961afd268ff48a61cba14290",
"size": "295",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "cynomys-net/src/main/java/cn/howardliu/monitor/cynomys/net/InvokeCallBack.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "638645"
},
{
"name": "Shell",
"bytes": "12243"
}
],
"symlink_target": ""
} |
#include "google/fhir/profiles_lib.h"
#include <string>
#include "absl/container/node_hash_map.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/synchronization/mutex.h"
#include "google/fhir/extensions.h"
namespace google {
namespace fhir {
namespace internal {
using ::absl::InvalidArgumentError;
using ::google::protobuf::Descriptor;
using ::google::protobuf::FieldDescriptor;
using ::google::protobuf::Message;
namespace {
const std::set<std::string> GetAncestorSet(
const ::google::protobuf::Descriptor* descriptor) {
std::set<std::string> ancestors;
ancestors.insert(GetStructureDefinitionUrl(descriptor));
for (int i = 0;
i < descriptor->options().ExtensionSize(proto::fhir_profile_base); i++) {
ancestors.insert(
descriptor->options().GetExtension(proto::fhir_profile_base, i));
}
return ancestors;
}
bool AddSharedCommonAncestorMemo(
const std::string& first_url, const std::string& second_url,
const bool value,
absl::node_hash_map<std::string, absl::node_hash_map<std::string, bool>>*
memos) {
(*memos)[first_url][second_url] = value;
(*memos)[second_url][first_url] = value;
return value;
}
} // namespace
const bool SharesCommonAncestor(const ::google::protobuf::Descriptor* first,
const ::google::protobuf::Descriptor* second) {
static absl::node_hash_map<std::string,
absl::node_hash_map<std::string, bool>>
memos;
static absl::Mutex memos_mutex;
const std::string& first_url = GetStructureDefinitionUrl(first);
const std::string& second_url = GetStructureDefinitionUrl(second);
absl::MutexLock lock(&memos_mutex);
const auto& first_url_memo_entry = memos[first_url];
const auto& memo_entry = first_url_memo_entry.find(second_url);
if (memo_entry != first_url_memo_entry.end()) {
return memo_entry->second;
}
const std::set<std::string> first_set = GetAncestorSet(first);
for (const std::string& entry_from_second : GetAncestorSet(second)) {
if (first_set.find(entry_from_second) != first_set.end()) {
return AddSharedCommonAncestorMemo(first_url, second_url, true, &memos);
}
}
return AddSharedCommonAncestorMemo(first_url, second_url, false, &memos);
}
const std::unordered_map<std::string, const FieldDescriptor*> GetExtensionMap(
const Descriptor* descriptor) {
// Note that we memoize on descriptor address, since the values include
// FieldDescriptor addresses, which will only be valid for a given address
// of input descriptor
static auto* memos = new std::unordered_map<
intptr_t, std::unordered_map<std::string, const FieldDescriptor*>>();
static absl::Mutex memos_mutex;
const intptr_t memo_key = (intptr_t)descriptor;
{
absl::ReaderMutexLock l(&memos_mutex);
const auto iter = memos->find(memo_key);
if (iter != memos->end()) {
return iter->second;
}
}
absl::MutexLock lock(&memos_mutex);
auto& extension_map = (*memos)[memo_key];
for (int i = 0; i < descriptor->field_count(); i++) {
const FieldDescriptor* field = descriptor->field(i);
if (HasInlinedExtensionUrl(field)) {
extension_map[GetInlinedExtensionUrl(field)] = field;
}
}
return extension_map;
}
// Returns the corresponding FieldDescriptor on a target message for a given
// field on a source message, or nullptr if none can be found.
// Returns a status error if any subprocess encounters a problem.
// Note that the inability to find a suitable target field does NOT constitute
// a failure with a status return.
absl::StatusOr<const FieldDescriptor*> FindTargetField(
const Message& source, const Message* target,
const FieldDescriptor* source_field) {
const Descriptor* target_descriptor = target->GetDescriptor();
const FieldDescriptor* target_field =
target_descriptor->FindFieldByName(source_field->name());
if (target_field) {
return target_field;
}
// If the source and target are contained resources, and the fields don't
// match up, it can be a profile that exists in one but not the other.
// In this case, use the base resource type if available, otherwise fail.
if (IsContainedResource(*target) && IsContainedResource(source)) {
FHIR_ASSIGN_OR_RETURN(
const Descriptor* source_base_type,
GetBaseResourceDescriptor(source_field->message_type()));
const std::string base_field_name = ToSnakeCase(source_base_type->name());
return target_descriptor->FindFieldByName(base_field_name);
}
return nullptr;
}
absl::Status CopyProtoPrimitiveField(const Message& source,
const FieldDescriptor* source_field,
Message* target,
const FieldDescriptor* target_field) {
if (source_field->type() != target_field->type()) {
return InvalidArgumentError(absl::StrCat(
"Primitive field type mismatch between ", source_field->full_name(),
" and ", target_field->full_name()));
}
const auto* source_reflection = source.GetReflection();
const auto* target_reflection = target->GetReflection();
switch (source_field->type()) {
case google::protobuf::FieldDescriptor::TYPE_STRING:
target_reflection->SetString(
target, target_field,
source_reflection->GetString(source, source_field));
break;
case google::protobuf::FieldDescriptor::TYPE_BOOL:
target_reflection->SetBool(
target, target_field,
source_reflection->GetBool(source, source_field));
break;
case google::protobuf::FieldDescriptor::TYPE_DOUBLE:
target_reflection->SetDouble(
target, target_field,
source_reflection->GetDouble(source, source_field));
break;
case google::protobuf::FieldDescriptor::TYPE_INT64:
target_reflection->SetInt64(
target, target_field,
source_reflection->GetInt64(source, source_field));
break;
case google::protobuf::FieldDescriptor::TYPE_SINT32:
target_reflection->SetInt32(
target, target_field,
source_reflection->GetInt32(source, source_field));
break;
case google::protobuf::FieldDescriptor::TYPE_UINT32:
target_reflection->SetUInt32(
target, target_field,
source_reflection->GetUInt32(source, source_field));
break;
case google::protobuf::FieldDescriptor::TYPE_ENUM:
target_reflection->SetEnum(
target, target_field,
source_reflection->GetEnum(source, source_field));
break;
default:
return InvalidArgumentError(absl::StrCat(
"Invalid primitive type for FHIR: ",
google::protobuf::FieldDescriptor::TypeName(source_field->type())));
}
return absl::OkStatus();
}
} // namespace internal
} // namespace fhir
} // namespace google
| {
"content_hash": "d672b6916f49824ffd8d5e278796bcaa",
"timestamp": "",
"source": "github",
"line_count": 191,
"max_line_length": 80,
"avg_line_length": 36.1151832460733,
"alnum_prop": 0.6772977674688315,
"repo_name": "google/fhir",
"id": "b8b99d627e42e3530ed350dc7b0adb6d7addf0e7",
"size": "7492",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "cc/google/fhir/profiles_lib.cc",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "5560"
},
{
"name": "C",
"bytes": "37522"
},
{
"name": "C++",
"bytes": "1376466"
},
{
"name": "Dockerfile",
"bytes": "966"
},
{
"name": "Go",
"bytes": "542973"
},
{
"name": "Java",
"bytes": "929152"
},
{
"name": "Python",
"bytes": "645991"
},
{
"name": "Shell",
"bytes": "17013"
},
{
"name": "Starlark",
"bytes": "308438"
}
],
"symlink_target": ""
} |
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.autofill_assistant.header;
import android.content.Context;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.PopupMenu;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.RecyclerView;
import org.chromium.base.task.PostTask;
import org.chromium.chrome.autofill_assistant.R;
import org.chromium.chrome.browser.autofill_assistant.AssistantTagsForTesting;
import org.chromium.chrome.browser.autofill_assistant.AssistantTextUtils;
import org.chromium.chrome.browser.autofill_assistant.AutofillAssistantPreferenceFragment;
import org.chromium.chrome.browser.autofill_assistant.carousel.AssistantChipAdapter;
import org.chromium.chrome.browser.settings.SettingsLauncherImpl;
import org.chromium.components.browser_ui.settings.SettingsLauncher;
import org.chromium.components.browser_ui.widget.textbubble.TextBubble;
import org.chromium.content_public.browser.UiThreadTaskTraits;
import org.chromium.ui.modelutil.PropertyKey;
import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
import org.chromium.ui.util.AccessibilityUtil;
import org.chromium.ui.widget.ViewRectProvider;
/**
* This class is responsible for pushing updates to the Autofill Assistant header view. These
* updates are pulled from the {@link AssistantHeaderModel} when a notification of an update is
* received.
*/
class AssistantHeaderViewBinder
implements PropertyModelChangeProcessor.ViewBinder<AssistantHeaderModel,
AssistantHeaderViewBinder.ViewHolder, PropertyKey> {
/** The amount of space to put between the top of the sheet and the bottom of the bubble.*/
private static final int TEXT_BUBBLE_PIXELS_ABOVE_SHEET = 4;
private final AccessibilityUtil mAccessibilityUtil;
public AssistantHeaderViewBinder(AccessibilityUtil accessibilityUtil) {
mAccessibilityUtil = accessibilityUtil;
}
/**
* A wrapper class that holds the different views of the header.
*/
static class ViewHolder {
final Context mContext;
final AnimatedPoodle mPoodle;
final ViewGroup mHeader;
final TextView mStatusMessage;
final AssistantStepProgressBar mStepProgressBar;
final ImageView mTtsButton;
final View mProfileIconView;
final PopupMenu mProfileIconMenu;
final MenuItem mProfileIconMenuSettingsMessage;
final MenuItem mProfileIconMenuSendFeedbackMessage;
final RecyclerView mChipsContainer;
@Nullable
TextBubble mTextBubble;
ViewHolder(Context context, ViewGroup headerView, AnimatedPoodle poodle,
RecyclerView chipsContainer) {
mContext = context;
mPoodle = poodle;
mHeader = headerView;
mStatusMessage = headerView.findViewById(R.id.status_message);
mStepProgressBar =
new AssistantStepProgressBar(headerView.findViewById(R.id.step_progress_bar));
mTtsButton = (ImageView) headerView.findViewById(R.id.tts_button);
mProfileIconView = headerView.findViewById(R.id.profile_image);
mProfileIconMenu = new PopupMenu(context, mProfileIconView);
mProfileIconMenu.inflate(R.menu.profile_icon_menu);
mProfileIconMenuSettingsMessage = mProfileIconMenu.getMenu().findItem(R.id.settings);
mProfileIconMenuSendFeedbackMessage =
mProfileIconMenu.getMenu().findItem(R.id.send_feedback);
mProfileIconView.setOnClickListener(unusedView -> mProfileIconMenu.show());
mChipsContainer = chipsContainer;
}
void disableAnimations(boolean disable) {
mStepProgressBar.disableAnimations(disable);
// Hiding the animated poodle seems to be the easiest way to disable its animation since
// {@link LogoView#setAnimationEnabled(boolean)} is private.
mPoodle.getView().setVisibility(View.INVISIBLE);
((DefaultItemAnimator) mChipsContainer.getItemAnimator())
.setSupportsChangeAnimations(!disable);
}
void updateProgressBarVisibility(boolean visible) {
mStepProgressBar.setVisible(visible);
}
}
@Override
public void bind(AssistantHeaderModel model, ViewHolder view, PropertyKey propertyKey) {
if (AssistantHeaderModel.STATUS_MESSAGE == propertyKey) {
String message = model.get(AssistantHeaderModel.STATUS_MESSAGE);
AssistantTextUtils.applyVisualAppearanceTags(view.mStatusMessage, message, null);
view.mStatusMessage.announceForAccessibility(view.mStatusMessage.getText());
} else if (AssistantHeaderModel.PROFILE_ICON_MENU_SETTINGS_MESSAGE == propertyKey) {
view.mProfileIconMenuSettingsMessage.setTitle(
model.get(AssistantHeaderModel.PROFILE_ICON_MENU_SETTINGS_MESSAGE));
} else if (AssistantHeaderModel.PROFILE_ICON_MENU_SEND_FEEDBACK_MESSAGE == propertyKey) {
view.mProfileIconMenuSendFeedbackMessage.setTitle(
model.get(AssistantHeaderModel.PROFILE_ICON_MENU_SEND_FEEDBACK_MESSAGE));
} else if (AssistantHeaderModel.PROGRESS_ACTIVE_STEP == propertyKey) {
int activeStep = model.get(AssistantHeaderModel.PROGRESS_ACTIVE_STEP);
if (activeStep >= 0) {
view.mStepProgressBar.setActiveStep(activeStep);
}
} else if (AssistantHeaderModel.PROGRESS_BAR_ERROR == propertyKey) {
view.mStepProgressBar.setError(model.get(AssistantHeaderModel.PROGRESS_BAR_ERROR));
} else if (AssistantHeaderModel.PROGRESS_VISIBLE == propertyKey) {
view.updateProgressBarVisibility(model.get(AssistantHeaderModel.PROGRESS_VISIBLE));
} else if (AssistantHeaderModel.STEP_PROGRESS_BAR_ICONS == propertyKey) {
view.mStepProgressBar.setSteps(model.get(AssistantHeaderModel.STEP_PROGRESS_BAR_ICONS));
view.mStepProgressBar.disableAnimations(
model.get(AssistantHeaderModel.DISABLE_ANIMATIONS_FOR_TESTING));
} else if (AssistantHeaderModel.SPIN_POODLE == propertyKey) {
view.mPoodle.setSpinEnabled(model.get(AssistantHeaderModel.SPIN_POODLE));
} else if (AssistantHeaderModel.FEEDBACK_BUTTON_CALLBACK == propertyKey) {
setProfileMenuListener(view, model.get(AssistantHeaderModel.FEEDBACK_BUTTON_CALLBACK));
} else if (AssistantHeaderModel.CHIPS == propertyKey) {
view.mChipsContainer.invalidateItemDecorations();
((AssistantChipAdapter) view.mChipsContainer.getAdapter())
.setChips(model.get(AssistantHeaderModel.CHIPS));
maybeShowChips(model, view);
} else if (AssistantHeaderModel.CHIPS_VISIBLE == propertyKey) {
maybeShowChips(model, view);
} else if (AssistantHeaderModel.BUBBLE_MESSAGE == propertyKey) {
showOrDismissBubble(model, view);
} else if (AssistantHeaderModel.TTS_BUTTON_VISIBLE == propertyKey) {
showOrHideTtsButton(model, view);
} else if (AssistantHeaderModel.TTS_BUTTON_STATE == propertyKey) {
setTtsButtonState(view, model.get(AssistantHeaderModel.TTS_BUTTON_STATE));
} else if (AssistantHeaderModel.TTS_BUTTON_CALLBACK == propertyKey) {
setTtsButtonClickListener(view, model.get(AssistantHeaderModel.TTS_BUTTON_CALLBACK));
} else if (AssistantHeaderModel.DISABLE_ANIMATIONS_FOR_TESTING == propertyKey) {
view.disableAnimations(model.get(AssistantHeaderModel.DISABLE_ANIMATIONS_FOR_TESTING));
} else {
assert false : "Unhandled property detected in AssistantHeaderViewBinder!";
}
}
private void maybeShowChips(AssistantHeaderModel model, ViewHolder view) {
// The PostTask is necessary as a workaround for the sticky button occasionally not showing,
// this makes sure that the change happens after any possibly clashing animation currently
// happening.
// TODO(b/164389932): Figure out a better fix that doesn't require issuing the change in the
// following UI iteration.
PostTask.postTask(UiThreadTaskTraits.DEFAULT, () -> {
if (model.get(AssistantHeaderModel.CHIPS_VISIBLE)
&& !model.get(AssistantHeaderModel.CHIPS).isEmpty()) {
view.mChipsContainer.setVisibility(View.VISIBLE);
view.mProfileIconView.setVisibility(View.GONE);
} else {
view.mChipsContainer.setVisibility(View.GONE);
view.mProfileIconView.setVisibility(View.VISIBLE);
}
});
}
private void setProfileMenuListener(ViewHolder view, @Nullable Runnable feedbackCallback) {
view.mProfileIconMenu.setOnMenuItemClickListener(item -> {
int itemId = item.getItemId();
if (itemId == R.id.settings) {
SettingsLauncher settingsLauncher = new SettingsLauncherImpl();
settingsLauncher.launchSettingsActivity(
view.mHeader.getContext(), AutofillAssistantPreferenceFragment.class);
return true;
} else if (itemId == R.id.send_feedback) {
if (feedbackCallback != null) {
feedbackCallback.run();
}
return true;
}
return false;
});
}
private void showOrDismissBubble(AssistantHeaderModel model, ViewHolder view) {
String message = model.get(AssistantHeaderModel.BUBBLE_MESSAGE);
if (message.isEmpty() && view.mTextBubble == null) {
return;
}
if (message.isEmpty() && view.mTextBubble != null) {
view.mTextBubble.dismiss();
view.mTextBubble = null;
return;
}
View poodle = view.mPoodle.getView();
ViewRectProvider anchorRectProvider = new ViewRectProvider(poodle);
int topOffset = view.mContext.getResources().getDimensionPixelSize(
R.dimen.autofill_assistant_root_view_top_padding)
+ TEXT_BUBBLE_PIXELS_ABOVE_SHEET;
anchorRectProvider.setInsetPx(0, -topOffset, 0, 0);
view.mTextBubble = new TextBubble(
/*context = */ view.mContext, /*rootView = */ poodle, /*contentString = */ message,
/*accessibilityString = */ message, /*showArrow = */ true,
/*anchorRectProvider = */ anchorRectProvider,
mAccessibilityUtil.isAccessibilityEnabled());
view.mTextBubble.setDismissOnTouchInteraction(true);
view.mTextBubble.show();
}
private void showOrHideTtsButton(AssistantHeaderModel model, ViewHolder view) {
if (model.get(AssistantHeaderModel.TTS_BUTTON_VISIBLE)) {
view.mTtsButton.setVisibility(View.VISIBLE);
} else {
view.mTtsButton.setVisibility(View.GONE);
}
}
private void setTtsButtonClickListener(ViewHolder view, @Nullable Runnable ttsButtonCallback) {
view.mTtsButton.setOnClickListener(unusedView -> {
if (ttsButtonCallback != null) {
ttsButtonCallback.run();
}
});
}
private void setTtsButtonState(ViewHolder view, @AssistantTtsButtonState int state) {
switch (state) {
case AssistantTtsButtonState.DEFAULT:
view.mTtsButton.setImageResource(R.drawable.ic_volume_on_white_24dp);
view.mTtsButton.setTag(AssistantTagsForTesting.TTS_ENABLED_ICON_TAG);
break;
case AssistantTtsButtonState.PLAYING:
view.mTtsButton.setImageResource(R.drawable.ic_volume_on_white_24dp);
view.mTtsButton.setTag(AssistantTagsForTesting.TTS_PLAYING_ICON_TAG);
break;
case AssistantTtsButtonState.DISABLED:
view.mTtsButton.setImageResource(R.drawable.ic_volume_off_white_24dp);
view.mTtsButton.setTag(AssistantTagsForTesting.TTS_DISABLED_ICON_TAG);
break;
}
}
}
| {
"content_hash": "84efde17ea26b1fbda9671c5edc80317",
"timestamp": "",
"source": "github",
"line_count": 247,
"max_line_length": 100,
"avg_line_length": 50.59919028340081,
"alnum_prop": 0.6826692270763323,
"repo_name": "ric2b/Vivaldi-browser",
"id": "48ee960d44d27413206db78a8e5b65cf77a71e7d",
"size": "12498",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "chromium/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/header/AssistantHeaderViewBinder.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- appworks script (this will be a 404 during development) -->
<script src="appworks.min.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
</head>
<body ng-app="starter">
<!--The nav bar that will be updated as we navigate between views.-->
<ion-nav-bar class="bar-stable">
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-nav-view></ion-nav-view>
</body>
</html> | {
"content_hash": "2c297d12f5ec2e2093e1c8348e1f831a",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 107,
"avg_line_length": 31.5,
"alnum_prop": 0.6359126984126984,
"repo_name": "opentext/appworks-js-api-docs",
"id": "9005631d4e433e22c6de9415f67e723e31eacddb",
"size": "1008",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/templates/examples/sample-index.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "42290"
},
{
"name": "JavaScript",
"bytes": "36455"
}
],
"symlink_target": ""
} |
"use strict";
import APIDispatcher from "../dispatcher/APIDispatcher";
import Constants from "../Constants";
import Flux from "flux/utils";
var domain = null;
var accessToken = null;
/** @ignore */
const { Store } = Flux;
/**
* The session store
*
* This class doesn't inherit from the base store. Instead, it handles the `SET_SESSION` event. This event expects a
* domain and accessToken property.
*/
class SessionStore extends Store {
/**
* Gets the domain for the session's shop
*
* @return {string}
*/
getDomain() {
return domain;
}
/**
* Gets the API access token register for this session
*
* @return {string}
*/
getAccessToken() {
return accessToken;
}
__onDispatch(action) {
switch(action.actionType) {
case Constants.Actions.SET_SESSION:
domain = action.domain;
accessToken = action.accessToken;
this.__emitChange();
break;
default:
// no-op
}
}
}
/** @ignore */
export default new SessionStore(APIDispatcher);
| {
"content_hash": "8230e5de5b9ce619d60db80ed60229d3",
"timestamp": "",
"source": "github",
"line_count": 52,
"max_line_length": 116,
"avg_line_length": 20.442307692307693,
"alnum_prop": 0.6199435559736595,
"repo_name": "pseudomuto/shopify-api-flux",
"id": "1c59831234b7879a52e9b6cdf98b59a4eec41a6b",
"size": "1063",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/stores/SessionStore.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "96583"
}
],
"symlink_target": ""
} |
title: Operations guide
---
| {
"content_hash": "00826124ed8b99d64b761d302bc5e921",
"timestamp": "",
"source": "github",
"line_count": 2,
"max_line_length": 23,
"avg_line_length": 14,
"alnum_prop": 0.7142857142857143,
"repo_name": "dannysauer/etcd",
"id": "7c83507f6a1e41784d7e32adb6e7c30235227a28",
"size": "32",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "Documentation/op-guide/_index.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "51"
},
{
"name": "Dockerfile",
"bytes": "6330"
},
{
"name": "Go",
"bytes": "4895131"
},
{
"name": "Makefile",
"bytes": "19954"
},
{
"name": "PowerShell",
"bytes": "2718"
},
{
"name": "Shell",
"bytes": "104854"
}
],
"symlink_target": ""
} |
class TTRegion {
public:
TTRegion() {};
TTRegion(city_coordinate region_min_x, city_coordinate region_max_x,
city_coordinate region_min_y, city_coordinate region_max_y) {
min_x = region_min_x;
max_x = region_max_x;
min_y = region_min_y;
max_y = region_max_y;
};
~TTRegion() {};
boolean inside(city_coordinate x, city_coordinate y) {
return(x >= min_x && x <= max_x && y >= min_y && y <= max_y);
};
void region_center(city_coordinate ¢er_x,
city_coordinate ¢er_y) {
center_x = (min_x+max_x)/2;
center_y = (min_y+max_y)/2;
};
void region_size(city_coordinate &width, city_coordinate &height) {
width = max_x-min_x;
height = max_y-min_y;
};
boolean partly_inside(city_coordinate r_min_x, city_coordinate r_max_x,
city_coordinate r_min_y, city_coordinate r_max_y) {
return(r_min_x < max_x && r_max_x > min_x &&
r_min_y < max_y && r_max_y > min_y);
};
boolean contains(TTRegion *another) {
return(min_x <= another->min_x &&
max_x >= another->max_x &&
min_y <= another->min_y &&
max_y >= another->max_y);
};
boolean contains(TTRegion &another) {
return(min_x <= another.min_x &&
max_x >= another.max_x &&
min_y <= another.min_y &&
max_y >= another.max_y);
};
boolean overlaps(TTRegion *another) {
return(!(another->min_x > max_x ||
another->max_x < min_x ||
min_x > another->max_x ||
max_x < another->min_x ||
another->min_y > max_y ||
another->max_y < min_y ||
min_y > another->max_y ||
max_y < another->min_y));
};
boolean overlaps(TTRegion &another) {
return(!(another.min_x > max_x ||
another.max_x < min_x ||
min_x > another.max_x ||
max_x < another.min_x ||
another.min_y > max_y ||
another.max_y < min_y ||
min_y > another.max_y ||
max_y < another.min_y));
};
void extend_with(TTRegion &another);
boolean mostly_contains(TTRegion *another);
city_coordinate width() {
return(max_x-min_x);
};
city_coordinate height() {
return(max_y-min_y);
};
void intersect_with(TTRegion &other_region, TTRegion &result);
void move_inside(TTRegion &container_region,
city_coordinate &delta_x, city_coordinate &delta_y);
void print(output_stream &stream);
void grow_by(int x_factor, int y_factor);
void shift_by(city_coordinate delta_x, city_coordinate delta_y);
#if TT_ALPHA
city_coordinate random_x();
city_coordinate random_y();
#endif
// yes, the following is public...
city_coordinate min_x, max_x, min_y, max_y;
};
#endif
| {
"content_hash": "b7a39cf31a0798ed0c986a4c9c7dbd9b",
"timestamp": "",
"source": "github",
"line_count": 83,
"max_line_length": 77,
"avg_line_length": 33.57831325301205,
"alnum_prop": 0.5583064226767133,
"repo_name": "ToonTalk/desktop-toontalk",
"id": "8592851db727a052ffe20dfef3b5c99d23a83a01",
"size": "2918",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "source/Region.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "4245"
},
{
"name": "C",
"bytes": "453919"
},
{
"name": "C++",
"bytes": "7830184"
},
{
"name": "HTML",
"bytes": "1649683"
},
{
"name": "JavaScript",
"bytes": "160463"
},
{
"name": "Makefile",
"bytes": "56712"
},
{
"name": "Objective-C",
"bytes": "14779"
},
{
"name": "Python",
"bytes": "24"
},
{
"name": "Scilab",
"bytes": "2"
},
{
"name": "Shell",
"bytes": "1384"
}
],
"symlink_target": ""
} |
@class BaseRequest, NSString;
@interface GetBizIapPayResultRequest : WXPBGeneratedMessage
{
}
+ (void)initialize;
// Remaining properties
@property(retain, nonatomic) BaseRequest *baseRequest; // @dynamic baseRequest;
@property(retain, nonatomic) NSString *serialId; // @dynamic serialId;
@end
| {
"content_hash": "9a46031fb35901b2a8fce003e2fff1cf",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 79,
"avg_line_length": 21.357142857142858,
"alnum_prop": 0.7725752508361204,
"repo_name": "walkdianzi/DashengHook",
"id": "ef4480769618c2ebd29b35d5e88ea577785f000e",
"size": "472",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "WeChat-Headers/GetBizIapPayResultRequest.h",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "986"
},
{
"name": "Objective-C",
"bytes": "10153542"
},
{
"name": "Objective-C++",
"bytes": "18332"
},
{
"name": "Shell",
"bytes": "1459"
}
],
"symlink_target": ""
} |
package com.bitdecay.game.event;
import com.bitdecay.game.trait.IEvent;
public class ExplosionEvent implements IEvent {}
| {
"content_hash": "4bd195de4d679dac7fcb91261ad49b2f",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 48,
"avg_line_length": 24.6,
"alnum_prop": 0.8130081300813008,
"repo_name": "bitDecayGames/LudumDare39",
"id": "3bb48e00d82bde078f0822cda3eb11afaee49020",
"size": "123",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/com/bitdecay/game/event/ExplosionEvent.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "230648"
},
{
"name": "OpenEdge ABL",
"bytes": "2187"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 Actor LLC. <https://actor.im>
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="248dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/avatar_bgrnd"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
<im.actor.sdk.view.avatar.CoverAvatarView
android:id="@+id/avatar"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_gravity="bottom"
android:gravity="center_vertical|left"
android:orientation="vertical"
android:paddingLeft="72dp"
android:paddingRight="24dp">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-2dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:lines="1"
android:singleLine="true"
android:textSize="26sp" />
<TextView
android:id="@+id/theme_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-2dp"
android:textSize="14sp"
android:visibility="gone" />
<TextView
android:id="@+id/createdBy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-2dp"
android:textSize="14sp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="@drawable/card_shadow_top" />
</FrameLayout>
<LinearLayout
android:id="@+id/descriptionContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="vertical"
android:visibility="gone">
<!--<LinearLayout-->
<!--android:id="@+id/themeContainer"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="72dp"-->
<!--android:layout_gravity="center_vertical"-->
<!--android:background="@drawable/clickable_background"-->
<!--android:gravity="center_vertical"-->
<!--android:orientation="vertical"-->
<!--android:paddingLeft="72dp"-->
<!--android:paddingRight="8dp">-->
<!--<TextView-->
<!--android:id="@+id/theme"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:textSize="18sp" />-->
<!--<TextView-->
<!--android:id="@+id/group_theme_hint"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="@string/theme_group"-->
<!--android:textSize="16sp" />-->
<!--</LinearLayout>-->
<!--<im.actor.sdk.view.DividerView-->
<!--android:id="@+id/themeDivider"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginLeft="72dp" />-->
<LinearLayout
android:id="@+id/aboutContainer"
android:layout_width="match_parent"
android:layout_height="72dp"
android:layout_gravity="center_vertical"
android:background="@drawable/clickable_background"
android:gravity="center_vertical"
android:orientation="vertical"
android:paddingLeft="72dp"
android:paddingRight="8dp">
<TextView
android:id="@+id/about"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp" />
<TextView
android:id="@+id/about_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_group"
android:textSize="16sp" />
</LinearLayout>
<FrameLayout
android:id="@+id/after_about_divider"
android:layout_width="match_parent"
android:layout_height="16dp">
<View
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_gravity="top"
android:background="@drawable/card_shadow_bottom" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="@drawable/card_shadow_top" />
</FrameLayout>
</LinearLayout>
<TextView
android:id="@+id/settings_header_text"
android:layout_width="match_parent"
android:layout_height="48dp"
android:gravity="center_vertical|left"
android:paddingLeft="72dp"
android:text="@string/profile_settings_header"
android:textSize="16sp" />
<LinearLayout
android:id="@+id/notificationsCont"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/selector"
android:paddingRight="8dp">
<im.actor.sdk.view.TintImageView
android:id="@+id/settings_notification_icon"
android:layout_width="72dp"
android:layout_height="match_parent"
app:src="@drawable/ic_notifications_white_18dp" />
<TextView
android:id="@+id/settings_notifications_title"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/profile_settings_notifications"
android:textSize="16sp" />
<android.support.v7.widget.SwitchCompat
android:id="@+id/enableNotifications"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<FrameLayout
android:id="@+id/after_settings_divider"
android:layout_width="match_parent"
android:layout_height="16dp">
<View
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_gravity="top"
android:background="@drawable/card_shadow_bottom" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="@drawable/card_shadow_top" />
</FrameLayout>
<LinearLayout
android:id="@+id/sharedContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/shared_header_text"
android:layout_width="match_parent"
android:layout_height="48dp"
android:gravity="center_vertical|left"
android:paddingLeft="72dp"
android:text="@string/profile_shared_header"
android:textSize="16sp" />
<LinearLayout
android:id="@+id/mediaContainer"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/clickable_background"
android:paddingRight="8dp"
android:visibility="gone">
<im.actor.sdk.view.TintImageView
android:id="@+id/share_media_icon"
android:layout_width="72dp"
android:layout_height="match_parent"
app:src="@drawable/conv_attach_gallery" />
<TextView
android:id="@+id/settings_media_title"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/profile_shared_media"
android:textSize="16sp" />
<TextView
android:id="@+id/mediaCount"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:paddingRight="16dp"
android:textSize="16sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/docsContainer"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/clickable_background"
android:paddingRight="8dp">
<im.actor.sdk.view.TintImageView
android:id="@+id/share_docs_icon"
android:layout_width="72dp"
android:layout_height="match_parent"
app:src="@drawable/conv_attach_file" />
<TextView
android:id="@+id/share_docs_title"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/profile_shared_files"
android:textSize="16sp" />
<TextView
android:id="@+id/docCount"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:paddingRight="16dp"
android:textSize="16sp" />
</LinearLayout>
<FrameLayout
android:id="@+id/bottom_divider"
android:layout_width="match_parent"
android:layout_height="16dp">
<View
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_gravity="top"
android:background="@drawable/card_shadow_bottom" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="@drawable/card_shadow_top" />
</FrameLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/membersTitle"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:gravity="center_vertical|left"
android:paddingLeft="72dp"
android:text="@string/group_members_header"
android:textSize="16sp" />
<TextView
android:id="@+id/membersCount"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:paddingRight="16dp"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout> | {
"content_hash": "5ce068a77ae1cd4f42b738fd81d2858a",
"timestamp": "",
"source": "github",
"line_count": 336,
"max_line_length": 72,
"avg_line_length": 35.663690476190474,
"alnum_prop": 0.5521989485103898,
"repo_name": "ljshj/actor-platform",
"id": "3c761a25a9b86a73411cb9bff7c1f7f51aba503a",
"size": "11983",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/fragment_group_header.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "2575"
},
{
"name": "CSS",
"bytes": "84420"
},
{
"name": "HTML",
"bytes": "2562"
},
{
"name": "Java",
"bytes": "3685846"
},
{
"name": "JavaScript",
"bytes": "310291"
},
{
"name": "Makefile",
"bytes": "3630"
},
{
"name": "Objective-C",
"bytes": "239045"
},
{
"name": "PLSQL",
"bytes": "66"
},
{
"name": "Protocol Buffer",
"bytes": "29116"
},
{
"name": "Python",
"bytes": "5803"
},
{
"name": "Ruby",
"bytes": "2728"
},
{
"name": "SQLPL",
"bytes": "99"
},
{
"name": "Scala",
"bytes": "1241984"
},
{
"name": "Shell",
"bytes": "12028"
},
{
"name": "Swift",
"bytes": "638635"
}
],
"symlink_target": ""
} |
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Xml;
using System.Xml.Serialization;
namespace MusicXMLUtils.Structure
{
[GeneratedCode("xsd", "4.0.30319.18020")]
[Serializable]
[DebuggerStepThrough]
[DesignerCategory("code")]
[XmlType(TypeName = "staff-tuning")]
public class StaffTuning
{
#region -- Public Properties --
[XmlElement("tuning-step")]
public Step TuningStep { get; set; }
[XmlElement("tuning-alter")]
public decimal TuningAlter { get; set; }
[XmlIgnore]
public bool TuningAlterSpecified { get; set; }
[XmlElement("tuning-octave", DataType = "integer")]
public string TuningOctave { get; set; }
[XmlAttribute("line", DataType = "integer")]
public string Line { get; set; }
#endregion
}
}
| {
"content_hash": "8a6ab161ed7a111b32bb388f24ff5bf0",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 59,
"avg_line_length": 25.083333333333332,
"alnum_prop": 0.6378737541528239,
"repo_name": "nanase/MusicXMLUtils",
"id": "fca974e12ac4bc429aead8c63a28738914851201",
"size": "2065",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "MusicXMLUtils/Structure/Staff/StaffTuning.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "595011"
}
],
"symlink_target": ""
} |
FROM kbase/sdkbase2:python
MAINTAINER KBase Developer
# -----------------------------------------
# In this section, you can install any system dependencies required
# to run your App. For instance, you could place an apt-get update or
# install line here, a git checkout to download code, or run any other
# installation scripts.
RUN apt-get update
# To install all the dependencies
RUN apt-get update && apt-get install -y build-essential wget make curl unzip python && \
apt-get install -y r-base r-cran-gplots
# Install X spoof execution wrapper (for plotting)
RUN apt-get -y install xvfb
RUN pip install matplotlib
# -----------------------------------------
COPY ./ /kb/module
RUN mkdir -p /kb/module/work
RUN chmod -R a+rw /kb/module
WORKDIR /kb/module
RUN make all
ENTRYPOINT [ "./scripts/entrypoint.sh" ]
CMD [ ]
| {
"content_hash": "b81b6dccf67b8a9428c51456107e4585",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 89,
"avg_line_length": 26.15625,
"alnum_prop": 0.6678614097968937,
"repo_name": "dcchivian/kb_assembly_compare",
"id": "2f72cb7a754e91a21e2296fe4430556916edffaf",
"size": "837",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Dockerfile",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Dockerfile",
"bytes": "857"
},
{
"name": "Java",
"bytes": "20706"
},
{
"name": "JavaScript",
"bytes": "6275"
},
{
"name": "Makefile",
"bytes": "3024"
},
{
"name": "Perl",
"bytes": "23762"
},
{
"name": "Python",
"bytes": "1003482"
},
{
"name": "Ruby",
"bytes": "2827"
},
{
"name": "Shell",
"bytes": "975"
}
],
"symlink_target": ""
} |
package io.wcm.caravan.hal.comparison.impl;
import io.wcm.caravan.hal.comparison.HalComparisonContext;
/**
* Adds context information to any exception that occurs when loading external resources.
*/
public class HalComparisonException extends RuntimeException {
private static final long serialVersionUID = 1L;
private final HalComparisonContext halContext;
private final String contextUrl;
/**
* @param halContext of the resource that failed to load
* @param contextUrl URL of the resource that contains the link to this resource
* @param cause the original exception
*/
public HalComparisonException(HalComparisonContext halContext, String contextUrl, Throwable cause) {
super("Failed to load resource with HAL path " + halContext + " that was linked from " + contextUrl, cause);
this.halContext = halContext;
this.contextUrl = contextUrl;
}
public HalComparisonContext getHalContext() {
return this.halContext;
}
public String getContextUrl() {
return this.contextUrl;
}
}
| {
"content_hash": "f61a5b06744a88f55bab2d47820e6c87",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 112,
"avg_line_length": 30.529411764705884,
"alnum_prop": 0.7543352601156069,
"repo_name": "wcm-io-caravan/caravan-hal",
"id": "f717f0a7450859521717a5ae3be6758abaedf5e8",
"size": "1665",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "comparison/src/main/java/io/wcm/caravan/hal/comparison/impl/HalComparisonException.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "1345"
},
{
"name": "HTML",
"bytes": "9238"
},
{
"name": "Java",
"bytes": "343480"
},
{
"name": "JavaScript",
"bytes": "21817"
}
],
"symlink_target": ""
} |
class CefDownloadItemCallbackCToCpp
: public CefCToCppRefCounted<CefDownloadItemCallbackCToCpp,
CefDownloadItemCallback, cef_download_item_callback_t> {
public:
CefDownloadItemCallbackCToCpp();
// CefDownloadItemCallback methods.
void Cancel() OVERRIDE;
void Pause() OVERRIDE;
void Resume() OVERRIDE;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_
| {
"content_hash": "42eeee9facbc254b49768e099107084a",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 65,
"avg_line_length": 30.384615384615383,
"alnum_prop": 0.7670886075949367,
"repo_name": "arkenthera/cef3d",
"id": "494aca7ce25fcf71fe3ff630ede4b1c523f23999",
"size": "1402",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "1028782"
},
{
"name": "C++",
"bytes": "2887899"
},
{
"name": "CMake",
"bytes": "118535"
},
{
"name": "HLSL",
"bytes": "821"
},
{
"name": "Python",
"bytes": "82527"
}
],
"symlink_target": ""
} |
(function($) {
$(document).ready(function(){
align_info();
$(window).resize(function(){
align_info();
});
// CSS3 Transitions.
jQuery('.ultb3-box .ultb3-info').each(function(){
if(jQuery(this).attr('data-animation')) {
jQuery(this).css('opacity','0');
var animationName = jQuery(this).attr('data-animation'),
animationDelay = "delay-"+jQuery(this).attr('data-animation-delay');
jQuery(this).bsf_appear(function() {
var $this = jQuery(this);
//$this.css('opacity','0');
//setTimeout(function(){
$this.addClass('animated').addClass(animationName);
$this.addClass('animated').addClass(animationDelay);
$this.css('opacity','1');
//},1000);
},{accY: -70});
}
});
});
$(window).load(function(){
align_info();
});
function align_info()
{
$('.ultb3-box').each(function(i,ib){
var ib_height = $(ib).outerHeight();
var ib_info_height = $(ib).find('.ultb3-info').outerHeight();
var diff = (ib_height-ib_info_height)/2;
$(ib).find('.ultb3-info').css({'top':diff});
});
}
}( jQuery )); | {
"content_hash": "a92a3f350f155037bb82c3bac4214f2c",
"timestamp": "",
"source": "github",
"line_count": 41,
"max_line_length": 73,
"avg_line_length": 27.463414634146343,
"alnum_prop": 0.5657193605683837,
"repo_name": "cimocimocimo/staydrysystems.com",
"id": "24dd5ae0810f1cf8467096e1ed8f7da752ecf2e7",
"size": "1126",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "web/app/plugins/Ultimate_VC_Addons/assets/js/info-banner.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "3511566"
},
{
"name": "HTML",
"bytes": "409791"
},
{
"name": "Hack",
"bytes": "3132"
},
{
"name": "JavaScript",
"bytes": "4604537"
},
{
"name": "PHP",
"bytes": "18711665"
},
{
"name": "XSLT",
"bytes": "4267"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<title>EventService tests</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../node_modules/chai/chai.js"></script>
<script src="../node_modules/sinon/pkg/sinon.js"></script>
<script>
var expect = chai.expect;
mocha.setup('bdd');
</script>
<script src="./EventService.bundle.test.js"></script>
</head>
<body>
<div id="mocha"></div>
<script>
mocha.run();
</script>
</body>
</html> | {
"content_hash": "8d1e638f2ca553f0a3fd33502a009287",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 66,
"avg_line_length": 25.045454545454547,
"alnum_prop": 0.6134301270417423,
"repo_name": "chi-mai2b/EventService",
"id": "c00866bfa198085236809d6af91bf7ab4a5738f6",
"size": "551",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/index.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1650"
},
{
"name": "CoffeeScript",
"bytes": "36430"
},
{
"name": "JavaScript",
"bytes": "526835"
},
{
"name": "Shell",
"bytes": "144"
}
],
"symlink_target": ""
} |
require 'octokit/connection'
require 'octokit/warnable'
require 'octokit/arguments'
require 'octokit/repo_arguments'
require 'octokit/configurable'
require 'octokit/authentication'
require 'octokit/gist'
require 'octokit/rate_limit'
require 'octokit/repository'
require 'octokit/user'
require 'octokit/organization'
require 'octokit/preview'
require 'octokit/client/apps'
require 'octokit/client/authorizations'
require 'octokit/client/commits'
require 'octokit/client/commit_comments'
require 'octokit/client/contents'
require 'octokit/client/downloads'
require 'octokit/client/deployments'
require 'octokit/client/emojis'
require 'octokit/client/events'
require 'octokit/client/feeds'
require 'octokit/client/gists'
require 'octokit/client/gitignore'
require 'octokit/client/hooks'
require 'octokit/client/issues'
require 'octokit/client/labels'
require 'octokit/client/legacy_search'
require 'octokit/client/licenses'
require 'octokit/client/meta'
require 'octokit/client/markdown'
require 'octokit/client/marketplace'
require 'octokit/client/milestones'
require 'octokit/client/notifications'
require 'octokit/client/objects'
require 'octokit/client/organizations'
require 'octokit/client/pages'
require 'octokit/client/projects'
require 'octokit/client/pub_sub_hubbub'
require 'octokit/client/pull_requests'
require 'octokit/client/rate_limit'
require 'octokit/client/reactions'
require 'octokit/client/refs'
require 'octokit/client/releases'
require 'octokit/client/repositories'
require 'octokit/client/repository_invitations'
require 'octokit/client/reviews'
require 'octokit/client/say'
require 'octokit/client/search'
require 'octokit/client/service_status'
require 'octokit/client/source_import'
require 'octokit/client/stats'
require 'octokit/client/statuses'
require 'octokit/client/traffic'
require 'octokit/client/users'
require 'ext/sawyer/relation'
module Octokit
# Client for the GitHub API
#
# @see https://developer.github.com
class Client
include Octokit::Authentication
include Octokit::Configurable
include Octokit::Connection
include Octokit::Preview
include Octokit::Warnable
include Octokit::Client::Authorizations
include Octokit::Client::Commits
include Octokit::Client::CommitComments
include Octokit::Client::Contents
include Octokit::Client::Deployments
include Octokit::Client::Downloads
include Octokit::Client::Emojis
include Octokit::Client::Events
include Octokit::Client::Feeds
include Octokit::Client::Gists
include Octokit::Client::Gitignore
include Octokit::Client::Hooks
include Octokit::Client::Apps
include Octokit::Client::Issues
include Octokit::Client::Labels
include Octokit::Client::LegacySearch
include Octokit::Client::Licenses
include Octokit::Client::Meta
include Octokit::Client::Markdown
include Octokit::Client::Marketplace
include Octokit::Client::Milestones
include Octokit::Client::Notifications
include Octokit::Client::Objects
include Octokit::Client::Organizations
include Octokit::Client::Pages
include Octokit::Client::Projects
include Octokit::Client::PubSubHubbub
include Octokit::Client::PullRequests
include Octokit::Client::RateLimit
include Octokit::Client::Reactions
include Octokit::Client::Refs
include Octokit::Client::Releases
include Octokit::Client::Repositories
include Octokit::Client::RepositoryInvitations
include Octokit::Client::Reviews
include Octokit::Client::Say
include Octokit::Client::Search
include Octokit::Client::ServiceStatus
include Octokit::Client::SourceImport
include Octokit::Client::Stats
include Octokit::Client::Statuses
include Octokit::Client::Traffic
include Octokit::Client::Users
# Header keys that can be passed in options hash to {#get},{#head}
CONVENIENCE_HEADERS = Set.new([:accept, :content_type])
def initialize(options = {})
# Use options passed in, but fall back to module defaults
Octokit::Configurable.keys.each do |key|
instance_variable_set(:"@#{key}", options[key] || Octokit.instance_variable_get(:"@#{key}"))
end
login_from_netrc unless user_authenticated? || application_authenticated?
end
# Text representation of the client, masking tokens and passwords
#
# @return [String]
def inspect
inspected = super
# mask password
inspected = inspected.gsub! @password, "*******" if @password
inspected = inspected.gsub! @management_console_password, "*******" if @management_console_password
inspected = inspected.gsub! @bearer_token, '********' if @bearer_token
# Only show last 4 of token, secret
if @access_token
inspected = inspected.gsub! @access_token, "#{'*'*36}#{@access_token[36..-1]}"
end
if @client_secret
inspected = inspected.gsub! @client_secret, "#{'*'*36}#{@client_secret[36..-1]}"
end
inspected
end
# Duplicate client using client_id and client_secret as
# Basic Authentication credentials.
# @example
# Octokit.client_id = "foo"
# Octokit.client_secret = "bar"
#
# # GET https://api.github.com/?client_id=foo&client_secret=bar
# Octokit.get "/"
#
# Octokit.client.as_app do |client|
# # GET https://foo:bar@api.github.com/
# client.get "/"
# end
def as_app(key = client_id, secret = client_secret, &block)
if key.to_s.empty? || secret.to_s.empty?
raise ApplicationCredentialsRequired, "client_id and client_secret required"
end
app_client = self.dup
app_client.client_id = app_client.client_secret = nil
app_client.login = key
app_client.password = secret
yield app_client if block_given?
end
# Set username for authentication
#
# @param value [String] GitHub username
def login=(value)
reset_agent
@login = value
end
# Set password for authentication
#
# @param value [String] GitHub password
def password=(value)
reset_agent
@password = value
end
# Set OAuth access token for authentication
#
# @param value [String] 40 character GitHub OAuth access token
def access_token=(value)
reset_agent
@access_token = value
end
# Set Bearer Token for authentication
#
# @param value [String] JWT
def bearer_token=(value)
reset_agent
@bearer_token = value
end
# Set OAuth app client_id
#
# @param value [String] 20 character GitHub OAuth app client_id
def client_id=(value)
reset_agent
@client_id = value
end
# Set OAuth app client_secret
#
# @param value [String] 40 character GitHub OAuth app client_secret
def client_secret=(value)
reset_agent
@client_secret = value
end
def client_without_redirects(options = {})
conn_opts = @connection_options
conn_opts[:url] = @api_endpoint
conn_opts[:builder] = @middleware.dup if @middleware
conn_opts[:proxy] = @proxy if @proxy
conn_opts[:ssl] = { :verify_mode => @ssl_verify_mode } if @ssl_verify_mode
conn = Faraday.new(conn_opts) do |http|
if basic_authenticated?
http.basic_auth(@login, @password)
elsif token_authenticated?
http.authorization 'token', @access_token
elsif bearer_authenticated?
http.authorization 'Bearer', @bearer_token
end
http.headers['accept'] = options[:accept] if options.key?(:accept)
end
conn.builder.delete(Octokit::Middleware::FollowRedirects)
conn
end
end
end
| {
"content_hash": "df0196fec63f6941a2da4fa936b108dd",
"timestamp": "",
"source": "github",
"line_count": 241,
"max_line_length": 105,
"avg_line_length": 31.900414937759336,
"alnum_prop": 0.6971904266389178,
"repo_name": "JuanitoFatas/octokit.rb",
"id": "d519f9e91bbaf1abdb1d8a33324a679e46ca56b4",
"size": "7688",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "lib/octokit/client.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "38"
},
{
"name": "Ruby",
"bytes": "653055"
},
{
"name": "Shell",
"bytes": "1186"
}
],
"symlink_target": ""
} |
/* Engine.js
* This file provides the game loop functionality (update entities and render),
* draws the initial game board on the screen, and then calls the update and
* render methods on your player and enemy objects (defined in your app.js).
*
* A game engine works by drawing the entire game screen over and over, kind of
* like a flipbook you may have created as a kid. When your player moves across
* the screen, it may look like just that image/character is moving or being
* drawn but that is not the case. What's really happening is the entire "scene"
* is being drawn over and over, presenting the illusion of animation.
*
* This engine is available globally via the Engine variable and it also makes
* the canvas' context (ctx) object globally available to make writing app.js
* a little simpler to work with.
*/
var Engine = (function(global) {
/* Predefine the variables we'll be using within this scope,
* create the canvas element, grab the 2D context for that canvas
* set the canvas elements height/width and add it to the DOM.
*/
var doc = global.document,
win = global.window,
canvas = doc.createElement('canvas'),
ctx = canvas.getContext('2d'),
lastTime;
canvas.width = 505;
canvas.height = 606;
doc.body.appendChild(canvas);
/* This function serves as the kickoff point for the game loop itself
* and handles properly calling the update and render methods.
*/
function main() {
/* Get our time delta information which is required if your game
* requires smooth animation. Because everyone's computer processes
* instructions at different speeds we need a constant value that
* would be the same for everyone (regardless of how fast their
* computer is) - hurray time!
*/
var now = Date.now(),
dt = (now - lastTime) / 1000.0;
/* Call our update/render functions, pass along the time delta to
* our update function since it may be used for smooth animation.
*/
update(dt);
render();
/* Set our lastTime variable which is used to determine the time delta
* for the next time this function is called.
*/
lastTime = now;
/* Use the browser's requestAnimationFrame function to call this
* function again as soon as the browser is able to draw another frame.
*/
win.requestAnimationFrame(main);
}
/* This function does some initial setup that should only occur once,
* particularly setting the lastTime variable that is required for the
* game loop.
*/
function init() {
reset();
lastTime = Date.now();
main();
}
/* This function is called by main (our game loop) and itself calls all
* of the functions which may need to update entity's data. Based on how
* you implement your collision detection (when two entities occupy the
* same space, for instance when your character should die), you may find
* the need to add an additional function call here. For now, we've left
* it commented out - you may or may not want to implement this
* functionality this way (you could just implement collision detection
* on the entities themselves within your app.js file).
*/
function update(dt) {
updateEntities(dt);
// checkCollisions();
}
/* This is called by the update function and loops through all of the
* objects within your allEnemies array as defined in app.js and calls
* their update() methods. It will then call the update function for your
* player object. These update methods should focus purely on updating
* the data/properties related to the object. Do your drawing in your
* render methods.
*/
function updateEntities(dt) {
allEnemies.forEach(function(enemy) {
enemy.update(dt);
});
player.update();
}
/* This function initially draws the "game level", it will then call
* the renderEntities function. Remember, this function is called every
* game tick (or loop of the game engine) because that's how games work -
* they are flipbooks creating the illusion of animation but in reality
* they are just drawing the entire screen over and over.
*/
function render() {
/* This array holds the relative URL to the image used
* for that particular row of the game level.
*/
var rowImages = [
'images/water-block.png', // Top row is water
'images/stone-block.png', // Row 1 of 3 of stone
'images/stone-block.png', // Row 2 of 3 of stone
'images/stone-block.png', // Row 3 of 3 of stone
'images/grass-block.png', // Row 1 of 2 of grass
'images/grass-block.png' // Row 2 of 2 of grass
],
numRows = 6,
numCols = 5,
row, col;
/* Loop through the number of rows and columns we've defined above
* and, using the rowImages array, draw the correct image for that
* portion of the "grid"
*/
for (row = 0; row < numRows; row++) {
for (col = 0; col < numCols; col++) {
/* The drawImage function of the canvas' context element
* requires 3 parameters: the image to draw, the x coordinate
* to start drawing and the y coordinate to start drawing.
* We're using our Resources helpers to refer to our images
* so that we get the benefits of caching these images, since
* we're using them over and over.
*/
ctx.drawImage(Resources.get(rowImages[row]), col * 101, row * 83);
}
}
renderEntities();
}
/* This function is called by the render function and is called on each game
* tick. Its purpose is to then call the render functions you have defined
* on your enemy and player entities within app.js
*/
function renderEntities() {
/* Loop through all of the objects within the allEnemies array and call
* the render function you have defined.
*/
allEnemies.forEach(function(enemy) {
enemy.render();
});
player.render();
}
/* This function does nothing but it could have been a good place to
* handle game reset states - maybe a new game menu or a game over screen
* those sorts of things. It's only called once by the init() method.
*/
function reset() {
// noop
}
/* Go ahead and load all of the images we know we're going to need to
* draw our game level. Then set init as the callback method, so that when
* all of these images are properly loaded our game will start.
*/
Resources.load([
'images/stone-block.png',
'images/water-block.png',
'images/grass-block.png',
'images/enemy-bug.png',
'images/char-boy.png'
]);
Resources.onReady(init);
/* Assign the canvas' context object to the global variable (the window
* object when run in a browser) so that developers can use it more easily
* from within their app.js files.
*/
global.ctx = ctx;
})(this);
| {
"content_hash": "a5454525a2be22b91d69c46ac03bf719",
"timestamp": "",
"source": "github",
"line_count": 183,
"max_line_length": 82,
"avg_line_length": 41.540983606557376,
"alnum_prop": 0.6129965798474086,
"repo_name": "Rishabh-Ahuja/classicArcadeGame",
"id": "7365e8e65955032eb0e9e4ab7c408a11f473da3c",
"size": "7602",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "js/engine.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "36"
},
{
"name": "HTML",
"bytes": "656"
},
{
"name": "JavaScript",
"bytes": "15522"
}
],
"symlink_target": ""
} |
package com.epam.catgenome.manager.maf;
import static com.epam.catgenome.component.MessageHelper.getMessage;
import static com.epam.catgenome.constant.MessagesConstants.ERROR_EMPTY_FOLDER;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import com.epam.catgenome.util.feature.reader.EhCacheBasedIndexCache;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import com.epam.catgenome.constant.MessagesConstants;
import com.epam.catgenome.controller.vo.registration.IndexedFileRegistrationRequest;
import com.epam.catgenome.entity.BiologicalDataItemResourceType;
import com.epam.catgenome.entity.maf.MafFile;
import com.epam.catgenome.entity.maf.MafRecord;
import com.epam.catgenome.entity.reference.Chromosome;
import com.epam.catgenome.entity.reference.Reference;
import com.epam.catgenome.entity.track.Track;
import com.epam.catgenome.exception.RegistrationException;
import com.epam.catgenome.manager.BiologicalDataItemManager;
import com.epam.catgenome.manager.DownloadFileManager;
import com.epam.catgenome.manager.FileManager;
import com.epam.catgenome.manager.TrackHelper;
import com.epam.catgenome.manager.maf.parser.MafCodec;
import com.epam.catgenome.manager.maf.parser.MafFeature;
import com.epam.catgenome.manager.reference.ReferenceGenomeManager;
import com.epam.catgenome.util.IOHelper;
import com.epam.catgenome.util.Utils;
import com.epam.catgenome.util.comparator.FeatureComparator;
import htsjdk.samtools.util.CloseableIterator;
import com.epam.catgenome.util.feature.reader.AbstractFeatureReader;
import htsjdk.tribble.readers.LineIterator;
/**
* Provides service for handling {@code MafFile}: CRUD operations and loading data from the files
*/
@Service
public class MafManager {
@Autowired
private FileManager fileManager;
@Autowired
private MafFileManager mafFileManager;
@Autowired
private BiologicalDataItemManager biologicalDataItemManager;
@Autowired
private ReferenceGenomeManager referenceGenomeManager;
@Autowired
private TrackHelper trackHelper;
@Autowired
private DownloadFileManager downloadFileManager;
@Autowired(required = false)
private EhCacheBasedIndexCache indexCache;
private static final Logger LOGGER = LoggerFactory.getLogger(MafManager.class);
/**
* Registers a MAF file or a directory with MAF files
* @param request a file registration request
* @return a {@code MafFile} object, that references file's representation in the system
* @throws IOException
*/
public MafFile registerMafFile(IndexedFileRegistrationRequest request) {
final String requestPath = request.getPath();
Assert.isTrue(StringUtils.isNotBlank(requestPath), getMessage(
MessagesConstants.ERROR_NULL_PARAM, "path"));
Assert.notNull(request.getReferenceId(), getMessage(MessagesConstants.ERROR_NULL_PARAM, "referenceId"));
if (request.getType() == null) {
request.setType(BiologicalDataItemResourceType.FILE);
}
MafFile mafFile;
try {
switch (request.getType()) {
case FILE:
mafFile = registerMafFileFromFile(request);
break;
case DOWNLOAD:
mafFile = downloadMafFile(request, requestPath);
break;
default:
throw new IllegalArgumentException(getMessage(MessagesConstants.ERROR_INVALID_PARAM));
}
} catch (IOException | NoSuchAlgorithmException e) {
throw new RegistrationException("Error while registering MAF file " + requestPath, e);
}
return mafFile;
}
private MafFile downloadMafFile(IndexedFileRegistrationRequest request, String requestPath)
throws IOException, NoSuchAlgorithmException {
MafFile mafFile;
final File newFile = downloadFileManager.downloadFromURL(requestPath);
request.setIndexPath(null);
request.setName(request.getName() != null ? request.getName() : FilenameUtils.getBaseName(requestPath));
request.setPath(newFile.getPath());
mafFile = registerMafFileFromFile(request);
return mafFile;
}
private MafFile registerMafFileFromFile(IndexedFileRegistrationRequest request) throws IOException {
double time1 = Utils.getSystemTimeMilliseconds();
File file = new File(request.getPath());
MafFile mafFile = new MafFile();
mafFile.setId(mafFileManager.createMafFileId());
mafFile.setCompressed(IOHelper.isGZIPFile(file.getName()));
mafFile.setName(request.getName() != null ? request.getName() : file.getName());
mafFile.setType(BiologicalDataItemResourceType.FILE); // For now we're working only with files
mafFile.setCreatedDate(new Date());
mafFile.setReferenceId(request.getReferenceId());
mafFile.setRealPath(request.getPath());
mafFile.setPrettyName(request.getPrettyName());
try {
processRegistration(mafFile, file, request);
double time2 = Utils.getSystemTimeMilliseconds();
LOGGER.debug("MAF registration completed in {} ms", time2 - time1);
biologicalDataItemManager.createBiologicalDataItem(mafFile.getIndex());
mafFileManager.create(mafFile);
} finally {
if (mafFile.getId() != null && mafFile.getBioDataItemId() != null &&
mafFileManager.loadMafFileNullable(mafFile.getId()) == null) {
biologicalDataItemManager.deleteBiologicalDataItem(mafFile.getBioDataItemId());
try {
fileManager.deleteFeatureFileDirectory(mafFile);
} catch (IOException e) {
LOGGER.error("Unable to delete directory for " + mafFile.getName(), e);
}
}
}
return mafFile;
}
public MafFile unregisterMafFile(final long mafFileId) throws IOException {
Assert.notNull(mafFileId, MessagesConstants.ERROR_INVALID_PARAM);
Assert.isTrue(mafFileId > 0, MessagesConstants.ERROR_INVALID_PARAM);
MafFile fileToDelete = mafFileManager.load(mafFileId);
Assert.notNull(fileToDelete, MessagesConstants.ERROR_NO_SUCH_FILE);
mafFileManager.delete(fileToDelete);
fileManager.deleteFeatureFileDirectory(fileToDelete);
return fileToDelete;
}
public MafFile updateMafFile(long mafFileId) throws IOException {
LOGGER.debug("Updating MAF file " + mafFileId);
MafFile mafFile = mafFileManager.load(mafFileId);
fileManager.deleteFeatureFileDirectory(mafFile);
File file = new File(mafFile.getRealPath());
IndexedFileRegistrationRequest request = new IndexedFileRegistrationRequest();
request.setPath(mafFile.getRealPath());
processRegistration(mafFile, file, request);
return mafFile;
}
public Track<MafRecord> loadFeatures(Track<MafRecord> track) throws IOException {
Chromosome chromosome = trackHelper.validateTrack(track);
MafFile mafFile = mafFileManager.load(track.getId());
double time1 = Utils.getSystemTimeMilliseconds();
try (AbstractFeatureReader<MafFeature, LineIterator> reader = fileManager.makeMafReader(mafFile)) {
CloseableIterator<MafFeature> iterator = reader.query(chromosome.getName(), track.getStartIndex(),
track.getEndIndex());
if (!iterator.hasNext()) {
iterator = reader.query(Utils.changeChromosomeName(chromosome.getName()), track.getStartIndex(),
track.getEndIndex());
}
track.setBlocks(iterator.stream().map(MafRecord::new).collect(Collectors.toList()));
}
double time2 = Utils.getSystemTimeMilliseconds();
LOGGER.debug("Reading records from MAF file, took {} ms", time2 - time1);
return track;
}
private void processRegistration(MafFile mafFile, File file, IndexedFileRegistrationRequest request)
throws IOException {
LOGGER.debug("Registering MAF file " + mafFile.getRealPath());
fileManager.makeMafDir(mafFile.getId());
mafFile.setSource(request.getPath());
if (file.isDirectory()) {
mergeMaf(file, mafFile);
} else {
mafFile.setPath(request.getPath());
createMafBioItem(mafFile);
fileManager.makeMafIndex(mafFile);
}
}
private void createMafBioItem(MafFile mafFile) {
if (mafFile.getBioDataItemId() == null) {
long id = mafFile.getId();
biologicalDataItemManager.createBiologicalDataItem(mafFile);
mafFile.setBioDataItemId(mafFile.getId());
mafFile.setId(id);
}
}
private void mergeMaf(File directory, MafFile mafFile) throws IOException {
Assert.notNull(directory.listFiles(), getMessage(ERROR_EMPTY_FOLDER));
Assert.isTrue(directory.listFiles().length > 0, getMessage(ERROR_EMPTY_FOLDER));
Reference reference = referenceGenomeManager.load(mafFile.getReferenceId());
try (BufferedWriter writer = fileManager.makeMafFileWriter(mafFile)) {
createMafBioItem(mafFile);
for (File f : directory.listFiles()) {
if (f.getAbsolutePath().endsWith(MafCodec.MAF_EXTENSION) ||
f.getAbsolutePath().endsWith(MafCodec.MAF_COMPRESSED_EXTENSION)) {
fileManager.makeMafTempIndex(f, mafFile);
}
}
for (Chromosome chromosome : reference.getChromosomes()) {
List<MafFeature> currChrFeatures = new ArrayList<>();
LOGGER.debug("Reading MAF records for chromosome {}", chromosome.getName());
for (File f : directory.listFiles()) {
addFeaturesFromFile(mafFile, chromosome, currChrFeatures, f);
}
LOGGER.debug("Sorting MAF records for chromosome {}", chromosome.getName());
Collections.sort(currChrFeatures, new FeatureComparator());
LOGGER.debug("Writing MAF records for chromosome {}", chromosome.getName());
for (MafFeature feature : currChrFeatures) {
writer.write(feature.toBigMafString());
writer.newLine();
}
writer.flush();
}
writer.flush();
} finally {
fileManager.deleteMafTempDir(mafFile.getId());
}
fileManager.makeBigMafIndex(mafFile);
}
private void addFeaturesFromFile(MafFile mafFile, Chromosome chromosome,
List<MafFeature> currChrFeatures, File f) throws IOException {
if (f.getAbsolutePath().endsWith(MafCodec.MAF_EXTENSION) ||
f.getAbsolutePath().endsWith(MafCodec.MAF_COMPRESSED_EXTENSION)) {
File indexFile = fileManager.getMafTempIndex(f, mafFile);
MafCodec mafCodec = new MafCodec(f.getName());
try (AbstractFeatureReader<MafFeature, LineIterator> reader = AbstractFeatureReader
.getFeatureReader(f.getAbsolutePath(), indexFile.getAbsolutePath(), mafCodec, true, indexCache)) {
CloseableIterator<MafFeature> iterator = reader.query(chromosome.getName(), 1,
chromosome.getSize());
if (!iterator.hasNext()) {
iterator = reader.query(Utils.changeChromosomeName(chromosome.getName()), 1,
chromosome.getSize());
}
currChrFeatures.addAll(iterator.toList());
}
}
}
}
| {
"content_hash": "1845768bc0ade0f89a57d1d0ea88516e",
"timestamp": "",
"source": "github",
"line_count": 278,
"max_line_length": 118,
"avg_line_length": 43.82374100719424,
"alnum_prop": 0.6753673151112205,
"repo_name": "epam/NGB",
"id": "93c2b77add7ff0faa38bc282c66034b6e27efb89",
"size": "13317",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "server/catgenome/src/main/java/com/epam/catgenome/manager/maf/MafManager.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2130"
},
{
"name": "Dockerfile",
"bytes": "2839"
},
{
"name": "EJS",
"bytes": "344"
},
{
"name": "HTML",
"bytes": "455953"
},
{
"name": "Java",
"bytes": "6041257"
},
{
"name": "JavaScript",
"bytes": "3315081"
},
{
"name": "PLSQL",
"bytes": "1182"
},
{
"name": "SCSS",
"bytes": "167986"
},
{
"name": "Shell",
"bytes": "11389"
},
{
"name": "Smarty",
"bytes": "1410"
}
],
"symlink_target": ""
} |
import Effect, { ConfigUI, fract } from './effect';
import { parseHtml } from '../ui/util';
import AccumulationEffect, { AccumulationAgent } from './accumulation';
const EffectName = 'Smooth trails';
const EffectDescription = 'Enables an smoother fading image echo';
class SmoothTrailsConfigUI extends ConfigUI {
constructor() {
super();
this.element = parseHtml(`
<fieldset>
<legend>${EffectName}</legend>
<label>
Fade-in:
<input type="number" class="effect-smooth-trails-fadein" value="100" />ms
</label><br/>
<label>
Fade-out:
<input type="number" class="effect-smooth-trails-fadeout" value="500" />ms
</label>
</fieldset>
`);
const ui = this.element;
this.fadeinInput = ui.querySelector('.effect-smooth-trails-fadein');
this.fadeoutInput = ui.querySelector('.effect-smooth-trails-fadeout');
this.fadeinInput.addEventListener('change', () => {
this.notifyChange();
});
this.fadeoutInput.addEventListener('change', () => {
this.notifyChange();
});
}
getElement() {
return this.element;
}
getConfig() {
const config = {};
config.fadein = parseInt(this.fadeinInput.value, 10);
config.fadeout = parseInt(this.fadeoutInput.value, 10);
return config;
}
applyConfig(config) {
this.fadeinInput.value = config.fadein;
this.fadeoutInput.value = config.fadeout;
}
}
class SmoothTrailsAgent extends AccumulationAgent {
constructor(instance) {
super(instance);
}
getFragmentCode(uniforms) {
const kernelSize = uniforms.addUniform('kernelSize', 'vec2', (ctx, props) => {
return [4 / props.state.getWidth(), 4 / props.state.getHeight()];
});
return `
vec3 color = /* texture2D(historyTexture, vec2(texcoord.x, texcoord.y)).rgb * .2 + */
texture2D(historyTexture, vec2(texcoord.x + ${kernelSize}.x, texcoord.y)).rgb * .25 +
texture2D(historyTexture, vec2(texcoord.x - ${kernelSize}.x, texcoord.y)).rgb * .25 +
texture2D(historyTexture, vec2(texcoord.x, texcoord.y + ${kernelSize}.y)).rgb * .25 +
texture2D(historyTexture, vec2(texcoord.x, texcoord.y - ${kernelSize}.y)).rgb * .25;
accumulationEffectResult = mix(particleColor, color, 0.8);
`;
}
}
export default class SmoothTrailsEffect extends AccumulationEffect {
static getAgentClass() {
return SmoothTrailsAgent;
}
static getDisplayName() {
return EffectName;
}
static getDescription() {
return EffectDescription;
}
static getConfigUI() {
if (!this._configUI) {
this._configUI = new SmoothTrailsConfigUI();
}
return this._configUI;
}
static getDefaultConfig() {
return {
fadein: 100,
fadeout: 500
};
}
static getRandomConfig() {
return this.getDefaultConfig();
}
}
| {
"content_hash": "b3c8125d6aeea343358a7d5cb8ae3617",
"timestamp": "",
"source": "github",
"line_count": 105,
"max_line_length": 93,
"avg_line_length": 27.295238095238094,
"alnum_prop": 0.6402651779483601,
"repo_name": "suluke/hfg-particles",
"id": "0e81f0624fc27fe18c8a4a7afa46c100e47fd020",
"size": "2866",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "js/effects/smooth-trails.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "25709"
},
{
"name": "HTML",
"bytes": "7751"
},
{
"name": "JavaScript",
"bytes": "231209"
}
],
"symlink_target": ""
} |
{% ckan_extends %}
{% block links -%}
<link rel="shortcut icon" href="/base/images/favicon.ico" />
{% endblock -%}
| {
"content_hash": "7c9df538cdc1be523e78c8ba4e3c31ba",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 62,
"avg_line_length": 23.6,
"alnum_prop": 0.6101694915254238,
"repo_name": "vrk-kpa/api-catalog",
"id": "48738ae16d7cb024c16134e10bcc3dcd203030bd",
"size": "118",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ckanext/ckanext-apicatalog/ckanext/apicatalog/templates/base.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "4103"
},
{
"name": "HTML",
"bytes": "229117"
},
{
"name": "JavaScript",
"bytes": "148706"
},
{
"name": "Jinja",
"bytes": "37631"
},
{
"name": "Less",
"bytes": "81251"
},
{
"name": "Mako",
"bytes": "494"
},
{
"name": "Python",
"bytes": "203802"
},
{
"name": "Shell",
"bytes": "7445"
}
],
"symlink_target": ""
} |
// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
#if UNITY_5_3_OR_NEWER
using UnityEngine;
using System.Collections.Generic;
namespace Fungus
{
/// <summary>
/// This component encodes and decodes a list of game objects to be saved for each Save Point.
/// It knows how to encode / decode concrete game classes like Flowchart and FlowchartData.
/// To extend the save system to handle other data types, just modify or subclass this component.
/// </summary>
public class SaveData : MonoBehaviour
{
protected const string FlowchartDataKey = "FlowchartData";
protected const string NarrativeLogKey = "NarrativeLogData";
[Tooltip("A list of Flowchart objects whose variables will be encoded in the save data. Boolean, Integer, Float and String variables are supported.")]
[SerializeField] protected List<Flowchart> flowcharts = new List<Flowchart>();
#region Public methods
/// <summary>
/// Encodes the objects to be saved as a list of SaveDataItems.
/// </summary
public virtual void Encode(List<SaveDataItem> saveDataItems)
{
for (int i = 0; i < flowcharts.Count; i++)
{
var flowchart = flowcharts[i];
var flowchartData = FlowchartData.Encode(flowchart);
var saveDataItem = SaveDataItem.Create(FlowchartDataKey, JsonUtility.ToJson(flowchartData));
saveDataItems.Add(saveDataItem);
var narrativeLogItem = SaveDataItem.Create(NarrativeLogKey, FungusManager.Instance.NarrativeLog.GetJsonHistory());
saveDataItems.Add(narrativeLogItem);
}
}
/// <summary>
/// Decodes the loaded list of SaveDataItems to restore the saved game state.
/// </summary>
public virtual void Decode(List<SaveDataItem> saveDataItems)
{
for (int i = 0; i < saveDataItems.Count; i++)
{
var saveDataItem = saveDataItems[i];
if (saveDataItem == null)
{
continue;
}
if (saveDataItem.DataType == FlowchartDataKey)
{
var flowchartData = JsonUtility.FromJson<FlowchartData>(saveDataItem.Data);
if (flowchartData == null)
{
Debug.LogError("Failed to decode Flowchart save data item");
return;
}
FlowchartData.Decode(flowchartData);
}
if (saveDataItem.DataType == NarrativeLogKey)
{
FungusManager.Instance.NarrativeLog.LoadHistory(saveDataItem.Data);
}
}
}
#endregion
}
}
#endif | {
"content_hash": "e4c7bd78636450477cf29aab5bb5d88f",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 158,
"avg_line_length": 37.54320987654321,
"alnum_prop": 0.5922393949358764,
"repo_name": "FungusGames/Fungus",
"id": "3a6fdc059b8f7d6f9283d019e0883918f9f4a65f",
"size": "3043",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Assets/Fungus/Scripts/Components/SaveData.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "1544082"
},
{
"name": "GLSL",
"bytes": "215"
}
],
"symlink_target": ""
} |
package com.android.anddeche;
import java.util.ArrayList;
import android.util.Log;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;
/**
* Cette classe sert à dessiner la sur-couche (overlay) de la Google Map.
* Cette sur-couche contient notamment les markers de la carte.
* @author Marc de Verdelhan
*
*/
public class DecheMapOverlay extends ItemizedOverlay {
/** Liste des items de l'overlay */
private ArrayList<DecheLocation> mOverlays = new ArrayList<DecheLocation>();
/** Google Map */
private GoogleMap map;
public DecheMapOverlay(GoogleMap map, int defaultMarker) {
super(boundCenterBottom(map.getResources().getDrawable(defaultMarker)));
this.map = map;
}
@Override
protected OverlayItem createItem(int i) {
return mOverlays.get(i);
}
public void addOverlay(DecheLocation overlay) {
mOverlays.add(overlay);
populate();
}
@Override
public int size() {
return mOverlays.size();
}
@Override
protected boolean onTap(int index) {
map.onTap(mOverlays.get(index));
return super.onTap(index);
}
}
| {
"content_hash": "d79318c54c2ae39e50249ac42d33ce85",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 80,
"avg_line_length": 23.58823529411765,
"alnum_prop": 0.6691604322527016,
"repo_name": "mdeverdelhan/AndDeche",
"id": "7ddef75589df3c6da8fa8622f69531789f77ebca",
"size": "1817",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "AndDeche/src/com/android/anddeche/DecheMapOverlay.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "47540"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>JobStatus (xenon 3.0.2 API for Xenon developers)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="JobStatus (xenon 3.0.2 API for Xenon developers)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding"> </div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">nl.esciencecenter.xenon.schedulers</a></div>
<h2 title="Interface JobStatus" class="title">Interface JobStatus</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="../adaptors/schedulers/JobStatusImplementation.html" title="class in nl.esciencecenter.xenon.adaptors.schedulers">JobStatusImplementation</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">JobStatus</span></pre>
<div class="block">JobStatus contains status information for a specific job.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../XenonException.html" title="class in nl.esciencecenter.xenon">XenonException</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getException()">getException</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the exception produced by the Job or while retrieving the status.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.lang.Integer</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getExitCode()">getExitCode</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the exit code for the Job.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getJobIdentifier()">getJobIdentifier</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the job identifier of the Job for which this JobStatus was created.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getName()">getName</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the name of the Job for which this JobStatus was created.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.util.Map<java.lang.String,​java.lang.String></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSchedulerSpecificInformation()">getSchedulerSpecificInformation</a></span>()</code></th>
<td class="colLast">
<div class="block">Get scheduler specific information on the Job.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getState()">getState</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the state of the Job.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasException()">hasException</a></span>()</code></th>
<td class="colLast">
<div class="block">Has the Job or job retrieval produced a exception ?</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isDone()">isDone</a></span>()</code></th>
<td class="colLast">
<div class="block">Is the Job done.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isRunning()">isRunning</a></span>()</code></th>
<td class="colLast">
<div class="block">Is the Job running.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maybeThrowException()">maybeThrowException</a></span>()</code></th>
<td class="colLast">
<div class="block">Throws the exception produced by the Job or while retrieving the status, if it exists.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getJobIdentifier()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJobIdentifier</h4>
<pre class="methodSignature">java.lang.String getJobIdentifier()</pre>
<div class="block">Get the job identifier of the Job for which this JobStatus was created.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the identifier of the Job.</dd>
</dl>
</li>
</ul>
<a id="getName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre class="methodSignature">java.lang.String getName()</pre>
<div class="block">Get the name of the Job for which this JobStatus was created.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the name of the Job.</dd>
</dl>
</li>
</ul>
<a id="getState()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getState</h4>
<pre class="methodSignature">java.lang.String getState()</pre>
<div class="block">Get the state of the Job.
The state is a scheduler specific string, generally intended to be human readable. Very different state strings can be returned depending on which
scheduler is used. Therefore, this method should only be used to provide feedback to the user. To programmatically inspect the state of the job use
{<a href="#isRunning()"><code>isRunning()</code></a>, <a href="#isDone()"><code>isDone()</code></a> or <a href="#hasException()"><code>hasException()</code></a> instead.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the state of the Job.</dd>
</dl>
</li>
</ul>
<a id="getExitCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExitCode</h4>
<pre class="methodSignature">java.lang.Integer getExitCode()</pre>
<div class="block">Get the exit code for the Job.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the exit code for the Job.</dd>
</dl>
</li>
</ul>
<a id="getException()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getException</h4>
<pre class="methodSignature"><a href="../XenonException.html" title="class in nl.esciencecenter.xenon">XenonException</a> getException()</pre>
<div class="block">Get the exception produced by the Job or while retrieving the status. If no exception occurred, <code>null</code> will be returned.
See <a href="#maybeThrowException()"><code>maybeThrowException()</code></a> for the possible exceptions.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the exception.</dd>
</dl>
</li>
</ul>
<a id="maybeThrowException()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maybeThrowException</h4>
<pre class="methodSignature">void maybeThrowException()
throws <a href="../XenonException.html" title="class in nl.esciencecenter.xenon">XenonException</a></pre>
<div class="block">Throws the exception produced by the Job or while retrieving the status, if it exists. Otherwise continue.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../adaptors/schedulers/JobCanceledException.html" title="class in nl.esciencecenter.xenon.adaptors.schedulers">JobCanceledException</a></code> - if the job was cancelled</dd>
<dd><code><a href="NoSuchJobException.html" title="class in nl.esciencecenter.xenon.schedulers">NoSuchJobException</a></code> - if the job of which the status was requested does not exist</dd>
<dd><code><a href="../XenonException.html" title="class in nl.esciencecenter.xenon">XenonException</a></code> - if an I/O error occurred.</dd>
</dl>
</li>
</ul>
<a id="isRunning()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRunning</h4>
<pre class="methodSignature">boolean isRunning()</pre>
<div class="block">Is the Job running.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>if the Job is running.</dd>
</dl>
</li>
</ul>
<a id="isDone()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDone</h4>
<pre class="methodSignature">boolean isDone()</pre>
<div class="block">Is the Job done.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>if the Job is done.</dd>
</dl>
</li>
</ul>
<a id="hasException()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasException</h4>
<pre class="methodSignature">boolean hasException()</pre>
<div class="block">Has the Job or job retrieval produced a exception ?</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>if the Job has an exception.</dd>
</dl>
</li>
</ul>
<a id="getSchedulerSpecificInformation()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getSchedulerSpecificInformation</h4>
<pre class="methodSignature">java.util.Map<java.lang.String,​java.lang.String> getSchedulerSpecificInformation()</pre>
<div class="block">Get scheduler specific information on the Job.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>scheduler specific information on the Job.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
| {
"content_hash": "7f5a9cc15a1b4a2a8ffdf73dd6cd51f1",
"timestamp": "",
"source": "github",
"line_count": 458,
"max_line_length": 391,
"avg_line_length": 34.89301310043668,
"alnum_prop": 0.6557161629434954,
"repo_name": "NLeSC/Xenon",
"id": "2f42401c3e904398ad0e276746533e9b7965e400",
"size": "15981",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/versions/3.0.2/javadoc-devel/nl/esciencecenter/xenon/schedulers/JobStatus.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "762"
},
{
"name": "Java",
"bytes": "1547681"
},
{
"name": "Shell",
"bytes": "4009"
}
],
"symlink_target": ""
} |
extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
namespace CORE_LuaInterface
{
void initialize();
// Game
static int goToRoom (lua_State* L);
// Audio
static int playMusic (lua_State* L);
static int playSound (lua_State* L);
static int pauseMusic (lua_State* L);
Event getEventFromStack (int n, int stackIndex, lua_State* L);
} | {
"content_hash": "9defc98afde04c39bd78b7ae65ed12ff",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 63,
"avg_line_length": 17.772727272727273,
"alnum_prop": 0.6419437340153452,
"repo_name": "pike4/CORE-Dev-Build-1.0",
"id": "b40adb4cee1b5d518dce8562153b046ca3448f18",
"size": "448",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "CORE/Source/Subsystems/CORE_LuaInterface.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "1963842"
},
{
"name": "C++",
"bytes": "683074"
},
{
"name": "CSS",
"bytes": "3013"
},
{
"name": "HTML",
"bytes": "369218"
},
{
"name": "Lua",
"bytes": "272"
},
{
"name": "Makefile",
"bytes": "10458"
},
{
"name": "Python",
"bytes": "3468"
},
{
"name": "Roff",
"bytes": "5493"
}
],
"symlink_target": ""
} |
include(acmake_common)
macro(acmake_mysqlconn_support TARGET)
find_package(MySqlConn REQUIRED)
include_directories(${MYSQLCONN_INCLUDE_DIRS})
target_link_libraries(${TARGET} ${MYSQLCONN_LIBRARIES})
endmacro()
| {
"content_hash": "ba272f8ecf9e82db5d0be2d73613c987",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 59,
"avg_line_length": 31.714285714285715,
"alnum_prop": 0.7612612612612613,
"repo_name": "rgkoo/libmv-blender",
"id": "75058af24f595b9d18900868a4e6bf0b1ee4ea90",
"size": "222",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/CMake/acmake/acmake_mysqlconn_support.cmake",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "9176"
},
{
"name": "C++",
"bytes": "2217561"
},
{
"name": "CMake",
"bytes": "1099891"
},
{
"name": "GLSL",
"bytes": "892"
},
{
"name": "HTML",
"bytes": "333118"
},
{
"name": "Makefile",
"bytes": "756"
},
{
"name": "Python",
"bytes": "126426"
},
{
"name": "QMake",
"bytes": "3100"
},
{
"name": "Shell",
"bytes": "2915"
}
],
"symlink_target": ""
} |
``` diff
namespace System.Text.Json.Serialization {
public abstract class JsonConverter<T> : JsonConverter {
+ public virtual T ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options);
+ public virtual void WriteAsPropertyName(Utf8JsonWriter writer, T value, JsonSerializerOptions options);
}
- public class JsonSourceGenerationOptionsAttribute : JsonAttribute
+ public sealed class JsonSourceGenerationOptionsAttribute : JsonAttribute
}
```
| {
"content_hash": "7db7747304f3fd2b7746677c0378621e",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 123,
"avg_line_length": 46.90909090909091,
"alnum_prop": 0.7790697674418605,
"repo_name": "dotnet/core",
"id": "c1377aaea09cb542300e6e29bbf4a8980f08f5d3",
"size": "550",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "release-notes/6.0/preview/api-diff/rc1/.Net/6.0.0-rc1_System.Text.Json.Serialization.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PowerShell",
"bytes": "15707"
},
{
"name": "Shell",
"bytes": "5074"
}
],
"symlink_target": ""
} |
package com.github.kostyasha.github.integration.multibranch.action;
import org.jenkinsci.plugins.github.pullrequest.GitHubPRPullRequest;
import org.kohsuke.github.GHRepository;
/**
* Add a link to repository pr
*
* @author Anton Tanasenko
*/
public class GitHubPRAction extends GitHubLinkAction {
private Integer pr;
public GitHubPRAction(GHRepository remoteRepository, Integer pr) {
super(buildUrl(remoteRepository, pr));
this.pr = pr;
}
@Override
public String getIconFileName() {
return GitHubPRPullRequest.getIconFileName();
}
@Override
public String getDisplayName() {
return "PR#" + pr;
}
private static String buildUrl(GHRepository remoteRepository, Integer pr) {
return remoteRepository.getHtmlUrl().toExternalForm() + "/pull/" + pr;
}
}
| {
"content_hash": "a4e6b0b4035eb0930b3a78d7bc81c307",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 79,
"avg_line_length": 24.764705882352942,
"alnum_prop": 0.7019002375296912,
"repo_name": "KostyaSha/github-integration-plugin",
"id": "b9ec3de4b421643f42c7bbe3f4c4f8fcd8f59c11",
"size": "842",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "github-pullrequest-plugin/src/main/java/com/github/kostyasha/github/integration/multibranch/action/GitHubPRAction.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Groovy",
"bytes": "42047"
},
{
"name": "HTML",
"bytes": "8395"
},
{
"name": "Java",
"bytes": "780725"
},
{
"name": "JavaScript",
"bytes": "284"
},
{
"name": "Shell",
"bytes": "217"
}
],
"symlink_target": ""
} |
package ru.org.linux.site;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import ru.org.linux.auth.AuthUtil;
import ru.org.linux.spring.SiteConfig;
import ru.org.linux.user.Profile;
import ru.org.linux.user.User;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.servlet.ServletRequest;
public final class Template {
@Nonnull
private final Profile userProfile;
private final SiteConfig siteConfig;
public Template(WebApplicationContext ctx) {
siteConfig = ctx.getBean(SiteConfig.class);
userProfile = AuthUtil.getProfile();
}
public Template(ServletRequest request) {
this(WebApplicationContextUtils.getWebApplicationContext(request.getServletContext()));
}
@Deprecated
public String getStyle() {
return getTheme().getId();
}
public Theme getTheme() {
User user = getCurrentUser();
if (user == null) {
return DefaultProfile.getDefaultTheme();
} else {
return DefaultProfile.getTheme(user.getStyle());
}
}
public String getFormatMode() {
return userProfile.getFormatMode();
}
@Nonnull
public Profile getProf() {
return userProfile;
}
public String getWSUrl() { return siteConfig.getWSUrl(); }
public String getSecureMainUrl() {
return siteConfig.getSecureUrl();
}
public String getSecureMainUrlNoSlash() {
return siteConfig.getSecureUrlWithoutSlash();
}
public SiteConfig getConfig() {
return siteConfig;
}
public boolean isSessionAuthorized() {
return AuthUtil.isSessionAuthorized();
}
public boolean isModeratorSession() {
return AuthUtil.isModeratorSession();
}
public boolean isCorrectorSession() {
return AuthUtil.isCorrectorSession();
}
/**
* Get current authorized users nick
* @return nick or null if not authorized
*/
public String getNick() {
User currentUser = getCurrentUser();
if (currentUser==null) {
return null;
} else {
return currentUser.getNick();
}
}
@Nonnull
public static Template getTemplate(ServletRequest request) {
return new Template(request);
}
@Nullable
public User getCurrentUser() {
return AuthUtil.getCurrentUser();
}
}
| {
"content_hash": "2fb4062f98e3efc15ad7563ffc382904",
"timestamp": "",
"source": "github",
"line_count": 104,
"max_line_length": 91,
"avg_line_length": 22.067307692307693,
"alnum_prop": 0.7154684095860566,
"repo_name": "hizel/lorsource",
"id": "9310707eb68b836eebdb33bf340686cd5ab6ff32",
"size": "2919",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/main/java/ru/org/linux/site/Template.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "91521"
},
{
"name": "HTML",
"bytes": "40739"
},
{
"name": "Java",
"bytes": "1486067"
},
{
"name": "JavaScript",
"bytes": "46905"
},
{
"name": "Scala",
"bytes": "330249"
},
{
"name": "Shell",
"bytes": "1947"
}
],
"symlink_target": ""
} |
// Karma configuration
// Generated on Wed Sep 18 2013 14:27:40 GMT-0700 (PDT)
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// frameworks to use
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'vendor/managed/angular/angular.js',
'vendor/managed/angular-mocks/angular-mocks.js',
'process/app.js',
'test/unit/**/*.spec.js'
],
preprocessors:{
"src/js/**/*.js":["coverage"]
},
// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters:["progress","coverage"],
coverageReporter:{
type: 'html',
dir: 'analytics/coverage/'
},
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['PhantomJS'],
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000,
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: true
});
}; | {
"content_hash": "b82d73ae619ff9f5000e9a3fae19c337",
"timestamp": "",
"source": "github",
"line_count": 70,
"max_line_length": 124,
"avg_line_length": 24.714285714285715,
"alnum_prop": 0.5398843930635838,
"repo_name": "thebigredgeek/grunt-init-angular-coffee-haml-app",
"id": "52182907274a3801c33c9fbed2e44d7c7a9fff21",
"size": "1730",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "root/karma.pre.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "27"
},
{
"name": "CoffeeScript",
"bytes": "839"
},
{
"name": "JavaScript",
"bytes": "13194"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
namespace _1.Count_Real_Numbers
{
class CountOfRealNums
{
static void Main()
{
var numbers = Console.ReadLine().Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(double.Parse).ToArray();
var result = new SortedDictionary<double, int>();
foreach (var number in numbers)
{
if (!result.ContainsKey(number))
{
result[number] = 0;
}
result[number]++;
}
foreach (var kvp in result)
{
Console.WriteLine($"{kvp.Key} -> {kvp.Value}");
}
}
}
}
| {
"content_hash": "bf323d8d394db22f92be80c94336b68e",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 136,
"avg_line_length": 23.65625,
"alnum_prop": 0.4900924702774108,
"repo_name": "bingoo0/SoftUni-TechModule",
"id": "8be2959716555609f63fad334fcab8e21d31a7f1",
"size": "759",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "DictionaryLab/1. Count Real Numbers/CountOfRealNums.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "239680"
}
],
"symlink_target": ""
} |
<?php
declare(strict_types=1);
namespace spec\Sylius\Component\Core\Promotion\Modifier;
use Doctrine\Common\Collections\ArrayCollection;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Core\Model\PromotionCouponInterface;
use Sylius\Component\Core\Model\PromotionInterface;
use Sylius\Component\Core\Promotion\Modifier\OrderPromotionsUsageModifierInterface;
final class OrderPromotionsUsageModifierSpec extends ObjectBehavior
{
function it_implements_an_order_promotions_usage_modifier_interface(): void
{
$this->shouldImplement(OrderPromotionsUsageModifierInterface::class);
}
function it_increments_a_usage_of_promotions_applied_on_order(
OrderInterface $order,
PromotionInterface $firstPromotion,
PromotionInterface $secondPromotion,
): void {
$order->getPromotions()->willReturn(
new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()]),
);
$order->getPromotionCoupon()->willReturn(null);
$firstPromotion->incrementUsed()->shouldBeCalled();
$secondPromotion->incrementUsed()->shouldBeCalled();
$this->increment($order);
}
function it_decrements_a_usage_of_promotions_applied_on_order(
OrderInterface $order,
PromotionInterface $firstPromotion,
PromotionInterface $secondPromotion,
): void {
$order->getPromotions()->willReturn(
new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()]),
);
$order->getPromotionCoupon()->willReturn(null);
$firstPromotion->decrementUsed()->shouldBeCalled();
$secondPromotion->decrementUsed()->shouldBeCalled();
$this->decrement($order);
}
function it_increments_a_usage_of_promotions_and_promotion_coupon_applied_on_order(
OrderInterface $order,
PromotionInterface $firstPromotion,
PromotionInterface $secondPromotion,
PromotionCouponInterface $promotionCoupon,
): void {
$order->getPromotions()->willReturn(
new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()]),
);
$order->getPromotionCoupon()->willReturn($promotionCoupon);
$firstPromotion->incrementUsed()->shouldBeCalled();
$secondPromotion->incrementUsed()->shouldBeCalled();
$promotionCoupon->incrementUsed()->shouldBeCalled();
$this->increment($order);
}
function it_decrements_a_usage_of_promotions_and_promotion_coupon_applied_on_order(
OrderInterface $order,
PromotionInterface $firstPromotion,
PromotionInterface $secondPromotion,
PromotionCouponInterface $promotionCoupon,
): void {
$order->getState()->willReturn('cancelled');
$order->getPromotions()->willReturn(
new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()]),
);
$order->getPromotionCoupon()->willReturn($promotionCoupon);
$promotionCoupon->isReusableFromCancelledOrders()->willReturn(true);
$firstPromotion->decrementUsed()->shouldBeCalled();
$secondPromotion->decrementUsed()->shouldBeCalled();
$promotionCoupon->decrementUsed()->shouldBeCalled();
$this->decrement($order);
}
function it_decrements_a_usage_of_promotions_and_does_not_decrement_a_usage_of_promotion_coupon_applied_on_order(
OrderInterface $order,
PromotionInterface $firstPromotion,
PromotionInterface $secondPromotion,
PromotionCouponInterface $promotionCoupon,
): void {
$order->getState()->willReturn('cancelled');
$order->getPromotions()->willReturn(
new ArrayCollection([$firstPromotion->getWrappedObject(), $secondPromotion->getWrappedObject()]),
);
$order->getPromotionCoupon()->willReturn($promotionCoupon);
$promotionCoupon->isReusableFromCancelledOrders()->willReturn(false);
$firstPromotion->decrementUsed()->shouldBeCalled();
$secondPromotion->decrementUsed()->shouldBeCalled();
$promotionCoupon->decrementUsed()->shouldNotBeCalled();
$this->decrement($order);
}
}
| {
"content_hash": "452a5a4036bf07c0d67c77c3aa822515",
"timestamp": "",
"source": "github",
"line_count": 115,
"max_line_length": 117,
"avg_line_length": 37.582608695652176,
"alnum_prop": 0.6943544655252198,
"repo_name": "diimpp/Sylius",
"id": "8d6b1eb699dfe2868b8069570a1e15432411a3e5",
"size": "4533",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/Sylius/Component/Core/spec/Promotion/Modifier/OrderPromotionsUsageModifierSpec.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Dockerfile",
"bytes": "674"
},
{
"name": "Gherkin",
"bytes": "1269548"
},
{
"name": "JavaScript",
"bytes": "102771"
},
{
"name": "Makefile",
"bytes": "1478"
},
{
"name": "PHP",
"bytes": "8145147"
},
{
"name": "SCSS",
"bytes": "53880"
},
{
"name": "Shell",
"bytes": "11411"
},
{
"name": "Twig",
"bytes": "446530"
}
],
"symlink_target": ""
} |
package client
import (
"context"
"github.com/golang/protobuf/proto"
"go.ligato.io/cn-infra/v2/datasync/kvdbsync/local"
"go.ligato.io/cn-infra/v2/datasync/syncbase"
"go.ligato.io/cn-infra/v2/db/keyval"
"go.ligato.io/vpp-agent/v3/pkg/models"
"go.ligato.io/vpp-agent/v3/pkg/util"
"go.ligato.io/vpp-agent/v3/plugins/orchestrator"
"go.ligato.io/vpp-agent/v3/plugins/orchestrator/contextdecorator"
"go.ligato.io/vpp-agent/v3/proto/ligato/generic"
protoV2 "google.golang.org/protobuf/proto"
)
// LocalClient is global client for direct local access.
// Updates and resyncs of this client use local.DefaultRegistry for propagating data to orchestrator.Dispatcher
// (going through watcher.Aggregator together with other data sources). However, data retrieval uses
// orchestrator.Dispatcher directly.
var LocalClient = NewClient(&txnFactory{local.DefaultRegistry}, &orchestrator.DefaultPlugin)
type client struct {
txnFactory ProtoTxnFactory
dispatcher orchestrator.Dispatcher
}
// NewClient returns new instance that uses given registry for data propagation and dispatcher for data retrieval.
func NewClient(factory ProtoTxnFactory, dispatcher orchestrator.Dispatcher) ConfigClient {
return &client{
txnFactory: factory,
dispatcher: dispatcher,
}
}
func (c *client) KnownModels(class string) ([]*ModelInfo, error) {
var modules []*ModelInfo
for _, model := range models.RegisteredModels() {
if class == "" || model.Spec().Class == class {
modules = append(modules, &models.ModelInfo{
ModelDetail: *model.ModelDetail(),
MessageDescriptor: proto.MessageV2(model.NewInstance()).ProtoReflect().Descriptor(),
})
}
}
return modules, nil
}
func (c *client) ResyncConfig(items ...proto.Message) error {
txn := c.txnFactory.NewTxn(true)
for _, item := range items {
key, err := models.GetKey(item)
if err != nil {
return err
}
txn.Put(key, item)
}
ctx := context.Background()
ctx = contextdecorator.DataSrcContext(ctx, "localclient")
return txn.Commit(ctx)
}
func (c *client) GetConfig(dsts ...interface{}) error {
protos := c.dispatcher.ListData()
protoDsts := extractProtoMessages(dsts)
if len(dsts) == len(protoDsts) { // all dsts are proto messages
// TODO the clearIgnoreLayerCount function argument should be a option of generic.Client
// (the value 1 generates from dynamic config the same json/yaml output as the hardcoded
// configurator.Config and therefore serves for backward compatibility)
util.PlaceProtosIntoProtos(convertToProtoV2(protos), 1, protoDsts...)
} else {
util.PlaceProtos(protos, dsts...)
}
return nil
}
func (c *client) DumpState() ([]*generic.StateItem, error) {
// TODO: use dispatcher to dump state
return nil, nil
}
func (c *client) ChangeRequest() ChangeRequest {
return &changeRequest{txn: c.txnFactory.NewTxn(false)}
}
type changeRequest struct {
txn keyval.ProtoTxn
err error
}
func (r *changeRequest) Update(items ...proto.Message) ChangeRequest {
if r.err != nil {
return r
}
for _, item := range items {
key, err := models.GetKey(item)
if err != nil {
r.err = err
return r
}
r.txn.Put(key, item)
}
return r
}
func (r *changeRequest) Delete(items ...proto.Message) ChangeRequest {
if r.err != nil {
return r
}
for _, item := range items {
key, err := models.GetKey(item)
if err != nil {
r.err = err
return r
}
r.txn.Delete(key)
}
return r
}
func (r *changeRequest) Send(ctx context.Context) error {
if r.err != nil {
return r.err
}
_, withDataSrc := contextdecorator.DataSrcFromContext(ctx)
if !withDataSrc {
ctx = contextdecorator.DataSrcContext(ctx, "localclient")
}
return r.txn.Commit(ctx)
}
// ProtoTxnFactory defines interface for keyval transaction provider.
type ProtoTxnFactory interface {
NewTxn(resync bool) keyval.ProtoTxn
}
type txnFactory struct {
registry *syncbase.Registry
}
func (p *txnFactory) NewTxn(resync bool) keyval.ProtoTxn {
if resync {
return local.NewProtoTxn(p.registry.PropagateResync)
}
return local.NewProtoTxn(p.registry.PropagateChanges)
}
func extractProtoMessages(dsts []interface{}) []protoV2.Message {
protoDsts := make([]protoV2.Message, 0)
for _, dst := range dsts {
protoV1Dst, isProtoV1 := dst.(proto.Message)
if isProtoV1 {
protoDsts = append(protoDsts, proto.MessageV2(protoV1Dst))
} else {
protoV2Dst, isProtoV2 := dst.(protoV2.Message)
if isProtoV2 {
protoDsts = append(protoDsts, protoV2Dst)
} else {
break
}
}
}
return protoDsts
}
func convertToProtoV2(protoMap map[string]proto.Message) []protoV2.Message {
result := make([]protoV2.Message, 0, len(protoMap))
for _, msg := range protoMap {
result = append(result, proto.MessageV2(msg))
}
return result
}
| {
"content_hash": "43a14ac6f79f4d9f8e082d05cf55bbab",
"timestamp": "",
"source": "github",
"line_count": 175,
"max_line_length": 114,
"avg_line_length": 27.05142857142857,
"alnum_prop": 0.7203210815378116,
"repo_name": "VladoLavor/vpp-agent",
"id": "dd60bc3d62578ffe24093141123f21383dec8858",
"size": "5355",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "client/local_client.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "5279"
},
{
"name": "Go",
"bytes": "6199307"
},
{
"name": "Makefile",
"bytes": "16123"
},
{
"name": "Python",
"bytes": "103503"
},
{
"name": "RobotFramework",
"bytes": "1029018"
},
{
"name": "Shell",
"bytes": "67858"
}
],
"symlink_target": ""
} |
import os
import sys
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.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = ['.rst', '.md']
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'BucketList'
copyright = '2017, Mbarak Mbigo'
author = 'Mbarak Mbigo'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- 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 = 'alabaster'
# 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 = {}
# 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']
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'BucketListdoc'
# -- 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': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'BucketList.tex', 'BucketList Documentation',
'Mbarak Mbigo', 'manual'),
]
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'bucketlist', 'BucketList Documentation',
[author], 1)
]
# -- 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 = [
(master_doc, 'BucketList', 'BucketList Documentation',
author, 'BucketList', 'One line description of project.',
'Miscellaneous'),
]
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
| {
"content_hash": "dd5d6615d35c1d0d75781a379ddb716f",
"timestamp": "",
"source": "github",
"line_count": 147,
"max_line_length": 78,
"avg_line_length": 29.836734693877553,
"alnum_prop": 0.6632466940264478,
"repo_name": "Mbarak-Mbigo/cp2_bucketlist",
"id": "b4c7ee88c39364033bd4dedee6fdcc455e0bc8b7",
"size": "5072",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "docs/conf.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "45474"
}
],
"symlink_target": ""
} |
<?php
// Start the session
require_once('startsession.php');
// Insert the page header
$page_title = 'Questionnaire';
require_once('header.php');
require_once('appvars.php');
require_once('connectvars.php');
// Make sure the user is logged in before going any further.
if (!isset($_SESSION['user_id'])) {
echo '<p class="login">Please <a href="login.php">log in</a> to access this page.</p>';
exit();
}
// Show the navigation menu
require_once('navmenu.php');
// Connect to the database
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
// If this user has never answered the questionnaire, insert empty responses into the database
$query = "SELECT * FROM mismatch_response WHERE user_id = '" . $_SESSION['user_id'] . "'";
$data = mysqli_query($dbc, $query);
if (mysqli_num_rows($data) == 0) {
// First grab the list of topic IDs from the topic table
$query = "SELECT topic_id FROM mismatch_topic ORDER BY category_id, topic_id";
$data = mysqli_query($dbc, $query);
$topicIDs = array();
while ($row = mysqli_fetch_array($data)) {
array_push($topicIDs, $row['topic_id']);
}
// Insert empty response rows into the response table, one per topic
foreach ($topicIDs as $topic_id) {
$query = "INSERT INTO mismatch_response (user_id, topic_id) VALUES ('" . $_SESSION['user_id']. "', '$topic_id')";
mysqli_query($dbc, $query);
}
}
// If the questionnaire form has been submitted, write the form responses to the database
if (isset($_POST['submit'])) {
// Write the questionnaire response rows to the response table
foreach ($_POST as $response_id => $response) {
$query = "UPDATE mismatch_response SET response = '$response' WHERE response_id = '$response_id'";
mysqli_query($dbc, $query);
}
echo '<p>Your responses have been saved.</p>';
}
// Grab the response data from the database to generate the form
$query = "SELECT mr.response_id, mr.topic_id, mr.response, mt.name AS topic_name, mc.name AS category_name " .
"FROM mismatch_response AS mr " .
"INNER JOIN mismatch_topic AS mt USING (topic_id) " .
"INNER JOIN mismatch_category AS mc USING (category_id) " .
"WHERE mr.user_id = '" . $_SESSION['user_id'] . "'";
$data = mysqli_query($dbc, $query);
$responses = array();
while ($row = mysqli_fetch_array($data)) {
array_push($responses, $row);
}
mysqli_close($dbc);
// Generate the questionnaire form by looping through the response array
echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">';
echo '<p>How do you feel about each topic?</p>';
$category = $responses[0]['category_name'];
echo '<fieldset><legend>' . $responses[0]['category_name'] . '</legend>';
foreach ($responses as $response) {
// Only start a new fieldset if the category has changed
if ($category != $response['category_name']) {
$category = $response['category_name'];
echo '</fieldset><fieldset><legend>' . $response['category_name'] . '</legend>';
}
// Display the topic form field
echo '<label ' . ($response['response'] == NULL ? 'class="error"' : '') . ' for="' . $response['response_id'] . '">' . $response['topic_name'] . ':</label>';
echo '<input type="radio" id="' . $response['response_id'] . '" name="' . $response['response_id'] . '" value="1" ' . ($response['response'] == 1 ? 'checked="checked"' : '') . ' />Love ';
echo '<input type="radio" id="' . $response['response_id'] . '" name="' . $response['response_id'] . '" value="2" ' . ($response['response'] == 2 ? 'checked="checked"' : '') . ' />Hate<br />';
}
echo '</fieldset>';
echo '<input type="submit" value="Save Questionnaire" name="submit" />';
echo '</form>';
// Insert the page footer
require_once('footer.php');
?>
| {
"content_hash": "34b01446a9cace57a77f6b661e6e2f99",
"timestamp": "",
"source": "github",
"line_count": 90,
"max_line_length": 196,
"avg_line_length": 42.55555555555556,
"alnum_prop": 0.6211488250652741,
"repo_name": "inest-us/php",
"id": "9d70d9a3ea1d07ee8f775af7cfa5efaac7b1a876",
"size": "3830",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "php102/ch11/final/mismatch/questionnaire.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "81450"
},
{
"name": "HTML",
"bytes": "281565"
},
{
"name": "Hack",
"bytes": "6775"
},
{
"name": "JavaScript",
"bytes": "4121"
},
{
"name": "PHP",
"bytes": "53600"
},
{
"name": "TSQL",
"bytes": "309"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace Itsp365.InvoiceFormApp.Api
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}
| {
"content_hash": "c84975453791cd1592e5f7cb3dd1918b",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 99,
"avg_line_length": 25.82608695652174,
"alnum_prop": 0.5942760942760943,
"repo_name": "ithinksharepoint/Invoicing-Application",
"id": "77257e2bfb9aee8a1fb352e0edf15330062f0dc7",
"size": "596",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "API/Itsp365.InvoiceFormApp.Api/App_Start/RouteConfig.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "117"
},
{
"name": "C#",
"bytes": "36637"
},
{
"name": "CSS",
"bytes": "513"
},
{
"name": "Groff",
"bytes": "4274"
},
{
"name": "HTML",
"bytes": "5127"
},
{
"name": "JavaScript",
"bytes": "208033"
}
],
"symlink_target": ""
} |
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Objects.Legacy.Taiko
{
/// <summary>
/// Legacy osu!taiko Slider-type, used for parsing Beatmaps.
/// </summary>
internal sealed class ConvertSlider : Legacy.ConvertSlider
{
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
}
}
| {
"content_hash": "37311137c29febfb3260143f3b9cf0f8",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 79,
"avg_line_length": 32.86666666666667,
"alnum_prop": 0.7079107505070994,
"repo_name": "ZLima12/osu",
"id": "b365fd34aeaad4c8b2c5687ece4d872b084f722c",
"size": "495",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "osu.Game/Rulesets/Objects/Legacy/Taiko/ConvertSlider.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "4086154"
},
{
"name": "PowerShell",
"bytes": "2550"
},
{
"name": "Shell",
"bytes": "1031"
}
],
"symlink_target": ""
} |
<?php
require_once 'lib/ext/pear/HTTP/OAuth/Signature/Common.php';
require_once 'lib/ext/pear/HTTP/OAuth/Exception/NotImplemented.php';
/**
* HTTP_OAuth_Signature_RSA_SHA1
*
* Signature class for the RSA-SHA1 signing method.
*
* @category HTTP
* @package HTTP_OAuth
* @author Jeff Hodsdon <jeffhodsdon@gmail.com>
* @copyright 2009 Jeff Hodsdon <jeffhodsdon@gmail.com>
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @link http://pear.php.net/package/HTTP_OAuth
* @link http://github.com/jeffhodsdon/HTTP_OAuth
*/
class HTTP_OAuth_Signature_RSA_SHA1
{
/**
* Build
*
* @param string $method HTTP method used
* @param string $url URL of the request
* @param array $params Parameters of the request
* @param string $consumerSecret Consumer secret value
* @param string $tokenSecret Token secret value (if exists)
*
* @return string Signature
*/
public function build($method, $url, array $params, $consumerSecret,
$tokenSecret = ''
) {
throw new HTTP_OAuth_Exception_NotImplemented;
}
}
?>
| {
"content_hash": "562a7110044ac7c2775e4818f8c303f0",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 80,
"avg_line_length": 27.785714285714285,
"alnum_prop": 0.6503856041131105,
"repo_name": "zenilt/bicubic-framework-php",
"id": "3f70d9fb017d734c72602470295a3fa5c54765c2",
"size": "1976",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "web/lib/ext/pear/HTTP/OAuth/Signature/RSA/SHA1.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "14"
},
{
"name": "CSS",
"bytes": "2399"
},
{
"name": "HTML",
"bytes": "23962"
},
{
"name": "JavaScript",
"bytes": "7476"
},
{
"name": "PHP",
"bytes": "8543777"
}
],
"symlink_target": ""
} |
import ObjectStorage from '../../lib/endpoints/objectstorage.js';
import Request from '../../lib/request.js';
describe('endpoints/objectstorage', () => {
let objectStorage;
let request;
beforeEach(() => {
request = new Request();
objectStorage = new ObjectStorage(request);
});
test('createCredential()', () => {
const spy = globalThis.setupRequestSpy(request, 'post');
const data = {
description: 'description',
instanceid: 'os-123',
};
objectStorage.createCredential(data);
expect(spy).toHaveBeenCalledWith(
'/objectstorage/createcredential',
data,
);
});
test('createInstance()', () => {
const spy = globalThis.setupRequestSpy(request, 'post');
const data = {
createinitialbucket: true,
datacenter: 'dc-sto1',
projectkey: 'cl123',
};
objectStorage.createInstance(data);
expect(spy).toHaveBeenCalledWith('/objectstorage/createinstance', data);
});
test('deleteCredential()', () => {
const spy = globalThis.setupRequestSpy(request, 'post');
const data = {
credentialid: 'abc123',
instanceid: 'os-123',
};
objectStorage.deleteCredential(data);
expect(spy).toHaveBeenCalledWith(
'/objectstorage/deletecredential',
data,
);
});
test('deleteInstance()', () => {
const spy = globalThis.setupRequestSpy(request, 'post');
const data = {
instanceid: 'os-123',
};
objectStorage.deleteInstance(data);
expect(spy).toHaveBeenCalledWith('/objectstorage/deleteinstance', data);
});
test('editInstance()', () => {
const spy = globalThis.setupRequestSpy(request, 'post');
const data = {
description: 'new description',
instanceid: 'os-123',
};
objectStorage.editInstance(data);
expect(spy).toHaveBeenCalledWith('/objectstorage/editinstance', data);
});
test('estimatedCost()', () => {
const spy = globalThis.setupRequestSpy(request, 'post');
const data = {
averageUsageInGib: 10,
instanceid: 'os-123',
};
objectStorage.estimatedCost(data);
expect(spy).toHaveBeenCalledWith('/objectstorage/estimatedcost', data);
});
test('instanceDetails()', () => {
const spy = globalThis.setupRequestSpy(request, 'post');
const data = {
instanceid: 'os-123',
};
objectStorage.instanceDetails(data);
expect(spy).toHaveBeenCalledWith(
'/objectstorage/instancedetails',
data,
);
});
test('listInstances()', () => {
const spy = globalThis.setupRequestSpy(request, 'get');
objectStorage.listInstances();
expect(spy).toHaveBeenCalledWith('/objectstorage/listinstances');
});
});
| {
"content_hash": "a24ec893ac983f1fae3487aa5763a5e6",
"timestamp": "",
"source": "github",
"line_count": 112,
"max_line_length": 80,
"avg_line_length": 26.973214285714285,
"alnum_prop": 0.5650446871896723,
"repo_name": "jwilsson/glesys-api-node",
"id": "9859fc4e842e20d7d39762464c63ee48e1885680",
"size": "3021",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "test/endpoints/objectstorage.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "84881"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "806e26ca9b4f6eeeee453a14e6e217d5",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 9.692307692307692,
"alnum_prop": 0.7063492063492064,
"repo_name": "mdoering/backbone",
"id": "f55807502359913784d95a0872258521707acece",
"size": "199",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Asteraceae/Koanophyllon/Koanophyllon polystichum/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple Tabs — sphinx-tabs demo documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/sphinx_tabs/tabs.css" />
<link rel="stylesheet" type="text/css" href="_static/sphinx_tabs/semantic-ui-2.2.10/segment.min.css" />
<link rel="stylesheet" type="text/css" href="_static/sphinx_tabs/semantic-ui-2.2.10/menu.min.css" />
<link rel="stylesheet" type="text/css" href="_static/sphinx_tabs/semantic-ui-2.2.10/tab.min.css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/sphinx_tabs/tabs.js"></script>
<script type="text/javascript" src="_static/sphinx_tabs/semantic-ui-2.2.10/tab.min.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="simple-tabs">
<h1>Simple Tabs<a class="headerlink" href="#simple-tabs" title="Permalink to this headline">¶</a></h1>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-0-0 docutils container">
<div class="docutils container">
Apples</div>
</div>
<div class="item sphinx-data-tab-0-1 docutils container">
<div class="docutils container">
Pears</div>
</div>
<div class="item sphinx-data-tab-0-2 docutils container">
<div class="docutils container">
Oranges</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-0-0 active docutils container">
Apples are green, or sometimes red.</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-0-1 docutils container">
Pears are green.</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-0-2 docutils container">
Oranges are orange.</div>
</div>
</div>
<div class="section" id="nested-tabs">
<h1>Nested Tabs<a class="headerlink" href="#nested-tabs" title="Permalink to this headline">¶</a></h1>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-1-0 docutils container">
<div class="docutils container">
Stars</div>
</div>
<div class="item sphinx-data-tab-1-1 docutils container">
<div class="docutils container">
Moons</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-1-0 active docutils container">
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-2-0 docutils container">
<div class="docutils container">
The Sun</div>
</div>
<div class="item sphinx-data-tab-2-1 docutils container">
<div class="docutils container">
Proxima Centauri</div>
</div>
<div class="item sphinx-data-tab-2-2 docutils container">
<div class="docutils container">
Polaris</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-2-0 active docutils container">
The closest star to us.</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-2-1 docutils container">
The second closest star to us.</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-2-2 docutils container">
The North Star.</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-1-1 docutils container">
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-3-0 docutils container">
<div class="docutils container">
The Moon</div>
</div>
<div class="item sphinx-data-tab-3-1 docutils container">
<div class="docutils container">
Titan</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-3-0 active docutils container">
Orbits the Earth</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-3-1 docutils container">
Orbits Jupiter</div>
</div>
</div>
</div>
</div>
<div class="section" id="code-tabs">
<h1>Code Tabs<a class="headerlink" href="#code-tabs" title="Permalink to this headline">¶</a></h1>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-Qw== docutils container">
<div class="docutils container">
C</div>
</div>
<div class="item sphinx-data-tab-Qysr docutils container">
<div class="docutils container">
C++</div>
</div>
<div class="item sphinx-data-tab-UHl0aG9u docutils container">
<div class="docutils container">
Python</div>
</div>
<div class="item sphinx-data-tab-SmF2YQ== docutils container">
<div class="docutils container">
Java</div>
</div>
<div class="item sphinx-data-tab-SnVsaWE= docutils container">
<div class="docutils container">
Julia</div>
</div>
<div class="item sphinx-data-tab-Rm9ydHJhbg== docutils container">
<div class="docutils container">
Fortran</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-Qw== active docutils container">
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="n">C</span> <span class="n">Main</span> <span class="n">Function</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-Qysr docutils container">
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">C</span><span class="o">++</span> <span class="n">Main</span> <span class="n">Function</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-UHl0aG9u docutils container">
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="n">Python</span> <span class="n">Main</span> <span class="n">Function</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-SmF2YQ== docutils container">
<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="n">Java</span> <span class="n">Main</span> <span class="n">Function</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-SnVsaWE= docutils container">
<div class="highlight-julia notranslate"><div class="highlight"><pre><span></span><span class="n">Julia</span> <span class="n">Main</span> <span class="kt">Function</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-Rm9ydHJhbg== docutils container">
<div class="highlight-fortran notranslate"><div class="highlight"><pre><span></span><span class="n">Fortran</span> <span class="n">Main</span> <span class="k">Function</span>
</pre></div>
</div>
</div>
</div>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-Qw== docutils container">
<div class="docutils container">
C</div>
</div>
<div class="item sphinx-data-tab-Qysr docutils container">
<div class="docutils container">
C++</div>
</div>
<div class="item sphinx-data-tab-UHl0aG9u docutils container">
<div class="docutils container">
Python</div>
</div>
<div class="item sphinx-data-tab-SmF2YQ== docutils container">
<div class="docutils container">
Java</div>
</div>
<div class="item sphinx-data-tab-SnVsaWE= docutils container">
<div class="docutils container">
Julia</div>
</div>
<div class="item sphinx-data-tab-Rm9ydHJhbg== docutils container">
<div class="docutils container">
Fortran</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-Qw== active docutils container">
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="k">const</span> <span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span> <span class="o">**</span><span class="n">argv</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-Qysr docutils container">
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="k">const</span> <span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span> <span class="o">**</span><span class="n">argv</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-UHl0aG9u docutils container">
<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
<span class="k">return</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-SmF2YQ== docutils container">
<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kd">class</span> <span class="nc">Main</span> <span class="o">{</span>
<span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="o">{</span>
<span class="o">}</span>
<span class="o">}</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-SnVsaWE= docutils container">
<div class="highlight-julia notranslate"><div class="highlight"><pre><span></span><span class="k">function</span> <span class="n">main</span><span class="p">()</span>
<span class="k">end</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment code-tab sphinx-data-tab-Rm9ydHJhbg== docutils container">
<div class="highlight-fortran notranslate"><div class="highlight"><pre><span></span><span class="k">PROGRAM </span><span class="n">main</span>
<span class="k">END PROGRAM </span><span class="n">main</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="group-tabs">
<h1>Group Tabs<a class="headerlink" href="#group-tabs" title="Permalink to this headline">¶</a></h1>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-TGludXg= docutils container">
<div class="docutils container">
Linux</div>
</div>
<div class="item sphinx-data-tab-TWFjIE9TWA== docutils container">
<div class="docutils container">
Mac OSX</div>
</div>
<div class="item sphinx-data-tab-V2luZG93cw== docutils container">
<div class="docutils container">
Windows</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-TGludXg= active docutils container">
Linux Line 1</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-TWFjIE9TWA== docutils container">
Mac OSX Line 1</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-V2luZG93cw== docutils container">
Windows Line 1</div>
</div>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-TGludXg= docutils container">
<div class="docutils container">
Linux</div>
</div>
<div class="item sphinx-data-tab-TWFjIE9TWA== docutils container">
<div class="docutils container">
Mac OSX</div>
</div>
<div class="item sphinx-data-tab-V2luZG93cw== docutils container">
<div class="docutils container">
Windows</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-TGludXg= active docutils container">
Linux Line 2</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-TWFjIE9TWA== docutils container">
Mac OSX Line 2</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-V2luZG93cw== docutils container">
Windows Line 2</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="#">sphinx-tabs demo</a></h1>
<h3>Navigation</h3>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="#">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.8.2</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/index.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html> | {
"content_hash": "fb07827bf3d25f0333aca2815be648cd",
"timestamp": "",
"source": "github",
"line_count": 363,
"max_line_length": 428,
"avg_line_length": 41.137741046831955,
"alnum_prop": 0.6971807406415321,
"repo_name": "TheImagingSource/tiscamera",
"id": "f5d75066b44e1eaea9750b7327731611b283efe6",
"size": "14938",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "doc/sphinx-tabs-v1.1.13/docs/index.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "80638"
},
{
"name": "C++",
"bytes": "2287603"
},
{
"name": "CMake",
"bytes": "170765"
},
{
"name": "Python",
"bytes": "41359"
},
{
"name": "Shell",
"bytes": "15386"
}
],
"symlink_target": ""
} |
namespace arrow {
namespace flatbuf = org::apache::arrow::flatbuf;
using internal::checked_cast;
namespace ipc {
namespace internal {
using FBB = flatbuffers::FlatBufferBuilder;
using DictionaryOffset = flatbuffers::Offset<flatbuf::DictionaryEncoding>;
using FieldOffset = flatbuffers::Offset<flatbuf::Field>;
using KeyValueOffset = flatbuffers::Offset<flatbuf::KeyValue>;
using RecordBatchOffset = flatbuffers::Offset<flatbuf::RecordBatch>;
using SparseTensorOffset = flatbuffers::Offset<flatbuf::SparseTensor>;
using Offset = flatbuffers::Offset<void>;
using FBString = flatbuffers::Offset<flatbuffers::String>;
MetadataVersion GetMetadataVersion(flatbuf::MetadataVersion version) {
switch (version) {
case flatbuf::MetadataVersion_V1:
// Arrow 0.1
return MetadataVersion::V1;
case flatbuf::MetadataVersion_V2:
// Arrow 0.2
return MetadataVersion::V2;
case flatbuf::MetadataVersion_V3:
// Arrow 0.3 to 0.7.1
return MetadataVersion::V4;
case flatbuf::MetadataVersion_V4:
// Arrow >= 0.8
return MetadataVersion::V4;
// Add cases as other versions become available
default:
return MetadataVersion::V4;
}
}
static Status IntFromFlatbuffer(const flatbuf::Int* int_data,
std::shared_ptr<DataType>* out) {
if (int_data->bitWidth() > 64) {
return Status::NotImplemented("Integers with more than 64 bits not implemented");
}
if (int_data->bitWidth() < 8) {
return Status::NotImplemented("Integers with less than 8 bits not implemented");
}
switch (int_data->bitWidth()) {
case 8:
*out = int_data->is_signed() ? int8() : uint8();
break;
case 16:
*out = int_data->is_signed() ? int16() : uint16();
break;
case 32:
*out = int_data->is_signed() ? int32() : uint32();
break;
case 64:
*out = int_data->is_signed() ? int64() : uint64();
break;
default:
return Status::NotImplemented("Integers not in cstdint are not implemented");
}
return Status::OK();
}
static Status FloatFromFlatbuffer(const flatbuf::FloatingPoint* float_data,
std::shared_ptr<DataType>* out) {
if (float_data->precision() == flatbuf::Precision_HALF) {
*out = float16();
} else if (float_data->precision() == flatbuf::Precision_SINGLE) {
*out = float32();
} else {
*out = float64();
}
return Status::OK();
}
// Forward declaration
static Status FieldToFlatbuffer(FBB& fbb, const Field& field,
DictionaryMemo* dictionary_memo, FieldOffset* offset);
static Offset IntToFlatbuffer(FBB& fbb, int bitWidth, bool is_signed) {
return flatbuf::CreateInt(fbb, bitWidth, is_signed).Union();
}
static Offset FloatToFlatbuffer(FBB& fbb, flatbuf::Precision precision) {
return flatbuf::CreateFloatingPoint(fbb, precision).Union();
}
static Status AppendChildFields(FBB& fbb, const DataType& type,
std::vector<FieldOffset>* out_children,
DictionaryMemo* dictionary_memo) {
FieldOffset field;
for (int i = 0; i < type.num_children(); ++i) {
RETURN_NOT_OK(FieldToFlatbuffer(fbb, *type.child(i), dictionary_memo, &field));
out_children->push_back(field);
}
return Status::OK();
}
static Status ListToFlatbuffer(FBB& fbb, const DataType& type,
std::vector<FieldOffset>* out_children,
DictionaryMemo* dictionary_memo, Offset* offset) {
RETURN_NOT_OK(AppendChildFields(fbb, type, out_children, dictionary_memo));
*offset = flatbuf::CreateList(fbb).Union();
return Status::OK();
}
static Status StructToFlatbuffer(FBB& fbb, const DataType& type,
std::vector<FieldOffset>* out_children,
DictionaryMemo* dictionary_memo, Offset* offset) {
RETURN_NOT_OK(AppendChildFields(fbb, type, out_children, dictionary_memo));
*offset = flatbuf::CreateStruct_(fbb).Union();
return Status::OK();
}
// ----------------------------------------------------------------------
// Union implementation
static Status UnionFromFlatbuffer(const flatbuf::Union* union_data,
const std::vector<std::shared_ptr<Field>>& children,
std::shared_ptr<DataType>* out) {
UnionMode::type mode =
(union_data->mode() == flatbuf::UnionMode_Sparse ? UnionMode::SPARSE
: UnionMode::DENSE);
std::vector<uint8_t> type_codes;
const flatbuffers::Vector<int32_t>* fb_type_ids = union_data->typeIds();
if (fb_type_ids == nullptr) {
for (uint8_t i = 0; i < children.size(); ++i) {
type_codes.push_back(i);
}
} else {
for (int32_t id : (*fb_type_ids)) {
// TODO(wesm): can these values exceed 255?
type_codes.push_back(static_cast<uint8_t>(id));
}
}
*out = union_(children, type_codes, mode);
return Status::OK();
}
static Status UnionToFlatBuffer(FBB& fbb, const DataType& type,
std::vector<FieldOffset>* out_children,
DictionaryMemo* dictionary_memo, Offset* offset) {
RETURN_NOT_OK(AppendChildFields(fbb, type, out_children, dictionary_memo));
const auto& union_type = checked_cast<const UnionType&>(type);
flatbuf::UnionMode mode = union_type.mode() == UnionMode::SPARSE
? flatbuf::UnionMode_Sparse
: flatbuf::UnionMode_Dense;
std::vector<int32_t> type_ids;
type_ids.reserve(union_type.type_codes().size());
for (uint8_t code : union_type.type_codes()) {
type_ids.push_back(code);
}
auto fb_type_ids = fbb.CreateVector(type_ids);
*offset = flatbuf::CreateUnion(fbb, mode, fb_type_ids).Union();
return Status::OK();
}
#define INT_TO_FB_CASE(BIT_WIDTH, IS_SIGNED) \
*out_type = flatbuf::Type_Int; \
*offset = IntToFlatbuffer(fbb, BIT_WIDTH, IS_SIGNED); \
break;
static inline flatbuf::TimeUnit ToFlatbufferUnit(TimeUnit::type unit) {
switch (unit) {
case TimeUnit::SECOND:
return flatbuf::TimeUnit_SECOND;
case TimeUnit::MILLI:
return flatbuf::TimeUnit_MILLISECOND;
case TimeUnit::MICRO:
return flatbuf::TimeUnit_MICROSECOND;
case TimeUnit::NANO:
return flatbuf::TimeUnit_NANOSECOND;
default:
break;
}
return flatbuf::TimeUnit_MIN;
}
static inline TimeUnit::type FromFlatbufferUnit(flatbuf::TimeUnit unit) {
switch (unit) {
case flatbuf::TimeUnit_SECOND:
return TimeUnit::SECOND;
case flatbuf::TimeUnit_MILLISECOND:
return TimeUnit::MILLI;
case flatbuf::TimeUnit_MICROSECOND:
return TimeUnit::MICRO;
case flatbuf::TimeUnit_NANOSECOND:
return TimeUnit::NANO;
default:
break;
}
// cannot reach
return TimeUnit::SECOND;
}
static Status TypeFromFlatbuffer(flatbuf::Type type, const void* type_data,
const std::vector<std::shared_ptr<Field>>& children,
std::shared_ptr<DataType>* out) {
switch (type) {
case flatbuf::Type_NONE:
return Status::Invalid("Type metadata cannot be none");
case flatbuf::Type_Null:
*out = null();
return Status::OK();
case flatbuf::Type_Int:
return IntFromFlatbuffer(static_cast<const flatbuf::Int*>(type_data), out);
case flatbuf::Type_FloatingPoint:
return FloatFromFlatbuffer(static_cast<const flatbuf::FloatingPoint*>(type_data),
out);
case flatbuf::Type_Binary:
*out = binary();
return Status::OK();
case flatbuf::Type_FixedSizeBinary: {
auto fw_binary = static_cast<const flatbuf::FixedSizeBinary*>(type_data);
*out = fixed_size_binary(fw_binary->byteWidth());
return Status::OK();
}
case flatbuf::Type_Utf8:
*out = utf8();
return Status::OK();
case flatbuf::Type_Bool:
*out = boolean();
return Status::OK();
case flatbuf::Type_Decimal: {
auto dec_type = static_cast<const flatbuf::Decimal*>(type_data);
*out = decimal(dec_type->precision(), dec_type->scale());
return Status::OK();
}
case flatbuf::Type_Date: {
auto date_type = static_cast<const flatbuf::Date*>(type_data);
if (date_type->unit() == flatbuf::DateUnit_DAY) {
*out = date32();
} else {
*out = date64();
}
return Status::OK();
}
case flatbuf::Type_Time: {
auto time_type = static_cast<const flatbuf::Time*>(type_data);
TimeUnit::type unit = FromFlatbufferUnit(time_type->unit());
int32_t bit_width = time_type->bitWidth();
switch (unit) {
case TimeUnit::SECOND:
case TimeUnit::MILLI:
if (bit_width != 32) {
return Status::Invalid("Time is 32 bits for second/milli unit");
}
*out = time32(unit);
break;
default:
if (bit_width != 64) {
return Status::Invalid("Time is 64 bits for micro/nano unit");
}
*out = time64(unit);
break;
}
return Status::OK();
}
case flatbuf::Type_Timestamp: {
auto ts_type = static_cast<const flatbuf::Timestamp*>(type_data);
TimeUnit::type unit = FromFlatbufferUnit(ts_type->unit());
if (ts_type->timezone() != 0 && ts_type->timezone()->Length() > 0) {
*out = timestamp(unit, ts_type->timezone()->str());
} else {
*out = timestamp(unit);
}
return Status::OK();
}
case flatbuf::Type_Interval:
return Status::NotImplemented("Interval");
case flatbuf::Type_List:
if (children.size() != 1) {
return Status::Invalid("List must have exactly 1 child field");
}
*out = std::make_shared<ListType>(children[0]);
return Status::OK();
case flatbuf::Type_Struct_:
*out = std::make_shared<StructType>(children);
return Status::OK();
case flatbuf::Type_Union:
return UnionFromFlatbuffer(static_cast<const flatbuf::Union*>(type_data), children,
out);
default:
return Status::Invalid("Unrecognized type");
}
}
// TODO(wesm): Convert this to visitor pattern
static Status TypeToFlatbuffer(FBB& fbb, const DataType& type,
std::vector<FieldOffset>* children,
flatbuf::Type* out_type, DictionaryMemo* dictionary_memo,
Offset* offset) {
const DataType* value_type = &type;
if (type.id() == Type::DICTIONARY) {
// In this library, the dictionary "type" is a logical construct. Here we
// pass through to the value type, as we've already captured the index
// type in the DictionaryEncoding metadata in the parent field
value_type = checked_cast<const DictionaryType&>(type).dictionary()->type().get();
}
switch (value_type->id()) {
case Type::NA:
*out_type = flatbuf::Type_Null;
*offset = flatbuf::CreateNull(fbb).Union();
break;
case Type::BOOL:
*out_type = flatbuf::Type_Bool;
*offset = flatbuf::CreateBool(fbb).Union();
break;
case Type::UINT8:
INT_TO_FB_CASE(8, false);
case Type::INT8:
INT_TO_FB_CASE(8, true);
case Type::UINT16:
INT_TO_FB_CASE(16, false);
case Type::INT16:
INT_TO_FB_CASE(16, true);
case Type::UINT32:
INT_TO_FB_CASE(32, false);
case Type::INT32:
INT_TO_FB_CASE(32, true);
case Type::UINT64:
INT_TO_FB_CASE(64, false);
case Type::INT64:
INT_TO_FB_CASE(64, true);
case Type::HALF_FLOAT:
*out_type = flatbuf::Type_FloatingPoint;
*offset = FloatToFlatbuffer(fbb, flatbuf::Precision_HALF);
break;
case Type::FLOAT:
*out_type = flatbuf::Type_FloatingPoint;
*offset = FloatToFlatbuffer(fbb, flatbuf::Precision_SINGLE);
break;
case Type::DOUBLE:
*out_type = flatbuf::Type_FloatingPoint;
*offset = FloatToFlatbuffer(fbb, flatbuf::Precision_DOUBLE);
break;
case Type::FIXED_SIZE_BINARY: {
const auto& fw_type = checked_cast<const FixedSizeBinaryType&>(*value_type);
*out_type = flatbuf::Type_FixedSizeBinary;
*offset = flatbuf::CreateFixedSizeBinary(fbb, fw_type.byte_width()).Union();
} break;
case Type::BINARY:
*out_type = flatbuf::Type_Binary;
*offset = flatbuf::CreateBinary(fbb).Union();
break;
case Type::STRING:
*out_type = flatbuf::Type_Utf8;
*offset = flatbuf::CreateUtf8(fbb).Union();
break;
case Type::DATE32:
*out_type = flatbuf::Type_Date;
*offset = flatbuf::CreateDate(fbb, flatbuf::DateUnit_DAY).Union();
break;
case Type::DATE64:
*out_type = flatbuf::Type_Date;
*offset = flatbuf::CreateDate(fbb, flatbuf::DateUnit_MILLISECOND).Union();
break;
case Type::TIME32: {
const auto& time_type = checked_cast<const Time32Type&>(*value_type);
*out_type = flatbuf::Type_Time;
*offset = flatbuf::CreateTime(fbb, ToFlatbufferUnit(time_type.unit()), 32).Union();
} break;
case Type::TIME64: {
const auto& time_type = checked_cast<const Time64Type&>(*value_type);
*out_type = flatbuf::Type_Time;
*offset = flatbuf::CreateTime(fbb, ToFlatbufferUnit(time_type.unit()), 64).Union();
} break;
case Type::TIMESTAMP: {
const auto& ts_type = checked_cast<const TimestampType&>(*value_type);
*out_type = flatbuf::Type_Timestamp;
flatbuf::TimeUnit fb_unit = ToFlatbufferUnit(ts_type.unit());
FBString fb_timezone = 0;
if (ts_type.timezone().size() > 0) {
fb_timezone = fbb.CreateString(ts_type.timezone());
}
*offset = flatbuf::CreateTimestamp(fbb, fb_unit, fb_timezone).Union();
} break;
case Type::DECIMAL: {
const auto& dec_type = checked_cast<const Decimal128Type&>(*value_type);
*out_type = flatbuf::Type_Decimal;
*offset =
flatbuf::CreateDecimal(fbb, dec_type.precision(), dec_type.scale()).Union();
} break;
case Type::LIST:
*out_type = flatbuf::Type_List;
return ListToFlatbuffer(fbb, *value_type, children, dictionary_memo, offset);
case Type::STRUCT:
*out_type = flatbuf::Type_Struct_;
return StructToFlatbuffer(fbb, *value_type, children, dictionary_memo, offset);
case Type::UNION:
*out_type = flatbuf::Type_Union;
return UnionToFlatBuffer(fbb, *value_type, children, dictionary_memo, offset);
default:
*out_type = flatbuf::Type_NONE; // Make clang-tidy happy
return Status::NotImplemented("Unable to convert type: ", type.ToString());
}
return Status::OK();
}
static Status TensorTypeToFlatbuffer(FBB& fbb, const DataType& type,
flatbuf::Type* out_type, Offset* offset) {
switch (type.id()) {
case Type::UINT8:
INT_TO_FB_CASE(8, false);
case Type::INT8:
INT_TO_FB_CASE(8, true);
case Type::UINT16:
INT_TO_FB_CASE(16, false);
case Type::INT16:
INT_TO_FB_CASE(16, true);
case Type::UINT32:
INT_TO_FB_CASE(32, false);
case Type::INT32:
INT_TO_FB_CASE(32, true);
case Type::UINT64:
INT_TO_FB_CASE(64, false);
case Type::INT64:
INT_TO_FB_CASE(64, true);
case Type::HALF_FLOAT:
*out_type = flatbuf::Type_FloatingPoint;
*offset = FloatToFlatbuffer(fbb, flatbuf::Precision_HALF);
break;
case Type::FLOAT:
*out_type = flatbuf::Type_FloatingPoint;
*offset = FloatToFlatbuffer(fbb, flatbuf::Precision_SINGLE);
break;
case Type::DOUBLE:
*out_type = flatbuf::Type_FloatingPoint;
*offset = FloatToFlatbuffer(fbb, flatbuf::Precision_DOUBLE);
break;
default:
*out_type = flatbuf::Type_NONE; // Make clang-tidy happy
return Status::NotImplemented("Unable to convert type: ", type.ToString());
}
return Status::OK();
}
static DictionaryOffset GetDictionaryEncoding(FBB& fbb, const DictionaryType& type,
DictionaryMemo* memo) {
int64_t dictionary_id = memo->GetId(type.dictionary());
// We assume that the dictionary index type (as an integer) has already been
// validated elsewhere, and can safely assume we are dealing with signed
// integers
const auto& fw_index_type = checked_cast<const FixedWidthType&>(*type.index_type());
auto index_type_offset = flatbuf::CreateInt(fbb, fw_index_type.bit_width(), true);
// TODO(wesm): ordered dictionaries
return flatbuf::CreateDictionaryEncoding(fbb, dictionary_id, index_type_offset,
type.ordered());
}
static flatbuffers::Offset<flatbuffers::Vector<KeyValueOffset>>
KeyValueMetadataToFlatbuffer(FBB& fbb, const KeyValueMetadata& metadata) {
std::vector<KeyValueOffset> key_value_offsets;
size_t metadata_size = metadata.size();
key_value_offsets.reserve(metadata_size);
for (size_t i = 0; i < metadata_size; ++i) {
const auto& key = metadata.key(i);
const auto& value = metadata.value(i);
key_value_offsets.push_back(
flatbuf::CreateKeyValue(fbb, fbb.CreateString(key), fbb.CreateString(value)));
}
return fbb.CreateVector(key_value_offsets);
}
static Status KeyValueMetadataFromFlatbuffer(
const flatbuffers::Vector<KeyValueOffset>* fb_metadata,
std::shared_ptr<KeyValueMetadata>* out) {
auto metadata = std::make_shared<KeyValueMetadata>();
metadata->reserve(fb_metadata->size());
for (const auto& pair : *fb_metadata) {
if (pair->key() == nullptr) {
return Status::IOError(
"Key-pointer in custom metadata of flatbuffer-encoded Schema is null.");
}
if (pair->value() == nullptr) {
return Status::IOError(
"Value-pointer in custom metadata of flatbuffer-encoded Schema is null.");
}
metadata->Append(pair->key()->str(), pair->value()->str());
}
*out = metadata;
return Status::OK();
}
static Status FieldToFlatbuffer(FBB& fbb, const Field& field,
DictionaryMemo* dictionary_memo, FieldOffset* offset) {
auto fb_name = fbb.CreateString(field.name());
flatbuf::Type type_enum;
Offset type_offset;
std::vector<FieldOffset> children;
RETURN_NOT_OK(TypeToFlatbuffer(fbb, *field.type(), &children, &type_enum,
dictionary_memo, &type_offset));
auto fb_children = fbb.CreateVector(children);
DictionaryOffset dictionary = 0;
if (field.type()->id() == Type::DICTIONARY) {
dictionary = GetDictionaryEncoding(
fbb, checked_cast<const DictionaryType&>(*field.type()), dictionary_memo);
}
auto metadata = field.metadata();
if (metadata != nullptr) {
auto fb_custom_metadata = KeyValueMetadataToFlatbuffer(fbb, *metadata);
*offset = flatbuf::CreateField(fbb, fb_name, field.nullable(), type_enum, type_offset,
dictionary, fb_children, fb_custom_metadata);
} else {
*offset = flatbuf::CreateField(fbb, fb_name, field.nullable(), type_enum, type_offset,
dictionary, fb_children);
}
return Status::OK();
}
static Status FieldFromFlatbuffer(const flatbuf::Field* field,
const DictionaryMemo& dictionary_memo,
std::shared_ptr<Field>* out) {
std::shared_ptr<DataType> type;
const flatbuf::DictionaryEncoding* encoding = field->dictionary();
if (encoding == nullptr) {
// The field is not dictionary encoded. We must potentially visit its
// children to fully reconstruct the data type
auto children = field->children();
std::vector<std::shared_ptr<Field>> child_fields(children->size());
for (int i = 0; i < static_cast<int>(children->size()); ++i) {
RETURN_NOT_OK(
FieldFromFlatbuffer(children->Get(i), dictionary_memo, &child_fields[i]));
}
RETURN_NOT_OK(
TypeFromFlatbuffer(field->type_type(), field->type(), child_fields, &type));
} else {
// The field is dictionary encoded. The type of the dictionary values has
// been determined elsewhere, and is stored in the DictionaryMemo. Here we
// construct the logical DictionaryType object
std::shared_ptr<Array> dictionary;
RETURN_NOT_OK(dictionary_memo.GetDictionary(encoding->id(), &dictionary));
std::shared_ptr<DataType> index_type;
RETURN_NOT_OK(IntFromFlatbuffer(encoding->indexType(), &index_type));
type = ::arrow::dictionary(index_type, dictionary, encoding->isOrdered());
}
auto fb_metadata = field->custom_metadata();
std::shared_ptr<KeyValueMetadata> metadata;
if (fb_metadata != nullptr) {
RETURN_NOT_OK(KeyValueMetadataFromFlatbuffer(fb_metadata, &metadata));
}
*out = std::make_shared<Field>(field->name()->str(), type, field->nullable(), metadata);
return Status::OK();
}
static Status FieldFromFlatbufferDictionary(const flatbuf::Field* field,
std::shared_ptr<Field>* out) {
// Need an empty memo to pass down for constructing children
DictionaryMemo dummy_memo;
// Any DictionaryEncoding set is ignored here
std::shared_ptr<DataType> type;
auto children = field->children();
std::vector<std::shared_ptr<Field>> child_fields(children->size());
for (int i = 0; i < static_cast<int>(children->size()); ++i) {
RETURN_NOT_OK(FieldFromFlatbuffer(children->Get(i), dummy_memo, &child_fields[i]));
}
RETURN_NOT_OK(
TypeFromFlatbuffer(field->type_type(), field->type(), child_fields, &type));
*out = std::make_shared<Field>(field->name()->str(), type, field->nullable());
return Status::OK();
}
// will return the endianness of the system we are running on
// based the NUMPY_API function. See NOTICE.txt
flatbuf::Endianness endianness() {
union {
uint32_t i;
char c[4];
} bint = {0x01020304};
return bint.c[0] == 1 ? flatbuf::Endianness_Big : flatbuf::Endianness_Little;
}
static Status SchemaToFlatbuffer(FBB& fbb, const Schema& schema,
DictionaryMemo* dictionary_memo,
flatbuffers::Offset<flatbuf::Schema>* out) {
/// Fields
std::vector<FieldOffset> field_offsets;
for (int i = 0; i < schema.num_fields(); ++i) {
FieldOffset offset;
RETURN_NOT_OK(FieldToFlatbuffer(fbb, *schema.field(i), dictionary_memo, &offset));
field_offsets.push_back(offset);
}
auto fb_offsets = fbb.CreateVector(field_offsets);
/// Custom metadata
auto metadata = schema.metadata();
if (metadata != nullptr) {
auto fb_custom_metadata = KeyValueMetadataToFlatbuffer(fbb, *metadata);
*out = flatbuf::CreateSchema(fbb, endianness(), fb_offsets, fb_custom_metadata);
} else {
*out = flatbuf::CreateSchema(fbb, endianness(), fb_offsets);
}
return Status::OK();
}
static Status WriteFBMessage(FBB& fbb, flatbuf::MessageHeader header_type,
flatbuffers::Offset<void> header, int64_t body_length,
std::shared_ptr<Buffer>* out) {
auto message = flatbuf::CreateMessage(fbb, kCurrentMetadataVersion, header_type, header,
body_length);
fbb.Finish(message);
return WriteFlatbufferBuilder(fbb, out);
}
Status WriteSchemaMessage(const Schema& schema, DictionaryMemo* dictionary_memo,
std::shared_ptr<Buffer>* out) {
FBB fbb;
flatbuffers::Offset<flatbuf::Schema> fb_schema;
RETURN_NOT_OK(SchemaToFlatbuffer(fbb, schema, dictionary_memo, &fb_schema));
return WriteFBMessage(fbb, flatbuf::MessageHeader_Schema, fb_schema.Union(), 0, out);
}
using FieldNodeVector =
flatbuffers::Offset<flatbuffers::Vector<const flatbuf::FieldNode*>>;
using BufferVector = flatbuffers::Offset<flatbuffers::Vector<const flatbuf::Buffer*>>;
static Status WriteFieldNodes(FBB& fbb, const std::vector<FieldMetadata>& nodes,
FieldNodeVector* out) {
std::vector<flatbuf::FieldNode> fb_nodes;
fb_nodes.reserve(nodes.size());
for (size_t i = 0; i < nodes.size(); ++i) {
const FieldMetadata& node = nodes[i];
if (node.offset != 0) {
return Status::Invalid("Field metadata for IPC must have offset 0");
}
fb_nodes.emplace_back(node.length, node.null_count);
}
*out = fbb.CreateVectorOfStructs(fb_nodes);
return Status::OK();
}
static Status WriteBuffers(FBB& fbb, const std::vector<BufferMetadata>& buffers,
BufferVector* out) {
std::vector<flatbuf::Buffer> fb_buffers;
fb_buffers.reserve(buffers.size());
for (size_t i = 0; i < buffers.size(); ++i) {
const BufferMetadata& buffer = buffers[i];
fb_buffers.emplace_back(buffer.offset, buffer.length);
}
*out = fbb.CreateVectorOfStructs(fb_buffers);
return Status::OK();
}
static Status MakeRecordBatch(FBB& fbb, int64_t length, int64_t body_length,
const std::vector<FieldMetadata>& nodes,
const std::vector<BufferMetadata>& buffers,
RecordBatchOffset* offset) {
FieldNodeVector fb_nodes;
BufferVector fb_buffers;
RETURN_NOT_OK(WriteFieldNodes(fbb, nodes, &fb_nodes));
RETURN_NOT_OK(WriteBuffers(fbb, buffers, &fb_buffers));
*offset = flatbuf::CreateRecordBatch(fbb, length, fb_nodes, fb_buffers);
return Status::OK();
}
Status WriteRecordBatchMessage(int64_t length, int64_t body_length,
const std::vector<FieldMetadata>& nodes,
const std::vector<BufferMetadata>& buffers,
std::shared_ptr<Buffer>* out) {
FBB fbb;
RecordBatchOffset record_batch;
RETURN_NOT_OK(MakeRecordBatch(fbb, length, body_length, nodes, buffers, &record_batch));
return WriteFBMessage(fbb, flatbuf::MessageHeader_RecordBatch, record_batch.Union(),
body_length, out);
}
Status WriteTensorMessage(const Tensor& tensor, int64_t buffer_start_offset,
std::shared_ptr<Buffer>* out) {
using TensorDimOffset = flatbuffers::Offset<flatbuf::TensorDim>;
using TensorOffset = flatbuffers::Offset<flatbuf::Tensor>;
FBB fbb;
const auto& type = checked_cast<const FixedWidthType&>(*tensor.type());
const int elem_size = type.bit_width() / 8;
flatbuf::Type fb_type_type;
Offset fb_type;
RETURN_NOT_OK(TensorTypeToFlatbuffer(fbb, *tensor.type(), &fb_type_type, &fb_type));
std::vector<TensorDimOffset> dims;
for (int i = 0; i < tensor.ndim(); ++i) {
FBString name = fbb.CreateString(tensor.dim_name(i));
dims.push_back(flatbuf::CreateTensorDim(fbb, tensor.shape()[i], name));
}
auto fb_shape = fbb.CreateVector(dims);
auto fb_strides = fbb.CreateVector(tensor.strides());
int64_t body_length = tensor.size() * elem_size;
flatbuf::Buffer buffer(buffer_start_offset, body_length);
TensorOffset fb_tensor =
flatbuf::CreateTensor(fbb, fb_type_type, fb_type, fb_shape, fb_strides, &buffer);
return WriteFBMessage(fbb, flatbuf::MessageHeader_Tensor, fb_tensor.Union(),
body_length, out);
}
Status MakeSparseTensorIndexCOO(FBB& fbb, const SparseCOOIndex& sparse_index,
const std::vector<BufferMetadata>& buffers,
flatbuf::SparseTensorIndex* fb_sparse_index_type,
Offset* fb_sparse_index, size_t* num_buffers) {
*fb_sparse_index_type = flatbuf::SparseTensorIndex_SparseTensorIndexCOO;
const BufferMetadata& indices_metadata = buffers[0];
flatbuf::Buffer indices(indices_metadata.offset, indices_metadata.length);
*fb_sparse_index = flatbuf::CreateSparseTensorIndexCOO(fbb, &indices).Union();
*num_buffers = 1;
return Status::OK();
}
Status MakeSparseMatrixIndexCSR(FBB& fbb, const SparseCSRIndex& sparse_index,
const std::vector<BufferMetadata>& buffers,
flatbuf::SparseTensorIndex* fb_sparse_index_type,
Offset* fb_sparse_index, size_t* num_buffers) {
*fb_sparse_index_type = flatbuf::SparseTensorIndex_SparseMatrixIndexCSR;
const BufferMetadata& indptr_metadata = buffers[0];
const BufferMetadata& indices_metadata = buffers[1];
flatbuf::Buffer indptr(indptr_metadata.offset, indptr_metadata.length);
flatbuf::Buffer indices(indices_metadata.offset, indices_metadata.length);
*fb_sparse_index = flatbuf::CreateSparseMatrixIndexCSR(fbb, &indptr, &indices).Union();
*num_buffers = 2;
return Status::OK();
}
Status MakeSparseTensorIndex(FBB& fbb, const SparseIndex& sparse_index,
const std::vector<BufferMetadata>& buffers,
flatbuf::SparseTensorIndex* fb_sparse_index_type,
Offset* fb_sparse_index, size_t* num_buffers) {
switch (sparse_index.format_id()) {
case SparseTensorFormat::COO:
RETURN_NOT_OK(MakeSparseTensorIndexCOO(
fbb, checked_cast<const SparseCOOIndex&>(sparse_index), buffers,
fb_sparse_index_type, fb_sparse_index, num_buffers));
break;
case SparseTensorFormat::CSR:
RETURN_NOT_OK(MakeSparseMatrixIndexCSR(
fbb, checked_cast<const SparseCSRIndex&>(sparse_index), buffers,
fb_sparse_index_type, fb_sparse_index, num_buffers));
break;
default:
std::stringstream ss;
ss << "Unsupporoted sparse tensor format:: " << sparse_index.ToString()
<< std::endl;
return Status::NotImplemented(ss.str());
}
return Status::OK();
}
Status MakeSparseTensor(FBB& fbb, const SparseTensor& sparse_tensor, int64_t body_length,
const std::vector<BufferMetadata>& buffers,
SparseTensorOffset* offset) {
flatbuf::Type fb_type_type;
Offset fb_type;
RETURN_NOT_OK(
TensorTypeToFlatbuffer(fbb, *sparse_tensor.type(), &fb_type_type, &fb_type));
using TensorDimOffset = flatbuffers::Offset<flatbuf::TensorDim>;
std::vector<TensorDimOffset> dims;
for (int i = 0; i < sparse_tensor.ndim(); ++i) {
FBString name = fbb.CreateString(sparse_tensor.dim_name(i));
dims.push_back(flatbuf::CreateTensorDim(fbb, sparse_tensor.shape()[i], name));
}
auto fb_shape = fbb.CreateVector(dims);
flatbuf::SparseTensorIndex fb_sparse_index_type;
Offset fb_sparse_index;
size_t num_index_buffers = 0;
RETURN_NOT_OK(MakeSparseTensorIndex(fbb, *sparse_tensor.sparse_index(), buffers,
&fb_sparse_index_type, &fb_sparse_index,
&num_index_buffers));
const BufferMetadata& data_metadata = buffers[num_index_buffers];
flatbuf::Buffer data(data_metadata.offset, data_metadata.length);
const int64_t non_zero_length = sparse_tensor.non_zero_length();
*offset =
flatbuf::CreateSparseTensor(fbb, fb_type_type, fb_type, fb_shape, non_zero_length,
fb_sparse_index_type, fb_sparse_index, &data);
return Status::OK();
}
Status WriteSparseTensorMessage(const SparseTensor& sparse_tensor, int64_t body_length,
const std::vector<BufferMetadata>& buffers,
std::shared_ptr<Buffer>* out) {
FBB fbb;
SparseTensorOffset fb_sparse_tensor;
RETURN_NOT_OK(
MakeSparseTensor(fbb, sparse_tensor, body_length, buffers, &fb_sparse_tensor));
return WriteFBMessage(fbb, flatbuf::MessageHeader_SparseTensor,
fb_sparse_tensor.Union(), body_length, out);
}
Status WriteDictionaryMessage(int64_t id, int64_t length, int64_t body_length,
const std::vector<FieldMetadata>& nodes,
const std::vector<BufferMetadata>& buffers,
std::shared_ptr<Buffer>* out) {
FBB fbb;
RecordBatchOffset record_batch;
RETURN_NOT_OK(MakeRecordBatch(fbb, length, body_length, nodes, buffers, &record_batch));
auto dictionary_batch = flatbuf::CreateDictionaryBatch(fbb, id, record_batch).Union();
return WriteFBMessage(fbb, flatbuf::MessageHeader_DictionaryBatch, dictionary_batch,
body_length, out);
}
static flatbuffers::Offset<flatbuffers::Vector<const flatbuf::Block*>>
FileBlocksToFlatbuffer(FBB& fbb, const std::vector<FileBlock>& blocks) {
std::vector<flatbuf::Block> fb_blocks;
for (const FileBlock& block : blocks) {
fb_blocks.emplace_back(block.offset, block.metadata_length, block.body_length);
}
return fbb.CreateVectorOfStructs(fb_blocks);
}
Status WriteFileFooter(const Schema& schema, const std::vector<FileBlock>& dictionaries,
const std::vector<FileBlock>& record_batches,
DictionaryMemo* dictionary_memo, io::OutputStream* out) {
FBB fbb;
flatbuffers::Offset<flatbuf::Schema> fb_schema;
RETURN_NOT_OK(SchemaToFlatbuffer(fbb, schema, dictionary_memo, &fb_schema));
#ifndef NDEBUG
for (size_t i = 0; i < dictionaries.size(); ++i) {
DCHECK(BitUtil::IsMultipleOf8(dictionaries[i].offset)) << i;
DCHECK(BitUtil::IsMultipleOf8(dictionaries[i].metadata_length)) << i;
DCHECK(BitUtil::IsMultipleOf8(dictionaries[i].body_length)) << i;
}
for (size_t i = 0; i < record_batches.size(); ++i) {
DCHECK(BitUtil::IsMultipleOf8(record_batches[i].offset)) << i;
DCHECK(BitUtil::IsMultipleOf8(record_batches[i].metadata_length)) << i;
DCHECK(BitUtil::IsMultipleOf8(record_batches[i].body_length)) << i;
}
#endif
auto fb_dictionaries = FileBlocksToFlatbuffer(fbb, dictionaries);
auto fb_record_batches = FileBlocksToFlatbuffer(fbb, record_batches);
auto footer = flatbuf::CreateFooter(fbb, kCurrentMetadataVersion, fb_schema,
fb_dictionaries, fb_record_batches);
fbb.Finish(footer);
int32_t size = fbb.GetSize();
return out->Write(fbb.GetBufferPointer(), size);
}
// ----------------------------------------------------------------------
static Status VisitField(const flatbuf::Field* field, DictionaryTypeMap* id_to_field) {
const flatbuf::DictionaryEncoding* dict_metadata = field->dictionary();
if (dict_metadata == nullptr) {
// Field is not dictionary encoded. Visit children
auto children = field->children();
if (children == nullptr) {
return Status::IOError("Children-pointer of flatbuffer-encoded Field is null.");
}
for (flatbuffers::uoffset_t i = 0; i < children->size(); ++i) {
RETURN_NOT_OK(VisitField(children->Get(i), id_to_field));
}
} else {
// Field is dictionary encoded. Construct the data type for the
// dictionary (no descendents can be dictionary encoded)
std::shared_ptr<Field> dictionary_field;
RETURN_NOT_OK(FieldFromFlatbufferDictionary(field, &dictionary_field));
(*id_to_field)[dict_metadata->id()] = dictionary_field;
}
return Status::OK();
}
Status GetDictionaryTypes(const void* opaque_schema, DictionaryTypeMap* id_to_field) {
auto schema = static_cast<const flatbuf::Schema*>(opaque_schema);
if (schema->fields() == nullptr) {
return Status::IOError("Fields-pointer of flatbuffer-encoded Schema is null.");
}
int num_fields = static_cast<int>(schema->fields()->size());
for (int i = 0; i < num_fields; ++i) {
auto field = schema->fields()->Get(i);
if (field == nullptr) {
return Status::IOError("Field-pointer of flatbuffer-encoded Schema is null.");
}
RETURN_NOT_OK(VisitField(field, id_to_field));
}
return Status::OK();
}
Status GetSchema(const void* opaque_schema, const DictionaryMemo& dictionary_memo,
std::shared_ptr<Schema>* out) {
auto schema = static_cast<const flatbuf::Schema*>(opaque_schema);
if (schema->fields() == nullptr) {
return Status::IOError("Fields-pointer of flatbuffer-encoded Schema is null.");
}
int num_fields = static_cast<int>(schema->fields()->size());
std::vector<std::shared_ptr<Field>> fields(num_fields);
for (int i = 0; i < num_fields; ++i) {
const flatbuf::Field* field = schema->fields()->Get(i);
RETURN_NOT_OK(FieldFromFlatbuffer(field, dictionary_memo, &fields[i]));
}
auto fb_metadata = schema->custom_metadata();
std::shared_ptr<KeyValueMetadata> metadata;
if (fb_metadata != nullptr) {
RETURN_NOT_OK(KeyValueMetadataFromFlatbuffer(fb_metadata, &metadata));
}
*out = ::arrow::schema(std::move(fields), metadata);
return Status::OK();
}
Status GetTensorMetadata(const Buffer& metadata, std::shared_ptr<DataType>* type,
std::vector<int64_t>* shape, std::vector<int64_t>* strides,
std::vector<std::string>* dim_names) {
auto message = flatbuf::GetMessage(metadata.data());
auto tensor = reinterpret_cast<const flatbuf::Tensor*>(message->header());
int ndim = static_cast<int>(tensor->shape()->size());
for (int i = 0; i < ndim; ++i) {
auto dim = tensor->shape()->Get(i);
shape->push_back(dim->size());
auto fb_name = dim->name();
if (fb_name == 0) {
dim_names->push_back("");
} else {
dim_names->push_back(fb_name->str());
}
}
if (tensor->strides()->size() > 0) {
for (int i = 0; i < ndim; ++i) {
strides->push_back(tensor->strides()->Get(i));
}
}
return TypeFromFlatbuffer(tensor->type_type(), tensor->type(), {}, type);
}
Status GetSparseTensorMetadata(const Buffer& metadata, std::shared_ptr<DataType>* type,
std::vector<int64_t>* shape,
std::vector<std::string>* dim_names,
int64_t* non_zero_length,
SparseTensorFormat::type* sparse_tensor_format_id) {
auto message = flatbuf::GetMessage(metadata.data());
if (message->header_type() != flatbuf::MessageHeader_SparseTensor) {
return Status::IOError("Header of flatbuffer-encoded Message is not SparseTensor.");
}
if (message->header() == nullptr) {
return Status::IOError("Header-pointer of flatbuffer-encoded Message is null.");
}
auto sparse_tensor = reinterpret_cast<const flatbuf::SparseTensor*>(message->header());
int ndim = static_cast<int>(sparse_tensor->shape()->size());
for (int i = 0; i < ndim; ++i) {
auto dim = sparse_tensor->shape()->Get(i);
shape->push_back(dim->size());
auto fb_name = dim->name();
if (fb_name == 0) {
dim_names->push_back("");
} else {
dim_names->push_back(fb_name->str());
}
}
*non_zero_length = sparse_tensor->non_zero_length();
switch (sparse_tensor->sparseIndex_type()) {
case flatbuf::SparseTensorIndex_SparseTensorIndexCOO:
*sparse_tensor_format_id = SparseTensorFormat::COO;
break;
case flatbuf::SparseTensorIndex_SparseMatrixIndexCSR:
*sparse_tensor_format_id = SparseTensorFormat::CSR;
break;
default:
return Status::Invalid("Unrecognized sparse index type");
}
return TypeFromFlatbuffer(sparse_tensor->type_type(), sparse_tensor->type(), {}, type);
}
// ----------------------------------------------------------------------
// Implement message writing
Status WriteMessage(const Buffer& message, int32_t alignment, io::OutputStream* file,
int32_t* message_length) {
// ARROW-3212: We do not make assumptions that the output stream is aligned
int32_t padded_message_length = static_cast<int32_t>(message.size()) + 4;
const int32_t remainder = padded_message_length % alignment;
if (remainder != 0) {
padded_message_length += alignment - remainder;
}
// The returned message size includes the length prefix, the flatbuffer,
// plus padding
*message_length = padded_message_length;
// Write the flatbuffer size prefix including padding
int32_t flatbuffer_size = padded_message_length - 4;
RETURN_NOT_OK(file->Write(&flatbuffer_size, sizeof(int32_t)));
// Write the flatbuffer
RETURN_NOT_OK(file->Write(message.data(), message.size()));
// Write any padding
int32_t padding = padded_message_length - static_cast<int32_t>(message.size()) - 4;
if (padding > 0) {
RETURN_NOT_OK(file->Write(kPaddingBytes, padding));
}
return Status::OK();
}
} // namespace internal
} // namespace ipc
} // namespace arrow
| {
"content_hash": "2c430c359e6e98f35a4ebcba3fd68b99",
"timestamp": "",
"source": "github",
"line_count": 1078,
"max_line_length": 90,
"avg_line_length": 37.442486085343226,
"alnum_prop": 0.6336744047766519,
"repo_name": "pcmoritz/arrow",
"id": "da6711395f8ead667512d0f02d5c37b308ed607e",
"size": "41780",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "cpp/src/arrow/ipc/metadata-internal.cc",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "73655"
},
{
"name": "Awk",
"bytes": "3683"
},
{
"name": "Batchfile",
"bytes": "33278"
},
{
"name": "C",
"bytes": "380611"
},
{
"name": "C#",
"bytes": "333149"
},
{
"name": "C++",
"bytes": "6386150"
},
{
"name": "CMake",
"bytes": "351656"
},
{
"name": "CSS",
"bytes": "3946"
},
{
"name": "Dockerfile",
"bytes": "39378"
},
{
"name": "FreeMarker",
"bytes": "2256"
},
{
"name": "Go",
"bytes": "343789"
},
{
"name": "HTML",
"bytes": "23351"
},
{
"name": "Java",
"bytes": "2205214"
},
{
"name": "JavaScript",
"bytes": "83169"
},
{
"name": "Lua",
"bytes": "8741"
},
{
"name": "M4",
"bytes": "8628"
},
{
"name": "MATLAB",
"bytes": "9068"
},
{
"name": "Makefile",
"bytes": "44948"
},
{
"name": "Meson",
"bytes": "36954"
},
{
"name": "Objective-C",
"bytes": "2533"
},
{
"name": "Perl",
"bytes": "3799"
},
{
"name": "Python",
"bytes": "1439764"
},
{
"name": "R",
"bytes": "149758"
},
{
"name": "Ruby",
"bytes": "583523"
},
{
"name": "Rust",
"bytes": "1192382"
},
{
"name": "Shell",
"bytes": "218636"
},
{
"name": "Thrift",
"bytes": "137291"
},
{
"name": "TypeScript",
"bytes": "836757"
}
],
"symlink_target": ""
} |
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (101, 40.36, 70.36);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (102, 47.41, 83.41);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (103, 37.09, 84.09);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (104, 49.29, 63.29);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (105, 33.38, 73.38);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (106, 44.39, 82.39);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (107, 17.35, 52.35);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (108, 22.37, 27.37);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (109, 26.03, 44.03);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (110, 43.66, 89.66);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (111, 24.67, 47.67);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (112, 25.27, 73.27);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (113, 10.27, 27.27);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (114, 43.61, 62.61);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (115, 22.26, 56.26);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (116, 30.03, 56.03);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (117, 17.96, 22.96);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (118, 29.96, 29.96);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (119, 14.66, 48.66);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (120, 28.27, 37.27);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (121, null, null);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (122, 42.74, 42.74);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (123, 22.04, 50.04);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (124, 14.73, 54.73);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (125, 47.64, 76.64);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (126, 16.14, 64.14);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (127, 28.93, 77.93);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (128, 26.99, 66.99);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (129, 38.03, 60.03);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (130, 35.72, 50.72);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (131, 49.86, 66.86);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (132, 38.27, 44.27);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (133, 10.46, 51.46);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (134, null, null);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (135, 27.73, 72.73);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (136, 40.71, 86.71);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (137, 23.33, 59.33);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (138, 49.57, 67.57);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (139, 35.41, 51.41);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (140, 19.15, 44.15);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (141, 48.7, 67.7);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (142, null, null);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (143, 45.14, 59.14);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (144, 39.93, 62.93);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (145, null, null);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (146, 14.21, 23.21);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (147, 14.7, 46.7);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (148, 16.57, 28.57);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (149, 12.56, 26.56);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (150, 22.35, 67.35);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (151, 35.17, 48.17);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (152, 11.18, 20.18);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (153, null, null);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (154, 31.01, 69.01);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (155, 32.36, 38.36);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (156, 20.3, 20.3);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (157, 25.49, 43.49);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (158, 17.44, 64.44);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (159, 13.5, 52.5);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (160, 32.51, 46.51);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (161, 29.32, 58.32);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (162, 14.2, 20.2);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (163, 44.05, 85.05);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (164, 39.19, 39.19);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (165, 44.93, 91.93);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (166, 27.27, 71.27);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (167, null, null);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (168, null, null);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (169, 14.31, 32.31);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (170, 31.59, 73.59);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (171, 45.14, 84.14);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (172, 10.95, 21.95);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (173, 49.38, 66.38);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (174, 16.49, 46.49);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (175, 36.57, 73.57);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (176, 31.31, 53.31);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (177, 28.13, 74.13);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (178, 29.08, 65.08);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (179, 20.34, 56.34);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (180, null, null);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (181, 30.77, 79.77);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (182, 26.29, 61.29);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (183, 45.37, 52.37);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (184, 39.47, 77.47);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (185, 17.24, 28.24);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (186, 48.85, 91.85);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (187, 32.41, 38.41);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (188, 41.69, 42.69);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (189, 18.92, 60.92);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (190, 24.25, 47.25);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (191, 22.07, 42.07);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (192, 12.95, 18.95);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (193, null, null);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (194, 49.1, 63.1);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (195, 37.52, 74.52);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (196, 38.31, 65.31);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (197, null, null);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (198, 29.27, 62.27);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (199, 18.37, 50.37);
insert into PREFERENCIA (idusuario, precioinicial, preciofinal) values (200, 47.98, 54.98);
| {
"content_hash": "818c199f8e33c9e2b89aca24061bc3ec",
"timestamp": "",
"source": "github",
"line_count": 100,
"max_line_length": 91,
"avg_line_length": 91.68,
"alnum_prop": 0.7731239092495636,
"repo_name": "js-diaz/sistrans",
"id": "8d589856321d8bcfe21c587eac8de49d8d6ba94b",
"size": "9168",
"binary": false,
"copies": "1",
"ref": "refs/heads/Salvar2.0",
"path": "data/inicializacion/PREFERENCIA.sql",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "12842"
},
{
"name": "HTML",
"bytes": "336437"
},
{
"name": "Java",
"bytes": "1010809"
},
{
"name": "JavaScript",
"bytes": "827"
},
{
"name": "PLSQL",
"bytes": "4096"
}
],
"symlink_target": ""
} |
Command interface for data sources
| {
"content_hash": "05d28ebcc409fb52fd97902ed2720ce3",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 34,
"avg_line_length": 35,
"alnum_prop": 0.8571428571428571,
"repo_name": "Consolefire/data-commando",
"id": "7be387c74a7e4e67e695c9b388e2a04b29fcb382",
"size": "51",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "79910"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
Nectandra intermedia Mez
### Remarks
null | {
"content_hash": "2d520e67add2ad434533d03f22bef37d",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 11.23076923076923,
"alnum_prop": 0.7328767123287672,
"repo_name": "mdoering/backbone",
"id": "f988ea5c24d0ac2dd3a9744d85d333d10be0a93d",
"size": "208",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Laurales/Lauraceae/Pleurothyrium/Pleurothyrium intermedium/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8" ?>
<Datatable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- HeroesDescriptors.xml -->
<SimulationObjectDescriptor Name="ClassHero" Type="Class" Serializable="false">
<SimulationObjectPropertyDescriptors>
<SimulationObjectPropertyDescriptor Name="Level" Value="1" IsSerializable="true"/>
<SimulationObjectPropertyDescriptor Name="CurrentXP" Value="0" IsSerializable="true"/>
<SimulationObjectPropertyDescriptor Name="Upkeep" Value="-2" MinValue="Negative" MaxValue="-2"/>
<SimulationObjectPropertyDescriptor Name="Fatigue" Value="0" IsSerializable="true"/>
<SimulationObjectPropertyDescriptor Name="AbilityPoint" Value="0" MinValue="Negative" IsSerializable="true"/> <!-- temp to test ability tree -->
<SimulationObjectPropertyDescriptor Name="AbilityPointSpent" Value="0" IsSerializable="true"/>
<SimulationObjectPropertyDescriptor Name="FatigueRecoveryPerTurn" Value="0.2" IsSerializable="true"/>
<SimulationObjectPropertyDescriptor Name="HealingCostBonus" Value="1" IsSerializable="true"/>
<SimulationObjectPropertyDescriptor Name="BattleCardCostBonus" Value="1" IsSerializable="true"/>
<SimulationObjectPropertyDescriptor Name="AssignationDelayLimit" Value="6" IsSerializable="true"/>
<!-- 5 attributes -->
<SimulationObjectPropertyDescriptor Name="Labor" Value="1" />
<SimulationObjectPropertyDescriptor Name="Wit" Value="1" />
<SimulationObjectPropertyDescriptor Name="Melee" Value="1" />
<SimulationObjectPropertyDescriptor Name="Offense" Value="1" />
<SimulationObjectPropertyDescriptor Name="Defense" Value="1" />
<!-- 5 bonus for attribute. This will be multiplied by the attribute and add to the target (system, fleet, module, etc) as a percent.
Ex : Wit = 7, WitBonus = 5, -> Add to the StarSystem a (7 * 5) = 35% of bonus on science and money.
Wit = 7, WitBonus = 1, -> Add to the StarSystem a (7 * 1) = 7% of bonus on science and money.
-->
<SimulationObjectPropertyDescriptor Name="LaborBonus" Value="0.02"/>
<SimulationObjectPropertyDescriptor Name="WitBonus" Value="0.02"/>
<SimulationObjectPropertyDescriptor Name="MeleeDefenseAddBonus" Value="5"/>
<SimulationObjectPropertyDescriptor Name="MeleeDefenseMultiplyBonus" Value="0.05"/>
<SimulationObjectPropertyDescriptor Name="MeleeInvasionBonus" Value="0.10"/>
<SimulationObjectPropertyDescriptor Name="OffenseBonus" Value="0.04"/>
<SimulationObjectPropertyDescriptor Name="DefenseBonus" Value="0.04"/>
<SimulationObjectPropertyDescriptor Name="HullWeaknessBonus" Value="-0.01"/>
<!-- XP Bonuses. Each Hero can modify the XP he gains -->
<SimulationObjectPropertyDescriptor Name="XPPerBattleBonus" Value="1" />
<SimulationObjectPropertyDescriptor Name="XPPerAssignedTurnBonus" Value="1" />
<SimulationObjectPropertyDescriptor Name="XPPerConstructionBonus" Value="1" />
<SimulationObjectPropertyDescriptor Name="XPPerEnnemyInjuredBonus" Value="1" />
<!-- Leech -->
<SimulationObjectPropertyDescriptor Name="MoneyLeechBonus" Value="0" />
<SimulationObjectPropertyDescriptor Name="ScienceLeechBonus" Value="0" />
</SimulationObjectPropertyDescriptors>
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="Upkeep" OperationType="Soustraction" BinaryOperationType="Multiplication" Right="2" Left="$(AbilityPointSpent)" Path="ClassHero"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="DamageMin" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Offense)" Left="$(OffenseBonus)" Path="../ClassFleet/ClassShip/WeaponModule"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="DamageMax" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Offense)" Left="$(OffenseBonus)" Path="../ClassFleet/ClassShip/WeaponModule"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="MilitaryPower" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Offense)" Left="$(OffenseBonus)" Path="../ClassFleet/ClassShip/WeaponModule"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="Defense" OperationType="Addition" BinaryOperationType="Multiplication" Right="$(Melee)" Left="$(MeleeDefenseAddBonus)" Path="../ClassStarSystem"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="Defense" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Melee)" Left="$(MeleeDefenseMultiplyBonus)" Path="../ClassStarSystem"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="MilitaryPowerInvasion" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Melee)" Left="$(MeleeInvasionBonus)" Path="../ClassFleet"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="HullWeakness" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Defense)" Left="$(HullWeaknessBonus)" Path="../ClassFleet/ClassShip"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="Defense" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Defense)" Left="$(DefenseBonus)" Path="../ClassFleet/ClassShip/DefenseModule"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="MilitaryPower" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Defense)" Left="$(DefenseBonus)" Path="../ClassFleet/ClassShip/DefenseModule"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="AbilityPoint" Value="$(AbilityPointSpent)" OperationType="Soustraction" Path="ClassHero"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="Science" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Wit)" Left="$(WitBonus)" Path="../ClassStarSystem"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="Money" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Wit)" Left="$(WitBonus)" Path="../ClassStarSystem"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="MoneyToConvert" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Wit)" Left="$(WitBonus)" Path="../ClassStarSystem" TooltipVisibility="false" />
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="Food" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Labor)" Left="$(LaborBonus)" Path="../ClassStarSystem"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="Industry" OperationType="Percent" BinaryOperationType="Multiplication" Right="$(Labor)" Left="$(LaborBonus)" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<!-- HeroesClassesDescriptor -->
<SimulationObjectDescriptor Name="HeroClassAdministrator" Type="HeroClass" Serializable="false">
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerBattleBonus" Value="-0.25" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerAssignedTurnBonus" Value="0.5" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerConstructionBonus" Value="0.5" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerEnnemyInjuredBonus" Value="-0.25" OperationType="Percent" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroClassCorporate" Type="HeroClass" Serializable="false">
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerBattleBonus" Value="-0.25" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerAssignedTurnBonus" Value="0.5" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerConstructionBonus" Value="0.5" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerEnnemyInjuredBonus" Value="-0.25" OperationType="Percent" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroClassPilot" Type="HeroClass" Serializable="false">
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerBattleBonus" Value="0.5" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerAssignedTurnBonus" Value="-0.25" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerConstructionBonus" Value="-0.25" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerEnnemyInjuredBonus" Value="0.5" OperationType="Percent" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroClassCommander" Type="HeroClass" Serializable="false">
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerBattleBonus" Value="0.5" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerAssignedTurnBonus" Value="-0.25" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerConstructionBonus" Value="-0.25" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerEnnemyInjuredBonus" Value="0.5" OperationType="Percent" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroClassAdventurer" Type="HeroClass" Serializable="false">
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerBattleBonus" Value="0.25" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerAssignedTurnBonus" Value="0.25" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerConstructionBonus" Value="0.25" OperationType="Percent" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="XPPerEnnemyInjuredBonus" Value="0.25" OperationType="Percent" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroClassEndlessAbility" Type="HeroUniqueBonus" Serializable="false"> <!-- little temporary hack: a descriptor should be: Type+DesciptorName-->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="AbilityPoint" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Upkeep" Value="2" OperationType="Addition" Path="ClassHero" TooltipVisibility="false"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroClassEndlessVirtuals" Type="HeroUniqueBonus" Serializable="false">
<!-- little temporary hack: a descriptor should be: Type+DesciptorName-->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Industry" Value="5" OperationType="Addition" Path="../ClassStarSystem/ClassPlanet,PlanetTypeGasHydrogen" />
<SimulationObjectPropertyModifierDescriptor TargetProperty="Industry" Value="5" OperationType="Addition" Path="../ClassStarSystem/ClassPlanet,PlanetTypeGasHelium" />
<SimulationObjectPropertyModifierDescriptor TargetProperty="Industry" Value="5" OperationType="Addition" Path="../ClassStarSystem/ClassPlanet,PlanetTypeGasMethane" />
<SimulationObjectPropertyModifierDescriptor TargetProperty="ShipCostBonus" Value="-0.1" OperationType="Percent" Path="../ClassStarSystem" />
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroClassEndlessArchivist" Type="HeroUniqueBonus" Serializable="false">
<!-- little temporary hack: a descriptor should be: Type+DesciptorName-->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Science" Value="2" OperationType="Addition" Path="../ClassStarSystem/ClassPlanet" />
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<!-- HeroesAbilitiesDescriptor -->
<!-- TEST -->
<SimulationObjectDescriptor Name="HeroAbilityCommon00" Type="HeroAbilities">
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="AbilityPoint" Value="99" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<!-- Example :-->
<SimulationObjectDescriptor Name="HeroAbilityExample" Type="HeroAbilities">
<SimulationObjectPropertyModifierDescriptors>
<!-- 30% Wit points are added to Trade Routes bonuses (need to be executed after the bonus computing)-->
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="TradeRoutesBonuses"
OperationType="Addition"
BinaryOperationType="Multiplication" Left="0.3" Right="$(Wit)"
Path="./ClassStarSystem"
Priority="1"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<!-- Common -->
<SimulationObjectDescriptor Name="HeroAbilityCommon01" Type="HeroAbilities">
<!-- Veteran 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Labor" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Wit" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Melee" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Offense" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Defense" Value="1" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon02" Type="HeroAbilities">
<!-- Veteran 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Labor" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Wit" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Melee" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Offense" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Defense" Value="1" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon03" Type="HeroAbilities">
<!-- Veteran 3 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Labor" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Wit" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Melee" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Offense" Value="1" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Defense" Value="1" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon04" Type="HeroAbilities">
<!-- Veteran 4 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Labor" Value="2" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Wit" Value="2" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Melee" Value="2" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Offense" Value="2" OperationType="Addition" Path="ClassHero"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Defense" Value="2" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon05" Type="HeroAbilities">
<!-- Cyberskilled -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="AbilityPoint" Value="2" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon06" Type="HeroAbilities">
<!-- Director 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Labor" Value="3" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon07" Type="HeroAbilities">
<!-- Director 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Labor" Value="3" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon08" Type="HeroAbilities">
<!-- Director 3 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Labor" Value="4" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon09" Type="HeroAbilities">
<!-- Negotiator 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Wit" Value="3" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon10" Type="HeroAbilities">
<!-- Negotiator 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Wit" Value="3" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon11" Type="HeroAbilities">
<!-- Negotiator 3 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Wit" Value="4" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon12" Type="HeroAbilities">
<!-- Assailant 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Offense" Value="3" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon13" Type="HeroAbilities">
<!-- Assailant 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Offense" Value="3" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon14" Type="HeroAbilities">
<!-- Assailant 3 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Offense" Value="4" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon15" Type="HeroAbilities">
<!-- Defender 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Defense" Value="3" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon16" Type="HeroAbilities">
<!-- Defender 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Defense" Value="3" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon17" Type="HeroAbilities">
<!-- Defender 3 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Defense" Value="4" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon18" Type="HeroAbilities">
<!-- Ground Pounder 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Melee" Value="3" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon19" Type="HeroAbilities">
<!-- Ground Pounder 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Melee" Value="3" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon20" Type="HeroAbilities">
<!-- Ground Pounder 3 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Melee" Value="4" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon21" Type="HeroAbilities">
<!-- Hardy Constitution 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="HealingCostBonus" Value="-0.40" OperationType="Percent" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon25" Type="HeroAbilities">
<!-- Dust Wielder 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="BattleCardCostBonus" Value="-0.30" OperationType="Percent" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommon26" Type="HeroAbilities">
<!-- Dust Wielder 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="BattleCardCostBonus" Value="-0.50" OperationType="Percent" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<!-- Administrator -->
<SimulationObjectDescriptor Name="HeroAbilityAdministrator01" Type="HeroAbilities">
<!-- Civil Engineer -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Industry" Value="10" OperationType="Addition" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdministrator02" Type="HeroAbilities">
<!-- Crop Geneticist 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Food" Value="15" OperationType="Addition" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdministrator03" Type="HeroAbilities">
<!-- Crop Geneticist 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Food" Value="2" OperationType="Addition" Path="../ClassStarSystem/ClassPlanet"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdministrator04" Type="HeroAbilities">
<!-- Minister of Propaganda 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Approval" Value="15" OperationType="Addition" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdministrator05" Type="HeroAbilities">
<!-- Minister of Propaganda 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Approval" Value="35" OperationType="Addition" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdministrator06" Type="HeroAbilities">
<!-- Motivational Leader -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Food" Value="0.20" OperationType="Percent" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdministrator07" Type="HeroAbilities">
<!-- Efficient Schooling -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Industry" Value="0.20" OperationType="Percent" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdministrator10" Type="HeroAbilities">
<!-- Emergency Preparedness 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Defense" Value="200" OperationType="Addition" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdministrator11" Type="HeroAbilities">
<!-- Emergency Preparedness 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="Defense"
OperationType="Addition"
BinaryOperationType="Multiplication"
Right="$(Population)"
Left="50"
Path="../ClassStarSystem"
BindOnSource="false"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdministrator12" Type="HeroAbilities">
<!-- Black Market -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Money" Value="0.50" OperationType="Percent" Path="../ClassStarSystem,StarSystemStatusBlocus"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Money" Value="0.50" OperationType="Percent" Path="../ClassStarSystem,StarSystemStatusSiege"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<!-- Corporate -->
<SimulationObjectDescriptor Name="HeroAbilityCorporate01" Type="HeroAbilities">
<!-- Smart Investor 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="TradeRoutesBonuses" Value="0.20" OperationType="Percent" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCorporate02" Type="HeroAbilities">
<!-- Smart Investor 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="TradeRoutesBonuses" Value="0.30" OperationType="Percent" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<!-- Smart Investor 3 -->
<!--<SimulationObjectDescriptor Name="HeroAbilityCorporate03" Type="HeroAbilities">
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="TradeRoutesBonuses" Value="0.30" OperationType="Percent" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>-->
<SimulationObjectDescriptor Name="HeroAbilityCorporate04" Type="HeroAbilities">
<!-- Savvy Business 1 -->
<SimulationObjectPropertyModifierDescriptors>
<!-- 5% Wit points are added to Trade Routes bonuses (need to be executed after the bonus computing)-->
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="TradeRoutesBonuses"
OperationType="Percent"
BinaryOperationType="Multiplication" Left="0.02" Right="$(Wit)"
Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCorporate05" Type="HeroAbilities">
<!-- Savvy Business 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="TradeRoutesBonuses"
OperationType="Percent"
BinaryOperationType="Multiplication" Left="0.03" Right="$(Wit)"
Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCorporate06" Type="HeroAbilities">
<!-- Savvy Business 3 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="TradeRoutesBonuses"
OperationType="Percent"
BinaryOperationType="Multiplication" Left="0.04" Right="$(Wit)"
Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCorporate07" Type="HeroAbilities">
<!-- Security Specialist -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DetectionRadius" Value="10" OperationType="Addition" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCorporate10" Type="HeroAbilities">
<!-- Value Creator 1 -->
<!-- TO DO : Needs to be tested -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="MaxTradeRoutes" Value="1" OperationType="Addition" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCorporate11" Type="HeroAbilities">
<!-- Value Creator 2 -->
<!-- TO DO : Needs to be tested -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="MaxTradeRoutes" Value="2" OperationType="Addition" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCorporate12" Type="HeroAbilities">
<!-- Industry-Academic Partnerships -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Science" Value="0.2" OperationType="Percent" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCorporate13" Type="HeroAbilities">
<!-- Co-opetition -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Science" Value="15" OperationType="Addition" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCorporate14" Type="HeroAbilities">
<!-- Dust Miser -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Money" Value="20" OperationType="Addition" Path="../ClassStarSystem"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="MoneyToConvert" Value="20" OperationType="Addition" Path="../ClassStarSystem" TooltipVisibility="false"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<!-- Commander -->
<SimulationObjectDescriptor Name="HeroAbilityCommander01" Type="HeroAbilities">
<!-- Tactician 1 -->
<!-- as it affects opponent fleet, cf.HeroAbilityCommander01Battle below -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander01Battle" Type="NonPersistentBattle">
<!-- Tactician 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Accuracy" Value="-0.06" OperationType="Percent" Path="../ClassFleet/ClassShip/WeaponModule"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander02" Type="HeroAbilities">
<!-- Tactician 2 -->
<!-- as it affects opponent fleet, cf.HeroAbilityCommander02Battle below -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander02Battle" Type="NonPersistentBattle">
<!-- Tactician 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Accuracy" Value="-0.07" OperationType="Percent" Path="../ClassFleet/ClassShip/WeaponModule"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander03" Type="HeroAbilities">
<!-- Fearless Foe -->
<!-- as it affects opponent fleet, cf.HeroAbilityCommander03Battle below -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander03Battle" Type="NonPersistentBattle">
<!-- Fearless Foe -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DamageMin" Value="0.25" OperationType="Percent" Path="../ClassFleet/ClassShip/WeaponModule"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DamageMax" Value="0.25" OperationType="Percent" Path="../ClassFleet/ClassShip/WeaponModule"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander05" Type="HeroAbilities">
<!-- Team Spirit 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="TeamSpiritBonusActivated" Value="1" OperationType="Addition" Path="../ClassFleet" TooltipVisibility="false"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander07" Type="HeroAbilities">
<!-- Hyper-driven -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="AssignationDelayLimit" Value="-3" OperationType="Addition" Path="ClassHero"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander08" Type="HeroAbilities">
<!-- Battle Action : Dust Warheads -->
<!-- Cf. BattleCardsDescriptors.xml -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander10" Type="HeroAbilities">
<!-- Battle Action : Ultimate Defense -->
<!-- Cf. BattleCardsDescriptors.xml -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander11" Type="HeroAbilities">
<!-- Battle Action : Emergency Shelter -->
<!-- Cf. BattleCardsDescriptors.xml -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander12" Type="HeroAbilities">
<!-- Commander-in-Chief 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="CurrentXP" Value="0.5" OperationType="Addition" Path="../ClassFleet/ClassShip"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityCommander13" Type="HeroAbilities">
<!-- Commander-in-Chief 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="CurrentXP" Value="1" OperationType="Addition" Path="../ClassFleet/ClassShip"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<!-- Pilot -->
<SimulationObjectDescriptor Name="HeroAbilityPilot01" Type="HeroAbilities">
<!-- Engine Tuner 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Speed" Value="2" OperationType="Addition" Path="../ClassFleet/ClassShip"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot02" Type="HeroAbilities">
<!-- Engine Tuner 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Speed" Value="3" OperationType="Addition" Path="../ClassFleet/ClassShip"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot03" Type="HeroAbilities">
<!-- Tinkerer 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DamageMin" Value="0.2" OperationType="Percent" Path="../ClassFleet/ClassShip/WeaponModule,Missile"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DamageMax" Value="0.2" OperationType="Percent" Path="../ClassFleet/ClassShip/WeaponModule,Missile"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Defense" Value="0.3" OperationType="Percent" Path="../ClassFleet/ClassShip/DefenseModule,Missile"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot04" Type="HeroAbilities">
<!-- Tinkerer 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DamageMin" Value="0.2" OperationType="Percent" Path="../ClassFleet/ClassShip/WeaponModule,Laser"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DamageMax" Value="0.2" OperationType="Percent" Path="../ClassFleet/ClassShip/WeaponModule,Laser"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Defense" Value="0.3" OperationType="Percent" Path="../ClassFleet/ClassShip/DefenseModule,Laser"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot05" Type="HeroAbilities">
<!-- Lethal Modder -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="DamageMin" OperationType="Addition" BinaryOperationType="Division" Right="100" Left="$(NumberPerSalve)" Path="../ClassFleet/ClassShip/WeaponModule" BindOnSource="false" TooltipVisibility="false"/>
<SimulationObjectPropertyBinaryModifierDescriptor TargetProperty="DamageMax" OperationType="Addition" BinaryOperationType="Division" Right="100" Left="$(NumberPerSalve)" Path="../ClassFleet/ClassShip/WeaponModule" BindOnSource="false" TooltipVisibility="false"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot06" Type="HeroAbilities">
<!-- Defense Systems Specialist -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="Defense" Value="125" OperationType="Addition" Path="../ClassFleet/ClassShip/DefenseModule"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot07" Type="HeroAbilities">
<!-- Fast Reboot 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="HealingAllied" Value="5" OperationType="Addition" Path="../ClassFleet/ClassShip"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot08" Type="HeroAbilities">
<!-- Fast Reboot 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="HealingPercentAllied" Value="0.02" OperationType="Percent" Path="../ClassFleet/ClassShip"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot09" Type="HeroAbilities">
<!-- Rapid Adaptation -->
<SimulationObjectPropertyModifierDescriptors>
<!-- gives healing outside territory only if Fast reboot abilities have been unlocked -->
<SimulationObjectPropertyModifierDescriptor TargetProperty="Healing" Value="5" OperationType="Addition" Path="ClassHero,HeroAbilityPilot07/./ClassFleet/ClassShip"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="HealingPercent" Value="0.02" OperationType="Percent" Path="ClassHero,HeroAbilityPilot08/./ClassFleet/ClassShip"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot11" Type="HeroAbilities">
<!-- Battle Action : Dust Barrier -->
<!-- Cf. BattleCardsDescriptors.xml -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot12" Type="HeroAbilities">
<!-- Battle Action : Power Convergence -->
<!-- Cf. BattleCardsDescriptors.xml -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot14" Type="HeroAbilities">
<!-- Battle Action : Gravity Well -->
<!-- Cf. BattleCardsDescriptors.xml -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityPilot15" Type="HeroAbilities">
<!-- Harvester -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DustBonusPerCPAfterEncounter" Value="50" OperationType="Addition" Path="../ClassEmpire" IsBase="true"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<!-- Adventurer -->
<SimulationObjectDescriptor Name="HeroAbilityAdventurer01" Type="HeroAbilities">
<!-- Foresight -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DetectionRadius" Value="10" OperationType="Addition" Path="../ClassStarSystem"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DetectionRadius" Value="5" OperationType="Addition" Path="../ClassFleet"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdventurer02" Type="HeroAbilities">
<!-- Inside Informant 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="MoneyLeechBonus" Value="0.25" OperationType="Addition" Path="ClassHero" TooltipVisibility="false"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdventurer03" Type="HeroAbilities">
<!-- Inside Informant 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="MoneyLeechBonus" Value="0.5" OperationType="Addition" Path="ClassHero" TooltipVisibility="false"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdventurer04" Type="HeroAbilities">
<!-- Master Hacker -->
<!-- hard-coded -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdventurer05" Type="HeroAbilities">
<!-- Saboteur -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DustBonusPerCPAfterEncounter" Value="20" OperationType="Addition" Path="../ClassEmpire" IsBase="true"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdventurer06" Type="HeroAbilities">
<!-- Blockade Runner -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="BypassBlockade" Value="1" OperationType="Addition" Path="../ClassStarSystem"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdventurer08" Type="HeroAbilities">
<!-- Insight 1 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="ScienceLeechBonus" Value="0.25" OperationType="Addition" Path="ClassHero" TooltipVisibility="false"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdventurer09" Type="HeroAbilities">
<!-- Snare -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DamageMin" Value="0.1" OperationType="Percent" Path="ClassHero/ClassFleet/ClassShip/WeaponModule"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="DamageMax" Value="0.1" OperationType="Percent" Path="ClassHero/ClassFleet/ClassShip/WeaponModule"/>
<SimulationObjectPropertyModifierDescriptor TargetProperty="MilitaryPowerInvasion" Value="0.15" OperationType="Percent" Path="ClassHero/ClassFleet"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdventurer10" Type="HeroAbilities">
<!-- Battle Action : Armor Weak Point -->
<!-- Cf. BattleCardsDescriptors.xml -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdventurer12" Type="HeroAbilities">
<!-- Insight 2 -->
<SimulationObjectPropertyModifierDescriptors>
<SimulationObjectPropertyModifierDescriptor TargetProperty="ScienceLeechBonus" Value="0.5" OperationType="Addition" Path="ClassHero" TooltipVisibility="false"/>
</SimulationObjectPropertyModifierDescriptors>
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdventurer13" Type="HeroAbilities">
<!-- Battle Action : Beam Surge -->
<!-- Cf. BattleCardsDescriptors.xml -->
</SimulationObjectDescriptor>
<SimulationObjectDescriptor Name="HeroAbilityAdventurer14" Type="HeroAbilities">
<!-- Battle Action : Illusion -->
<!-- Cf. BattleCardsDescriptors.xml -->
</SimulationObjectDescriptor>
</Datatable>
| {
"content_hash": "2b01d949cd7b17053e9b1d3d3534e0b3",
"timestamp": "",
"source": "github",
"line_count": 794,
"max_line_length": 268,
"avg_line_length": 63.622166246851386,
"alnum_prop": 0.7617388550162325,
"repo_name": "kbzod/es-cybertron",
"id": "f5c7a5e5bf76b512378876dcbb445cb078686340",
"size": "50516",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Simulation/HeroDescriptor.xml",
"mode": "33261",
"license": "mit",
"language": [],
"symlink_target": ""
} |
@class VIHAArea;
@interface VIHAFacilitiesViewController : KNMKSearchableIndexedTableViewController
- (id)initWithArea:(VIHAArea *)area;
@end
| {
"content_hash": "ff433224e913567b454ee0efebb19bb4",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 82,
"avg_line_length": 20.714285714285715,
"alnum_prop": 0.8206896551724138,
"repo_name": "knickmack/VIHA",
"id": "15682fac6267390100bbc5f73ec46b3282020eec",
"size": "356",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Classes/VIHAFacilitiesViewController.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "7963"
},
{
"name": "CSS",
"bytes": "18074"
},
{
"name": "Objective-C",
"bytes": "287300"
},
{
"name": "Ruby",
"bytes": "53"
},
{
"name": "Shell",
"bytes": "1915"
}
],
"symlink_target": ""
} |
use strict;
use Data::Dumper;
use Bio::KBase::Utilities::ScriptThing;
use Carp;
#
# This is a SAS Component
#
=head1 NAME
get_entity_ProteinSequence
=head1 SYNOPSIS
get_entity_ProteinSequence [-c N] [-a] [--fields field-list] < ids > table.with.fields.added
=head1 DESCRIPTION
We use the concept of ProteinSequence as an amino acid
string with an associated MD5 value. It is easy to access the
set of Features that relate to a ProteinSequence. While function
is still associated with Features (and may be for some time),
publications are associated with ProteinSequences (and the inferred
impact on Features is through the relationship connecting
ProteinSequences to Features).
Example:
get_entity_ProteinSequence -a < ids > table.with.fields.added
would read in a file of ids and add a column for each field in the entity.
The standard input should be a tab-separated table (i.e., each line
is a tab-separated set of fields). Normally, the last field in each
line would contain the id. If some other column contains the id,
use
-c N
where N is the column (from 1) that contains the id.
This is a pipe command. The input is taken from the standard input, and the
output is to the standard output.
=head2 Related entities
The ProteinSequence entity has the following relationship links:
=over 4
=item HasAssertedFunctionFrom Source
=item HasConservedDomainModel ConservedDomainModel
=item IsATopicOf Publication
=item IsAlignedProteinComponentOf AlignmentRow
=item IsProteinFor Feature
=item IsProteinMemberOf Family
=back
=head1 COMMAND-LINE OPTIONS
Usage: get_entity_ProteinSequence [arguments] < ids > table.with.fields.added
-a Return all available fields.
-c num Select the identifier from column num.
-i filename Use filename rather than stdin for input.
--fields list Choose a set of fields to return. List is a comma-separated list of strings.
-a Return all available fields.
--show-fields List the available fields.
The following fields are available:
=over 4
=item sequence
The sequence contains the letters corresponding to the protein's amino acids.
=back
=head1 AUTHORS
L<The SEED Project|http://www.theseed.org>
=cut
our $usage = <<'END';
Usage: get_entity_ProteinSequence [arguments] < ids > table.with.fields.added
-c num Select the identifier from column num
-i filename Use filename rather than stdin for input
--fields list Choose a set of fields to return. List is a comma-separated list of strings.
-a Return all available fields.
--show-fields List the available fields.
The following fields are available:
sequence
The sequence contains the letters corresponding to the protein's amino acids.
END
use Bio::KBase::CDMI::CDMIClient;
use Getopt::Long;
#Default fields
my @all_fields = ( 'sequence' );
my %all_fields = map { $_ => 1 } @all_fields;
my $column;
my $a;
my $f;
my $i = "-";
my @fields;
my $help;
my $show_fields;
my $geO = Bio::KBase::CDMI::CDMIClient->new_get_entity_for_script('c=i' => \$column,
"all-fields|a" => \$a,
"help|h" => \$help,
"show-fields" => \$show_fields,
"fields=s" => \$f,
'i=s' => \$i);
if ($help)
{
print $usage;
exit 0;
}
if ($show_fields)
{
print STDERR "Available fields:\n";
print STDERR "\t$_\n" foreach @all_fields;
exit 0;
}
if ($a && $f)
{
print STDERR "Only one of the -a and --fields options may be specified\n";
exit 1;
}
if ($a)
{
@fields = @all_fields;
}
elsif ($f) {
my @err;
for my $field (split(",", $f))
{
if (!$all_fields{$field})
{
push(@err, $field);
}
else
{
push(@fields, $field);
}
}
if (@err)
{
print STDERR "get_entity_ProteinSequence: unknown fields @err. Valid fields are: @all_fields\n";
exit 1;
}
} else {
print STDERR $usage;
exit 1;
}
my $ih;
if ($i eq '-')
{
$ih = \*STDIN;
}
else
{
open($ih, "<", $i) or die "Cannot open input file $i: $!\n";
}
while (my @tuples = Bio::KBase::Utilities::ScriptThing::GetBatch($ih, undef, $column)) {
my @h = map { $_->[0] } @tuples;
my $h = $geO->get_entity_ProteinSequence(\@h, \@fields);
for my $tuple (@tuples) {
my @values;
my ($id, $line) = @$tuple;
my $v = $h->{$id};
if (! defined($v))
{
#nothing found for this id
print STDERR $line,"\n";
} else {
foreach $_ (@fields) {
my $val = $v->{$_};
push (@values, ref($val) eq 'ARRAY' ? join(",", @$val) : $val);
}
my $tail = join("\t", @values);
print "$line\t$tail\n";
}
}
}
__DATA__
| {
"content_hash": "4454e2b80364d873f25c29ff28214b12",
"timestamp": "",
"source": "github",
"line_count": 210,
"max_line_length": 97,
"avg_line_length": 22.257142857142856,
"alnum_prop": 0.6482670089858793,
"repo_name": "kbase/kb_seed",
"id": "4e946e5656a6eae931651df6c408711311f550dd",
"size": "4674",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "scripts/get_entity_ProteinSequence.pl",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Makefile",
"bytes": "7127"
},
{
"name": "Perl",
"bytes": "23376361"
},
{
"name": "Perl 6",
"bytes": "195228"
},
{
"name": "Ruby",
"bytes": "271749"
},
{
"name": "Shell",
"bytes": "3091"
}
],
"symlink_target": ""
} |
var gulp = require('gulp');
var load = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*'],
replaceString: /\bgulp[\-.]/
});
var pkg = require('./package.json');
var childProcess = require('child_process');
var config = require('./gulp/gulp.config');
var fs = require('fs');
var taskList = fs.readdirSync('./gulp/tasks/');
taskList.forEach(function (fileName) {
require('./gulp/tasks/' + fileName)(gulp, load, pkg, childProcess);
}); | {
"content_hash": "c6b13a510ec7d646ee3d7cd08c8b77bb",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 68,
"avg_line_length": 32.285714285714285,
"alnum_prop": 0.6482300884955752,
"repo_name": "BE-FE/iToolkit",
"id": "80912bc046b4a819eee8e2ce40ce28d2eaa8885f",
"size": "452",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "gulpfile.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "670928"
},
{
"name": "HTML",
"bytes": "1293042"
},
{
"name": "JavaScript",
"bytes": "2593583"
},
{
"name": "PHP",
"bytes": "59176"
},
{
"name": "Ruby",
"bytes": "161"
},
{
"name": "Shell",
"bytes": "341"
}
],
"symlink_target": ""
} |
#ifndef PARAMS_H
#define PARAMS_H
#include <stdio.h>
#include BOSS_TESSERACT_U_genericvector_h //original-code:"genericvector.h"
#include BOSS_TESSERACT_U_strngs_h //original-code:"strngs.h"
namespace tesseract {
class IntParam;
class BoolParam;
class StringParam;
class DoubleParam;
// Enum for constraints on what kind of params should be set by SetParam().
enum SetParamConstraint {
SET_PARAM_CONSTRAINT_NONE,
SET_PARAM_CONSTRAINT_DEBUG_ONLY,
SET_PARAM_CONSTRAINT_NON_DEBUG_ONLY,
SET_PARAM_CONSTRAINT_NON_INIT_ONLY,
};
struct ParamsVectors {
GenericVector<IntParam *> int_params;
GenericVector<BoolParam *> bool_params;
GenericVector<StringParam *> string_params;
GenericVector<DoubleParam *> double_params;
};
// Utility functions for working with Tesseract parameters.
class ParamUtils {
public:
// Reads a file of parameter definitions and set/modify the values therein.
// If the filename begins with a + or -, the BoolVariables will be
// ORed or ANDed with any current values.
// Blank lines and lines beginning # are ignored.
// Values may have any whitespace after the name and are the rest of line.
static bool ReadParamsFile(
const char *file, // filename to read
SetParamConstraint constraint,
ParamsVectors *member_params);
// Read parameters from the given file pointer (stop at end_offset).
static bool ReadParamsFromFp(FILE *fp, inT64 end_offset,
SetParamConstraint constraint,
ParamsVectors *member_params);
// Set a parameters to have the given value.
static bool SetParam(const char *name, const char* value,
SetParamConstraint constraint,
ParamsVectors *member_params);
// Returns the pointer to the parameter with the given name (of the
// appropriate type) if it was found in the vector obtained from
// GlobalParams() or in the given member_params.
template<class T>
static T *FindParam(const char *name,
const GenericVector<T *> &global_vec,
const GenericVector<T *> &member_vec) {
int i;
for (i = 0; i < global_vec.size(); ++i) {
if (strcmp(global_vec[i]->name_str(), name) == 0) return global_vec[i];
}
for (i = 0; i < member_vec.size(); ++i) {
if (strcmp(member_vec[i]->name_str(), name) == 0) return member_vec[i];
}
return NULL;
}
// Removes the given pointer to the param from the given vector.
template<class T>
static void RemoveParam(T *param_ptr, GenericVector<T *> *vec) {
for (int i = 0; i < vec->size(); ++i) {
if ((*vec)[i] == param_ptr) {
vec->remove(i);
return;
}
}
}
// Fetches the value of the named param as a STRING. Returns false if not
// found.
static bool GetParamAsString(const char *name,
const ParamsVectors* member_params,
STRING *value);
// Print parameters to the given file.
static void PrintParams(FILE *fp, const ParamsVectors *member_params);
// Resets all parameters back to default values;
static void ResetToDefaults(ParamsVectors* member_params);
};
// Definition of various parameter types.
class Param {
public:
~Param() {}
const char *name_str() const { return name_; }
const char *info_str() const { return info_; }
bool is_init() const { return init_; }
bool is_debug() const { return debug_; }
bool constraint_ok(SetParamConstraint constraint) const {
return (constraint == SET_PARAM_CONSTRAINT_NONE ||
(constraint == SET_PARAM_CONSTRAINT_DEBUG_ONLY &&
this->is_debug()) ||
(constraint == SET_PARAM_CONSTRAINT_NON_DEBUG_ONLY &&
!this->is_debug()) ||
(constraint == SET_PARAM_CONSTRAINT_NON_INIT_ONLY &&
!this->is_init()));
}
protected:
Param(const char *name, const char *comment, bool init) :
name_(name), info_(comment), init_(init) {
debug_ = (strstr(name, "debug") != NULL) || (strstr(name, "display"));
}
const char *name_; // name of this parameter
const char *info_; // for menus
bool init_; // needs to be set before init
bool debug_;
};
class IntParam : public Param {
public:
IntParam(inT32 value, const char *name, const char *comment, bool init,
ParamsVectors *vec) : Param(name, comment, init) {
value_ = value;
default_ = value;
params_vec_ = &(vec->int_params);
vec->int_params.push_back(this);
}
~IntParam() { ParamUtils::RemoveParam<IntParam>(this, params_vec_); }
operator inT32() const { return value_; }
void operator=(inT32 value) { value_ = value; }
void set_value(inT32 value) { value_ = value; }
void ResetToDefault() {
value_ = default_;
}
private:
inT32 value_;
inT32 default_;
// Pointer to the vector that contains this param (not owened by this class).
GenericVector<IntParam *> *params_vec_;
};
class BoolParam : public Param {
public:
BoolParam(bool value, const char *name, const char *comment, bool init,
ParamsVectors *vec) : Param(name, comment, init) {
value_ = value;
default_ = value;
params_vec_ = &(vec->bool_params);
vec->bool_params.push_back(this);
}
~BoolParam() { ParamUtils::RemoveParam<BoolParam>(this, params_vec_); }
operator BOOL8() const { return value_; }
void operator=(BOOL8 value) { value_ = value; }
void set_value(BOOL8 value) { value_ = value; }
void ResetToDefault() {
value_ = default_;
}
private:
BOOL8 value_;
BOOL8 default_;
// Pointer to the vector that contains this param (not owned by this class).
GenericVector<BoolParam *> *params_vec_;
};
class StringParam : public Param {
public:
StringParam(const char *value, const char *name,
const char *comment, bool init,
ParamsVectors *vec) : Param(name, comment, init) {
value_ = value;
default_ = value;
params_vec_ = &(vec->string_params);
vec->string_params.push_back(this);
}
~StringParam() { ParamUtils::RemoveParam<StringParam>(this, params_vec_); }
operator STRING &() { return value_; }
const char *string() const { return value_.string(); }
const char *c_str() const { return value_.string(); }
bool empty() { return value_.length() <= 0; }
bool operator==(const STRING& other) { return value_ == other; }
void operator=(const STRING& value) { value_ = value; }
void set_value(const STRING& value) { value_ = value; }
void ResetToDefault() {
value_ = default_;
}
private:
STRING value_;
STRING default_;
// Pointer to the vector that contains this param (not owened by this class).
GenericVector<StringParam *> *params_vec_;
};
class DoubleParam : public Param {
public:
DoubleParam(double value, const char *name, const char *comment,
bool init, ParamsVectors *vec) : Param(name, comment, init) {
value_ = value;
default_ = value;
params_vec_ = &(vec->double_params);
vec->double_params.push_back(this);
}
~DoubleParam() { ParamUtils::RemoveParam<DoubleParam>(this, params_vec_); }
operator double() const { return value_; }
void operator=(double value) { value_ = value; }
void set_value(double value) { value_ = value; }
void ResetToDefault() {
value_ = default_;
}
private:
double value_;
double default_;
// Pointer to the vector that contains this param (not owned by this class).
GenericVector<DoubleParam *> *params_vec_;
};
} // namespace tesseract
// Global parameter lists.
//
// To avoid the problem of undetermined order of static initialization
// global_params are accessed through the GlobalParams function that
// initializes the static pointer to global_params only on the first
// first time GlobalParams() is called.
//
// TODO(daria): remove GlobalParams() when all global Tesseract
// parameters are converted to members.
tesseract::ParamsVectors *GlobalParams();
/*************************************************************************
* Note on defining parameters.
*
* The values of the parameters defined with *_INIT_* macros are guaranteed
* to be loaded from config files before Tesseract initialization is done
* (there is no such guarantee for parameters defined with the other macros).
*************************************************************************/
#define INT_VAR_H(name,val,comment)\
tesseract::IntParam name
#define BOOL_VAR_H(name,val,comment)\
tesseract::BoolParam name
#define STRING_VAR_H(name,val,comment)\
tesseract::StringParam name
#define double_VAR_H(name,val,comment)\
tesseract::DoubleParam name
#define INT_VAR(name,val,comment)\
tesseract::IntParam name(val,#name,comment,false,GlobalParams())
#define BOOL_VAR(name,val,comment)\
tesseract::BoolParam name(val,#name,comment,false,GlobalParams())
#define STRING_VAR(name,val,comment)\
tesseract::StringParam name(val,#name,comment,false,GlobalParams())
#define double_VAR(name,val,comment)\
tesseract::DoubleParam name(val,#name,comment,false,GlobalParams())
#define INT_INIT_VAR(name,val,comment)\
tesseract::IntParam name(val,#name,comment,true,GlobalParams())
#define BOOL_INIT_VAR(name,val,comment)\
tesseract::BoolParam name(val,#name,comment,true,GlobalParams())
#define STRING_INIT_VAR(name,val,comment)\
tesseract::StringParam name(val,#name,comment,true,GlobalParams())
#define double_INIT_VAR(name,val,comment)\
tesseract::DoubleParam name(val,#name,comment,true,GlobalParams())
#define INT_MEMBER(name, val, comment, vec)\
name(val, #name, comment, false, vec)
#define BOOL_MEMBER(name, val, comment, vec)\
name(val, #name, comment, false, vec)
#define STRING_MEMBER(name, val, comment, vec)\
name(val, #name, comment, false, vec)
#define double_MEMBER(name, val, comment, vec)\
name(val, #name, comment, false, vec)
#define INT_INIT_MEMBER(name, val, comment, vec)\
name(val, #name, comment, true, vec)
#define BOOL_INIT_MEMBER(name, val, comment, vec)\
name(val, #name, comment, true, vec)
#define STRING_INIT_MEMBER(name, val, comment, vec)\
name(val, #name, comment, true, vec)
#define double_INIT_MEMBER(name, val, comment, vec)\
name(val, #name, comment, true, vec)
#endif
| {
"content_hash": "7112f36a9c943f47ef4235db1f2feaa3",
"timestamp": "",
"source": "github",
"line_count": 308,
"max_line_length": 84,
"avg_line_length": 33.642857142857146,
"alnum_prop": 0.6529627485041498,
"repo_name": "koobonil/Boss2D",
"id": "301b28dc3a5d6b1b0ccfb06374aff6b8c737fb5d",
"size": "11284",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Boss2D/addon/_old/tesseract-3.04.01_for_boss/ccutil/params.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "4820445"
},
{
"name": "Awk",
"bytes": "4272"
},
{
"name": "Batchfile",
"bytes": "89930"
},
{
"name": "C",
"bytes": "119747922"
},
{
"name": "C#",
"bytes": "87505"
},
{
"name": "C++",
"bytes": "272329620"
},
{
"name": "CMake",
"bytes": "1199656"
},
{
"name": "CSS",
"bytes": "42679"
},
{
"name": "Clojure",
"bytes": "1487"
},
{
"name": "Cuda",
"bytes": "1651996"
},
{
"name": "DIGITAL Command Language",
"bytes": "239527"
},
{
"name": "Dockerfile",
"bytes": "9638"
},
{
"name": "Emacs Lisp",
"bytes": "15570"
},
{
"name": "Go",
"bytes": "858185"
},
{
"name": "HLSL",
"bytes": "3314"
},
{
"name": "HTML",
"bytes": "2958385"
},
{
"name": "Java",
"bytes": "2921052"
},
{
"name": "JavaScript",
"bytes": "178190"
},
{
"name": "Jupyter Notebook",
"bytes": "1833654"
},
{
"name": "LLVM",
"bytes": "6536"
},
{
"name": "M4",
"bytes": "775724"
},
{
"name": "MATLAB",
"bytes": "74606"
},
{
"name": "Makefile",
"bytes": "3941551"
},
{
"name": "Meson",
"bytes": "2847"
},
{
"name": "Module Management System",
"bytes": "2626"
},
{
"name": "NSIS",
"bytes": "4505"
},
{
"name": "Objective-C",
"bytes": "4090702"
},
{
"name": "Objective-C++",
"bytes": "1702390"
},
{
"name": "PHP",
"bytes": "3530"
},
{
"name": "Perl",
"bytes": "11096338"
},
{
"name": "Perl 6",
"bytes": "11802"
},
{
"name": "PowerShell",
"bytes": "38571"
},
{
"name": "Python",
"bytes": "24123805"
},
{
"name": "QMake",
"bytes": "18188"
},
{
"name": "Roff",
"bytes": "1261269"
},
{
"name": "Ruby",
"bytes": "5890"
},
{
"name": "Scala",
"bytes": "5683"
},
{
"name": "Shell",
"bytes": "2879948"
},
{
"name": "TeX",
"bytes": "243507"
},
{
"name": "TypeScript",
"bytes": "1593696"
},
{
"name": "Verilog",
"bytes": "1215"
},
{
"name": "Vim Script",
"bytes": "3759"
},
{
"name": "Visual Basic",
"bytes": "16186"
},
{
"name": "eC",
"bytes": "9705"
}
],
"symlink_target": ""
} |
package org.orekit.models.earth.troposphere;
import org.hipparchus.Field;
import org.hipparchus.CalculusFieldElement;
import org.hipparchus.analysis.differentiation.DSFactory;
import org.hipparchus.analysis.differentiation.DerivativeStructure;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64Field;
import org.hipparchus.util.FastMath;
import org.hipparchus.util.MathArrays;
import org.hipparchus.util.Precision;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.orekit.Utils;
import org.orekit.attitudes.Attitude;
import org.orekit.bodies.FieldGeodeticPoint;
import org.orekit.bodies.GeodeticPoint;
import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.errors.OrekitException;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.frames.Frame;
import org.orekit.frames.FramesFactory;
import org.orekit.frames.TopocentricFrame;
import org.orekit.orbits.FieldKeplerianOrbit;
import org.orekit.orbits.FieldOrbit;
import org.orekit.orbits.Orbit;
import org.orekit.orbits.OrbitType;
import org.orekit.orbits.PositionAngle;
import org.orekit.propagation.FieldSpacecraftState;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.numerical.NumericalPropagator;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
import org.orekit.time.TimeScalesFactory;
import org.orekit.utils.Constants;
import org.orekit.utils.IERSConventions;
public class FieldGlobalMappingFunctionModelTest {
@BeforeClass
public static void setUpGlobal() {
Utils.setDataRoot("atmosphere");
}
@Before
public void setUp() throws OrekitException {
Utils.setDataRoot("regular-data:potential/shm-format");
}
@Test
public void testMappingFactors() {
doTestMappingFactors(Decimal64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestMappingFactors(final Field<T> field) {
final T zero = field.getZero();
// Site (NRAO, Green Bank, WV): latitude: 0.6708665767 radians
// longitude: -1.393397187 radians
// height: 844.715 m
//
// Date: MJD 55055 -> 12 August 2009 at 0h UT
//
// Ref: Petit, G. and Luzum, B. (eds.), IERS Conventions (2010),
// IERS Technical Note No. 36, BKG (2010)
//
// Expected mapping factors : hydrostatic -> 3.425246 (Ref)
// wet -> 3.449589 (Ref)
final FieldAbsoluteDate<T> date = FieldAbsoluteDate.createMJDDate(55055, zero, TimeScalesFactory.getUTC());
final double latitude = 0.6708665767;
final double longitude = -1.393397187;
final double height = 844.715;
final FieldGeodeticPoint<T> point = new FieldGeodeticPoint<T>(zero.add(latitude), zero.add(longitude), zero.add(height));
final double elevation = 0.5 * FastMath.PI - 1.278564131;
final double expectedHydro = 3.425246;
final double expectedWet = 3.449589;
final MappingFunction model = new GlobalMappingFunctionModel();
final T[] computedMapping = model.mappingFactors(zero.add(elevation), point, date);
Assert.assertEquals(expectedHydro, computedMapping[0].getReal(), 1.0e-6);
Assert.assertEquals(expectedWet, computedMapping[1].getReal(), 1.0e-6);
}
@Test
public void testFixedHeight() {
doTestFixedHeight(Decimal64Field.getInstance());
}
private <T extends CalculusFieldElement<T>> void doTestFixedHeight(final Field<T> field) {
final T zero = field.getZero();
final FieldAbsoluteDate<T> date = new FieldAbsoluteDate<>(field);
MappingFunction model = new GlobalMappingFunctionModel();
FieldGeodeticPoint<T> point = new FieldGeodeticPoint<T>(zero.add(FastMath.toRadians(45.0)), zero.add(FastMath.toRadians(45.0)), zero.add(350.0));
final T[] lastFactors = MathArrays.buildArray(field, 2);
lastFactors[0] = zero.add(Double.MAX_VALUE);
lastFactors[1] = zero.add(Double.MAX_VALUE);
// mapping functions shall decline with increasing elevation angle
for (double elev = 10d; elev < 90d; elev += 8d) {
final T[] factors = model.mappingFactors(zero.add(FastMath.toRadians(elev)), point, date);
Assert.assertTrue(Precision.compareTo(factors[0].getReal(), lastFactors[0].getReal(), 1.0e-6) < 0);
Assert.assertTrue(Precision.compareTo(factors[1].getReal(), lastFactors[1].getReal(), 1.0e-6) < 0);
lastFactors[0] = factors[0];
lastFactors[1] = factors[1];
}
}
@Test
public void testMFStateDerivatives() {
// Geodetic point
final double latitude = FastMath.toRadians(45.0);
final double longitude = FastMath.toRadians(45.0);
final double height = 0.0;
final GeodeticPoint point = new GeodeticPoint(latitude, longitude, height);
// Body: earth
final OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
Constants.WGS84_EARTH_FLATTENING,
FramesFactory.getITRF(IERSConventions.IERS_2010, true));
// Topocentric frame
final TopocentricFrame baseFrame = new TopocentricFrame(earth, point, "topo");
// Station
final GroundStation station = new GroundStation(baseFrame);
// Mapping Function model
final MappingFunction model = new GlobalMappingFunctionModel();
// Derivative Structure
final DSFactory factory = new DSFactory(6, 1);
final DerivativeStructure a0 = factory.variable(0, 24464560.0);
final DerivativeStructure e0 = factory.variable(1, 0.05);
final DerivativeStructure i0 = factory.variable(2, 0.122138);
final DerivativeStructure pa0 = factory.variable(3, 3.10686);
final DerivativeStructure raan0 = factory.variable(4, 1.00681);
final DerivativeStructure anomaly0 = factory.variable(5, 0.048363);
final Field<DerivativeStructure> field = a0.getField();
final DerivativeStructure zero = field.getZero();
// Field Date
final FieldAbsoluteDate<DerivativeStructure> dsDate = new FieldAbsoluteDate<>(field);
// Field Orbit
final Frame frame = FramesFactory.getEME2000();
final FieldOrbit<DerivativeStructure> dsOrbit = new FieldKeplerianOrbit<>(a0, e0, i0, pa0, raan0, anomaly0,
PositionAngle.MEAN, frame,
dsDate, zero.add(3.9860047e14));
// Field State
final FieldSpacecraftState<DerivativeStructure> dsState = new FieldSpacecraftState<>(dsOrbit);
// Initial satellite elevation
final FieldVector3D<DerivativeStructure> position = dsState.getPVCoordinates().getPosition();
final DerivativeStructure dsElevation = baseFrame.getElevation(position, frame, dsDate);
// Compute mapping factors state derivatives
final FieldGeodeticPoint<DerivativeStructure> dsPoint = new FieldGeodeticPoint<>(zero.add(latitude), zero.add(longitude), zero.add(height));
final DerivativeStructure[] factors = model.mappingFactors(dsElevation, dsPoint, dsDate);
final double[] compMFH = factors[0].getAllDerivatives();
final double[] compMFW = factors[1].getAllDerivatives();
// Field -> non-field
final Orbit orbit = dsOrbit.toOrbit();
final SpacecraftState state = dsState.toSpacecraftState();
// Finite differences for reference values
final double[][] refMF = new double[2][6];
final OrbitType orbitType = OrbitType.KEPLERIAN;
final PositionAngle angleType = PositionAngle.MEAN;
double dP = 0.001;
double[] steps = NumericalPropagator.tolerances(1000000 * dP, orbit, orbitType)[0];
for (int i = 0; i < 6; i++) {
SpacecraftState stateM4 = shiftState(state, orbitType, angleType, -4 * steps[i], i);
final Vector3D positionM4 = stateM4.getPVCoordinates().getPosition();
final double elevationM4 = station.getBaseFrame().getElevation(positionM4, stateM4.getFrame(), stateM4.getDate());
double[] delayM4 = model.mappingFactors(elevationM4, point, stateM4.getDate());
SpacecraftState stateM3 = shiftState(state, orbitType, angleType, -3 * steps[i], i);
final Vector3D positionM3 = stateM3.getPVCoordinates().getPosition();
final double elevationM3 = station.getBaseFrame().getElevation(positionM3, stateM3.getFrame(), stateM3.getDate());
double[] delayM3 = model.mappingFactors(elevationM3, point, stateM3.getDate());
SpacecraftState stateM2 = shiftState(state, orbitType, angleType, -2 * steps[i], i);
final Vector3D positionM2 = stateM2.getPVCoordinates().getPosition();
final double elevationM2 = station.getBaseFrame().getElevation(positionM2, stateM2.getFrame(), stateM2.getDate());
double[] delayM2 = model.mappingFactors(elevationM2, point, stateM2.getDate());
SpacecraftState stateM1 = shiftState(state, orbitType, angleType, -1 * steps[i], i);
final Vector3D positionM1 = stateM1.getPVCoordinates().getPosition();
final double elevationM1 = station.getBaseFrame().getElevation(positionM1, stateM1.getFrame(), stateM1.getDate());
double[] delayM1 = model.mappingFactors(elevationM1, point, stateM1.getDate());
SpacecraftState stateP1 = shiftState(state, orbitType, angleType, 1 * steps[i], i);
final Vector3D positionP1 = stateP1.getPVCoordinates().getPosition();
final double elevationP1 = station.getBaseFrame().getElevation(positionP1, stateP1.getFrame(), stateP1.getDate());
double[] delayP1 = model.mappingFactors(elevationP1, point, stateP1.getDate());
SpacecraftState stateP2 = shiftState(state, orbitType, angleType, 2 * steps[i], i);
final Vector3D positionP2 = stateP2.getPVCoordinates().getPosition();
final double elevationP2 = station.getBaseFrame().getElevation(positionP2, stateP2.getFrame(), stateP2.getDate());
double[] delayP2 = model.mappingFactors(elevationP2, point, stateP2.getDate());
SpacecraftState stateP3 = shiftState(state, orbitType, angleType, 3 * steps[i], i);
final Vector3D positionP3 = stateP3.getPVCoordinates().getPosition();
final double elevationP3 = station.getBaseFrame().getElevation(positionP3, stateP3.getFrame(), stateP3.getDate());
double[] delayP3 = model.mappingFactors(elevationP3, point, stateP3.getDate());
SpacecraftState stateP4 = shiftState(state, orbitType, angleType, 4 * steps[i], i);
final Vector3D positionP4 = stateP4.getPVCoordinates().getPosition();
final double elevationP4 = station.getBaseFrame().getElevation(positionP4, stateP4.getFrame(), stateP4.getDate());
double[] delayP4 = model.mappingFactors(elevationP4, point, stateP4.getDate());
fillJacobianColumn(refMF, i, orbitType, angleType, steps[i],
delayM4, delayM3, delayM2, delayM1,
delayP1, delayP2, delayP3, delayP4);
}
for (int i = 0; i < 6; i++) {
Assert.assertEquals(compMFH[i + 1], refMF[0][i], 2.1e-11);
Assert.assertEquals(compMFW[i + 1], refMF[1][i], 1.7e-11);
}
}
private void fillJacobianColumn(double[][] jacobian, int column,
OrbitType orbitType, PositionAngle angleType, double h,
double[] sM4h, double[] sM3h,
double[] sM2h, double[] sM1h,
double[] sP1h, double[] sP2h,
double[] sP3h, double[] sP4h) {
for (int i = 0; i < jacobian.length; ++i) {
jacobian[i][column] = ( -3 * (sP4h[i] - sM4h[i]) +
32 * (sP3h[i] - sM3h[i]) -
168 * (sP2h[i] - sM2h[i]) +
672 * (sP1h[i] - sM1h[i])) / (840 * h);
}
}
private SpacecraftState shiftState(SpacecraftState state, OrbitType orbitType, PositionAngle angleType,
double delta, int column) {
double[][] array = stateToArray(state, orbitType, angleType, true);
array[0][column] += delta;
return arrayToState(array, orbitType, angleType, state.getFrame(), state.getDate(),
state.getMu(), state.getAttitude());
}
private double[][] stateToArray(SpacecraftState state, OrbitType orbitType, PositionAngle angleType,
boolean withMass) {
double[][] array = new double[2][withMass ? 7 : 6];
orbitType.mapOrbitToArray(state.getOrbit(), angleType, array[0], array[1]);
if (withMass) {
array[0][6] = state.getMass();
}
return array;
}
private SpacecraftState arrayToState(double[][] array, OrbitType orbitType, PositionAngle angleType,
Frame frame, AbsoluteDate date, double mu,
Attitude attitude) {
Orbit orbit = orbitType.mapArrayToOrbit(array[0], array[1], angleType, date, mu, frame);
return (array.length > 6) ?
new SpacecraftState(orbit, attitude) :
new SpacecraftState(orbit, attitude, array[0][6]);
}
}
| {
"content_hash": "dc5cc27ed9918e2003ef8fa73ed83545",
"timestamp": "",
"source": "github",
"line_count": 275,
"max_line_length": 153,
"avg_line_length": 51.67636363636364,
"alnum_prop": 0.6346492153965239,
"repo_name": "petrushy/Orekit",
"id": "98380f5ad03f305b936416aee140618421350d8b",
"size": "15011",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "src/test/java/org/orekit/models/earth/troposphere/FieldGlobalMappingFunctionModelTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Fortran",
"bytes": "7408"
},
{
"name": "HTML",
"bytes": "19607"
},
{
"name": "Java",
"bytes": "23105843"
},
{
"name": "Roff",
"bytes": "31072"
}
],
"symlink_target": ""
} |
var
kind = require('enyo/kind'),
ilib = require('enyo-ilib');
var
Select = require('enyo/Select');
module.exports = kind({
name: 'ilib.sample.ChooseLocale',
tag: 'span',
published: {
'value': 'en-US'
},
locales: [
{locale: 'sq-AL', label: 'Albanian - Albania', label_ol: 'shqipe - Shqipëri'},
{locale: 'sq-ME', label: 'Albanian - Montenegro', label_ol: 'shqipe - Montenegro'},
{locale: 'ar-DZ', label: 'Arabic - Algeria', label_ol: 'العربية - الجزائر'},
{locale: 'ar-BH', label: 'Arabic - Bahrain', label_ol: 'العربية - البحرين'},
{locale: 'ar-DJ', label: 'Arabic - Djibouti', label_ol: 'العربية - جيبوتي'},
{locale: 'ar-EG', label: 'Arabic - Egypt', label_ol: 'العربية - مصر'},
{locale: 'ar-IQ', label: 'Arabic - Iraq', label_ol: 'العربية - العراق'},
{locale: 'ar-JO', label: 'Arabic - Jordan', label_ol: 'العربية - الأردن'},
{locale: 'ar-KW', label: 'Arabic - Kuwait', label_ol: 'العربية - الكويت'},
{locale: 'ar-LB', label: 'Arabic - Lebanon', label_ol: 'العربية - لبنان'},
{locale: 'ar-LY', label: 'Arabic - Libya', label_ol: 'العربية - ليبيا'},
{locale: 'ar-MR', label: 'Arabic - Mauritania', label_ol: 'العربية - موريتانيا'},
{locale: 'ar-MA', label: 'Arabic - Morocco', label_ol: 'العربية - مغربي'},
{locale: 'ar-OM', label: 'Arabic - Oman', label_ol: 'العربية - عمان'},
{locale: 'ar-QA', label: 'Arabic - Qatar', label_ol: 'العربية - قطر'},
{locale: 'ar-SA', label: 'Arabic - Saudi Arabia', label_ol: 'العربية - العربية السعودية'},
{locale: 'ar-SD', label: 'Arabic - Sudan', label_ol: 'العربية - سودان'},
{locale: 'ar-SY', label: 'Arabic - Syria', label_ol: 'العربية - سوريا'},
{locale: 'ar-TN', label: 'Arabic - Tunisia', label_ol: 'العربية - تونس'},
{locale: 'ar-AE', label: 'Arabic - UAE', label_ol: 'العربية - الأمارات العربية المتحدة'},
{locale: 'ar-YE', label: 'Arabic - Yemen', label_ol: 'العربية - يمني'},
{locale: 'bs-Latn-BA', label: 'Bosnian - Bosnia', label_ol: 'bosanski - Bosna i Hercegovina'},
{locale: 'bs-Latn-ME', label: 'Bosnian - Montenegro', label_ol: 'bosanski - Montenegro'},
{locale: 'bg-BG', label: 'Bulgarian - Bulgaria', label_ol: 'български - България'},
{locale: 'zh-Hans-CN', label: 'Chinese - China', label_ol: '中文 - 简体'},
{locale: 'zh-Hant-HK', label: 'Chinese - Hong Kong', label_ol: '中文 - 繁体'},
{locale: 'zh-Hant-MY', label: 'Chinese - Malaysia', label_ol: '中文 - 馬來西亞'},
{locale: 'zh-Hans-SG', label: 'Chinese - Singapore', label_ol: '中文 - 新加坡'},
{locale: 'zh-Hant-TW', label: 'Chinese - Taiwan', label_ol: '中文 - 台灣'},
{locale: 'hr-HR', label: 'Croatian - Croatia', label_ol: 'Hrvatski - Hrvatska'},
{locale: 'hr-ME', label: 'Croatian - Montenegro', label_ol: 'Hrvatski - Montenegro'},
{locale: 'cz-CZ', label: 'Czech - Czech Republic', label_ol: 'Český - Česká republika'},
{locale: 'da-DK', label: 'Danish - Denmark', label_ol: 'dansk - Danmark'},
{locale: 'nl-BE', label: 'Dutch - Belgium', label_ol: 'Nederlands - België'},
{locale: 'nl-NL', label: 'Dutch - Netherlands', label_ol: 'Nederlands - Nederland'},
{locale: 'en-AM', label: 'English - Armenia', label_ol: 'English - Armenia'},
{locale: 'en-AU', label: 'English - Australia', label_ol: 'English - Australia'},
{locale: 'en-AZ', label: 'English - Azerbaijan', label_ol: 'English - Azerbaijan'},
{locale: 'en-CA', label: 'English - Canada', label_ol: 'English - Canada'},
{locale: 'en-ET', label: 'English - Ethiopia', label_ol: 'English - Ethiopia'},
{locale: 'en-GM', label: 'English - Gambia', label_ol: 'English - Gambia'},
{locale: 'en-GH', label: 'English - Ghana', label_ol: 'English - Ghana'},
{locale: 'en-HK', label: 'English - Hong Kong', label_ol: 'English - Hong Kong'},
{locale: 'en-IS', label: 'English - Iceland', label_ol: 'English - Iceland'},
{locale: 'en-IN', label: 'English - India', label_ol: 'English - India'},
{locale: 'en-IE', label: 'English - Ireland', label_ol: 'English - Ireland'},
{locale: 'en-KE', label: 'English - Kenya', label_ol: 'English - Kenya'},
{locale: 'en-LR', label: 'English - Liberia', label_ol: 'English - Liberia'},
{locale: 'en-MW', label: 'English - Malawi', label_ol: 'English - Malawi'},
{locale: 'en-MY', label: 'English - Malaysia', label_ol: 'English - Malaysia'},
{locale: 'en-MM', label: 'English - Myanmar', label_ol: 'English - Myanmar'},
{locale: 'en-NZ', label: 'English - New Zealand', label_ol: 'English - New Zealand'},
{locale: 'en-NG', label: 'English - Nigeria', label_ol: 'English - Nigeria'},
{locale: 'en-PK', label: 'English - Pakistan', label_ol: 'English - Pakistan'},
{locale: 'en-PH', label: 'English - Philippines', label_ol: 'English - Philippines'},
{locale: 'en-PR', label: 'English - Puerto Rico', label_ol: 'English - Puerto Rico'},
{locale: 'en-RW', label: 'English - Rwanda', label_ol: 'English - Rwanda'},
{locale: 'en-SL', label: 'English - Sierra Leone', label_ol: 'English - Sierra Leone'},
{locale: 'en-SG', label: 'English - Singapore', label_ol: 'English - Singapore'},
{locale: 'en-ZA', label: 'English - South Africa', label_ol: 'English - South Africa'},
{locale: 'en-LK', label: 'English - Sri Lanka', label_ol: 'English - Sri Lanka'},
{locale: 'en-SD', label: 'English - Sudan', label_ol: 'English - Sudan'},
{locale: 'en-TZ', label: 'English - Tanzania', label_ol: 'English - Tanzania'},
{locale: 'en-GB', label: 'English - UK', label_ol: 'English - UK'},
{locale: 'en-US', label: 'English - USA', label_ol: 'English - USA'},
{locale: 'en-UG', label: 'English - Uganda', label_ol: 'English - Uganda'},
{locale: 'en-ZM', label: 'English - Zambia', label_ol: 'English - Zambia'},
{locale: 'et-EE', label: 'Estonian - Estonia', label_ol: 'eesti - Eesti'},
{locale: 'fa-AF', label: 'Farsi - Afghanistan', label_ol: 'فارسی - جمهوری اسلامی ایران'},
{locale: 'fa-IR', label: 'Farsi - Iran', label_ol: 'فارسی - جمهوری اسلامی افغانستان'},
{locale: 'fi-FI', label: 'Finnish - Finland', label_ol: 'suomi - Suomi'},
{locale: 'fr-DZ', label: 'French - Algeria', label_ol: 'français - Algérie'},
{locale: 'fr-BE', label: 'French - Belgium', label_ol: 'français - Belgique'},
{locale: 'fr-BJ', label: 'French - Benin', label_ol: 'français - Bénin'},
{locale: 'fr-BF', label: 'French - Burkina Faso', label_ol: 'français - Burkina Faso'},
{locale: 'fr-CM', label: 'French - Cameroon', label_ol: 'français - Cameroun'},
{locale: 'fr-CA', label: 'French - Canada', label_ol: 'français - Canada'},
{locale: 'fr-CF', label: 'French - Central African Republic', label_ol: 'français - République centrafricaine'},
{locale: 'fr-CD', label: 'French - Democratic Republic of the Congo', label_ol: 'français - République démocratique du Congo'},
{locale: 'fr-DJ', label: 'French - Djibouti', label_ol: 'français - Djibouti'},
{locale: 'fr-CQ', label: 'French - Equatorial Guinea', label_ol: 'français - Guinée équatoriale'},
{locale: 'fr-FR', label: 'French - France', label_ol: 'français - France'},
{locale: 'fr-GA', label: 'French - Gabon', label_ol: 'français - Gabon'},
{locale: 'fr-GN', label: 'French - Guinea', label_ol: 'français - Guinée'},
{locale: 'fr-CI', label: 'French - Ivory Coast', label_ol: 'français - Côte-d\'Ivoire'},
{locale: 'fr-LB', label: 'French - Lebanon', label_ol: 'français - Liban'},
{locale: 'fr-LU', label: 'French - Luxemburg', label_ol: 'français - Luxembourg'},
{locale: 'fr-ML', label: 'French - Mali', label_ol: 'français - Mali'},
{locale: 'fr-CG', label: 'French - Republic of the Congo (Congo-Brazzaville)', label_ol: 'français - République du Congo'},
{locale: 'fr-RW', label: 'French - Rwanda', label_ol: 'français - Rwanda'},
{locale: 'fr-SN', label: 'French - Senegal', label_ol: 'français - Sénégal'},
{locale: 'fr-CH', label: 'French - Swizerland', label_ol: 'français - Suisse'},
{locale: 'fr-TG', label: 'French - Togo', label_ol: 'français - Togo'},
{locale: 'ga-IE', label: 'Gaelic - Ireland', label_ol: 'Gaeilge - Éire'},
{locale: 'de-AT', label: 'German - Austria', label_ol: 'Deutsch - Österreich'},
{locale: 'de-DE', label: 'German - Germany', label_ol: 'Deutsch - Deutschland'},
{locale: 'de-LU', label: 'German - Luxemburg', label_ol: 'Deutsch - Luxemburg'},
{locale: 'de-CH', label: 'German - Swizerland', label_ol: 'Deutsch - Schweiz'},
{locale: 'el-CY', label: 'Greek - Cyprus', label_ol: 'Ελληνική - Κύπρος'},
{locale: 'el-GR', label: 'Greek - Greece', label_ol: 'Ελληνική - Ελλάδα'},
{locale: 'he-IL', label: 'Hebrew - Israel', label_ol: 'עברית - ישראל'},
{locale: 'hi-IN', label: 'Hindi - India', label_ol: 'हिन्दी - भारत'},
{locale: 'hu-HU', label: 'Hungarian - Hungary', label_ol: 'magyar - Magyarország'},
{locale: 'id-ID', label: 'Indonesian - Indonesia', label_ol: 'bahasa Indonesia - Indonesia'},
{locale: 'it-IT', label: 'Italian - Italy', label_ol: 'italiano - Italia'},
{locale: 'it-CH', label: 'Italian - Swizerland', label_ol: 'italiano - Svizzeria'},
{locale: 'ja-JP', label: 'Japanese - Japan', label_ol: '日本語 - 日本'},
{locale: 'kk-Cyrl-KZ', label: 'Kazahk - Kazakhstan', label_ol: 'қазақ тілі - Қазақстан Республикасы'},
{locale: 'ko-KR', label: 'Korean - Korea', label_ol: '한국어 - 한국'},
{locale: 'ku-Arab-IQ', label: 'Kurdish - Iraq', label_ol: 'کوردی - العـراق'},
{locale: 'lv-LV', label: 'Latvian - Latvia', label_ol: 'Latvijas - Latvija'},
{locale: 'lt-LT', label: 'Lithuanian - Lithuania', label_ol: 'lietuviešu - Lietuva'},
{locale: 'mk-MK', label: 'Macedonian - Macedonia', label_ol: 'македонски - Поранешна Југословенска Република Македонија'},
{locale: 'ms-MY', label: 'Malaysian - Malaysia', label_ol: 'bahasa Melayu - Malaysia'},
{locale: 'ms-SG', label: 'Malaysian - Singapore', label_ol: 'bahasa Melayu - Singapore'},
{locale: 'mn-Cyrl-MN', label: 'Mongolian - Mongolia', label_ol: 'Монгол хэл - Монгол улс'},
{locale: 'nb-NO', label: 'Norwegian - Norway', label_ol: 'norsk - Norge'},
{locale: 'pl-PL', label: 'Polish - Poland', label_ol: 'polski - Polska'},
{locale: 'pt-AO', label: 'Portuguese - Angola', label_ol: 'português - Angola'},
{locale: 'pt-BR', label: 'Portuguese - Brazil', label_ol: 'português - Brasil'},
{locale: 'pt-CV', label: 'Portuguese - Cape Verde', label_ol: 'português - Ilhas de Cabo Verde'},
{locale: 'pt-CQ', label: 'Portuguese - Equatorial Guinea', label_ol: 'português - Guiné Equatorial'},
{locale: 'pt-PT', label: 'Portuguese - Portugal', label_ol: 'português - Portugal'},
{locale: 'ro-RO', label: 'Romanian - Romania', label_ol: 'română - România'},
{locale: 'ru-BY', label: 'Russian - Belarus', label_ol: 'русский - Беларусь'},
{locale: 'ru-GE', label: 'Russian - Georgia', label_ol: 'русский - Грузия'},
{locale: 'ru-KG', label: 'Russian - Kyrgyzstan', label_ol: 'русский - Киргизия'},
{locale: 'ru-KZ', label: 'Russian - Kazahkstan', label_ol: 'русский - Казахстан'},
{locale: 'ru-RU', label: 'Russian - Russia', label_ol: 'русский - Русские Федерации'},
{locale: 'ru-UA', label: 'Russian - Ukraine', label_ol: 'русский - Украина'},
{locale: 'sr-Latn-ME', label: 'Serbian - Montenegro', label_ol: 'srpski - Montenegro'},
{locale: 'rs-Latn-RS', label: 'Serbian - Serbia', label_ol: 'srpski - Srbija'},
{locale: 'sk-SK', label: 'Slovakian - Slovakia', label_ol: 'slovenský - Slovensko'},
{locale: 'sl-SI', label: 'Slovenian - Slovenia', label_ol: 'Slovenski - Slovenija'},
{locale: 'es-AR', label: 'Spanish - Argentina', label_ol: 'español - Argentina'},
{locale: 'es-BO', label: 'Spanish - Bolivia', label_ol: 'español - Bolivia'},
{locale: 'es-CL', label: 'Spanish - Chile', label_ol: 'español - Chile'},
{locale: 'es-CO', label: 'Spanish - Colombia', label_ol: 'español - Colombia'},
{locale: 'es-CR', label: 'Spanish - Costa Rica', label_ol: 'español - Costa Rica'},
{locale: 'es-DO', label: 'Spanish - Dominican Republic', label_ol: 'español - República Dominicana'},
{locale: 'es-EC', label: 'Spanish - Ecuador', label_ol: 'español - Ecuador'},
{locale: 'es-SV', label: 'Spanish - El Salvador', label_ol: 'español - El Salvador'},
{locale: 'es-GQ', label: 'Spanish - Equatorial Guinea', label_ol: 'español - Guinea Ecuatorial'},
{locale: 'es-GT', label: 'Spanish - Guatemala', label_ol: 'español - Guatamala'},
{locale: 'es-HN', label: 'Spanish - Honduras', label_ol: 'español - Honduras'},
{locale: 'es-MX', label: 'Spanish - Mexico', label_ol: 'español - México'},
{locale: 'es-NI', label: 'Spanish - Nicaragua', label_ol: 'español - Nicaragua'},
{locale: 'es-PA', label: 'Spanish - Panama', label_ol: 'español - Panamá'},
{locale: 'es-PY', label: 'Spanish - Paraguay', label_ol: 'español - Paraguay'},
{locale: 'es-PE', label: 'Spanish - Peru', label_ol: 'español - Perú'},
{locale: 'es-PH', label: 'Spanish - Philippines', label_ol: 'español - Filipinas'},
{locale: 'es-PR', label: 'Spanish - Puerto Rico', label_ol: 'español - Puerto Rico'},
{locale: 'es-ES', label: 'Spanish - Spain', label_ol: 'español - España'},
{locale: 'es-US', label: 'Spanish - USA', label_ol: 'español - Estados Unidos'},
{locale: 'es-UY', label: 'Spanish - Uruguay', label_ol: 'español - Uruguay'},
{locale: 'es-VE', label: 'Spanish - Venezuela', label_ol: 'español - Venezuela'},
{locale: 'sv-FI', label: 'Swedish - Finland', label_ol: 'svenska - Finland'},
{locale: 'sv-SE', label: 'Swedish - Sweden', label_ol: 'svenska - Sverige'},
{locale: 'th-TH', label: 'Thai - Thailand', label_ol: 'ภาษาไทย - ประเทศไทย'},
{locale: 'tr-AM', label: 'Turkish - Armenia', label_ol: 'Türk - Ermenistan'},
{locale: 'tr-AZ', label: 'Turkish - Azerbaijan', label_ol: 'Türk - Azerbeycan'},
{locale: 'tr-CY', label: 'Turkish - Cyprus', label_ol: 'Türk - Kıbrıs'},
{locale: 'tr-TR', label: 'Turkish - Turkey', label_ol: 'Türk - Türkiye'},
{locale: 'uk-UA', label: 'Ukranian - Ukraine', label_ol: 'Українська - Україна'},
{locale: 'uz-Cyrl-UZ', label: 'Uzbek - Uzbekistan', label_ol: 'Ўзбек - Ўзбекистон Республикаси'},
{locale: 'uz-Latn-UZ', label: 'Uzbek - Uzbekistan', label_ol: 'Oʻzbek - O‘zbekiston Respublikasi'},
{locale: 'vi-VN', label: 'Vietnamese - Vietnam', label_ol: 'Việt - Việt Nam'},
{locale: 'as-IN', label: 'Assamese - India', label_ol: 'অসমীয়া - ভাৰত'},
{locale: 'bn-IN', label: 'Bengali - India', label_ol: 'বাংলা - ভারত'},
{locale: 'gu-IN', label: 'Gujarati - India', label_ol: 'ગુજરાતી - ભારત'},
{locale: 'kn-IN', label: 'Kannada - India', label_ol: 'ಕನ್ನಡ - ಭಾರತ'},
{locale: 'ml-IN', label: 'Malayalam - India', label_ol: 'മലയാളം - ഇന്ത്യ'},
{locale: 'mr-IN', label: 'Marathi - India', label_ol: 'मराठी - भारत'},
{locale: 'pa-IN', label: 'Punjabi - India', label_ol: 'ਪੰਜਾਬੀ - ਭਾਰਤ'},
{locale: 'pa-PK', label: 'Punjabi - Pakistan', label_ol: 'ਪੰਜਾਬੀ - ਪਾਕਿਸਤਾਨ'},
{locale: 'ta-IN', label: 'Tamil - India', label_ol: 'தமிழ் - இந்தியா'},
{locale: 'te-IN', label: 'Telugu - India', label_ol: 'తెలుగు - ఇండియా'},
{locale: 'ur-IN', label: 'Urdu - India', label_ol: 'بھارت - اُردُو'},
{locale: 'ur-PK', label: 'Urdu - Pakistan', label_ol: 'پاکستان - اُردُو'}
],
components: [
{name: 'switcherLocale', kind: Select, onchange: 'setLocale'}
],
create: function () {
this.inherited(arguments);
var curLocale = ilib.getLocale();
for(var i = 0; i < this.locales.length; i++) {
this.$.switcherLocale.createComponent({value: this.locales[i].locale, content: this.locales[i].locale +' ('+ this.locales[i].label +' / '+ this.locales[i].label_ol +')', selected: this.locales[i].locale.toLowerCase() === curLocale.toLowerCase()});
}
},
setLocale: function (sender, ev) {
this.setValue(this.$.switcherLocale.value);
this.bubble('onSelectedLocale', {content: this.$.switcherLocale.value});
}
}); | {
"content_hash": "d8a522a524c4e06da475571e9f772c08",
"timestamp": "",
"source": "github",
"line_count": 215,
"max_line_length": 259,
"avg_line_length": 78.33953488372093,
"alnum_prop": 0.5845158225969246,
"repo_name": "enyojs/enyo-strawman",
"id": "cf7e03ae406bc438b5515b8778edf600fbd060c3",
"size": "17924",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/enyo-ilib-samples/src/ChooseLocale.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "104991"
},
{
"name": "JavaScript",
"bytes": "958907"
}
],
"symlink_target": ""
} |
.class Lorg/simpleframework/xml/stream/DocumentProvider;
.super Ljava/lang/Object;
.source "DocumentProvider.java"
# interfaces
.implements Lorg/simpleframework/xml/stream/Provider;
# instance fields
.field private final factory:Ljavax/xml/parsers/DocumentBuilderFactory;
# direct methods
.method public constructor <init>()V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
invoke-static {}, Ljavax/xml/parsers/DocumentBuilderFactory;->newInstance()Ljavax/xml/parsers/DocumentBuilderFactory;
move-result-object v0
iput-object v0, p0, Lorg/simpleframework/xml/stream/DocumentProvider;->factory:Ljavax/xml/parsers/DocumentBuilderFactory;
iget-object v0, p0, Lorg/simpleframework/xml/stream/DocumentProvider;->factory:Ljavax/xml/parsers/DocumentBuilderFactory;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Ljavax/xml/parsers/DocumentBuilderFactory;->setNamespaceAware(Z)V
return-void
.end method
.method private provide(Lorg/xml/sax/InputSource;)Lorg/simpleframework/xml/stream/EventReader;
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
iget-object v2, p0, Lorg/simpleframework/xml/stream/DocumentProvider;->factory:Ljavax/xml/parsers/DocumentBuilderFactory;
invoke-virtual {v2}, Ljavax/xml/parsers/DocumentBuilderFactory;->newDocumentBuilder()Ljavax/xml/parsers/DocumentBuilder;
move-result-object v0
invoke-virtual {v0, p1}, Ljavax/xml/parsers/DocumentBuilder;->parse(Lorg/xml/sax/InputSource;)Lorg/w3c/dom/Document;
move-result-object v1
new-instance v2, Lorg/simpleframework/xml/stream/DocumentReader;
invoke-direct {v2, v1}, Lorg/simpleframework/xml/stream/DocumentReader;-><init>(Lorg/w3c/dom/Document;)V
return-object v2
.end method
# virtual methods
.method public provide(Ljava/io/InputStream;)Lorg/simpleframework/xml/stream/EventReader;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
new-instance v0, Lorg/xml/sax/InputSource;
invoke-direct {v0, p1}, Lorg/xml/sax/InputSource;-><init>(Ljava/io/InputStream;)V
invoke-direct {p0, v0}, Lorg/simpleframework/xml/stream/DocumentProvider;->provide(Lorg/xml/sax/InputSource;)Lorg/simpleframework/xml/stream/EventReader;
move-result-object v0
return-object v0
.end method
.method public provide(Ljava/io/Reader;)Lorg/simpleframework/xml/stream/EventReader;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
new-instance v0, Lorg/xml/sax/InputSource;
invoke-direct {v0, p1}, Lorg/xml/sax/InputSource;-><init>(Ljava/io/Reader;)V
invoke-direct {p0, v0}, Lorg/simpleframework/xml/stream/DocumentProvider;->provide(Lorg/xml/sax/InputSource;)Lorg/simpleframework/xml/stream/EventReader;
move-result-object v0
return-object v0
.end method
| {
"content_hash": "59ccdf92f2e84d856b6fc2162fc46ec0",
"timestamp": "",
"source": "github",
"line_count": 97,
"max_line_length": 157,
"avg_line_length": 31.216494845360824,
"alnum_prop": 0.73778071334214,
"repo_name": "BatMan-Rom/ModdedFiles",
"id": "57e6f85ec3ca1a72068c0cfbad2800e4d6c94b1d",
"size": "3028",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "services.jar.out/smali_classes2/org/simpleframework/xml/stream/DocumentProvider.smali",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "GLSL",
"bytes": "15069"
},
{
"name": "HTML",
"bytes": "139176"
},
{
"name": "Smali",
"bytes": "541934400"
}
],
"symlink_target": ""
} |
classdef Base < Core.IdProcInterface
% Base Abstract base class for extraction of blocks from streams (wavs)
%% -----------------------------------------------------------------------------------
properties (SetAccess = private)
shiftSize_s; % shift between blocks
blockSize_s; % size of the AFE data block in seconds
afeBlocks;
blockAnnotations;
curWavFilepath;
end
%% -----------------------------------------------------------------------------------
methods (Abstract, Access = protected)
outputDeps = getBlockCreatorInternOutputDependencies( obj )
[blockAnnotations,afeBlocks] = blockify( obj, afeStream, streamAnnotations )
end
%% -----------------------------------------------------------------------------------
methods
function obj = Base( blockSize_s, shiftsize_s )
obj = obj@Core.IdProcInterface();
obj.blockSize_s = blockSize_s;
obj.shiftSize_s = shiftsize_s;
end
%% -------------------------------------------------------------------------------
function process( obj, wavFilepath )
obj.curWavFilepath = wavFilepath;
end
%% -------------------------------------------------------------------------------
function afeBlock = cutDataBlock( obj, afeData, backOffset_s )
afeBlock = containers.Map( 'KeyType', 'int32', 'ValueType', 'any' );
for afeKey = afeData.keys
afeSignal = afeData(afeKey{1});
if isa( afeSignal, 'cell' )
afeSignalExtract = cell( size( afeSignal ) );
for ii = 1 : numel( afeSignal )
afeSignalExtract{ii} = ...
afeSignal{ii}.cutSignalCopyReducedToArray( obj.blockSize_s,...
backOffset_s );
end
else
afeSignalExtract = ...
afeSignal.cutSignalCopyReducedToArray( obj.blockSize_s, ...
backOffset_s );
end
afeBlock(afeKey{1}) = afeSignalExtract;
end
%fprintf( '.' );
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function fileProcessed = hasFileAlreadyBeenProcessed( ~, ~ )
fileProcessed = false;
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function [out, outFilepath] = loadProcessedData( obj, wavFilepath, varargin )
outFilepath = obj.getOutputFilepath( wavFilepath );
obj.curWavFilepath = wavFilepath;
out = obj.getOutput( varargin{:} );
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function out = saveOutput( obj, wavFilepath )
obj.curWavFilepath = wavFilepath;
if nargout > 0
out = obj.getOutput();
end
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function save( ~, ~, ~ )
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function outFilepath = getOutputFilepath( ~, ~ )
outFilepath = [];
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function currentFolder = getCurrentFolder( ~ )
currentFolder = [];
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function setCacheSystemDir( ~, ~, ~ )
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function saveCacheDirectory( ~ )
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function loadCacheDirectory( ~ )
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function getSingleProcessCacheAccess( ~ )
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function releaseSingleProcessCacheAccess( ~ )
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function delete( obj )
removefilesemaphore( obj.outFileSema );
end
%% -------------------------------------------------------------------------------
end
%% -----------------------------------------------------------------------------------
methods (Access = protected)
%% -------------------------------------------------------------------------------
function processInternal( obj, varargin )
obj.inputProc.sceneId = obj.sceneId;
in = obj.loadInputData( obj.curWavFilepath, 'afeData', 'annotations' );
if nargin < 2 || any( strcmpi( 'afeBlocks', varargin ) )
[obj.blockAnnotations,obj.afeBlocks] = ...
obj.blockify( in.afeData, in.annotations );
else
obj.blockAnnotations = obj.blockify( in.afeData, in.annotations );
end
end
%% -------------------------------------------------------------------------------
% override of Core.IdProcInterface's method
function out = getOutput( obj, varargin )
obj.processInternal( varargin{:} );
if nargin < 2 || any( strcmpi( 'afeBlocks', varargin ) )
out.afeBlocks = obj.afeBlocks;
end
if nargin < 2 || any( strcmpi( 'blockAnnotations', varargin ) )
out.blockAnnotations = obj.blockAnnotations;
end
end
%% -------------------------------------------------------------------------------
function outputDeps = getInternOutputDependencies( obj )
outputDeps.blockSize = obj.blockSize_s;
outputDeps.shiftSize = obj.shiftSize_s;
outputDeps.v = 2;
outputDeps.blockProc = obj.getBlockCreatorInternOutputDependencies();
end
%% -------------------------------------------------------------------------------
end
%% -----------------------------------------------------------------------------------
methods (Static)
%% -------------------------------------------------------------------------------
%% -------------------------------------------------------------------------------
end
end
| {
"content_hash": "08525cd5d2649dd73dea232d0717eb3b",
"timestamp": "",
"source": "github",
"line_count": 176,
"max_line_length": 98,
"avg_line_length": 44.46590909090909,
"alnum_prop": 0.35905954510605675,
"repo_name": "kashefy/Auditory-Machine-Learning-Training-and-Testing-Pipeline",
"id": "498e7b0f47fc3bcd2863247d87b0d6d3e12356d1",
"size": "7826",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/+BlockCreators/Base.m",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "C",
"bytes": "160380"
},
{
"name": "C++",
"bytes": "158056"
},
{
"name": "FORTRAN",
"bytes": "598090"
},
{
"name": "HTML",
"bytes": "83380"
},
{
"name": "Java",
"bytes": "100316"
},
{
"name": "M",
"bytes": "2031"
},
{
"name": "M4",
"bytes": "62711"
},
{
"name": "Makefile",
"bytes": "6946"
},
{
"name": "Mathematica",
"bytes": "518"
},
{
"name": "Matlab",
"bytes": "1356419"
},
{
"name": "Python",
"bytes": "58126"
}
],
"symlink_target": ""
} |
package com.cube.storm.content.model;
import androidx.annotation.NonNull;
import androidx.work.Data;
import lombok.Value;
@Value
public class UpdateContentProgress
{
private static final String WORKER_DATA_KEY_PHASE = "phase";
private static final String WORKER_DATA_KEY_PROGRESS = "progress";
private static final String WORKER_DATA_KEY_PROGRESS_MAX = "progress_max";
@NonNull
public static UpdateContentProgress waiting()
{
return new UpdateContentProgress(Phase.WAITING, 0, 0);
}
@NonNull
public static UpdateContentProgress checking()
{
return new UpdateContentProgress(Phase.CHECKING, 0, 0);
}
@NonNull
public static UpdateContentProgress deploying()
{
return new UpdateContentProgress(Phase.DEPLOYING, 0, 0);
}
@NonNull
public static UpdateContentProgress downloading(long bytesDownloaded, long bytesTotal)
{
return new UpdateContentProgress(Phase.DOWNLOADING, bytesDownloaded, bytesTotal);
}
@NonNull
public static UpdateContentProgress fromWorkerData(Data workerData)
{
return new UpdateContentProgress(
Phase.values()[workerData.getInt(WORKER_DATA_KEY_PHASE, Phase.UNKNOWN.ordinal())],
workerData.getLong(WORKER_DATA_KEY_PROGRESS, 0L),
workerData.getLong(WORKER_DATA_KEY_PROGRESS_MAX, 0L));
}
@NonNull
public static UpdateContentProgress verifying()
{
return new UpdateContentProgress(Phase.VERIFYING, 0, 0);
}
public enum Phase
{
UNKNOWN,
WAITING,
CHECKING,
DOWNLOADING,
VERIFYING,
DEPLOYING
}
Phase phase;
long progress;
long progressMax;
@NonNull
public Data toWorkerData()
{
return new Data.Builder()
.putInt(WORKER_DATA_KEY_PHASE, phase.ordinal())
.putLong(WORKER_DATA_KEY_PROGRESS, progress)
.putLong(WORKER_DATA_KEY_PROGRESS_MAX, progressMax)
.build();
}
}
| {
"content_hash": "0806d1040054c06d5a21bbab2cb56e98",
"timestamp": "",
"source": "github",
"line_count": 76,
"max_line_length": 87,
"avg_line_length": 23.63157894736842,
"alnum_prop": 0.7472160356347439,
"repo_name": "3sidedcube/Android-LightningContent",
"id": "e0bf837e998a05323a6bec3e901561f09e65200a",
"size": "1796",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "library/src/main/java/com/cube/storm/content/model/UpdateContentProgress.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Groovy",
"bytes": "11778"
},
{
"name": "Java",
"bytes": "87816"
}
],
"symlink_target": ""
} |
<?xml version="1.0" ?>
<!--
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.
-->
<schema name="schema-docValuesMulti" version="1.5">
<types>
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true"
positionIncrementGap="0"/>
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true"
positionIncrementGap="0"/>
<!-- format for date is 1995-12-31T23:59:59.999Z and only the fractional
seconds part (.999) is optional.
-->
<fieldtype name="date" class="solr.TrieDateField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldtype name="boolean" class="solr.BoolField"/>
<fieldtype name="string" class="solr.StrField"/>
<fieldType name="uuid" class="solr.UUIDField"/>
</types>
<fields>
<field name="id" type="string" required="true"/>
<field name="floatdv" type="float" indexed="false" stored="false" docValues="true" multiValued="true"/>
<field name="intdv" type="int" indexed="false" stored="false" docValues="true" multiValued="true"/>
<field name="doubledv" type="double" indexed="false" stored="false" docValues="true" multiValued="true"/>
<field name="longdv" type="long" indexed="false" stored="false" docValues="true" multiValued="true"/>
<field name="datedv" type="date" indexed="false" stored="false" docValues="true" multiValued="true"/>
<field name="stringdv" type="string" indexed="false" stored="false" docValues="true" multiValued="true"/>
</fields>
<uniqueKey>id</uniqueKey>
</schema>
| {
"content_hash": "082d637e9d35f15f482e68c23813b6eb",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 119,
"avg_line_length": 47.05357142857143,
"alnum_prop": 0.6895635673624289,
"repo_name": "tballison/lucene-addons",
"id": "390dbdc694ab1e40d73a4720664f161d7e5e679e",
"size": "2635",
"binary": false,
"copies": "1",
"ref": "refs/heads/dependabot/maven/org.apache.commons-commons-compress-1.21",
"path": "solr-5411/src/test/test-files/solr/collection1/conf/schema-docValuesMulti.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "5977"
},
{
"name": "Java",
"bytes": "914953"
},
{
"name": "JavaScript",
"bytes": "3683"
},
{
"name": "XSLT",
"bytes": "4021"
}
],
"symlink_target": ""
} |
package com.icegreen.greenmail.examples;
import com.icegreen.greenmail.configuration.GreenMailConfiguration;
import com.icegreen.greenmail.junit.GreenMailRule;
import com.icegreen.greenmail.util.Retriever;
import com.icegreen.greenmail.util.ServerSetupTest;
import org.junit.Rule;
import org.junit.Test;
import javax.mail.Message;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertEquals;
/**
* Created by Youssuf ElKalay.
* Example using GreenMailConfiguration to test authenticating against SMTP/IMAP/POP3 with no password required.
*/
public class ExampleDisableAuthenticationTest {
@Rule
public final GreenMailRule greenMail = new GreenMailRule(ServerSetupTest.SMTP_POP3_IMAP)
.withConfiguration(GreenMailConfiguration.aConfig().withDisabledAuthentication());
@Test
public void testNoAuthIMAP() {
try (Retriever retriever = new Retriever(greenMail.getImap())) {
Message[] messages = retriever.getMessages("foo@localhost");
assertEquals(0, messages.length);
}
}
@Test
public void testExistingUserNotRecreated() {
try (Retriever retriever = new Retriever(greenMail.getImap())) {
Message[] messages = retriever.getMessages("foo@localhost");
assertEquals(0, messages.length);
assertThat(greenMail.getManagers().getUserManager().hasUser("foo@localhost"), equalTo(true));
}
}
}
| {
"content_hash": "11a89661e905a8b6b6af00b2d9971de3",
"timestamp": "",
"source": "github",
"line_count": 41,
"max_line_length": 112,
"avg_line_length": 36.73170731707317,
"alnum_prop": 0.7350597609561753,
"repo_name": "chriswhite199/greenmail",
"id": "51ad03e0b433696a7dd3de5bdb3a2b5f3c41c57e",
"size": "1506",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "greenmail-core/src/test/java/com/icegreen/greenmail/examples/ExampleDisableAuthenticationTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "2649"
},
{
"name": "HTML",
"bytes": "80894"
},
{
"name": "Java",
"bytes": "806373"
},
{
"name": "JavaScript",
"bytes": "694"
},
{
"name": "PHP",
"bytes": "11529"
},
{
"name": "Shell",
"bytes": "3141"
}
],
"symlink_target": ""
} |
package ua.com.fielden.platform.sample.domain;
import java.util.Collection;
import com.google.inject.Inject;
import ua.com.fielden.platform.attachment.AbstractAttachmentDao;
import ua.com.fielden.platform.dao.annotations.SessionRequired;
import ua.com.fielden.platform.entity.annotation.EntityType;
import ua.com.fielden.platform.entity.query.IFilter;
/**
* DAO implementation for companion object {@link ITgCategoryAttachment}.
*
* @author TG Team
*
*/
@EntityType(TgCategoryAttachment.class)
public class TgCategoryAttachmentDao extends AbstractAttachmentDao<TgCategoryAttachment> implements ITgCategoryAttachment {
@Inject
public TgCategoryAttachmentDao(final IFilter filter) {
super(filter);
}
@Override
@SessionRequired
public TgCategoryAttachment save(final TgCategoryAttachment entity) {
return super.save(entity);
}
@Override
@SessionRequired
public int batchDelete(final Collection<Long> entitiesIds) {
return super.batchDelete(entitiesIds);
}
} | {
"content_hash": "5f05fcada7d4aff49c70698770230efc",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 123,
"avg_line_length": 28.694444444444443,
"alnum_prop": 0.7676669893514037,
"repo_name": "fieldenms/tg",
"id": "383cd01e0bd377804079dc42a3de005f334e53ee",
"size": "1033",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "platform-dao/src/main/java/ua/com/fielden/platform/sample/domain/TgCategoryAttachmentDao.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "4729"
},
{
"name": "CSS",
"bytes": "177044"
},
{
"name": "CoffeeScript",
"bytes": "2455"
},
{
"name": "HTML",
"bytes": "2236957"
},
{
"name": "Java",
"bytes": "12685270"
},
{
"name": "JavaScript",
"bytes": "34404107"
},
{
"name": "Makefile",
"bytes": "28094"
},
{
"name": "Python",
"bytes": "3798"
},
{
"name": "Roff",
"bytes": "3102"
},
{
"name": "Shell",
"bytes": "13899"
},
{
"name": "TSQL",
"bytes": "1058"
},
{
"name": "TeX",
"bytes": "1296798"
},
{
"name": "XSLT",
"bytes": "6158"
}
],
"symlink_target": ""
} |
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-b10
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.07.08 at 09:52:02 AM CST
//
package com.rossjourdain.jaxb;
import java.util.Calendar;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Java class for User complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="User">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="ValidationErrors" type="{}ArrayOfValidationError" minOccurs="0"/>
* <element name="Warnings" type="{}ArrayOfWarning" minOccurs="0"/>
* <element name="UserID" type="{}uniqueIdentifier" minOccurs="0"/>
* <element name="FirstName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="LastName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="UpdatedDateUTC" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
* <element name="IsSubscriber" type="{}trueOrFalse" minOccurs="0"/>
* <element name="OrganisationRole" type="{}organisationRole" minOccurs="0"/>
* </all>
* <attribute name="status" type="{}entityValidationStatus" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "User", propOrder = {
})
public class User {
@XmlElement(name = "ValidationErrors")
protected ArrayOfValidationError validationErrors;
@XmlElement(name = "Warnings")
protected ArrayOfWarning warnings;
@XmlElement(name = "UserID")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String userID;
@XmlElement(name = "FirstName")
protected String firstName;
@XmlElement(name = "LastName")
protected String lastName;
@XmlElement(name = "UpdatedDateUTC", type = String.class)
@XmlJavaTypeAdapter(Adapter1.class)
@XmlSchemaType(name = "dateTime")
protected Calendar updatedDateUTC;
@XmlElement(name = "IsSubscriber")
protected TrueOrFalse isSubscriber;
@XmlElement(name = "OrganisationRole")
protected OrganisationRole organisationRole;
@XmlAttribute(name = "status")
protected EntityValidationStatus status;
/**
* Gets the value of the validationErrors property.
*
* @return possible object is {@link ArrayOfValidationError }
*/
public ArrayOfValidationError getValidationErrors() {
return validationErrors;
}
/**
* Sets the value of the validationErrors property.
*
* @param value allowed object is {@link ArrayOfValidationError }
*/
public void setValidationErrors(ArrayOfValidationError value) {
this.validationErrors = value;
}
/**
* Gets the value of the warnings property.
*
* @return possible object is {@link ArrayOfWarning }
*/
public ArrayOfWarning getWarnings() {
return warnings;
}
/**
* Sets the value of the warnings property.
*
* @param value allowed object is {@link ArrayOfWarning }
*/
public void setWarnings(ArrayOfWarning value) {
this.warnings = value;
}
/**
* Gets the value of the userID property.
*
* @return possible object is {@link String }
*/
public String getUserID() {
return userID;
}
/**
* Sets the value of the userID property.
*
* @param value allowed object is {@link String }
*/
public void setUserID(String value) {
this.userID = value;
}
/**
* Gets the value of the firstName property.
*
* @return possible object is {@link String }
*/
public String getFirstName() {
return firstName;
}
/**
* Sets the value of the firstName property.
*
* @param value allowed object is {@link String }
*/
public void setFirstName(String value) {
this.firstName = value;
}
/**
* Gets the value of the lastName property.
*
* @return possible object is {@link String }
*/
public String getLastName() {
return lastName;
}
/**
* Sets the value of the lastName property.
*
* @param value allowed object is {@link String }
*/
public void setLastName(String value) {
this.lastName = value;
}
/**
* Gets the value of the updatedDateUTC property.
*
* @return possible object is {@link String }
*/
public Calendar getUpdatedDateUTC() {
return updatedDateUTC;
}
/**
* Sets the value of the updatedDateUTC property.
*
* @param value allowed object is {@link String }
*/
public void setUpdatedDateUTC(Calendar value) {
this.updatedDateUTC = value;
}
/**
* Gets the value of the isSubscriber property.
*
* @return possible object is {@link TrueOrFalse }
*/
public TrueOrFalse getIsSubscriber() {
return isSubscriber;
}
/**
* Sets the value of the isSubscriber property.
*
* @param value allowed object is {@link TrueOrFalse }
*/
public void setIsSubscriber(TrueOrFalse value) {
this.isSubscriber = value;
}
/**
* Gets the value of the organisationRole property.
*
* @return possible object is {@link OrganisationRole }
*/
public OrganisationRole getOrganisationRole() {
return organisationRole;
}
/**
* Sets the value of the organisationRole property.
*
* @param value allowed object is {@link OrganisationRole }
*/
public void setOrganisationRole(OrganisationRole value) {
this.organisationRole = value;
}
/**
* Gets the value of the status property.
*
* @return possible object is {@link EntityValidationStatus }
*/
public EntityValidationStatus getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value allowed object is {@link EntityValidationStatus }
*/
public void setStatus(EntityValidationStatus value) {
this.status = value;
}
}
| {
"content_hash": "4d30675a329cf28b2e2e447ae3ebf6ab",
"timestamp": "",
"source": "github",
"line_count": 238,
"max_line_length": 113,
"avg_line_length": 27.42436974789916,
"alnum_prop": 0.6814769419335069,
"repo_name": "tom-haines/patricia-xero-sync",
"id": "7077e2f5ab6b22f300dccbc6d8c46c049fc7c6e9",
"size": "6527",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "patricia-xero-webapp/src/main/java/com/rossjourdain/jaxb/User.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "1150"
},
{
"name": "HTML",
"bytes": "4215"
},
{
"name": "Java",
"bytes": "925631"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="ApiGen 2.8.0" />
<title>Class Doctrine\ORM\Query\AST\Functions\DateAddFunction | seip</title>
<script type="text/javascript" src="resources/combined.js?784181472"></script>
<script type="text/javascript" src="elementlist.js?3927760630"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" />
</head>
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
<div id="groups">
<h3>Namespaces</h3>
<ul>
<li><a href="namespace-Acme.html">Acme<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.html">DemoBundle<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Command.html">Command</a>
</li>
<li><a href="namespace-Acme.DemoBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Acme.DemoBundle.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Acme.DemoBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Acme.DemoBundle.Form.html">Form</a>
</li>
<li><a href="namespace-Acme.DemoBundle.Proxy.html">Proxy<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.html">__CG__<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.html">Symfony<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.html">Component<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.html">Security<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Acl.html">Acl<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Acl.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Acl.Tests.Domain.html">Domain</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Core.html">Core<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Core.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Core.Tests.Util.html">Util</a>
</li>
</ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li>
<li><a href="namespace-Acme.DemoBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Tests.Controller.html">Controller</a>
</li>
</ul></li>
<li><a href="namespace-Acme.DemoBundle.Twig.html">Twig<span></span></a>
<ul>
<li><a href="namespace-Acme.DemoBundle.Twig.Extension.html">Extension</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Alpha.html">Alpha</a>
</li>
<li><a href="namespace-Apc.html">Apc<span></span></a>
<ul>
<li><a href="namespace-Apc.NamespaceCollision.html">NamespaceCollision<span></span></a>
<ul>
<li><a href="namespace-Apc.NamespaceCollision.A.html">A<span></span></a>
<ul>
<li><a href="namespace-Apc.NamespaceCollision.A.B.html">B</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Apc.Namespaced.html">Namespaced</a>
</li>
</ul></li>
<li><a href="namespace-Assetic.html">Assetic<span></span></a>
<ul>
<li><a href="namespace-Assetic.Asset.html">Asset<span></span></a>
<ul>
<li><a href="namespace-Assetic.Asset.Iterator.html">Iterator</a>
</li>
</ul></li>
<li><a href="namespace-Assetic.Cache.html">Cache</a>
</li>
<li><a href="namespace-Assetic.Exception.html">Exception</a>
</li>
<li><a href="namespace-Assetic.Extension.html">Extension<span></span></a>
<ul>
<li><a href="namespace-Assetic.Extension.Twig.html">Twig</a>
</li>
</ul></li>
<li><a href="namespace-Assetic.Factory.html">Factory<span></span></a>
<ul>
<li><a href="namespace-Assetic.Factory.Loader.html">Loader</a>
</li>
<li><a href="namespace-Assetic.Factory.Resource.html">Resource</a>
</li>
<li><a href="namespace-Assetic.Factory.Worker.html">Worker</a>
</li>
</ul></li>
<li><a href="namespace-Assetic.Filter.html">Filter<span></span></a>
<ul>
<li><a href="namespace-Assetic.Filter.GoogleClosure.html">GoogleClosure</a>
</li>
<li><a href="namespace-Assetic.Filter.Sass.html">Sass</a>
</li>
<li><a href="namespace-Assetic.Filter.Yui.html">Yui</a>
</li>
</ul></li>
<li><a href="namespace-Assetic.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-Bazinga.html">Bazinga<span></span></a>
<ul>
<li><a href="namespace-Bazinga.Bundle.html">Bundle<span></span></a>
<ul>
<li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.html">JsTranslationBundle<span></span></a>
<ul>
<li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Command.html">Command</a>
</li>
<li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Dumper.html">Dumper</a>
</li>
<li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Finder.html">Finder</a>
</li>
<li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Tests.html">Tests</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Bazinga.JsTranslationBundle.html">JsTranslationBundle<span></span></a>
<ul>
<li><a href="namespace-Bazinga.JsTranslationBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Bazinga.JsTranslationBundle.Tests.Controller.html">Controller</a>
</li>
<li><a href="namespace-Bazinga.JsTranslationBundle.Tests.Finder.html">Finder</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Beta.html">Beta</a>
</li>
<li><a href="namespace-Blameable.html">Blameable<span></span></a>
<ul>
<li><a href="namespace-Blameable.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Blameable.Fixture.Document.html">Document</a>
</li>
<li><a href="namespace-Blameable.Fixture.Entity.html">Entity</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-ClassesWithParents.html">ClassesWithParents</a>
</li>
<li><a href="namespace-ClassLoaderTest.html">ClassLoaderTest</a>
</li>
<li><a href="namespace-ClassMap.html">ClassMap</a>
</li>
<li><a href="namespace-Composer.html">Composer<span></span></a>
<ul>
<li><a href="namespace-Composer.Autoload.html">Autoload</a>
</li>
</ul></li>
<li><a href="namespace-Container14.html">Container14</a>
</li>
<li class="active"><a href="namespace-Doctrine.html">Doctrine<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Bundle.html">Bundle<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Bundle.DoctrineBundle.html">DoctrineBundle<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Command.html">Command<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Command.Proxy.html">Proxy</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Doctrine.Bundle.DoctrineBundle.DataCollector.html">DataCollector</a>
</li>
<li><a href="namespace-Doctrine.Bundle.DoctrineBundle.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Mapping.html">Mapping</a>
</li>
<li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Tests.DependencyInjection.html">DependencyInjection</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Twig.html">Twig</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Bundle.FixturesBundle.html">FixturesBundle<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Bundle.FixturesBundle.Command.html">Command</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Doctrine.Common.html">Common<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Common.Annotations.html">Annotations<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Common.Annotations.Annotation.html">Annotation</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Common.Cache.html">Cache</a>
</li>
<li><a href="namespace-Doctrine.Common.Collections.html">Collections<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Common.Collections.Expr.html">Expr</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Common.DataFixtures.html">DataFixtures<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Common.DataFixtures.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Common.DataFixtures.Event.Listener.html">Listener</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Common.DataFixtures.Exception.html">Exception</a>
</li>
<li><a href="namespace-Doctrine.Common.DataFixtures.Executor.html">Executor</a>
</li>
<li><a href="namespace-Doctrine.Common.DataFixtures.Purger.html">Purger</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Common.Inflector.html">Inflector</a>
</li>
<li><a href="namespace-Doctrine.Common.Lexer.html">Lexer</a>
</li>
<li><a href="namespace-Doctrine.Common.Persistence.html">Persistence<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Common.Persistence.Event.html">Event</a>
</li>
<li><a href="namespace-Doctrine.Common.Persistence.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Common.Persistence.Mapping.Driver.html">Driver</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Doctrine.Common.Proxy.html">Proxy<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Common.Proxy.Exception.html">Exception</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Common.Reflection.html">Reflection</a>
</li>
<li><a href="namespace-Doctrine.Common.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.DBAL.html">DBAL<span></span></a>
<ul>
<li><a href="namespace-Doctrine.DBAL.Cache.html">Cache</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Connections.html">Connections</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Driver.html">Driver<span></span></a>
<ul>
<li><a href="namespace-Doctrine.DBAL.Driver.DrizzlePDOMySql.html">DrizzlePDOMySql</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Driver.IBMDB2.html">IBMDB2</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Driver.Mysqli.html">Mysqli</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Driver.OCI8.html">OCI8</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Driver.PDOIbm.html">PDOIbm</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Driver.PDOMySql.html">PDOMySql</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Driver.PDOOracle.html">PDOOracle</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Driver.PDOPgSql.html">PDOPgSql</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Driver.PDOSqlite.html">PDOSqlite</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Driver.PDOSqlsrv.html">PDOSqlsrv</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Driver.SQLSrv.html">SQLSrv</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.DBAL.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Doctrine.DBAL.Event.Listeners.html">Listeners</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.DBAL.Id.html">Id</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Logging.html">Logging</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Platforms.html">Platforms<span></span></a>
<ul>
<li><a href="namespace-Doctrine.DBAL.Platforms.Keywords.html">Keywords</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.DBAL.Portability.html">Portability</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Query.html">Query<span></span></a>
<ul>
<li><a href="namespace-Doctrine.DBAL.Query.Expression.html">Expression</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.DBAL.Schema.html">Schema<span></span></a>
<ul>
<li><a href="namespace-Doctrine.DBAL.Schema.Synchronizer.html">Synchronizer</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Schema.Visitor.html">Visitor</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.DBAL.Sharding.html">Sharding<span></span></a>
<ul>
<li><a href="namespace-Doctrine.DBAL.Sharding.ShardChoser.html">ShardChoser</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Sharding.SQLAzure.html">SQLAzure<span></span></a>
<ul>
<li><a href="namespace-Doctrine.DBAL.Sharding.SQLAzure.Schema.html">Schema</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Doctrine.DBAL.Tools.html">Tools<span></span></a>
<ul>
<li><a href="namespace-Doctrine.DBAL.Tools.Console.html">Console<span></span></a>
<ul>
<li><a href="namespace-Doctrine.DBAL.Tools.Console.Command.html">Command</a>
</li>
<li><a href="namespace-Doctrine.DBAL.Tools.Console.Helper.html">Helper</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Doctrine.DBAL.Types.html">Types</a>
</li>
</ul></li>
<li class="active"><a href="namespace-Doctrine.ORM.html">ORM<span></span></a>
<ul>
<li><a href="namespace-Doctrine.ORM.Decorator.html">Decorator</a>
</li>
<li><a href="namespace-Doctrine.ORM.Event.html">Event</a>
</li>
<li><a href="namespace-Doctrine.ORM.Id.html">Id</a>
</li>
<li><a href="namespace-Doctrine.ORM.Internal.html">Internal<span></span></a>
<ul>
<li><a href="namespace-Doctrine.ORM.Internal.Hydration.html">Hydration</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.ORM.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Doctrine.ORM.Mapping.Builder.html">Builder</a>
</li>
<li><a href="namespace-Doctrine.ORM.Mapping.Driver.html">Driver</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.ORM.Persisters.html">Persisters</a>
</li>
<li><a href="namespace-Doctrine.ORM.Proxy.html">Proxy</a>
</li>
<li class="active"><a href="namespace-Doctrine.ORM.Query.html">Query<span></span></a>
<ul>
<li class="active"><a href="namespace-Doctrine.ORM.Query.AST.html">AST<span></span></a>
<ul>
<li class="active"><a href="namespace-Doctrine.ORM.Query.AST.Functions.html">Functions</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.ORM.Query.Exec.html">Exec</a>
</li>
<li><a href="namespace-Doctrine.ORM.Query.Expr.html">Expr</a>
</li>
<li><a href="namespace-Doctrine.ORM.Query.Filter.html">Filter</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.ORM.Repository.html">Repository</a>
</li>
<li><a href="namespace-Doctrine.ORM.Tools.html">Tools<span></span></a>
<ul>
<li><a href="namespace-Doctrine.ORM.Tools.Console.html">Console<span></span></a>
<ul>
<li><a href="namespace-Doctrine.ORM.Tools.Console.Command.html">Command<span></span></a>
<ul>
<li><a href="namespace-Doctrine.ORM.Tools.Console.Command.ClearCache.html">ClearCache</a>
</li>
<li><a href="namespace-Doctrine.ORM.Tools.Console.Command.SchemaTool.html">SchemaTool</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.ORM.Tools.Console.Helper.html">Helper</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.ORM.Tools.Event.html">Event</a>
</li>
<li><a href="namespace-Doctrine.ORM.Tools.Export.html">Export<span></span></a>
<ul>
<li><a href="namespace-Doctrine.ORM.Tools.Export.Driver.html">Driver</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.ORM.Tools.Pagination.html">Pagination</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Doctrine.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Tests.Common.html">Common<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Tests.Common.Annotations.html">Annotations<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Tests.Common.Annotations.Bar.html">Bar</a>
</li>
<li><a href="namespace-Doctrine.Tests.Common.Annotations.Fixtures.html">Fixtures<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Tests.Common.Annotations.Fixtures.Annotation.html">Annotation</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Tests.Common.Annotations.Foo.html">Foo</a>
</li>
<li><a href="namespace-Doctrine.Tests.Common.Annotations.FooBar.html">FooBar</a>
</li>
<li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.html">Ticket<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.Doctrine.html">Doctrine<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.Doctrine.ORM.html">ORM<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.Doctrine.ORM.Mapping.html">Mapping</a>
</li>
</ul></li></ul></li></ul></li></ul></li>
<li><a href="namespace-Doctrine.Tests.Common.Cache.html">Cache</a>
</li>
<li><a href="namespace-Doctrine.Tests.Common.Collections.html">Collections</a>
</li>
<li><a href="namespace-Doctrine.Tests.Common.DataFixtures.html">DataFixtures<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Tests.Common.DataFixtures.Executor.html">Executor</a>
</li>
<li><a href="namespace-Doctrine.Tests.Common.DataFixtures.TestEntity.html">TestEntity</a>
</li>
<li><a href="namespace-Doctrine.Tests.Common.DataFixtures.TestFixtures.html">TestFixtures</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Tests.Common.Inflector.html">Inflector</a>
</li>
<li><a href="namespace-Doctrine.Tests.Common.Persistence.html">Persistence<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Tests.Common.Persistence.Mapping.html">Mapping</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Tests.Common.Proxy.html">Proxy</a>
</li>
<li><a href="namespace-Doctrine.Tests.Common.Reflection.html">Reflection<span></span></a>
<ul>
<li><a href="namespace-Doctrine.Tests.Common.Reflection.Dummies.html">Dummies</a>
</li>
</ul></li>
<li><a href="namespace-Doctrine.Tests.Common.Util.html">Util</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Entity.html">Entity<span></span></a>
<ul>
<li><a href="namespace-Entity.Repository.html">Repository</a>
</li>
</ul></li>
<li><a href="namespace-Fixtures.html">Fixtures<span></span></a>
<ul>
<li><a href="namespace-Fixtures.Bundles.html">Bundles<span></span></a>
<ul>
<li><a href="namespace-Fixtures.Bundles.AnnotationsBundle.html">AnnotationsBundle<span></span></a>
<ul>
<li><a href="namespace-Fixtures.Bundles.AnnotationsBundle.Entity.html">Entity</a>
</li>
</ul></li>
<li><a href="namespace-Fixtures.Bundles.Vendor.html">Vendor<span></span></a>
<ul>
<li><a href="namespace-Fixtures.Bundles.Vendor.AnnotationsBundle.html">AnnotationsBundle<span></span></a>
<ul>
<li><a href="namespace-Fixtures.Bundles.Vendor.AnnotationsBundle.Entity.html">Entity</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Fixtures.Bundles.XmlBundle.html">XmlBundle<span></span></a>
<ul>
<li><a href="namespace-Fixtures.Bundles.XmlBundle.Entity.html">Entity</a>
</li>
</ul></li>
<li><a href="namespace-Fixtures.Bundles.YamlBundle.html">YamlBundle<span></span></a>
<ul>
<li><a href="namespace-Fixtures.Bundles.YamlBundle.Entity.html">Entity</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Foo.html">Foo<span></span></a>
<ul>
<li><a href="namespace-Foo.Bar.html">Bar</a>
</li>
</ul></li>
<li><a href="namespace-FOS.html">FOS<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.html">RestBundle<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Controller.html">Controller<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Controller.Annotations.html">Annotations</a>
</li>
</ul></li>
<li><a href="namespace-FOS.RestBundle.Decoder.html">Decoder</a>
</li>
<li><a href="namespace-FOS.RestBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-FOS.RestBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-FOS.RestBundle.Examples.html">Examples</a>
</li>
<li><a href="namespace-FOS.RestBundle.Form.html">Form<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Form.Extension.html">Extension</a>
</li>
</ul></li>
<li><a href="namespace-FOS.RestBundle.Normalizer.html">Normalizer<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Normalizer.Exception.html">Exception</a>
</li>
</ul></li>
<li><a href="namespace-FOS.RestBundle.Request.html">Request</a>
</li>
<li><a href="namespace-FOS.RestBundle.Response.html">Response<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Response.AllowedMethodsLoader.html">AllowedMethodsLoader</a>
</li>
</ul></li>
<li><a href="namespace-FOS.RestBundle.Routing.html">Routing<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Routing.Loader.html">Loader<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Routing.Loader.Reader.html">Reader</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-FOS.RestBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Tests.Controller.html">Controller<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Tests.Controller.Annotations.html">Annotations</a>
</li>
</ul></li>
<li><a href="namespace-FOS.RestBundle.Tests.Decoder.html">Decoder</a>
</li>
<li><a href="namespace-FOS.RestBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Tests.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-FOS.RestBundle.Tests.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-FOS.RestBundle.Tests.Fixtures.html">Fixtures<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Tests.Fixtures.Controller.html">Controller</a>
</li>
</ul></li>
<li><a href="namespace-FOS.RestBundle.Tests.Normalizer.html">Normalizer</a>
</li>
<li><a href="namespace-FOS.RestBundle.Tests.Request.html">Request</a>
</li>
<li><a href="namespace-FOS.RestBundle.Tests.Routing.html">Routing<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Tests.Routing.Loader.html">Loader</a>
</li>
</ul></li>
<li><a href="namespace-FOS.RestBundle.Tests.Util.html">Util</a>
</li>
<li><a href="namespace-FOS.RestBundle.Tests.View.html">View</a>
</li>
</ul></li>
<li><a href="namespace-FOS.RestBundle.Util.html">Util<span></span></a>
<ul>
<li><a href="namespace-FOS.RestBundle.Util.Inflector.html">Inflector</a>
</li>
</ul></li>
<li><a href="namespace-FOS.RestBundle.View.html">View</a>
</li>
</ul></li>
<li><a href="namespace-FOS.UserBundle.html">UserBundle<span></span></a>
<ul>
<li><a href="namespace-FOS.UserBundle.Command.html">Command</a>
</li>
<li><a href="namespace-FOS.UserBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-FOS.UserBundle.CouchDocument.html">CouchDocument</a>
</li>
<li><a href="namespace-FOS.UserBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-FOS.UserBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-FOS.UserBundle.Doctrine.html">Doctrine</a>
</li>
<li><a href="namespace-FOS.UserBundle.Document.html">Document</a>
</li>
<li><a href="namespace-FOS.UserBundle.Entity.html">Entity</a>
</li>
<li><a href="namespace-FOS.UserBundle.Form.html">Form<span></span></a>
<ul>
<li><a href="namespace-FOS.UserBundle.Form.DataTransformer.html">DataTransformer</a>
</li>
<li><a href="namespace-FOS.UserBundle.Form.Handler.html">Handler</a>
</li>
<li><a href="namespace-FOS.UserBundle.Form.Model.html">Model</a>
</li>
<li><a href="namespace-FOS.UserBundle.Form.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-FOS.UserBundle.Mailer.html">Mailer</a>
</li>
<li><a href="namespace-FOS.UserBundle.Model.html">Model</a>
</li>
<li><a href="namespace-FOS.UserBundle.Propel.html">Propel</a>
</li>
<li><a href="namespace-FOS.UserBundle.Security.html">Security</a>
</li>
<li><a href="namespace-FOS.UserBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-FOS.UserBundle.Tests.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-FOS.UserBundle.Tests.Doctrine.html">Doctrine</a>
</li>
<li><a href="namespace-FOS.UserBundle.Tests.Model.html">Model</a>
</li>
<li><a href="namespace-FOS.UserBundle.Tests.Security.html">Security</a>
</li>
<li><a href="namespace-FOS.UserBundle.Tests.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-FOS.UserBundle.Util.html">Util</a>
</li>
<li><a href="namespace-FOS.UserBundle.Validator.html">Validator</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.html">Gedmo<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Blameable.html">Blameable<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Blameable.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Blameable.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.Blameable.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Blameable.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.Blameable.Traits.html">Traits</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Exception.html">Exception</a>
</li>
<li><a href="namespace-Gedmo.IpTraceable.html">IpTraceable<span></span></a>
<ul>
<li><a href="namespace-Gedmo.IpTraceable.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.IpTraceable.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.IpTraceable.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.IpTraceable.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.IpTraceable.Traits.html">Traits</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Loggable.html">Loggable<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Loggable.Document.html">Document<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Loggable.Document.MappedSuperclass.html">MappedSuperclass</a>
</li>
<li><a href="namespace-Gedmo.Loggable.Document.Repository.html">Repository</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Loggable.Entity.html">Entity<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Loggable.Entity.MappedSuperclass.html">MappedSuperclass</a>
</li>
<li><a href="namespace-Gedmo.Loggable.Entity.Repository.html">Repository</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Loggable.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Loggable.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.Loggable.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Loggable.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Gedmo.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Mapping.Annotation.html">Annotation</a>
</li>
<li><a href="namespace-Gedmo.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Mapping.Mock.html">Mock<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Mapping.Mock.Extension.html">Extension<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.html">Encoder<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li></ul></li></ul></li>
<li><a href="namespace-Gedmo.Mapping.Mock.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Mapping.Mock.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Mapping.Mock.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Gedmo.Mapping.Xml.html">Xml</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.ReferenceIntegrity.html">ReferenceIntegrity<span></span></a>
<ul>
<li><a href="namespace-Gedmo.ReferenceIntegrity.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.ReferenceIntegrity.Mapping.Driver.html">Driver</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.References.html">References<span></span></a>
<ul>
<li><a href="namespace-Gedmo.References.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.References.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.References.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.References.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Gedmo.Sluggable.html">Sluggable<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Sluggable.Handler.html">Handler</a>
</li>
<li><a href="namespace-Gedmo.Sluggable.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Sluggable.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.Sluggable.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Sluggable.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.Sluggable.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.SoftDeleteable.html">SoftDeleteable<span></span></a>
<ul>
<li><a href="namespace-Gedmo.SoftDeleteable.Filter.html">Filter<span></span></a>
<ul>
<li><a href="namespace-Gedmo.SoftDeleteable.Filter.ODM.html">ODM</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.SoftDeleteable.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.SoftDeleteable.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.SoftDeleteable.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.SoftDeleteable.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.SoftDeleteable.Query.html">Query<span></span></a>
<ul>
<li><a href="namespace-Gedmo.SoftDeleteable.Query.TreeWalker.html">TreeWalker<span></span></a>
<ul>
<li><a href="namespace-Gedmo.SoftDeleteable.Query.TreeWalker.Exec.html">Exec</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.SoftDeleteable.Traits.html">Traits</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Sortable.html">Sortable<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Sortable.Entity.html">Entity<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Sortable.Entity.Repository.html">Repository</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Sortable.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Sortable.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.Sortable.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Sortable.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Gedmo.Timestampable.html">Timestampable<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Timestampable.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Timestampable.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.Timestampable.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Timestampable.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.Timestampable.Traits.html">Traits</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Tool.html">Tool<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Tool.Logging.html">Logging<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Tool.Logging.DBAL.html">DBAL</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Tool.Wrapper.html">Wrapper</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Translatable.html">Translatable<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Translatable.Document.html">Document<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Translatable.Document.MappedSuperclass.html">MappedSuperclass</a>
</li>
<li><a href="namespace-Gedmo.Translatable.Document.Repository.html">Repository</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Translatable.Entity.html">Entity<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Translatable.Entity.MappedSuperclass.html">MappedSuperclass</a>
</li>
<li><a href="namespace-Gedmo.Translatable.Entity.Repository.html">Repository</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Translatable.Hydrator.html">Hydrator<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Translatable.Hydrator.ORM.html">ORM</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Translatable.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Translatable.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.Translatable.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Translatable.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.Translatable.Query.html">Query<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Translatable.Query.TreeWalker.html">TreeWalker</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.Translator.html">Translator<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Translator.Document.html">Document</a>
</li>
<li><a href="namespace-Gedmo.Translator.Entity.html">Entity</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Tree.html">Tree<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Tree.Document.html">Document<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Tree.Document.MongoDB.html">MongoDB<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Tree.Document.MongoDB.Repository.html">Repository</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.Tree.Entity.html">Entity<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Tree.Entity.MappedSuperclass.html">MappedSuperclass</a>
</li>
<li><a href="namespace-Gedmo.Tree.Entity.Repository.html">Repository</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Tree.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Tree.Mapping.Driver.html">Driver</a>
</li>
<li><a href="namespace-Gedmo.Tree.Mapping.Event.html">Event<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Tree.Mapping.Event.Adapter.html">Adapter</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.Tree.Strategy.html">Strategy<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Tree.Strategy.ODM.html">ODM<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Tree.Strategy.ODM.MongoDB.html">MongoDB</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Tree.Strategy.ORM.html">ORM</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Gedmo.Uploadable.html">Uploadable<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Uploadable.Event.html">Event</a>
</li>
<li><a href="namespace-Gedmo.Uploadable.FileInfo.html">FileInfo</a>
</li>
<li><a href="namespace-Gedmo.Uploadable.FilenameGenerator.html">FilenameGenerator</a>
</li>
<li><a href="namespace-Gedmo.Uploadable.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Gedmo.Uploadable.Mapping.Driver.html">Driver</a>
</li>
</ul></li>
<li><a href="namespace-Gedmo.Uploadable.MimeType.html">MimeType</a>
</li>
<li><a href="namespace-Gedmo.Uploadable.Stub.html">Stub</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Incenteev.html">Incenteev<span></span></a>
<ul>
<li><a href="namespace-Incenteev.ParameterHandler.html">ParameterHandler<span></span></a>
<ul>
<li><a href="namespace-Incenteev.ParameterHandler.Tests.html">Tests</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-IpTraceable.html">IpTraceable<span></span></a>
<ul>
<li><a href="namespace-IpTraceable.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-IpTraceable.Fixture.Document.html">Document</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-JMS.html">JMS<span></span></a>
<ul>
<li><a href="namespace-JMS.Parser.html">Parser<span></span></a>
<ul>
<li><a href="namespace-JMS.Parser.Tests.html">Tests</a>
</li>
</ul></li>
<li><a href="namespace-JMS.Serializer.html">Serializer<span></span></a>
<ul>
<li><a href="namespace-JMS.Serializer.Annotation.html">Annotation</a>
</li>
<li><a href="namespace-JMS.Serializer.Builder.html">Builder</a>
</li>
<li><a href="namespace-JMS.Serializer.Construction.html">Construction</a>
</li>
<li><a href="namespace-JMS.Serializer.EventDispatcher.html">EventDispatcher<span></span></a>
<ul>
<li><a href="namespace-JMS.Serializer.EventDispatcher.Subscriber.html">Subscriber</a>
</li>
</ul></li>
<li><a href="namespace-JMS.Serializer.Exception.html">Exception</a>
</li>
<li><a href="namespace-JMS.Serializer.Exclusion.html">Exclusion</a>
</li>
<li><a href="namespace-JMS.Serializer.Handler.html">Handler</a>
</li>
<li><a href="namespace-JMS.Serializer.Metadata.html">Metadata<span></span></a>
<ul>
<li><a href="namespace-JMS.Serializer.Metadata.Driver.html">Driver</a>
</li>
</ul></li>
<li><a href="namespace-JMS.Serializer.Naming.html">Naming</a>
</li>
<li><a href="namespace-JMS.Serializer.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-JMS.Serializer.Tests.Exclusion.html">Exclusion</a>
</li>
<li><a href="namespace-JMS.Serializer.Tests.Fixtures.html">Fixtures<span></span></a>
<ul>
<li><a href="namespace-JMS.Serializer.Tests.Fixtures.Discriminator.html">Discriminator</a>
</li>
<li><a href="namespace-JMS.Serializer.Tests.Fixtures.Doctrine.html">Doctrine</a>
</li>
<li><a href="namespace-JMS.Serializer.Tests.Fixtures.DoctrinePHPCR.html">DoctrinePHPCR</a>
</li>
</ul></li>
<li><a href="namespace-JMS.Serializer.Tests.Handler.html">Handler</a>
</li>
<li><a href="namespace-JMS.Serializer.Tests.Metadata.html">Metadata<span></span></a>
<ul>
<li><a href="namespace-JMS.Serializer.Tests.Metadata.Driver.html">Driver</a>
</li>
</ul></li>
<li><a href="namespace-JMS.Serializer.Tests.Serializer.html">Serializer<span></span></a>
<ul>
<li><a href="namespace-JMS.Serializer.Tests.Serializer.EventDispatcher.html">EventDispatcher<span></span></a>
<ul>
<li><a href="namespace-JMS.Serializer.Tests.Serializer.EventDispatcher.Subscriber.html">Subscriber</a>
</li>
</ul></li>
<li><a href="namespace-JMS.Serializer.Tests.Serializer.Naming.html">Naming</a>
</li>
</ul></li>
<li><a href="namespace-JMS.Serializer.Tests.Twig.html">Twig</a>
</li>
</ul></li>
<li><a href="namespace-JMS.Serializer.Twig.html">Twig</a>
</li>
<li><a href="namespace-JMS.Serializer.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-JMS.SerializerBundle.html">SerializerBundle<span></span></a>
<ul>
<li><a href="namespace-JMS.SerializerBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-JMS.SerializerBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-JMS.SerializerBundle.Serializer.html">Serializer</a>
</li>
<li><a href="namespace-JMS.SerializerBundle.Templating.html">Templating</a>
</li>
<li><a href="namespace-JMS.SerializerBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-JMS.SerializerBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-JMS.SerializerBundle.Tests.DependencyInjection.Fixture.html">Fixture</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-JMS.TranslationBundle.html">TranslationBundle<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Annotation.html">Annotation</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Command.html">Command</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-JMS.TranslationBundle.Exception.html">Exception</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Logger.html">Logger</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Model.html">Model</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Tests.Functional.html">Functional<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Tests.Functional.TestBundle.html">TestBundle<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Tests.Functional.TestBundle.Controller.html">Controller</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-JMS.TranslationBundle.Tests.Model.html">Model</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.html">Translation<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Comparison.html">Comparison</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Dumper.html">Dumper</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.html">Extractor<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.File.html">File<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.File.Fixture.html">Fixture</a>
</li>
</ul></li>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.SimpleTest.html">SimpleTest<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.SimpleTest.Controller.html">Controller</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.SimpleTest.Form.html">Form</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Loader.html">Loader<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Loader.Symfony.html">Symfony</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-JMS.TranslationBundle.Tests.Twig.html">Twig</a>
</li>
</ul></li>
<li><a href="namespace-JMS.TranslationBundle.Translation.html">Translation<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Translation.Comparison.html">Comparison</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Translation.Dumper.html">Dumper</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Translation.Extractor.html">Extractor<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Translation.Extractor.File.html">File</a>
</li>
</ul></li>
<li><a href="namespace-JMS.TranslationBundle.Translation.Loader.html">Loader<span></span></a>
<ul>
<li><a href="namespace-JMS.TranslationBundle.Translation.Loader.Symfony.html">Symfony</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-JMS.TranslationBundle.Twig.html">Twig</a>
</li>
<li><a href="namespace-JMS.TranslationBundle.Util.html">Util</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Knp.html">Knp<span></span></a>
<ul>
<li><a href="namespace-Knp.Bundle.html">Bundle<span></span></a>
<ul>
<li><a href="namespace-Knp.Bundle.MenuBundle.html">MenuBundle<span></span></a>
<ul>
<li><a href="namespace-Knp.Bundle.MenuBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Knp.Bundle.MenuBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Knp.Bundle.MenuBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Knp.Bundle.MenuBundle.Provider.html">Provider</a>
</li>
<li><a href="namespace-Knp.Bundle.MenuBundle.Renderer.html">Renderer</a>
</li>
<li><a href="namespace-Knp.Bundle.MenuBundle.Templating.html">Templating<span></span></a>
<ul>
<li><a href="namespace-Knp.Bundle.MenuBundle.Templating.Helper.html">Helper</a>
</li>
</ul></li>
<li><a href="namespace-Knp.Bundle.MenuBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Knp.Bundle.MenuBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Knp.Bundle.MenuBundle.Tests.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Knp.Bundle.MenuBundle.Tests.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Provider.html">Provider</a>
</li>
<li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Renderer.html">Renderer</a>
</li>
<li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.html">Stubs<span></span></a>
<ul>
<li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.Child.html">Child<span></span></a>
<ul>
<li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.Child.Menu.html">Menu</a>
</li>
</ul></li>
<li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.Menu.html">Menu</a>
</li>
</ul></li>
<li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Templating.html">Templating</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Knp.Menu.html">Menu<span></span></a>
<ul>
<li><a href="namespace-Knp.Menu.Factory.html">Factory</a>
</li>
<li><a href="namespace-Knp.Menu.Integration.html">Integration<span></span></a>
<ul>
<li><a href="namespace-Knp.Menu.Integration.Silex.html">Silex</a>
</li>
<li><a href="namespace-Knp.Menu.Integration.Symfony.html">Symfony</a>
</li>
</ul></li>
<li><a href="namespace-Knp.Menu.Iterator.html">Iterator</a>
</li>
<li><a href="namespace-Knp.Menu.Loader.html">Loader</a>
</li>
<li><a href="namespace-Knp.Menu.Matcher.html">Matcher<span></span></a>
<ul>
<li><a href="namespace-Knp.Menu.Matcher.Voter.html">Voter</a>
</li>
</ul></li>
<li><a href="namespace-Knp.Menu.Provider.html">Provider</a>
</li>
<li><a href="namespace-Knp.Menu.Renderer.html">Renderer</a>
</li>
<li><a href="namespace-Knp.Menu.Silex.html">Silex<span></span></a>
<ul>
<li><a href="namespace-Knp.Menu.Silex.Voter.html">Voter</a>
</li>
</ul></li>
<li><a href="namespace-Knp.Menu.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Knp.Menu.Tests.Factory.html">Factory</a>
</li>
<li><a href="namespace-Knp.Menu.Tests.Integration.html">Integration<span></span></a>
<ul>
<li><a href="namespace-Knp.Menu.Tests.Integration.Silex.html">Silex</a>
</li>
</ul></li>
<li><a href="namespace-Knp.Menu.Tests.Iterator.html">Iterator</a>
</li>
<li><a href="namespace-Knp.Menu.Tests.Loader.html">Loader</a>
</li>
<li><a href="namespace-Knp.Menu.Tests.Matcher.html">Matcher<span></span></a>
<ul>
<li><a href="namespace-Knp.Menu.Tests.Matcher.Voter.html">Voter</a>
</li>
</ul></li>
<li><a href="namespace-Knp.Menu.Tests.Provider.html">Provider</a>
</li>
<li><a href="namespace-Knp.Menu.Tests.Renderer.html">Renderer</a>
</li>
<li><a href="namespace-Knp.Menu.Tests.Silex.html">Silex</a>
</li>
<li><a href="namespace-Knp.Menu.Tests.Twig.html">Twig</a>
</li>
<li><a href="namespace-Knp.Menu.Tests.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-Knp.Menu.Twig.html">Twig</a>
</li>
<li><a href="namespace-Knp.Menu.Util.html">Util</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Loggable.html">Loggable<span></span></a>
<ul>
<li><a href="namespace-Loggable.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Loggable.Fixture.Document.html">Document<span></span></a>
<ul>
<li><a href="namespace-Loggable.Fixture.Document.Log.html">Log</a>
</li>
</ul></li>
<li><a href="namespace-Loggable.Fixture.Entity.html">Entity<span></span></a>
<ul>
<li><a href="namespace-Loggable.Fixture.Entity.Log.html">Log</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Lunetics.html">Lunetics<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.html">LocaleBundle<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Cookie.html">Cookie</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Lunetics.LocaleBundle.Event.html">Event</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Form.html">Form<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.Form.Extension.html">Extension<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.Form.Extension.ChoiceList.html">ChoiceList</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Form.Extension.Type.html">Type</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Lunetics.LocaleBundle.LocaleGuesser.html">LocaleGuesser</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.LocaleInformation.html">LocaleInformation</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Matcher.html">Matcher</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Session.html">Session</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Switcher.html">Switcher</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Templating.html">Templating<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.Templating.Helper.html">Helper</a>
</li>
</ul></li>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.Controller.html">Controller</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.Event.html">Event</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.html">Form<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.Extension.html">Extension<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.Extension.ChoiceList.html">ChoiceList</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.Extension.Type.html">Type</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.LocaleGuesser.html">LocaleGuesser</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.LocaleInformation.html">LocaleInformation</a>
</li>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.Templating.html">Templating<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.Templating.Helper.html">Helper</a>
</li>
</ul></li>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.Twig.html">Twig<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.Twig.Extension.html">Extension</a>
</li>
</ul></li>
<li><a href="namespace-Lunetics.LocaleBundle.Tests.Validator.html">Validator</a>
</li>
</ul></li>
<li><a href="namespace-Lunetics.LocaleBundle.Twig.html">Twig<span></span></a>
<ul>
<li><a href="namespace-Lunetics.LocaleBundle.Twig.Extension.html">Extension</a>
</li>
</ul></li>
<li><a href="namespace-Lunetics.LocaleBundle.Validator.html">Validator</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Mapping.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Mapping.Fixture.Compatibility.html">Compatibility</a>
</li>
<li><a href="namespace-Mapping.Fixture.Document.html">Document</a>
</li>
<li><a href="namespace-Mapping.Fixture.Unmapped.html">Unmapped</a>
</li>
<li><a href="namespace-Mapping.Fixture.Xml.html">Xml</a>
</li>
<li><a href="namespace-Mapping.Fixture.Yaml.html">Yaml</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Metadata.html">Metadata<span></span></a>
<ul>
<li><a href="namespace-Metadata.Cache.html">Cache</a>
</li>
<li><a href="namespace-Metadata.Driver.html">Driver</a>
</li>
<li><a href="namespace-Metadata.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Metadata.Tests.Cache.html">Cache</a>
</li>
<li><a href="namespace-Metadata.Tests.Driver.html">Driver<span></span></a>
<ul>
<li><a href="namespace-Metadata.Tests.Driver.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Metadata.Tests.Driver.Fixture.A.html">A</a>
</li>
<li><a href="namespace-Metadata.Tests.Driver.Fixture.B.html">B</a>
</li>
<li><a href="namespace-Metadata.Tests.Driver.Fixture.C.html">C<span></span></a>
<ul>
<li><a href="namespace-Metadata.Tests.Driver.Fixture.C.SubDir.html">SubDir</a>
</li>
</ul></li>
<li><a href="namespace-Metadata.Tests.Driver.Fixture.T.html">T</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Metadata.Tests.Fixtures.html">Fixtures<span></span></a>
<ul>
<li><a href="namespace-Metadata.Tests.Fixtures.ComplexHierarchy.html">ComplexHierarchy</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Monolog.html">Monolog<span></span></a>
<ul>
<li><a href="namespace-Monolog.Formatter.html">Formatter</a>
</li>
<li><a href="namespace-Monolog.Handler.html">Handler<span></span></a>
<ul>
<li><a href="namespace-Monolog.Handler.FingersCrossed.html">FingersCrossed</a>
</li>
<li><a href="namespace-Monolog.Handler.SyslogUdp.html">SyslogUdp</a>
</li>
</ul></li>
<li><a href="namespace-Monolog.Processor.html">Processor</a>
</li>
</ul></li>
<li><a href="namespace-MyProject.html">MyProject<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.html">Proxies<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.__CG__.html">__CG__<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.html">Doctrine<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.Tests.Common.html">Common<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.Tests.Common.Util.html">Util</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.html">OtherProject<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.html">Proxies<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.html">__CG__<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.html">Doctrine<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.Tests.Common.html">Common<span></span></a>
<ul>
<li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.Tests.Common.Util.html">Util</a>
</li>
</ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li>
<li><a href="namespace-NamespaceCollision.html">NamespaceCollision<span></span></a>
<ul>
<li><a href="namespace-NamespaceCollision.A.html">A<span></span></a>
<ul>
<li><a href="namespace-NamespaceCollision.A.B.html">B</a>
</li>
</ul></li>
<li><a href="namespace-NamespaceCollision.C.html">C<span></span></a>
<ul>
<li><a href="namespace-NamespaceCollision.C.B.html">B</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Namespaced.html">Namespaced</a>
</li>
<li><a href="namespace-Namespaced2.html">Namespaced2</a>
</li>
<li><a href="namespace-Negotiation.html">Negotiation<span></span></a>
<ul>
<li><a href="namespace-Negotiation.Tests.html">Tests</a>
</li>
</ul></li>
<li><a href="namespace-None.html">None</a>
</li>
<li><a href="namespace-Pequiven.html">Pequiven<span></span></a>
<ul>
<li><a href="namespace-Pequiven.SEIPBundle.html">SEIPBundle<span></span></a>
<ul>
<li><a href="namespace-Pequiven.SEIPBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Pequiven.SEIPBundle.DataFixtures.html">DataFixtures</a>
</li>
<li><a href="namespace-Pequiven.SEIPBundle.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Pequiven.SEIPBundle.Entity.html">Entity</a>
</li>
<li><a href="namespace-Pequiven.SEIPBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Pequiven.SEIPBundle.Form.html">Form<span></span></a>
<ul>
<li><a href="namespace-Pequiven.SEIPBundle.Form.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-Pequiven.SEIPBundle.Menu.html">Menu<span></span></a>
<ul>
<li><a href="namespace-Pequiven.SEIPBundle.Menu.Template.html">Template<span></span></a>
<ul>
<li><a href="namespace-Pequiven.SEIPBundle.Menu.Template.Developer.html">Developer</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Pequiven.SEIPBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Pequiven.SEIPBundle.Tests.Controller.html">Controller</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-PHP.html">PHP</a>
</li>
<li><a href="namespace-PhpCollection.html">PhpCollection<span></span></a>
<ul>
<li><a href="namespace-PhpCollection.Tests.html">Tests</a>
</li>
</ul></li>
<li><a href="namespace-PhpOption.html">PhpOption<span></span></a>
<ul>
<li><a href="namespace-PhpOption.Tests.html">Tests</a>
</li>
</ul></li>
<li><a href="namespace-Proxies.html">Proxies<span></span></a>
<ul>
<li><a href="namespace-Proxies.__CG__.html">__CG__<span></span></a>
<ul>
<li><a href="namespace-Proxies.__CG__.Pequiven.html">Pequiven<span></span></a>
<ul>
<li><a href="namespace-Proxies.__CG__.Pequiven.SEIPBundle.html">SEIPBundle<span></span></a>
<ul>
<li><a href="namespace-Proxies.__CG__.Pequiven.SEIPBundle.Entity.html">Entity</a>
</li>
</ul></li></ul></li></ul></li></ul></li>
<li><a href="namespace-Psr.html">Psr<span></span></a>
<ul>
<li><a href="namespace-Psr.Log.html">Log<span></span></a>
<ul>
<li><a href="namespace-Psr.Log.Test.html">Test</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-ReferenceIntegrity.html">ReferenceIntegrity<span></span></a>
<ul>
<li><a href="namespace-ReferenceIntegrity.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-ReferenceIntegrity.Fixture.Document.html">Document<span></span></a>
<ul>
<li><a href="namespace-ReferenceIntegrity.Fixture.Document.ManyNullify.html">ManyNullify</a>
</li>
<li><a href="namespace-ReferenceIntegrity.Fixture.Document.ManyRestrict.html">ManyRestrict</a>
</li>
<li><a href="namespace-ReferenceIntegrity.Fixture.Document.OneNullify.html">OneNullify</a>
</li>
<li><a href="namespace-ReferenceIntegrity.Fixture.Document.OneRestrict.html">OneRestrict</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-References.html">References<span></span></a>
<ul>
<li><a href="namespace-References.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-References.Fixture.ODM.html">ODM<span></span></a>
<ul>
<li><a href="namespace-References.Fixture.ODM.MongoDB.html">MongoDB</a>
</li>
</ul></li>
<li><a href="namespace-References.Fixture.ORM.html">ORM</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Sensio.html">Sensio<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.html">Bundle<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.DistributionBundle.html">DistributionBundle<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.DistributionBundle.Composer.html">Composer</a>
</li>
<li><a href="namespace-Sensio.Bundle.DistributionBundle.Configurator.html">Configurator<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.DistributionBundle.Configurator.Form.html">Form</a>
</li>
<li><a href="namespace-Sensio.Bundle.DistributionBundle.Configurator.Step.html">Step</a>
</li>
</ul></li>
<li><a href="namespace-Sensio.Bundle.DistributionBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Sensio.Bundle.DistributionBundle.DependencyInjection.html">DependencyInjection</a>
</li>
</ul></li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.html">FrameworkExtraBundle<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Configuration.html">Configuration</a>
</li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Request.html">Request<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Request.ParamConverter.html">ParamConverter</a>
</li>
</ul></li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Routing.html">Routing</a>
</li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Security.html">Security</a>
</li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Templating.html">Templating</a>
</li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Configuration.html">Configuration</a>
</li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.EventListener.html">EventListener<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.EventListener.Fixture.html">Fixture</a>
</li>
</ul></li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Request.html">Request<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Request.ParamConverter.html">ParamConverter</a>
</li>
</ul></li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Routing.html">Routing</a>
</li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.html">Templating<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.BarBundle.html">BarBundle<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.BarBundle.Controller.html">Controller</a>
</li>
</ul></li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBarBundle.html">FooBarBundle<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBarBundle.Controller.html">Controller</a>
</li>
</ul></li>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBundle.html">FooBundle<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBundle.Controller.html">Controller</a>
</li>
</ul></li></ul></li></ul></li></ul></li></ul></li>
<li><a href="namespace-Sensio.Bundle.GeneratorBundle.html">GeneratorBundle<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.GeneratorBundle.Command.html">Command<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.GeneratorBundle.Command.Helper.html">Helper</a>
</li>
</ul></li>
<li><a href="namespace-Sensio.Bundle.GeneratorBundle.Generator.html">Generator</a>
</li>
<li><a href="namespace-Sensio.Bundle.GeneratorBundle.Manipulator.html">Manipulator</a>
</li>
<li><a href="namespace-Sensio.Bundle.GeneratorBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Sensio.Bundle.GeneratorBundle.Tests.Command.html">Command</a>
</li>
<li><a href="namespace-Sensio.Bundle.GeneratorBundle.Tests.Generator.html">Generator</a>
</li>
</ul></li></ul></li></ul></li></ul></li>
<li><a href="namespace-Sluggable.html">Sluggable<span></span></a>
<ul>
<li><a href="namespace-Sluggable.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Sluggable.Fixture.Doctrine.html">Doctrine</a>
</li>
<li><a href="namespace-Sluggable.Fixture.Document.html">Document<span></span></a>
<ul>
<li><a href="namespace-Sluggable.Fixture.Document.Handler.html">Handler</a>
</li>
</ul></li>
<li><a href="namespace-Sluggable.Fixture.Handler.html">Handler<span></span></a>
<ul>
<li><a href="namespace-Sluggable.Fixture.Handler.People.html">People</a>
</li>
</ul></li>
<li><a href="namespace-Sluggable.Fixture.Inheritance.html">Inheritance</a>
</li>
<li><a href="namespace-Sluggable.Fixture.Inheritance2.html">Inheritance2</a>
</li>
<li><a href="namespace-Sluggable.Fixture.Issue104.html">Issue104</a>
</li>
<li><a href="namespace-Sluggable.Fixture.Issue116.html">Issue116</a>
</li>
<li><a href="namespace-Sluggable.Fixture.Issue131.html">Issue131</a>
</li>
<li><a href="namespace-Sluggable.Fixture.Issue449.html">Issue449</a>
</li>
<li><a href="namespace-Sluggable.Fixture.Issue633.html">Issue633</a>
</li>
<li><a href="namespace-Sluggable.Fixture.Issue827.html">Issue827</a>
</li>
<li><a href="namespace-Sluggable.Fixture.Issue939.html">Issue939</a>
</li>
<li><a href="namespace-Sluggable.Fixture.MappedSuperclass.html">MappedSuperclass</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-SoftDeleteable.html">SoftDeleteable<span></span></a>
<ul>
<li><a href="namespace-SoftDeleteable.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-SoftDeleteable.Fixture.Document.html">Document</a>
</li>
<li><a href="namespace-SoftDeleteable.Fixture.Entity.html">Entity</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Sortable.html">Sortable<span></span></a>
<ul>
<li><a href="namespace-Sortable.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Sortable.Fixture.Transport.html">Transport</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Stof.html">Stof<span></span></a>
<ul>
<li><a href="namespace-Stof.DoctrineExtensionsBundle.html">DoctrineExtensionsBundle<span></span></a>
<ul>
<li><a href="namespace-Stof.DoctrineExtensionsBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Stof.DoctrineExtensionsBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Stof.DoctrineExtensionsBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Stof.DoctrineExtensionsBundle.Uploadable.html">Uploadable</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.html">Symfony<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.html">Bridge<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.html">Doctrine<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.CacheWarmer.html">CacheWarmer</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.DataCollector.html">DataCollector</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.DataFixtures.html">DataFixtures</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.CompilerPass.html">CompilerPass</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.Security.html">Security<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.Security.UserProvider.html">UserProvider</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Bridge.Doctrine.ExpressionLanguage.html">ExpressionLanguage</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Form.html">Form<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.Form.ChoiceList.html">ChoiceList</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Form.DataTransformer.html">DataTransformer</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Form.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Form.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bridge.Doctrine.HttpFoundation.html">HttpFoundation</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Logger.html">Logger</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Security.html">Security<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.Security.RememberMe.html">RememberMe</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Security.User.html">User</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Test.html">Test</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DataCollector.html">DataCollector</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DataFixtures.html">DataFixtures</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DependencyInjection.CompilerPass.html">CompilerPass</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.ExpressionLanguage.html">ExpressionLanguage</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Fixtures.html">Fixtures</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.html">Form<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.ChoiceList.html">ChoiceList</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.DataTransformer.html">DataTransformer</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.HttpFoundation.html">HttpFoundation</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Logger.html">Logger</a>
</li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Security.html">Security<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Security.User.html">User</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Validator.html">Validator<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Validator.Constraints.html">Constraints</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Bridge.Doctrine.Validator.html">Validator<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Doctrine.Validator.Constraints.html">Constraints</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Bridge.Monolog.html">Monolog<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Monolog.Formatter.html">Formatter</a>
</li>
<li><a href="namespace-Symfony.Bridge.Monolog.Handler.html">Handler</a>
</li>
<li><a href="namespace-Symfony.Bridge.Monolog.Processor.html">Processor</a>
</li>
<li><a href="namespace-Symfony.Bridge.Monolog.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Monolog.Tests.Handler.html">Handler</a>
</li>
<li><a href="namespace-Symfony.Bridge.Monolog.Tests.Processor.html">Processor</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Bridge.Propel1.html">Propel1<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Propel1.DataCollector.html">DataCollector</a>
</li>
<li><a href="namespace-Symfony.Bridge.Propel1.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Propel1.DependencyInjection.Security.html">Security<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Propel1.DependencyInjection.Security.UserProvider.html">UserProvider</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Bridge.Propel1.Form.html">Form<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Propel1.Form.ChoiceList.html">ChoiceList</a>
</li>
<li><a href="namespace-Symfony.Bridge.Propel1.Form.DataTransformer.html">DataTransformer</a>
</li>
<li><a href="namespace-Symfony.Bridge.Propel1.Form.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Bridge.Propel1.Form.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bridge.Propel1.Logger.html">Logger</a>
</li>
<li><a href="namespace-Symfony.Bridge.Propel1.Security.html">Security<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Propel1.Security.User.html">User</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bridge.Propel1.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Propel1.Tests.DataCollector.html">DataCollector</a>
</li>
<li><a href="namespace-Symfony.Bridge.Propel1.Tests.Fixtures.html">Fixtures</a>
</li>
<li><a href="namespace-Symfony.Bridge.Propel1.Tests.Form.html">Form<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Propel1.Tests.Form.ChoiceList.html">ChoiceList</a>
</li>
<li><a href="namespace-Symfony.Bridge.Propel1.Tests.Form.DataTransformer.html">DataTransformer</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Symfony.Bridge.ProxyManager.html">ProxyManager<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.ProxyManager.LazyProxy.html">LazyProxy<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.ProxyManager.LazyProxy.Instantiator.html">Instantiator</a>
</li>
<li><a href="namespace-Symfony.Bridge.ProxyManager.LazyProxy.PhpDumper.html">PhpDumper</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.html">LazyProxy<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.Dumper.html">Dumper</a>
</li>
<li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.Instantiator.html">Instantiator</a>
</li>
<li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.PhpDumper.html">PhpDumper</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Symfony.Bridge.Twig.html">Twig<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Twig.Extension.html">Extension</a>
</li>
<li><a href="namespace-Symfony.Bridge.Twig.Form.html">Form</a>
</li>
<li><a href="namespace-Symfony.Bridge.Twig.Node.html">Node</a>
</li>
<li><a href="namespace-Symfony.Bridge.Twig.NodeVisitor.html">NodeVisitor</a>
</li>
<li><a href="namespace-Symfony.Bridge.Twig.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Twig.Tests.Extension.html">Extension<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bridge.Twig.Tests.Extension.Fixtures.html">Fixtures</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bridge.Twig.Tests.Node.html">Node</a>
</li>
<li><a href="namespace-Symfony.Bridge.Twig.Tests.NodeVisitor.html">NodeVisitor</a>
</li>
<li><a href="namespace-Symfony.Bridge.Twig.Tests.TokenParser.html">TokenParser</a>
</li>
<li><a href="namespace-Symfony.Bridge.Twig.Tests.Translation.html">Translation</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bridge.Twig.TokenParser.html">TokenParser</a>
</li>
<li><a href="namespace-Symfony.Bridge.Twig.Translation.html">Translation</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Bundle.html">Bundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.html">AsseticBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.CacheWarmer.html">CacheWarmer</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Command.html">Command</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Config.html">Config</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.html">Factory<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.Resource.html">Resource</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.Worker.html">Worker</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Routing.html">Routing</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Templating.html">Templating</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.CacheWarmer.html">CacheWarmer</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Command.html">Command</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Factory.html">Factory<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Factory.Resource.html">Resource</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Templating.html">Templating</a>
</li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.TestBundle.html">TestBundle</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.AsseticBundle.Twig.html">Twig</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.html">FrameworkBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.CacheWarmer.html">CacheWarmer</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Command.html">Command</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Console.html">Console<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Console.Descriptor.html">Descriptor</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Console.Helper.html">Helper</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.DataCollector.html">DataCollector</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Fragment.html">Fragment</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.HttpCache.html">HttpCache</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Routing.html">Routing</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.html">Templating<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.Asset.html">Asset</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.Helper.html">Helper</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.Loader.html">Loader</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Test.html">Test</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.CacheWarmer.html">CacheWarmer</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Console.html">Console<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Console.Descriptor.html">Descriptor</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Fixtures.html">Fixtures<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Fixtures.BaseBundle.html">BaseBundle</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Fragment.html">Fragment</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.html">Functional<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.app.html">app</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.Bundle.html">Bundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.Bundle.TestBundle.html">TestBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.Bundle.TestBundle.Controller.html">Controller</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Routing.html">Routing</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.html">Templating<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.Helper.html">Helper<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.Helper.Fixtures.html">Fixtures</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.Loader.html">Loader</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Translation.html">Translation</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Validator.html">Validator</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Translation.html">Translation</a>
</li>
<li><a href="namespace-Symfony.Bundle.FrameworkBundle.Validator.html">Validator</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.MonologBundle.html">MonologBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.MonologBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.MonologBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.MonologBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.MonologBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.MonologBundle.Tests.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.html">SecurityBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Command.html">Command</a>
</li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.DataCollector.html">DataCollector</a>
</li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Security.html">Security<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Security.Factory.html">Factory</a>
</li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Security.UserProvider.html">UserProvider</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Security.html">Security</a>
</li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Templating.html">Templating<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Templating.Helper.html">Helper</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.DependencyInjection.Security.html">Security<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.DependencyInjection.Security.Factory.html">Factory</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.html">Functional<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.app.html">app</a>
</li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.html">Bundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.CsrfFormLoginBundle.html">CsrfFormLoginBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.CsrfFormLoginBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.CsrfFormLoginBundle.Form.html">Form</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.html">FormLoginBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.Security.html">Security</a>
</li>
</ul></li></ul></li></ul></li></ul></li>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Twig.html">Twig<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SecurityBundle.Twig.Extension.html">Extension</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.html">SwiftmailerBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.Command.html">Command</a>
</li>
<li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.DataCollector.html">DataCollector</a>
</li>
<li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.Tests.DependencyInjection.html">DependencyInjection</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.html">TwigBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.TwigBundle.CacheWarmer.html">CacheWarmer</a>
</li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Command.html">Command</a>
</li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Debug.html">Debug</a>
</li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.TwigBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Extension.html">Extension</a>
</li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Node.html">Node</a>
</li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.TokenParser.html">TokenParser</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.TwigBundle.TokenParser.html">TokenParser</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Bundle.WebProfilerBundle.html">WebProfilerBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Bundle.WebProfilerBundle.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Symfony.Bundle.WebProfilerBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Profiler.html">Profiler</a>
</li>
<li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.Profiler.html">Profiler</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Symfony.Component.html">Component<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.BrowserKit.html">BrowserKit<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.BrowserKit.Tests.html">Tests</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.ClassLoader.html">ClassLoader<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.ClassLoader.Tests.html">Tests</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Config.html">Config<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Config.Definition.html">Definition<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Config.Definition.Builder.html">Builder</a>
</li>
<li><a href="namespace-Symfony.Component.Config.Definition.Dumper.html">Dumper</a>
</li>
<li><a href="namespace-Symfony.Component.Config.Definition.Exception.html">Exception</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Config.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Config.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Component.Config.Resource.html">Resource</a>
</li>
<li><a href="namespace-Symfony.Component.Config.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Config.Tests.Definition.html">Definition<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Config.Tests.Definition.Builder.html">Builder</a>
</li>
<li><a href="namespace-Symfony.Component.Config.Tests.Definition.Dumper.html">Dumper</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Config.Tests.Fixtures.html">Fixtures<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Config.Tests.Fixtures.Configuration.html">Configuration</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Config.Tests.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Component.Config.Tests.Resource.html">Resource</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Config.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Console.html">Console<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Console.Command.html">Command</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Descriptor.html">Descriptor</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Event.html">Event</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Formatter.html">Formatter</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Helper.html">Helper</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Input.html">Input</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Output.html">Output</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Tester.html">Tester</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Console.Tests.Command.html">Command</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Tests.Descriptor.html">Descriptor</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Tests.Fixtures.html">Fixtures</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Tests.Formatter.html">Formatter</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Tests.Helper.html">Helper</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Tests.Input.html">Input</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Tests.Output.html">Output</a>
</li>
<li><a href="namespace-Symfony.Component.Console.Tests.Tester.html">Tester</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.CssSelector.html">CssSelector<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.CssSelector.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.CssSelector.Node.html">Node</a>
</li>
<li><a href="namespace-Symfony.Component.CssSelector.Parser.html">Parser<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.CssSelector.Parser.Handler.html">Handler</a>
</li>
<li><a href="namespace-Symfony.Component.CssSelector.Parser.Shortcut.html">Shortcut</a>
</li>
<li><a href="namespace-Symfony.Component.CssSelector.Parser.Tokenizer.html">Tokenizer</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.CssSelector.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.CssSelector.Tests.Node.html">Node</a>
</li>
<li><a href="namespace-Symfony.Component.CssSelector.Tests.Parser.html">Parser<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.CssSelector.Tests.Parser.Handler.html">Handler</a>
</li>
<li><a href="namespace-Symfony.Component.CssSelector.Tests.Parser.Shortcut.html">Shortcut</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.CssSelector.Tests.XPath.html">XPath</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.CssSelector.XPath.html">XPath<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.CssSelector.XPath.Extension.html">Extension</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Debug.html">Debug<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Debug.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Debug.FatalErrorHandler.html">FatalErrorHandler</a>
</li>
<li><a href="namespace-Symfony.Component.Debug.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Debug.Tests.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Debug.Tests.FatalErrorHandler.html">FatalErrorHandler</a>
</li>
<li><a href="namespace-Symfony.Component.Debug.Tests.Fixtures.html">Fixtures</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.DependencyInjection.Compiler.html">Compiler</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Dump.html">Dump</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Dumper.html">Dumper</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Extension.html">Extension</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.LazyProxy.html">LazyProxy<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.DependencyInjection.LazyProxy.Instantiator.html">Instantiator</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.LazyProxy.PhpDumper.html">PhpDumper</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.ParameterBag.html">ParameterBag</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Compiler.html">Compiler</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Dumper.html">Dumper</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Extension.html">Extension</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Tests.LazyProxy.html">LazyProxy<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.DependencyInjection.Tests.LazyProxy.Instantiator.html">Instantiator</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Tests.LazyProxy.PhpDumper.html">PhpDumper</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Component.DependencyInjection.Tests.ParameterBag.html">ParameterBag</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.DomCrawler.html">DomCrawler<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.DomCrawler.Field.html">Field</a>
</li>
<li><a href="namespace-Symfony.Component.DomCrawler.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.DomCrawler.Tests.Field.html">Field</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.EventDispatcher.html">EventDispatcher<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.EventDispatcher.Debug.html">Debug</a>
</li>
<li><a href="namespace-Symfony.Component.EventDispatcher.Tests.html">Tests</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.ExpressionLanguage.html">ExpressionLanguage<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.ExpressionLanguage.Node.html">Node</a>
</li>
<li><a href="namespace-Symfony.Component.ExpressionLanguage.ParserCache.html">ParserCache</a>
</li>
<li><a href="namespace-Symfony.Component.ExpressionLanguage.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.ExpressionLanguage.Tests.Node.html">Node</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Filesystem.html">Filesystem<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Filesystem.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Filesystem.Tests.html">Tests</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Finder.html">Finder<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Finder.Adapter.html">Adapter</a>
</li>
<li><a href="namespace-Symfony.Component.Finder.Comparator.html">Comparator</a>
</li>
<li><a href="namespace-Symfony.Component.Finder.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Finder.Expression.html">Expression</a>
</li>
<li><a href="namespace-Symfony.Component.Finder.Iterator.html">Iterator</a>
</li>
<li><a href="namespace-Symfony.Component.Finder.Shell.html">Shell</a>
</li>
<li><a href="namespace-Symfony.Component.Finder.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Finder.Tests.Comparator.html">Comparator</a>
</li>
<li><a href="namespace-Symfony.Component.Finder.Tests.Expression.html">Expression</a>
</li>
<li><a href="namespace-Symfony.Component.Finder.Tests.FakeAdapter.html">FakeAdapter</a>
</li>
<li><a href="namespace-Symfony.Component.Finder.Tests.Iterator.html">Iterator</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Form.html">Form<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.html">Extension<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Extension.Core.html">Core<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Extension.Core.ChoiceList.html">ChoiceList</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.Core.DataMapper.html">DataMapper</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.Core.DataTransformer.html">DataTransformer</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.Core.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.Core.Type.html">Type</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.Core.View.html">View</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Form.Extension.Csrf.html">Csrf<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Extension.Csrf.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.Csrf.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.html">DataCollector<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.Proxy.html">Proxy</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Form.Extension.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.HttpFoundation.html">HttpFoundation<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Extension.HttpFoundation.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Form.Extension.Templating.html">Templating</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.Validator.html">Validator<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Extension.Validator.Constraints.html">Constraints</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.Validator.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.Validator.Type.html">Type</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.Validator.Util.html">Util</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Extension.Validator.ViolationMapper.html">ViolationMapper</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Form.Guess.html">Guess</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Test.html">Test</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.html">Extension<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.html">Core<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.ChoiceList.html">ChoiceList</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.DataMapper.html">DataMapper</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.DataTransformer.html">DataTransformer</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.html">Csrf<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.CsrfProvider.html">CsrfProvider</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.DataCollector.html">DataCollector<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.DataCollector.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.HttpFoundation.html">HttpFoundation<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.HttpFoundation.EventListener.html">EventListener</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.html">Validator<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.Constraints.html">Constraints</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.Type.html">Type</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.Util.html">Util</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.ViolationMapper.html">ViolationMapper</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Form.Tests.Fixtures.html">Fixtures</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Guess.html">Guess</a>
</li>
<li><a href="namespace-Symfony.Component.Form.Tests.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Form.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.HttpFoundation.html">HttpFoundation<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpFoundation.File.html">File<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpFoundation.File.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.HttpFoundation.File.MimeType.html">MimeType</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.HttpFoundation.Session.html">Session<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpFoundation.Session.Attribute.html">Attribute</a>
</li>
<li><a href="namespace-Symfony.Component.HttpFoundation.Session.Flash.html">Flash</a>
</li>
<li><a href="namespace-Symfony.Component.HttpFoundation.Session.Storage.html">Storage<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpFoundation.Session.Storage.Handler.html">Handler</a>
</li>
<li><a href="namespace-Symfony.Component.HttpFoundation.Session.Storage.Proxy.html">Proxy</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.HttpFoundation.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpFoundation.Tests.File.html">File<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpFoundation.Tests.File.MimeType.html">MimeType</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.html">Session<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Attribute.html">Attribute</a>
</li>
<li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Flash.html">Flash</a>
</li>
<li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Storage.html">Storage<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Storage.Handler.html">Handler</a>
</li>
<li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Storage.Proxy.html">Proxy</a>
</li>
</ul></li></ul></li></ul></li></ul></li>
<li><a href="namespace-Symfony.Component.HttpKernel.html">HttpKernel<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpKernel.Bundle.html">Bundle</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.CacheClearer.html">CacheClearer</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.CacheWarmer.html">CacheWarmer</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Config.html">Config</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.DataCollector.html">DataCollector<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpKernel.DataCollector.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.HttpKernel.Debug.html">Debug</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Event.html">Event</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Fragment.html">Fragment</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.HttpCache.html">HttpCache</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Log.html">Log</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Profiler.html">Profiler</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Bundle.html">Bundle</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.CacheClearer.html">CacheClearer</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.CacheWarmer.html">CacheWarmer</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Config.html">Config</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Controller.html">Controller</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.DataCollector.html">DataCollector</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Debug.html">Debug</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.html">Fixtures<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionAbsentBundle.html">ExtensionAbsentBundle</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionLoadedBundle.html">ExtensionLoadedBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionLoadedBundle.DependencyInjection.html">DependencyInjection</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionPresentBundle.html">ExtensionPresentBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionPresentBundle.Command.html">Command</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionPresentBundle.DependencyInjection.html">DependencyInjection</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fragment.html">Fragment</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.HttpCache.html">HttpCache</a>
</li>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Profiler.html">Profiler<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.HttpKernel.Tests.Profiler.Mock.html">Mock</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Icu.html">Icu<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Icu.Tests.html">Tests</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Intl.html">Intl<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Intl.Collator.html">Collator</a>
</li>
<li><a href="namespace-Symfony.Component.Intl.DateFormatter.html">DateFormatter<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Intl.DateFormatter.DateFormat.html">DateFormat</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Intl.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Intl.Globals.html">Globals</a>
</li>
<li><a href="namespace-Symfony.Component.Intl.Locale.html">Locale</a>
</li>
<li><a href="namespace-Symfony.Component.Intl.NumberFormatter.html">NumberFormatter</a>
</li>
<li><a href="namespace-Symfony.Component.Intl.ResourceBundle.html">ResourceBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Compiler.html">Compiler</a>
</li>
<li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Reader.html">Reader</a>
</li>
<li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Transformer.html">Transformer<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Transformer.Rule.html">Rule</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Util.html">Util</a>
</li>
<li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Writer.html">Writer</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Intl.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Intl.Tests.Collator.html">Collator<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Intl.Tests.Collator.Verification.html">Verification</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Intl.Tests.DateFormatter.html">DateFormatter<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Intl.Tests.DateFormatter.Verification.html">Verification</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Intl.Tests.Globals.html">Globals<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Intl.Tests.Globals.Verification.html">Verification</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Intl.Tests.Locale.html">Locale<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Intl.Tests.Locale.Verification.html">Verification</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Intl.Tests.NumberFormatter.html">NumberFormatter<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Intl.Tests.NumberFormatter.Verification.html">Verification</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.html">ResourceBundle<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.Reader.html">Reader</a>
</li>
<li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.Util.html">Util</a>
</li>
<li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.Writer.html">Writer</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Intl.Tests.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Intl.Util.html">Util</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Locale.html">Locale<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Locale.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Locale.Tests.Stub.html">Stub</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.OptionsResolver.html">OptionsResolver<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.OptionsResolver.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.OptionsResolver.Tests.html">Tests</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Process.html">Process<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Process.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Process.Tests.html">Tests</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.PropertyAccess.html">PropertyAccess<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.PropertyAccess.Exception.html">Exception</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Routing.html">Routing<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Routing.Annotation.html">Annotation</a>
</li>
<li><a href="namespace-Symfony.Component.Routing.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Routing.Generator.html">Generator<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Routing.Generator.Dumper.html">Dumper</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Routing.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Component.Routing.Matcher.html">Matcher<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Routing.Matcher.Dumper.html">Dumper</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Routing.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Routing.Tests.Annotation.html">Annotation</a>
</li>
<li><a href="namespace-Symfony.Component.Routing.Tests.Fixtures.html">Fixtures<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Routing.Tests.Fixtures.AnnotatedClasses.html">AnnotatedClasses</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Routing.Tests.Generator.html">Generator<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Routing.Tests.Generator.Dumper.html">Dumper</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Routing.Tests.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Component.Routing.Tests.Matcher.html">Matcher<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Routing.Tests.Matcher.Dumper.html">Dumper</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Security.html">Security<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Acl.html">Acl<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Acl.Dbal.html">Dbal</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Acl.Domain.html">Domain</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Acl.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Acl.Model.html">Model</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Acl.Permission.html">Permission</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Acl.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Acl.Tests.Dbal.html">Dbal</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Acl.Tests.Domain.html">Domain</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Acl.Tests.Permission.html">Permission</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Acl.Tests.Voter.html">Voter</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Security.Acl.Voter.html">Voter</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Security.Core.html">Core<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Core.Authentication.html">Authentication<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Core.Authentication.Provider.html">Provider</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Authentication.RememberMe.html">RememberMe</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Authentication.Token.html">Token</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Security.Core.Authorization.html">Authorization<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Core.Authorization.Voter.html">Voter</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Security.Core.Encoder.html">Encoder</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Event.html">Event</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Role.html">Role</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.html">Authentication<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.Provider.html">Provider</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.RememberMe.html">RememberMe</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.Token.html">Token</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.Authorization.html">Authorization<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.Authorization.Voter.html">Voter</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.Encoder.html">Encoder</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.Role.html">Role</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.User.html">User</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.Util.html">Util</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.Validator.html">Validator<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Core.Tests.Validator.Constraints.html">Constraints</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Security.Core.User.html">User</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Util.html">Util</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Core.Validator.html">Validator<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Core.Validator.Constraints.html">Constraints</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Security.Csrf.html">Csrf<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Csrf.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Csrf.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Csrf.Tests.TokenGenerator.html">TokenGenerator</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Csrf.Tests.TokenStorage.html">TokenStorage</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Security.Csrf.TokenGenerator.html">TokenGenerator</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Csrf.TokenStorage.html">TokenStorage</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Security.Http.html">Http<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Http.Authentication.html">Authentication</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.Authorization.html">Authorization</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.EntryPoint.html">EntryPoint</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.Event.html">Event</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.Firewall.html">Firewall</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.Logout.html">Logout</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.RememberMe.html">RememberMe</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.Session.html">Session</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Http.Tests.Authentication.html">Authentication</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.Tests.EntryPoint.html">EntryPoint</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.Tests.Firewall.html">Firewall</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.Tests.Logout.html">Logout</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.Tests.RememberMe.html">RememberMe</a>
</li>
<li><a href="namespace-Symfony.Component.Security.Http.Tests.Session.html">Session</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Security.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Tests.Core.html">Core<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Tests.Core.Authentication.html">Authentication<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Tests.Core.Authentication.Token.html">Token</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Security.Tests.Core.User.html">User</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Security.Tests.Http.html">Http<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Security.Tests.Http.Firewall.html">Firewall</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Serializer.html">Serializer<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Serializer.Encoder.html">Encoder</a>
</li>
<li><a href="namespace-Symfony.Component.Serializer.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Serializer.Normalizer.html">Normalizer</a>
</li>
<li><a href="namespace-Symfony.Component.Serializer.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Serializer.Tests.Encoder.html">Encoder</a>
</li>
<li><a href="namespace-Symfony.Component.Serializer.Tests.Fixtures.html">Fixtures</a>
</li>
<li><a href="namespace-Symfony.Component.Serializer.Tests.Normalizer.html">Normalizer</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Stopwatch.html">Stopwatch</a>
</li>
<li><a href="namespace-Symfony.Component.Templating.html">Templating<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Templating.Asset.html">Asset</a>
</li>
<li><a href="namespace-Symfony.Component.Templating.Helper.html">Helper</a>
</li>
<li><a href="namespace-Symfony.Component.Templating.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Component.Templating.Storage.html">Storage</a>
</li>
<li><a href="namespace-Symfony.Component.Templating.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Templating.Tests.Fixtures.html">Fixtures</a>
</li>
<li><a href="namespace-Symfony.Component.Templating.Tests.Helper.html">Helper</a>
</li>
<li><a href="namespace-Symfony.Component.Templating.Tests.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Component.Templating.Tests.Storage.html">Storage</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Translation.html">Translation<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Translation.Catalogue.html">Catalogue</a>
</li>
<li><a href="namespace-Symfony.Component.Translation.Dumper.html">Dumper</a>
</li>
<li><a href="namespace-Symfony.Component.Translation.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Translation.Extractor.html">Extractor</a>
</li>
<li><a href="namespace-Symfony.Component.Translation.Loader.html">Loader</a>
</li>
<li><a href="namespace-Symfony.Component.Translation.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Translation.Tests.Catalogue.html">Catalogue</a>
</li>
<li><a href="namespace-Symfony.Component.Translation.Tests.Dumper.html">Dumper</a>
</li>
<li><a href="namespace-Symfony.Component.Translation.Tests.Loader.html">Loader</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Translation.Writer.html">Writer</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Validator.html">Validator<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Validator.Constraints.html">Constraints</a>
</li>
<li><a href="namespace-Symfony.Component.Validator.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Validator.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Validator.Mapping.Cache.html">Cache</a>
</li>
<li><a href="namespace-Symfony.Component.Validator.Mapping.Loader.html">Loader</a>
</li>
</ul></li>
<li><a href="namespace-Symfony.Component.Validator.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Validator.Tests.Constraints.html">Constraints</a>
</li>
<li><a href="namespace-Symfony.Component.Validator.Tests.Fixtures.html">Fixtures</a>
</li>
<li><a href="namespace-Symfony.Component.Validator.Tests.Mapping.html">Mapping<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Validator.Tests.Mapping.Cache.html">Cache</a>
</li>
<li><a href="namespace-Symfony.Component.Validator.Tests.Mapping.Loader.html">Loader</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Symfony.Component.Yaml.html">Yaml<span></span></a>
<ul>
<li><a href="namespace-Symfony.Component.Yaml.Exception.html">Exception</a>
</li>
<li><a href="namespace-Symfony.Component.Yaml.Tests.html">Tests</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Tecnocreaciones.html">Tecnocreaciones<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Bundle.html">Bundle<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.html">AjaxFOSUserBundle<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.DependencyInjection.html">DependencyInjection<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.DependencyInjection.Compiler.html">Compiler</a>
</li>
</ul></li>
<li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Event.html">Event</a>
</li>
<li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.EventListener.html">EventListener</a>
</li>
<li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Handler.html">Handler</a>
</li>
<li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Tests.Controller.html">Controller</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.html">InstallBundle<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.Command.html">Command</a>
</li>
<li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.Tests.Controller.html">Controller</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.html">TemplateBundle<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Controller.html">Controller</a>
</li>
<li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Menu.html">Menu<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Menu.Template.html">Template<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Menu.Template.Developer.html">Developer</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Tests.Controller.html">Controller</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-Tecnocreaciones.Vzla.html">Vzla<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.html">GovernmentBundle<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.DependencyInjection.html">DependencyInjection</a>
</li>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Form.html">Form<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Form.Type.html">Type</a>
</li>
</ul></li>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Menu.html">Menu<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Menu.Template.html">Template<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Menu.Template.Developer.html">Developer</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Model.html">Model</a>
</li>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Tests.html">Tests<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Tests.Controller.html">Controller</a>
</li>
</ul></li>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Twig.html">Twig<span></span></a>
<ul>
<li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Twig.Extension.html">Extension</a>
</li>
</ul></li></ul></li></ul></li></ul></li>
<li><a href="namespace-TestBundle.html">TestBundle<span></span></a>
<ul>
<li><a href="namespace-TestBundle.Fabpot.html">Fabpot<span></span></a>
<ul>
<li><a href="namespace-TestBundle.Fabpot.FooBundle.html">FooBundle<span></span></a>
<ul>
<li><a href="namespace-TestBundle.Fabpot.FooBundle.Controller.html">Controller</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-TestBundle.FooBundle.html">FooBundle<span></span></a>
<ul>
<li><a href="namespace-TestBundle.FooBundle.Controller.html">Controller<span></span></a>
<ul>
<li><a href="namespace-TestBundle.FooBundle.Controller.Sub.html">Sub</a>
</li>
<li><a href="namespace-TestBundle.FooBundle.Controller.Test.html">Test</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-TestBundle.Sensio.html">Sensio<span></span></a>
<ul>
<li><a href="namespace-TestBundle.Sensio.Cms.html">Cms<span></span></a>
<ul>
<li><a href="namespace-TestBundle.Sensio.Cms.FooBundle.html">FooBundle<span></span></a>
<ul>
<li><a href="namespace-TestBundle.Sensio.Cms.FooBundle.Controller.html">Controller</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-TestBundle.Sensio.FooBundle.html">FooBundle<span></span></a>
<ul>
<li><a href="namespace-TestBundle.Sensio.FooBundle.Controller.html">Controller</a>
</li>
</ul></li></ul></li></ul></li>
<li><a href="namespace-TestFixtures.html">TestFixtures</a>
</li>
<li><a href="namespace-Timestampable.html">Timestampable<span></span></a>
<ul>
<li><a href="namespace-Timestampable.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Timestampable.Fixture.Document.html">Document</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Tool.html">Tool</a>
</li>
<li><a href="namespace-Translatable.html">Translatable<span></span></a>
<ul>
<li><a href="namespace-Translatable.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Translatable.Fixture.Document.html">Document<span></span></a>
<ul>
<li><a href="namespace-Translatable.Fixture.Document.Personal.html">Personal</a>
</li>
</ul></li>
<li><a href="namespace-Translatable.Fixture.Issue114.html">Issue114</a>
</li>
<li><a href="namespace-Translatable.Fixture.Issue138.html">Issue138</a>
</li>
<li><a href="namespace-Translatable.Fixture.Issue165.html">Issue165</a>
</li>
<li><a href="namespace-Translatable.Fixture.Issue173.html">Issue173</a>
</li>
<li><a href="namespace-Translatable.Fixture.Issue75.html">Issue75</a>
</li>
<li><a href="namespace-Translatable.Fixture.Issue922.html">Issue922</a>
</li>
<li><a href="namespace-Translatable.Fixture.Personal.html">Personal</a>
</li>
<li><a href="namespace-Translatable.Fixture.Template.html">Template</a>
</li>
<li><a href="namespace-Translatable.Fixture.Type.html">Type</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Translator.html">Translator<span></span></a>
<ul>
<li><a href="namespace-Translator.Fixture.html">Fixture</a>
</li>
</ul></li>
<li><a href="namespace-Tree.html">Tree<span></span></a>
<ul>
<li><a href="namespace-Tree.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Tree.Fixture.Closure.html">Closure</a>
</li>
<li><a href="namespace-Tree.Fixture.Document.html">Document</a>
</li>
<li><a href="namespace-Tree.Fixture.Genealogy.html">Genealogy</a>
</li>
<li><a href="namespace-Tree.Fixture.Mock.html">Mock</a>
</li>
<li><a href="namespace-Tree.Fixture.Repository.html">Repository</a>
</li>
<li><a href="namespace-Tree.Fixture.Transport.html">Transport</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Uploadable.html">Uploadable<span></span></a>
<ul>
<li><a href="namespace-Uploadable.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Uploadable.Fixture.Entity.html">Entity</a>
</li>
</ul></li></ul></li>
<li><a href="namespace-Wrapper.html">Wrapper<span></span></a>
<ul>
<li><a href="namespace-Wrapper.Fixture.html">Fixture<span></span></a>
<ul>
<li><a href="namespace-Wrapper.Fixture.Document.html">Document</a>
</li>
<li><a href="namespace-Wrapper.Fixture.Entity.html">Entity</a>
</li>
</ul></li></ul></li>
</ul>
</div>
<hr />
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.AbsFunction.html">AbsFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.BitAndFunction.html">BitAndFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.BitOrFunction.html">BitOrFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.ConcatFunction.html">ConcatFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.CurrentDateFunction.html">CurrentDateFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.CurrentTimeFunction.html">CurrentTimeFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.CurrentTimestampFunction.html">CurrentTimestampFunction</a></li>
<li class="active"><a href="class-Doctrine.ORM.Query.AST.Functions.DateAddFunction.html">DateAddFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.DateDiffFunction.html">DateDiffFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.DateSubFunction.html">DateSubFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.FunctionNode.html">FunctionNode</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.IdentityFunction.html">IdentityFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.LengthFunction.html">LengthFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.LocateFunction.html">LocateFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.LowerFunction.html">LowerFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.ModFunction.html">ModFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.SizeFunction.html">SizeFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.SqrtFunction.html">SqrtFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.SubstringFunction.html">SubstringFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.TrimFunction.html">TrimFunction</a></li>
<li><a href="class-Doctrine.ORM.Query.AST.Functions.UpperFunction.html">UpperFunction</a></li>
</ul>
</div>
</div>
</div>
<div id="splitter"></div>
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" class="text" />
<input type="submit" value="Search" />
</form>
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="namespace-Doctrine.ORM.Query.AST.Functions.html" title="Summary of Doctrine\ORM\Query\AST\Functions"><span>Namespace</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
</ul>
<ul>
</ul>
</div>
<div id="content" class="class">
<h1>Class DateAddFunction</h1>
<div class="description">
<p>"DATE_ADD" "(" ArithmeticPrimary "," ArithmeticPrimary "," StringPrimary
")"</p>
</div>
<dl class="tree">
<dd style="padding-left:0px">
<a href="class-Doctrine.ORM.Query.AST.Node.html"><span>Doctrine\ORM\Query\AST\Node</span></a>
</dd>
<dd style="padding-left:30px">
<img src="resources/inherit.png" alt="Extended by" />
<a href="class-Doctrine.ORM.Query.AST.Functions.FunctionNode.html"><span>Doctrine\ORM\Query\AST\Functions\FunctionNode</span></a>
</dd>
<dd style="padding-left:60px">
<img src="resources/inherit.png" alt="Extended by" />
<b><span>Doctrine\ORM\Query\AST\Functions\DateAddFunction</span></b>
</dd>
</dl>
<div>
<h4>Direct known subclasses</h4>
<a href="class-Doctrine.ORM.Query.AST.Functions.DateSubFunction.html">Doctrine\ORM\Query\AST\Functions\DateSubFunction</a>
</div>
<div class="info">
<b>Namespace:</b> <a href="namespace-Doctrine.html">Doctrine</a>\<a href="namespace-Doctrine.ORM.html">ORM</a>\<a href="namespace-Doctrine.ORM.Query.html">Query</a>\<a href="namespace-Doctrine.ORM.Query.AST.html">AST</a>\<a href="namespace-Doctrine.ORM.Query.AST.Functions.html">Functions</a><br />
<b>Author:</b>
Guilherme Blanco <<a
href="mailto:guilhermeblanco@hotmail.com">guilhermeblanco@<!---->hotmail.com</a>><br />
<b>Author:</b>
Benjamin Eberlei <<a
href="mailto:kontakt@beberlei.de">kontakt@<!---->beberlei.de</a>><br />
<b>Since:</b>
2.0<br />
<b>Link:</b>
<a href="http://www.doctrine-project.org">www.doctrine-project.org</a><br />
<b>Located at</b> <a href="source-class-Doctrine.ORM.Query.AST.Functions.DateAddFunction.html#27-83" title="Go to source code">vendor/doctrine/orm/lib/Doctrine/ORM/Query/AST/Functions/DateAddFunction.php</a><br />
</div>
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="getSql" id="_getSql">
<td class="attributes"><code>
public
string
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getSql">#</a>
<code><a href="source-class-Doctrine.ORM.Query.AST.Functions.DateAddFunction.html#42-65" title="Go to source code">getSql</a>( <span><code><a href="class-Doctrine.ORM.Query.SqlWalker.html">Doctrine\ORM\Query\SqlWalker</a></code> <var>$sqlWalker</var></span> )</code>
<div class="description short">
</div>
<div class="description detailed hidden">
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$sqlWalker</var></dt>
<dd><code><code><a href="class-Doctrine.ORM.Query.SqlWalker.html">Doctrine\ORM\Query\SqlWalker</a></code></code><br>$sqlWalker</dd>
</dl></div>
<h4>Returns</h4>
<div class="list">
<code>string</code><br />
</div>
<h4>Override</h4>
<div class="list">
</div>
</div>
</div></td>
</tr>
<tr data-order="parse" id="_parse">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_parse">#</a>
<code><a href="source-class-Doctrine.ORM.Query.AST.Functions.DateAddFunction.html#67-82" title="Go to source code">parse</a>( <span><code><a href="class-Doctrine.ORM.Query.Parser.html">Doctrine\ORM\Query\Parser</a></code> <var>$parser</var></span> )</code>
<div class="description short">
</div>
<div class="description detailed hidden">
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$parser</var></dt>
<dd><code><code><a href="class-Doctrine.ORM.Query.Parser.html">Doctrine\ORM\Query\Parser</a></code></code><br>$parser</dd>
</dl></div>
<h4>Override</h4>
<div class="list">
</div>
</div>
</div></td>
</tr>
</table>
<table class="summary inherited">
<caption>Methods inherited from <a href="class-Doctrine.ORM.Query.AST.Functions.FunctionNode.html#methods">Doctrine\ORM\Query\AST\Functions\FunctionNode</a></caption>
<tr>
<td><code>
<a href="class-Doctrine.ORM.Query.AST.Functions.FunctionNode.html#___construct">__construct()</a>,
<a href="class-Doctrine.ORM.Query.AST.Functions.FunctionNode.html#_dispatch">dispatch()</a>
</code></td>
</tr>
</table>
<table class="summary inherited">
<caption>Methods inherited from <a href="class-Doctrine.ORM.Query.AST.Node.html#methods">Doctrine\ORM\Query\AST\Node</a></caption>
<tr>
<td><code>
<a href="class-Doctrine.ORM.Query.AST.Node.html#___toString">__toString()</a>,
<a href="class-Doctrine.ORM.Query.AST.Node.html#_dump">dump()</a>
</code></td>
</tr>
</table>
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="firstDateExpression" id="$firstDateExpression">
<td class="attributes"><code>
public
mixed
</code></td>
<td class="name">
<a href="source-class-Doctrine.ORM.Query.AST.Functions.DateAddFunction.html#38" title="Go to source code"><var>$firstDateExpression</var></a>
</td>
<td class="value"><code><span class="php-keyword1">null</span></code></td>
<td class="description"><div>
<a href="#$firstDateExpression" class="anchor">#</a>
<div class="description short">
</div>
<div class="description detailed hidden">
</div>
</div></td>
</tr>
<tr data-order="intervalExpression" id="$intervalExpression">
<td class="attributes"><code>
public
mixed
</code></td>
<td class="name">
<a href="source-class-Doctrine.ORM.Query.AST.Functions.DateAddFunction.html#39" title="Go to source code"><var>$intervalExpression</var></a>
</td>
<td class="value"><code><span class="php-keyword1">null</span></code></td>
<td class="description"><div>
<a href="#$intervalExpression" class="anchor">#</a>
<div class="description short">
</div>
<div class="description detailed hidden">
</div>
</div></td>
</tr>
<tr data-order="unit" id="$unit">
<td class="attributes"><code>
public
mixed
</code></td>
<td class="name">
<a href="source-class-Doctrine.ORM.Query.AST.Functions.DateAddFunction.html#40" title="Go to source code"><var>$unit</var></a>
</td>
<td class="value"><code><span class="php-keyword1">null</span></code></td>
<td class="description"><div>
<a href="#$unit" class="anchor">#</a>
<div class="description short">
</div>
<div class="description detailed hidden">
</div>
</div></td>
</tr>
</table>
<table class="summary inherited">
<caption>Properties inherited from <a href="class-Doctrine.ORM.Query.AST.Functions.FunctionNode.html#properties">Doctrine\ORM\Query\AST\Functions\FunctionNode</a></caption>
<tr>
<td><code>
<a href="class-Doctrine.ORM.Query.AST.Functions.FunctionNode.html#$name"><var>$name</var></a>
</code></td>
</tr>
</table>
</div>
<div id="footer">
seip API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>
| {
"content_hash": "4eaa1e0e57a1749acec1b1aaa54a2339",
"timestamp": "",
"source": "github",
"line_count": 3607,
"max_line_length": 300,
"avg_line_length": 45.03299140560022,
"alnum_prop": 0.6498393193543224,
"repo_name": "Tecnocreaciones/VzlaGovernmentTemplateDeveloperSeed",
"id": "249ecfd6193bf5469db7613ca53c9ee61b4d0b66",
"size": "162434",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "api/class-Doctrine.ORM.Query.AST.Functions.DateAddFunction.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "10864"
},
{
"name": "JavaScript",
"bytes": "131316"
},
{
"name": "PHP",
"bytes": "211008"
},
{
"name": "Perl",
"bytes": "2621"
}
],
"symlink_target": ""
} |
package main
import (
"bytes"
"flag"
"fmt"
"log"
"net"
"os"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudwatch"
)
var (
accessKey = os.Getenv("AWS_ACCESS_KEY_ID")
secretKey = os.Getenv("AWS_SECRET_ACCESS_KEY")
awsRegion = os.Getenv("AWS_REGION")
)
func main() {
log.SetFlags(0)
// Check env. vars.
if len(accessKey) == 0 || len(secretKey) == 0 || len(awsRegion) == 0 {
log.Fatal("Please set the environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_REGION")
}
// Check command line args.
prefixDefault := "s3." + awsRegion + "."
prefix := flag.String("p", prefixDefault, "`prefix` for graphite metrics names")
prev := flag.Bool("1", false, "collect yesterday's metrics rather than today's")
addr := flag.String("g", "127.0.0.1:2003", "`graphite server` to send metrics to")
flag.Usage = func() {
fmt.Fprintf(os.Stderr, "s3report - Collects today's S3 metrics and reports them to Graphite\n")
flag.PrintDefaults()
}
flag.Parse()
tcpAddr, err := net.ResolveTCPAddr("tcp", *addr)
if err != nil {
log.Fatal(err.Error())
}
// Create CloudWatch service
svc := cloudwatch.New(session.New())
// List all metrics in the AWS/S3 namespace
params := &cloudwatch.ListMetricsInput{
Namespace: aws.String("AWS/S3"),
}
resp, err := svc.ListMetrics(params)
if err != nil {
log.Fatal(err.Error())
}
// For each metric..
buf := &bytes.Buffer{}
for _, m := range resp.Metrics {
// Get the bucket name and storage type
var name, stype string
for _, d := range m.Dimensions {
if *d.Name == "BucketName" {
name = *d.Value
} else if *d.Name == "StorageType" {
stype = strings.ToLower(*d.Value)
}
}
// Get the bucket size in bytes
if *m.MetricName == "BucketSizeBytes" {
t, v := getBucketSize(svc, m.Dimensions, *prev)
if t.IsZero() {
log.Printf("bucket size not available for bucket %s", name)
} else {
fmt.Fprintf(buf, "%s%s.%s.size %d %d\n", *prefix, name, stype, v, t.Unix())
}
}
// And the count of objects
if *m.MetricName == "NumberOfObjects" {
t, v := getBucketObjectCount(svc, m.Dimensions, *prev)
if t.IsZero() {
log.Printf("object count not available for bucket %s", name)
} else {
fmt.Fprintf(buf, "%s%s.objcount %d %d\n", *prefix, name, v, t.Unix())
}
}
}
if buf.Len() > 0 {
fmt.Print(buf.String())
fmt.Printf("sending to graphite server at %v:\n", tcpAddr)
conn, err := net.DialTCP("tcp", nil, tcpAddr)
if err != nil {
log.Fatal(err)
}
buf.WriteTo(conn)
conn.Close()
fmt.Println("done.")
} else {
log.Println("No metrics were found for today.")
log.Println("Try running it later in the day or run with \"-1\" flag.")
}
}
func getBucketSize(svc *cloudwatch.CloudWatch, dims []*cloudwatch.Dimension, prev bool) (time.Time, int64) {
t := time.Now().In(time.UTC)
if prev {
t = t.Add(-24 * time.Hour)
}
y, m, d := t.Date()
st := time.Date(y, m, d, 0, 0, 0, 0, time.UTC)
et := time.Date(y, m, d, 0, 1, 0, 0, time.UTC)
params := &cloudwatch.GetMetricStatisticsInput{
StartTime: aws.Time(st),
EndTime: aws.Time(et),
Period: aws.Int64(60),
MetricName: aws.String("BucketSizeBytes"),
Namespace: aws.String("AWS/S3"),
Statistics: []*string{
aws.String("Average"),
},
Dimensions: dims,
Unit: aws.String("Bytes"),
}
return actualGet(svc, params)
}
func getBucketObjectCount(svc *cloudwatch.CloudWatch, dims []*cloudwatch.Dimension, prev bool) (time.Time, int64) {
t := time.Now().In(time.UTC)
if prev {
t = t.Add(-24 * time.Hour)
}
y, m, d := t.Date()
st := time.Date(y, m, d, 0, 0, 0, 0, time.UTC)
et := time.Date(y, m, d, 0, 1, 0, 0, time.UTC)
params := &cloudwatch.GetMetricStatisticsInput{
StartTime: aws.Time(st),
EndTime: aws.Time(et),
Period: aws.Int64(60),
MetricName: aws.String("NumberOfObjects"),
Namespace: aws.String("AWS/S3"),
Statistics: []*string{
aws.String("Average"),
},
Dimensions: dims,
Unit: aws.String("Count"),
}
return actualGet(svc, params)
}
func actualGet(svc *cloudwatch.CloudWatch, params *cloudwatch.GetMetricStatisticsInput) (time.Time, int64) {
resp, err := svc.GetMetricStatistics(params)
if err != nil {
log.Fatal(err.Error())
}
if len(resp.Datapoints) == 0 {
return time.Time{}, 0
}
return *resp.Datapoints[0].Timestamp, int64(*resp.Datapoints[0].Average)
}
| {
"content_hash": "305d36ddee0cec9340ab8e9fbd86e196",
"timestamp": "",
"source": "github",
"line_count": 167,
"max_line_length": 115,
"avg_line_length": 26.64071856287425,
"alnum_prop": 0.6394695437176894,
"repo_name": "rapidloop/s3report",
"id": "7ec984c08978aad8ffe0be9805e9f3c8a67a4757",
"size": "5577",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "s3report.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Go",
"bytes": "5577"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en" ng-app="vertxApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Vert.x Microservice Blueprint - Online shopping SPA">
<meta name="author" content="sczyh30">
<title>Online Market</title>
<link href="assets/lib/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/style.css" rel="stylesheet">
<script src="assets/lib/angular/angular.js"></script>
<script src="assets/lib/angular-route/angular-route.js"></script>
<script src="app/app.js"></script>
<script src="app/controller.js"></script>
</head>
<body>
<!-- navbar on the top -->
<nav class="navbar navbar-default navbar-inverse navbar-static-top" role="navigation" ng-controller="HeaderCtrl">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/#/">
<div class="brand"><span class="glyphicon glyphicon-cloud"></span> Micro Shop</div>
</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li ng-if="user.id != undefined">
<span class="welcome-tag">
<span>Welcome,</span>
<span><a href="/#/account">{{ user.username }}</a></span>
</span>
</li>
<li ng-if="user.id != undefined"><a href="/#/orders">Orders</a></li>
<li ng-if="user.id != undefined">
<a href="/#/cart"><span class="glyphicon glyphicon-shopping-cart">Cart</span></a></li>
<li ng-if="user.id == undefined"><a ng-href="/login">Login</a></li>
<li ng-if="user.id != undefined"><a ng-click="logout()" href="#">Logout</a></li>
</ul>
</div>
</div>
</nav>
<div ng-view></div>
<script src="assets/lib/jquery/dist/jquery.js"></script>
<script src="assets/lib/bootstrap/dist/js/bootstrap.min.js"></script>
</body>
</html> | {
"content_hash": "4ceac18068cb0c862b27c0f12a6b2999",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 113,
"avg_line_length": 40,
"alnum_prop": 0.6090517241379311,
"repo_name": "sczyh30/vertx-blueprint-microservice",
"id": "a06c39b17335ed91a382db1c476f174fcbb12133",
"size": "2320",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "api-gateway/src/main/resources/webroot/index.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "2329"
},
{
"name": "HTML",
"bytes": "20461"
},
{
"name": "Java",
"bytes": "326933"
},
{
"name": "JavaScript",
"bytes": "14812"
},
{
"name": "Shell",
"bytes": "1583"
}
],
"symlink_target": ""
} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "da806c321772f1fdbc3a117a6d4aab62",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "0e680798817e4c5905fece6ed1c389ae312b58af",
"size": "181",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Boraginales/Boraginaceae/Tiquilia/Tiquilia palmeri/ Syn. Coldenia palmeri/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package example.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Customer1315 {
@Id @GeneratedValue(strategy = GenerationType.AUTO) private long id;
private String firstName;
private String lastName;
protected Customer1315() {}
public Customer1315(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
@Override
public String toString() {
return String.format("Customer1315[id=%d, firstName='%s', lastName='%s']", id, firstName, lastName);
}
}
| {
"content_hash": "2f4fb851d02dfc2e6417a42c775c68ac",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 102,
"avg_line_length": 23.25925925925926,
"alnum_prop": 0.7627388535031847,
"repo_name": "spring-projects/spring-data-examples",
"id": "ed12d6ac679f8499336f2c2c9110900ce48534c7",
"size": "628",
"binary": false,
"copies": "2",
"ref": "refs/heads/main",
"path": "jpa/deferred/src/main/java/example/model/Customer1315.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "407"
},
{
"name": "HTML",
"bytes": "11754"
},
{
"name": "Java",
"bytes": "3549318"
},
{
"name": "Kotlin",
"bytes": "25902"
}
],
"symlink_target": ""
} |
from nose.tools import *
from dateutil.parser import parse as time_parse
import yawhois
class TestWhoisNicCzStatusRegistered(object):
def setUp(self):
fixture_path = "spec/fixtures/responses/whois.nic.cz/status_registered.txt"
host = "whois.nic.cz"
part = yawhois.record.Part(open(fixture_path, "r").read(), host)
self.record = yawhois.record.Record(None, [part])
def test_status(self):
eq_(self.record.status, 'registered')
def test_available(self):
eq_(self.record.available, False)
def test_domain(self):
eq_(self.record.domain, "google.cz")
def test_nameservers(self):
eq_(self.record.nameservers.__class__.__name__, 'list')
eq_(len(self.record.nameservers), 4)
eq_(self.record.nameservers[0].__class__.__name__, 'Nameserver')
eq_(self.record.nameservers[0].name, "ns2.google.com")
eq_(self.record.nameservers[1].__class__.__name__, 'Nameserver')
eq_(self.record.nameservers[1].name, "ns4.google.com")
eq_(self.record.nameservers[2].__class__.__name__, 'Nameserver')
eq_(self.record.nameservers[2].name, "ns3.google.com")
eq_(self.record.nameservers[3].__class__.__name__, 'Nameserver')
eq_(self.record.nameservers[3].name, "ns1.google.com")
def test_admin_contacts(self):
eq_(self.record.admin_contacts.__class__.__name__, 'list')
eq_(len(self.record.admin_contacts), 1)
eq_(self.record.admin_contacts[0].__class__.__name__, 'Contact')
eq_(self.record.admin_contacts[0].type, yawhois.record.Contact.TYPE_ADMINISTRATIVE)
eq_(self.record.admin_contacts[0].id, "MM12383")
eq_(self.record.admin_contacts[0].name, "DNS Admin")
eq_(self.record.admin_contacts[0].organization, "Google Inc.")
eq_(self.record.admin_contacts[0].address, "1600 Amphitheatre Parkway\nMountain View\n94043\nCA\nUS")
eq_(self.record.admin_contacts[0].city, None)
eq_(self.record.admin_contacts[0].zip, None)
eq_(self.record.admin_contacts[0].state, None)
eq_(self.record.admin_contacts[0].country, None)
eq_(self.record.admin_contacts[0].country_code, None)
eq_(self.record.admin_contacts[0].phone, None)
eq_(self.record.admin_contacts[0].fax, None)
eq_(self.record.admin_contacts[0].email, "dns-admin@google.com")
eq_(self.record.admin_contacts[0].created_on, time_parse('2011-05-18 23:28:26'))
def test_registered(self):
eq_(self.record.registered, True)
def test_created_on(self):
eq_(self.record.created_on.__class__.__name__, 'datetime')
eq_(self.record.created_on, time_parse('2000-07-21 15:21:00'))
def test_registrar(self):
eq_(self.record.registrar.__class__.__name__, 'Registrar')
eq_(self.record.registrar.id, "REG-MARKMONITOR")
eq_(self.record.registrar.name, "REG-MARKMONITOR")
eq_(self.record.registrar.organization, None)
eq_(self.record.registrar.url, None)
def test_registrant_contacts(self):
eq_(self.record.registrant_contacts.__class__.__name__, 'list')
eq_(len(self.record.registrant_contacts), 1)
eq_(self.record.registrant_contacts[0].__class__.__name__, 'Contact')
eq_(self.record.registrant_contacts[0].type, yawhois.record.Contact.TYPE_REGISTRANT)
eq_(self.record.registrant_contacts[0].id, "MM12383")
eq_(self.record.registrant_contacts[0].name, "DNS Admin")
eq_(self.record.registrant_contacts[0].organization, "Google Inc.")
eq_(self.record.registrant_contacts[0].address, "1600 Amphitheatre Parkway\nMountain View\n94043\nCA\nUS")
eq_(self.record.registrant_contacts[0].city, None)
eq_(self.record.registrant_contacts[0].zip, None)
eq_(self.record.registrant_contacts[0].state, None)
eq_(self.record.registrant_contacts[0].country, None)
eq_(self.record.registrant_contacts[0].country_code, None)
eq_(self.record.registrant_contacts[0].phone, None)
eq_(self.record.registrant_contacts[0].fax, None)
eq_(self.record.registrant_contacts[0].email, "dns-admin@google.com")
eq_(self.record.registrant_contacts[0].created_on, time_parse('2011-05-18 23:28:26'))
def test_technical_contacts(self):
eq_(self.record.technical_contacts.__class__.__name__, 'list')
eq_(len(self.record.technical_contacts), 1)
eq_(self.record.technical_contacts[0].__class__.__name__, 'Contact')
eq_(self.record.technical_contacts[0].id, "MM193020")
eq_(self.record.technical_contacts[0].name, "Domain Provisioning")
eq_(self.record.technical_contacts[0].organization, "MarkMonitor, Inc.")
eq_(self.record.technical_contacts[0].address, "10400 Overland Road PMB 155\nBoise\n83709-1433\nID\nUS")
eq_(self.record.technical_contacts[0].city, None)
eq_(self.record.technical_contacts[0].zip, None)
eq_(self.record.technical_contacts[0].state, None)
eq_(self.record.technical_contacts[0].country, None)
eq_(self.record.technical_contacts[0].country_code, None)
eq_(self.record.technical_contacts[0].phone, None)
eq_(self.record.technical_contacts[0].fax, None)
eq_(self.record.technical_contacts[0].email, "ccops@markmonitor.com")
eq_(self.record.technical_contacts[0].created_on, time_parse('2011-02-03 18:24:34'))
def test_updated_on(self):
eq_(self.record.updated_on.__class__.__name__, 'datetime')
eq_(self.record.updated_on, time_parse('2011-05-18 23:28:45'))
def test_domain_id(self):
assert_raises(yawhois.exceptions.AttributeNotSupported, self.record.domain_id)
def test_expires_on(self):
eq_(self.record.expires_on.__class__.__name__, 'datetime')
eq_(self.record.expires_on, time_parse('2014-07-22'))
| {
"content_hash": "3838bbb2ddf49753de61e8b63b6dc046",
"timestamp": "",
"source": "github",
"line_count": 113,
"max_line_length": 114,
"avg_line_length": 52.283185840707965,
"alnum_prop": 0.6492890995260664,
"repo_name": "huyphan/pyyawhois",
"id": "4747406c6d77e520d858a71ba675d87a40565b43",
"size": "6169",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/record/parser/test_response_whois_nic_cz_status_registered.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "1859653"
}
],
"symlink_target": ""
} |
export const defaultProps = {
dotSize: 4,
noteWidth: 120,
noteTextOffset: 8,
animate: true,
motionStiffness: 90,
motionDamping: 13,
}
| {
"content_hash": "786b5768a0656e7e8d2b8532472f7e3d",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 29,
"avg_line_length": 19.75,
"alnum_prop": 0.6392405063291139,
"repo_name": "plouc/nivo",
"id": "5d6c4e5e3fca6f782653f4138b7bd1f4e5aa36e1",
"size": "158",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "packages/annotations/src/props.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "34774"
},
{
"name": "HTML",
"bytes": "586"
},
{
"name": "JavaScript",
"bytes": "461033"
},
{
"name": "Makefile",
"bytes": "10824"
},
{
"name": "Procfile",
"bytes": "20"
},
{
"name": "TypeScript",
"bytes": "2581793"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
metadata-complete="false">
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
| {
"content_hash": "f8c02707f53fea1d5a9c6e61332d3852",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 113,
"avg_line_length": 31.428571428571427,
"alnum_prop": 0.6272727272727273,
"repo_name": "Hellaenergy/openshift-liberty-cartridge",
"id": "5dddb24a0ae8c4c685f3c5ab063164c14fdc1e00",
"size": "440",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "template/src/main/webapp/WEB-INF/web.xml",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "Shell",
"bytes": "5518"
}
],
"symlink_target": ""
} |
"""Tests for the Quotes app."""
import pytest
from django.core import exceptions
from . import models
@pytest.mark.django_db
def test_quote_similarity_pk_order():
"""Pairs of quotes must be ordered by PK."""
# Small/big in terms of their IDs.
small_quote = models.Quote.objects.create(content='foo', pk=500)
big_quote = models.Quote.objects.create(content='bar', pk=505)
# Wrong order raises an exception.
with pytest.raises(exceptions.ValidationError):
models.QuoteSimilarity.objects.create(
quote_1=big_quote, quote_2=small_quote, score=0.3)
# Good order works fine.
models.QuoteSimilarity.objects.create(
quote_1=small_quote, quote_2=small_quote, score=0.3)
@pytest.mark.django_db
class TestQuoteSimilarityStore(object):
"""QuoteSimilarity.store sorts out which quote gets which number."""
@pytest.fixture(autouse=True)
def make_quotes(self):
"""Create small/big quote."""
# pylint: disable=attribute-defined-outside-init
self.small_quote = models.Quote.objects.create(content='foo', pk=500)
self.big_quote = models.Quote.objects.create(content='bar', pk=505)
def test_from_scratch(self):
"""Will create a new QuoteSimilarity instance properly."""
inst, created = models.QuoteSimilarity.store(
self.big_quote, self.small_quote, 0.3)
assert created
assert inst.quote_1 == self.small_quote
assert inst.quote_2 == self.big_quote
assert inst.score == 0.3
def test_updates_existing(self):
"""If an existing score is found, updates that instance."""
sim_score = models.QuoteSimilarity.objects.create(
quote_1=self.small_quote, quote_2=self.big_quote, score=0.4)
inst, created = models.QuoteSimilarity.store(
self.big_quote, self.small_quote, 0.9)
assert not created
assert inst.pk == sim_score.pk
assert inst.quote_1 == self.small_quote
assert inst.quote_2 == self.big_quote
assert inst.score == 0.9
| {
"content_hash": "be31a03b8f9246c63b4d40763da72592",
"timestamp": "",
"source": "github",
"line_count": 59,
"max_line_length": 77,
"avg_line_length": 35.101694915254235,
"alnum_prop": 0.6615161757605021,
"repo_name": "dan-passaro/django-recommend",
"id": "f0075d6154893830f3dcf566416075aaf93df6df",
"size": "2071",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "simplerec/quotes/tests.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "2146"
},
{
"name": "Python",
"bytes": "85661"
}
],
"symlink_target": ""
} |
import { platformBrowser } from '@angular/platform-browser';
import { enableProdMode } from '@angular/core';
import { AppModuleNgFactory } from '../../../temp/app/grid/foreignkeycolumn/app.module.ngfactory';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory); | {
"content_hash": "7948ad50e4d39b8b0d0516549436ea78",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 98,
"avg_line_length": 49.166666666666664,
"alnum_prop": 0.7593220338983051,
"repo_name": "juannelisalde/holter",
"id": "d6b125df835db4494dd4f18a0c20a148b50e3289",
"size": "295",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "assets/jqwidgets/demos/angular/app/grid/foreignkeycolumn/main.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "1327"
},
{
"name": "Batchfile",
"bytes": "802"
},
{
"name": "C#",
"bytes": "374733"
},
{
"name": "CSS",
"bytes": "882785"
},
{
"name": "HTML",
"bytes": "18898187"
},
{
"name": "Java",
"bytes": "12788"
},
{
"name": "JavaScript",
"bytes": "9712220"
},
{
"name": "PHP",
"bytes": "2051144"
},
{
"name": "TypeScript",
"bytes": "3437214"
}
],
"symlink_target": ""
} |
"use strict";
var myobject = {
myparam: 111
};
var myparam;
({ myparam } = myobject);
| {
"content_hash": "f4132fe26b19983c90200cbcecc899b4",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 25,
"avg_line_length": 12.571428571428571,
"alnum_prop": 0.625,
"repo_name": "wildpeaks/packages-eslint-config",
"id": "463e556bbfc096d471d76a390c5090fc90591336",
"size": "88",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "test/eslint/destructuring_assign_object_param_destructured.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "160713"
},
{
"name": "TypeScript",
"bytes": "13659"
}
],
"symlink_target": ""
} |
include_recipe 'git'
module_path = "#{Chef::Config['file_cache_path']}/#{node['openresty']['fair']['name']}"
git module_path do
repository node['openresty']['fair']['url']
reference 'master'
action :checkout
not_if { ::File.exists?(module_path) }
end
node.run_state['openresty_configure_flags'] |= ["--add-module=#{module_path}"]
| {
"content_hash": "7daae8d72d5ff4374248c8294856e30a",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 87,
"avg_line_length": 28.416666666666668,
"alnum_prop": 0.6627565982404692,
"repo_name": "jirkami/chef-snapshot",
"id": "b9f6a6ecf0190f26b2af947e58d8dbd5433ce2f1",
"size": "1043",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "cookbooks/openresty/recipes/fair_module.rb",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C++",
"bytes": "571"
},
{
"name": "HTML",
"bytes": "196049"
},
{
"name": "Lua",
"bytes": "203"
},
{
"name": "Makefile",
"bytes": "455"
},
{
"name": "Nginx",
"bytes": "2858"
},
{
"name": "Perl",
"bytes": "82975"
},
{
"name": "Python",
"bytes": "1654898"
},
{
"name": "Ruby",
"bytes": "950520"
},
{
"name": "Shell",
"bytes": "52509"
}
],
"symlink_target": ""
} |
/* _filterSearch.css */
.cn-filter-search .cn-bar {
float: left;
margin: 0 0 4px;
zoom: 1;
}
.cn-filter-search .cn-content {
clear: both;
}
.cn-filter-search .cn-border {
padding: 5px 30px 5px 10px;
position: relative;
}
.cn-filter-search .cn-filter-search-submit {
background-image: url("../../images/icons/icons-map.png?t=${build.timestamp}");
background-position: -134px -7px;
background-size: 576px 416px;
display: block;
height: 20px;
position: absolute;
right: 5px;
top: 6px;
width: 20px;
}
.cn-filter-search .cn-filter-search-submit:hover {
background-position: -134px -71px;
}
.cn-filter-search .cn-filter-search-submit-off,
.cn-filter-search.cn-filter-search-submit-disabled .cn-filter-search-submit {
display: none;
}
* + html .cn-filter-search .cn-filter-search-submit, * + html .cn-filter-search.cn-filter-search-submit-disabled .cn-filter-search-submit-off {
top: 2px;
} | {
"content_hash": "a3d7a3267d4d38d9ca1d2595ac95dd91",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 143,
"avg_line_length": 25.72972972972973,
"alnum_prop": 0.6712184873949579,
"repo_name": "Communote/communote-server",
"id": "e74a3a05cfdc619c7ced2360471622a4d68a9eb3",
"size": "952",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "communote/webapp/src/main/webapp/themes/core/styles/widgets/SearchBox.Widget.css",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "272"
},
{
"name": "CSS",
"bytes": "294265"
},
{
"name": "HTML",
"bytes": "26978"
},
{
"name": "Java",
"bytes": "13692073"
},
{
"name": "JavaScript",
"bytes": "2460010"
},
{
"name": "PLSQL",
"bytes": "4134"
},
{
"name": "PLpgSQL",
"bytes": "262702"
},
{
"name": "Rich Text Format",
"bytes": "30964"
},
{
"name": "Shell",
"bytes": "274"
}
],
"symlink_target": ""
} |
package com.khartec.waltz.model;
/**
* Created by dwatkins on 06/06/2017.
*/
public class EntityReferenceUtilities {
public static String pretty(EntityReference ref) {
return String.format(
"%s [%s/%d]",
ref.name().orElse("?"),
ref.kind().name(),
ref.id());
}
public static String safeName(EntityReference ref) {
String idStr = "[" + ref.id() + "]";
return ref
.name()
.map(n -> n + " " + idStr)
.orElse(idStr);
}
}
| {
"content_hash": "55fc3928d1f7b0f5a77257d1dab83205",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 56,
"avg_line_length": 21.37037037037037,
"alnum_prop": 0.47660311958405543,
"repo_name": "rovats/waltz",
"id": "fb6fdd4cce1f0d1fefbe2fd7f78daa3a87901f8b",
"size": "1214",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "waltz-model/src/main/java/com/khartec/waltz/model/EntityReferenceUtilities.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "152506"
},
{
"name": "HTML",
"bytes": "1380564"
},
{
"name": "Java",
"bytes": "3436612"
},
{
"name": "JavaScript",
"bytes": "2233210"
},
{
"name": "Shell",
"bytes": "305"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="action_help">Hilfe</string>
<string name="action_licenses">Open-Source Lizenzen</string>
<string name="action_restore">Sicherung von anderem Gerät aus wiederherstellen</string>
<string name="card_backup_email_button">E-Mail senden</string>
<string name="card_backup_cloud_button">In Cloud speichern</string>
<string name="card_backup_print_button">Drucken</string>
<string name="card_backup_print_description">Vor kurzem wurde die Sicherung \"%1$s\" angelegt. Möchtest du sie nochmal drucken oder senden?</string>
<string name="card_contact_headline_backup">Gib %1$s eine Kopie deiner Sicherung</string>
<string name="card_contact_more">Mehr</string>
<string name="card_contact_positive_button">Ja</string>
<string name="card_contact_show_qr_code">Anzeigen</string>
<string name="card_contact_subtitle_email">Du hast %1$s eine E-Mail mit einem Teilschlüssel gesendet. Hat die Person diesen erhalten?</string>
<string name="card_contact_subtitle_print">Du hast einen QR-Code mit einem Teilschlüssel für %1$s ausgedruckt. Hat die Person den Ausdruck erhalten?</string>
<string name="card_contact_subtitle_qr">Übergebe %1$s einen Teilschlüssel per QR-Code.</string>
<string name="card_help_backup_description">Beginne Geheimnisse, wie zum Beispiel Passwörter oder Schlüssel von einer verschlüsselten Festplatte, zu sichern. Wische nach links, um eine Übersicht deiner Sicherungen zu sehen und eine neue hinzuzufügen.</string>
<string name="card_help_backup_headline">Erstelle deine erste Sicherung</string>
<string name="card_setup_key_headline">Verteile deinen Kistenschlüssel</string>
<string name="card_setup_key_description">Verteile Teile deines Kistenschlüssels, die später zum Wiederherstellen deiner Sicherungen ohne dein Smartphone benötigt werden. Diebe und andere können nicht die Sicherungen mit deinem Smartphone herstellen. </string>
<string name="card_setup_key_setup">Start</string>
<string name="card_share_key_description">Du hast deinen Kistenschlüssel bereits in mehrere Teile zerlegt. Verteile nun die Schlüsselteile.</string>
<string name="card_share_key_progress_description">Verteilte Schlüsselteile: %1$d / %2$d</string>
<string name="card_share_key_headline">Verteile deine Schlüsselteile</string>
<string name="card_share_key_start">Verteile Schlüsselteile</string>
<string name="card_warning_description">Es sind ausreichend Schlüsselteile auf diesem Gerät vorhanden, um deinen Kistenschlüssel wiederherzustellen. Wenn du dein Smartphone verlierst, können Diebe deine Kisten öffnen. Verteile deine Schlüsselteile!</string>
<string name="card_warning_headline">Achtung</string>
<string name="contact_chooser_collect_parts_title">Sammle Schlüsselteile</string>
<string name="contact_chooser_share_parts_add_item_description">Kontakt hinzufügen</string>
<string name="contact_chooser_share_parts_add_item_hint">Name</string>
<string name="contact_chooser_share_parts_description_full">Du hast jedem Schlüsselteil eine Person zugewiesen. Es können weiterhin andere Kontakte ausgewählt werden, wenn die aktuelle Person den Schlüsselteil noch nicht erhalten hat.</string>
<string name="contact_chooser_share_parts_title">Wähle Kontakte</string>
<string name="contact_list_header_contacts">Kontakte</string>
<string name="contact_list_header_none">Nichts</string>
<string name="contact_list_header_receive_email">E-Mail</string>
<string name="contact_list_header_receive_print">Papier</string>
<string name="contact_list_header_receive_qr">Smartphone</string>
<string name="create_backup_message">Achtung: Bevor du eine Sicherung anlegen kannst, muss zunächst der Kistenschlüssel zerteilt werden.</string>
<string name="create_backup_qr_code_error">Leider ist die wiederhergestellte Sicherung zu groß.</string>
<string name="dialog_cancel">Abrechen</string>
<string name="dialog_change_send_method_change_email">Ändern: E-Mail versenden</string>
<string name="dialog_change_send_method_change_print">Ändern: QR-Code drucken</string>
<string name="dialog_change_send_method_change_qr">Ändern: QR-Code</string>
<string name="dialog_change_send_method_deselect">Kontakt abwählen</string>
<string name="dialog_change_send_method_show_email">E-Mail senden</string>
<string name="dialog_change_send_method_show_print">QR-Code drucken</string>
<string name="dialog_change_send_method_show_qr">QR-Code zeigen</string>
<string name="dialog_change_send_method_title">Ausgewählte Methode zum Übergeben: %1$s</string>
<string name="dialog_create_backup_title">Neue Sicherung </string>
<string name="dialog_restore_backup_title">Stelle %1$s wieder her</string>
<string name="dialog_restore_wrong_secret">Dieser QR-Code stellt keine Box dar oder es kann nicht mit dem Kistenschlüssel geöffnet werden.</string>
<string name="dialog_send_method_title">Wie soll der Schlüsselteil übergeben werden?</string>
<string name="dialog_share_key_title">Zerlege den Kistenschlüssel</string>
<string name="dialog_step_enter_name">Kennzeichnung der Schlüsselteile</string>
<string name="email">E-Mail</string>
<string name="email_address">E-Mail Adresse</string>
<string name="main_tab_backups">Geheimnis sichern</string>
<string name="main_tab_key_parts">Schlüsselteile annehmen</string>
<string name="overview_backups_empty">Du hast noch keine Geheimnisse gesichert. Bitte wähle den Button unten rechts dafür aus. \nEs gibt eine Menge Geheimnisse:\n • Schlüssel deines E-Mail oder Bitcoin Kontos\n • Schlüssel einer verschlüsselten Festplatte\n • ...</string>
<string name="overview_secret_parts_empty">Hier werden die Teile des Kistenschlüssels deiner Freunde gesammelt. Wähle den Button unten rechts aus um einen zu scannen. \n\n Deine eigenen Schlüsselteile sollten hier nicht einscannt werden! </string>
<string name="print_qr_code">Drucken</string>
<string name="qr_code">QR-Code</string>
<string name="qr_fragment_description">%1$s muss diesen QR-Code persönlich einscannen!</string>
<string name="qr_fragment_description_restored">Dieser QR-Code enthält deine angelegte Sicherung.</string>
<string name="qr_fragment_description_restored_error">Leider kann der QR-Code nicht angezeigt werden.</string>
<string name="qr_fragment_description_restored_text">Das ist deine wiederhergestellte Sicherung.</string>
<string name="qr_fragment_title">QR-Code</string>
<string name="qr_fragment_title_key_part">QR-Code eines Schlüsselteils</string>
<string name="qr_fragment_title_restored_text">Wiederhergestellte Sicherung</string>
<string name="qr_fragment_transfer_later">Später scannen</string>
<string name="qr_fragment_transferred">Erfolgreich eingescannt</string>
<string name="qr_reader_title">Scanne einen QR-Code</string>
<string name="secret_part_transfer_error">Hier können nur die Schlüsselteile von anderen abgelegt werden. </string>
<string name="secret_part_transferred_success">Schlüsselteil von %1$s erfolgreich übertragen</string>
<string name="stepper_backup_name_description">Gib einen Namen ein, um die Sicherung später wieder zu finden.</string>
<string name="stepper_backup_name_hint">Name</string>
<string name="stepper_collect_shares_button">Kontakte anzeigen</string>
<string name="stepper_collect_shares_description">Du musst die Teile deines Kistenschlüssels sammeln, um deine Sicherung aufzudecken.</string>
<string name="stepper_import_secret_hint">Geheimnis</string>
<string name="stepper_import_secret_keyboard">Oder gib es hier ein:</string>
<string name="stepper_import_secret_store_method_email">Scanne den QR-Code, den du per E-Mail versendet hast.</string>
<string name="stepper_import_secret_store_method_print">Scanne den QR-Code deiner ausgedruckten Sicherung.</string>
<string name="stepper_last_step_backup_second_button">Drucken</string>
<string name="stepper_last_step_backup_title">Verschlüsselte Sicherung ausgeben</string>
<string name="stepper_last_step_button">Später</string>
<string name="stepper_last_step_button_cloud">In Cloud speichern</string>
<string name="stepper_last_step_collect_shares_button">QR-Code anzeigen</string>
<string name="stepper_last_step_collect_shares_second_button">Als Text anzeigen</string>
<string name="stepper_last_step_collect_shares_title">Geheimnis exportieren</string>
<string name="stepper_last_step_key_second_button">Wähle Empfänger aus</string>
<string name="stepper_last_step_key_title">Verteile Schlüsselteile</string>
<string name="stepper_minimum_parts_description">Wie viele Teile sollen zur Wiederherstellung des Kistenschlüssels nötig sein? (Empfehlung: mehr als die Hälfte der Schlüsselteile)</string>
<string name="stepper_minimum_parts_error">Es müssen mindestens %1$d Schlüsselteile benötigt werden.</string>
<string name="stepper_subtitle_optional">Optional</string>
<string name="stepper_total_parts_description">Wie vielen Personen möchtest du Schlüsselteile anvertrauen? (Empfehlung ist vorausgewählt)</string>
<string name="stepper_total_parts_error">Es können nicht weniger Schlüsselteile erstellt werden, als zur Wiederherstellung benötigt werden sollen.</string>
<string name="stepper_user_name_description">Damit deine Freunde den Schlüsselteil besser wiedererkennen können, kannst du ihn kennzeichnen.</string>
<string name="stepper_user_name_hint">Hinweis</string>
<string name="onboarding_next">Weiter</string>
<string name="onboarding_get_started">Los geht\'s</string>
<string name="onboarding_subhead_key_created">Dein Geheimnis wird sicher in einer Kiste abgelegt. Diese Kiste kann bedenkenlos verteilt werden, denn nur der Kistenschlüssel kann sie öffnen.</string>
<string name="onboarding_headline_key_created">Verschließe Geheimnisse</string>
<string name="onboarding_subhead_share">Du besitzt einen Kistenschlüssel, der zu allen Kisten passt. Er wird wie ein Puzzle zerlegt, deine Freunde bekommen jeweils ein Schlüsselteil.</string>
<string name="onboarding_headline_share">Teilen</string>
<string name="onboarding_headline_restore">Wiederherstellen</string>
<string name="onboarding_headline_backup">Geheimnisse sicher schützen</string>
<string name="onboarding_subhead_restore">Wenn du die Geheimnisse wiederherstellen möchtest, wird der Kistenschlüssel benötigt. Viele aber nicht alle Schlüsselteile reichen zum Öffnen einer Kiste aus.</string>
<string name="onboarding_subhead_backup">Verliere niemals mehr den Zugang zu deinen Konten und Diensten.</string>
<string name="vertical_form_stepper_form_continue">Weiter</string>
<plurals name="contact_chooser_share_parts_description">
<item quantity="one">Wer soll einen Teil deines Kistenschlüssels erhalten? Gebe niemals mehrere Teile der gleichen Person! Es ist %1$d Teil übrig.</item>
<item quantity="other">Wer soll einen Teil deines Kistenschlüssels erhalten? Gebe niemals mehrere Teile der gleichen Person! Es sind %1$d Teile übrig.</item>
</plurals>
<plurals name="contact_chooser_receive_parts_description">
<item quantity="one">Du musst noch %1$d Schlüsselteil sammeln. Scanne den QR-Code von dem Gerät einer Person, einer versendeten E-Mail oder eines Ausdrucks.</item>
<item quantity="other">Du musst noch %1$d Schlüsselteile sammeln. Scanne den QR-Code von dem Gerät einer Person, einer versendeten E-Mail oder eines Ausdrucks.</item>
</plurals>
<string name="dialog_back">Zurück</string>
<string name="secret_part_transfer_error_title">Der QR-Code ist kein fremder Schlüsselteil.</string>
<string name="snackbar_message_cloud">Das Geheimnis wurde erfolgreich verschlüsselt in der Cloud gespeichert.</string>
<string name="snackbar_message_qrscan">Ein QR-Code wurde erfolgreich als Geheimnis eingescannt.</string>
<string name="dialog_change_send_method_later">Wähle später aus.</string>
<string name="dialog_change_send_method_send">Übergebe</string>
<string name="dialog_intent_create_backup_description">Eine neue Sicherheitskopie deines Geheimnisses wird erstellt. Die Sicherheitskopie ist verschlüsselt und wird in der Cloud gespeichert. Gebe einen Namen für das Geheimnis ein:</string>
<string name="dialog_intent_create_backup_hint">Eine neue Sicherheitskopie deines Geheimnisses wird erstellt. Die Sicherheitskopie ist verschlüsselt und wird in der Cloud gespeichert. Gebe einen Namen für das Geheimnis ein:</string>
<string name="dialog_intent_create_backup_title">Erzeuge eine Sicherheitskopie</string>
<string name="dialog_ok">OK</string>
<string name="main_tab_todo">TODO</string>
<string name="stepper_import_secret_show">Dein importiertes Geheimnis</string>
<string name="card_contact_subtitle">Überge ein Schlüsselteil an %1$s.</string>
</resources> | {
"content_hash": "267a8ecd93d7050b8e4eb046a27f7df4",
"timestamp": "",
"source": "github",
"line_count": 162,
"max_line_length": 287,
"avg_line_length": 80.69753086419753,
"alnum_prop": 0.7630995180907213,
"repo_name": "tobiasschuelke/FreeUsableCryptographicKeyBackup",
"id": "ed8e39a061272b970d5131305e4f69753272c800",
"size": "13199",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/main/res/values-de/strings.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "6276"
},
{
"name": "Java",
"bytes": "255154"
}
],
"symlink_target": ""
} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "dd76268389d68819b3093ec5bc2c8331",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "010f4f8f93ea46b8edb61a828b935545f2c481b3",
"size": "190",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Liliopsida/Poales/Cyperaceae/Carex/Carex ornithopoda/ Syn. Carex ornithopoda hausmannii/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package picocli.examples.execute;
import picocli.CommandLine;
import picocli.CommandLine.ExitCode;
import picocli.CommandLine.IExecutionStrategy;
import picocli.CommandLine.Model.CommandSpec;
import picocli.CommandLine.Model.OptionSpec;
import picocli.CommandLine.Model.PositionalParamSpec;
import picocli.CommandLine.ParseResult;
import java.io.File;
import java.util.Collections;
import java.util.List;
public class ExecutionStrategyWithExecutionResult {
public static void main(final String[] args) {
CommandSpec spec = CommandSpec.create();
spec.mixinStandardHelpOptions(true);
spec.addOption(OptionSpec.builder("-c", "--count")
.paramLabel("COUNT")
.type(int.class)
.description("number of times to execute").build());
spec.addPositional(PositionalParamSpec.builder()
.paramLabel("FILES")
.type(List.class)
.auxiliaryTypes(File.class)
.description("The files to process").build());
CommandLine commandLine = new CommandLine(spec);
class Handler implements IExecutionStrategy {
@Override
public int execute(ParseResult pr) {
int count = pr.matchedOptionValue('c', 1);
List<File> files = pr.matchedPositionalValue(0, Collections.<File>emptyList());
for (File f : files) {
for (int i = 0; i < count; i++) {
System.out.println(i + " " + f.getName());
}
}
pr.commandSpec().commandLine().setExecutionResult(files.size());
return ExitCode.OK;
}
}
commandLine.setExecutionStrategy(new Handler());
commandLine.execute(args);
int processed = commandLine.getExecutionResult();
}
}
| {
"content_hash": "3666b4ddb949228a5d2f3a59b23eea70",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 95,
"avg_line_length": 36.8235294117647,
"alnum_prop": 0.6150159744408946,
"repo_name": "remkop/picocli",
"id": "52075591bb7d6c3064700299122400c8d59ad4b4",
"size": "2466",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "picocli-examples/src/main/java/picocli/examples/execute/ExecutionStrategyWithExecutionResult.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Groovy",
"bytes": "76794"
},
{
"name": "HTML",
"bytes": "2925"
},
{
"name": "Java",
"bytes": "4411912"
},
{
"name": "Kotlin",
"bytes": "25214"
},
{
"name": "Scala",
"bytes": "6012"
},
{
"name": "Shell",
"bytes": "89133"
}
],
"symlink_target": ""
} |
package com.hazelcast.flakeidgen.impl;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.flakeidgen.FlakeIdGenerator;
import com.hazelcast.monitor.LocalFlakeIdGeneratorStats;
import com.hazelcast.test.HazelcastParallelClassRunner;
import com.hazelcast.test.HazelcastTestSupport;
import com.hazelcast.test.TestHazelcastInstanceFactory;
import com.hazelcast.test.annotation.ParallelTest;
import com.hazelcast.test.annotation.QuickTest;
import com.hazelcast.test.annotation.SerializationSamplesExcluded;
import com.hazelcast.util.function.Supplier;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import java.util.Map;
import static com.hazelcast.instance.BuildInfoProvider.HAZELCAST_INTERNAL_OVERRIDE_VERSION;
import static com.hazelcast.internal.cluster.Versions.V3_9;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@RunWith(HazelcastParallelClassRunner.class)
@Category({QuickTest.class, ParallelTest.class, SerializationSamplesExcluded.class})
public class FlakeIdGenerator_MemberIntegrationTest extends HazelcastTestSupport {
@Rule
public ExpectedException exception = ExpectedException.none();
private TestHazelcastInstanceFactory factory;
@Before
public void before() {
factory = createHazelcastInstanceFactory();
}
@After
public void after() {
factory.shutdownAll();
}
@Test
public void smokeTest() throws Exception {
HazelcastInstance instance = factory.newHazelcastInstance();
final FlakeIdGenerator generator = instance.getFlakeIdGenerator("gen");
FlakeIdConcurrencyTestUtil.concurrentlyGenerateIds(new Supplier<Long>() {
@Override
public Long get() {
return generator.newId();
}
});
}
@Test
public void when_310MemberJoinsWith39Mode_flakeIdGeneratorDoesNotWork() {
System.setProperty(HAZELCAST_INTERNAL_OVERRIDE_VERSION, V3_9.toString());
HazelcastInstance instance = factory.newHazelcastInstance();
FlakeIdGenerator gen = instance.getFlakeIdGenerator("gen");
exception.expect(UnsupportedOperationException.class);
gen.newId();
}
@Test
public void statistics() {
HazelcastInstance instance = factory.newHazelcastInstance();
FlakeIdGenerator gen = instance.getFlakeIdGenerator("gen");
gen.newId();
FlakeIdGeneratorService service = getNodeEngineImpl(instance).getService(FlakeIdGeneratorService.SERVICE_NAME);
Map<String, LocalFlakeIdGeneratorStats> stats = service.getStats();
assertTrue(!stats.isEmpty());
assertTrue(stats.containsKey("gen"));
LocalFlakeIdGeneratorStats genStats = stats.get("gen");
assertEquals(1L, genStats.getBatchCount());
assertTrue(genStats.getIdCount() > 0);
}
}
| {
"content_hash": "9f63ce08433ca3d72b53c53cb9adb9b2",
"timestamp": "",
"source": "github",
"line_count": 86,
"max_line_length": 119,
"avg_line_length": 35.2906976744186,
"alnum_prop": 0.7472817133443163,
"repo_name": "Donnerbart/hazelcast",
"id": "c97bfc0b8885c13e84da56c13d9378f145b31556",
"size": "3660",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "hazelcast/src/test/java/com/hazelcast/flakeidgen/impl/FlakeIdGenerator_MemberIntegrationTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "1438"
},
{
"name": "C",
"bytes": "344"
},
{
"name": "Java",
"bytes": "39184651"
},
{
"name": "Shell",
"bytes": "15150"
}
],
"symlink_target": ""
} |
"""
This is only meant to add docs to objects defined in C-extension modules.
The purpose is to allow easier editing of the docstrings without
requiring a re-compile.
NOTE: Many of the methods of ndarray have corresponding functions.
If you update these docstrings, please keep also the ones in
core/fromnumeric.py, core/defmatrix.py up-to-date.
"""
from __future__ import division, absolute_import, print_function
from numpy.lib import add_newdoc
###############################################################################
#
# flatiter
#
# flatiter needs a toplevel description
#
###############################################################################
add_newdoc('numpy.core', 'flatiter',
"""
Flat iterator object to iterate over arrays.
A `flatiter` iterator is returned by ``x.flat`` for any array `x`.
It allows iterating over the array as if it were a 1-D array,
either in a for-loop or by calling its `next` method.
Iteration is done in row-major, C-style order (the last
index varying the fastest). The iterator can also be indexed using
basic slicing or advanced indexing.
See Also
--------
ndarray.flat : Return a flat iterator over an array.
ndarray.flatten : Returns a flattened copy of an array.
Notes
-----
A `flatiter` iterator can not be constructed directly from Python code
by calling the `flatiter` constructor.
Examples
--------
>>> x = np.arange(6).reshape(2, 3)
>>> fl = x.flat
>>> type(fl)
<type 'numpy.flatiter'>
>>> for item in fl:
... print(item)
...
0
1
2
3
4
5
>>> fl[2:4]
array([2, 3])
""")
# flatiter attributes
add_newdoc('numpy.core', 'flatiter', ('base',
"""
A reference to the array that is iterated over.
Examples
--------
>>> x = np.arange(5)
>>> fl = x.flat
>>> fl.base is x
True
"""))
add_newdoc('numpy.core', 'flatiter', ('coords',
"""
An N-dimensional tuple of current coordinates.
Examples
--------
>>> x = np.arange(6).reshape(2, 3)
>>> fl = x.flat
>>> fl.coords
(0, 0)
>>> fl.next()
0
>>> fl.coords
(0, 1)
"""))
add_newdoc('numpy.core', 'flatiter', ('index',
"""
Current flat index into the array.
Examples
--------
>>> x = np.arange(6).reshape(2, 3)
>>> fl = x.flat
>>> fl.index
0
>>> fl.next()
0
>>> fl.index
1
"""))
# flatiter functions
add_newdoc('numpy.core', 'flatiter', ('__array__',
"""__array__(type=None) Get array from iterator
"""))
add_newdoc('numpy.core', 'flatiter', ('copy',
"""
copy()
Get a copy of the iterator as a 1-D array.
Examples
--------
>>> x = np.arange(6).reshape(2, 3)
>>> x
array([[0, 1, 2],
[3, 4, 5]])
>>> fl = x.flat
>>> fl.copy()
array([0, 1, 2, 3, 4, 5])
"""))
###############################################################################
#
# nditer
#
###############################################################################
add_newdoc('numpy.core', 'nditer',
"""
Efficient multi-dimensional iterator object to iterate over arrays.
To get started using this object, see the
:ref:`introductory guide to array iteration <arrays.nditer>`.
Parameters
----------
op : ndarray or sequence of array_like
The array(s) to iterate over.
flags : sequence of str, optional
Flags to control the behavior of the iterator.
* "buffered" enables buffering when required.
* "c_index" causes a C-order index to be tracked.
* "f_index" causes a Fortran-order index to be tracked.
* "multi_index" causes a multi-index, or a tuple of indices
with one per iteration dimension, to be tracked.
* "common_dtype" causes all the operands to be converted to
a common data type, with copying or buffering as necessary.
* "delay_bufalloc" delays allocation of the buffers until
a reset() call is made. Allows "allocate" operands to
be initialized before their values are copied into the buffers.
* "external_loop" causes the `values` given to be
one-dimensional arrays with multiple values instead of
zero-dimensional arrays.
* "grow_inner" allows the `value` array sizes to be made
larger than the buffer size when both "buffered" and
"external_loop" is used.
* "ranged" allows the iterator to be restricted to a sub-range
of the iterindex values.
* "refs_ok" enables iteration of reference types, such as
object arrays.
* "reduce_ok" enables iteration of "readwrite" operands
which are broadcasted, also known as reduction operands.
* "zerosize_ok" allows `itersize` to be zero.
op_flags : list of list of str, optional
This is a list of flags for each operand. At minimum, one of
"readonly", "readwrite", or "writeonly" must be specified.
* "readonly" indicates the operand will only be read from.
* "readwrite" indicates the operand will be read from and written to.
* "writeonly" indicates the operand will only be written to.
* "no_broadcast" prevents the operand from being broadcasted.
* "contig" forces the operand data to be contiguous.
* "aligned" forces the operand data to be aligned.
* "nbo" forces the operand data to be in native byte order.
* "copy" allows a temporary read-only copy if required.
* "updateifcopy" allows a temporary read-write copy if required.
* "allocate" causes the array to be allocated if it is None
in the `op` parameter.
* "no_subtype" prevents an "allocate" operand from using a subtype.
* "arraymask" indicates that this operand is the mask to use
for selecting elements when writing to operands with the
'writemasked' flag set. The iterator does not enforce this,
but when writing from a buffer back to the array, it only
copies those elements indicated by this mask.
* 'writemasked' indicates that only elements where the chosen
'arraymask' operand is True will be written to.
op_dtypes : dtype or tuple of dtype(s), optional
The required data type(s) of the operands. If copying or buffering
is enabled, the data will be converted to/from their original types.
order : {'C', 'F', 'A', 'K'}, optional
Controls the iteration order. 'C' means C order, 'F' means
Fortran order, 'A' means 'F' order if all the arrays are Fortran
contiguous, 'C' order otherwise, and 'K' means as close to the
order the array elements appear in memory as possible. This also
affects the element memory order of "allocate" operands, as they
are allocated to be compatible with iteration order.
Default is 'K'.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
Controls what kind of data casting may occur when making a copy
or buffering. Setting this to 'unsafe' is not recommended,
as it can adversely affect accumulations.
* 'no' means the data types should not be cast at all.
* 'equiv' means only byte-order changes are allowed.
* 'safe' means only casts which can preserve values are allowed.
* 'same_kind' means only safe casts or casts within a kind,
like float64 to float32, are allowed.
* 'unsafe' means any data conversions may be done.
op_axes : list of list of ints, optional
If provided, is a list of ints or None for each operands.
The list of axes for an operand is a mapping from the dimensions
of the iterator to the dimensions of the operand. A value of
-1 can be placed for entries, causing that dimension to be
treated as "newaxis".
itershape : tuple of ints, optional
The desired shape of the iterator. This allows "allocate" operands
with a dimension mapped by op_axes not corresponding to a dimension
of a different operand to get a value not equal to 1 for that
dimension.
buffersize : int, optional
When buffering is enabled, controls the size of the temporary
buffers. Set to 0 for the default value.
Attributes
----------
dtypes : tuple of dtype(s)
The data types of the values provided in `value`. This may be
different from the operand data types if buffering is enabled.
finished : bool
Whether the iteration over the operands is finished or not.
has_delayed_bufalloc : bool
If True, the iterator was created with the "delay_bufalloc" flag,
and no reset() function was called on it yet.
has_index : bool
If True, the iterator was created with either the "c_index" or
the "f_index" flag, and the property `index` can be used to
retrieve it.
has_multi_index : bool
If True, the iterator was created with the "multi_index" flag,
and the property `multi_index` can be used to retrieve it.
index :
When the "c_index" or "f_index" flag was used, this property
provides access to the index. Raises a ValueError if accessed
and `has_index` is False.
iterationneedsapi : bool
Whether iteration requires access to the Python API, for example
if one of the operands is an object array.
iterindex : int
An index which matches the order of iteration.
itersize : int
Size of the iterator.
itviews :
Structured view(s) of `operands` in memory, matching the reordered
and optimized iterator access pattern.
multi_index :
When the "multi_index" flag was used, this property
provides access to the index. Raises a ValueError if accessed
accessed and `has_multi_index` is False.
ndim : int
The iterator's dimension.
nop : int
The number of iterator operands.
operands : tuple of operand(s)
The array(s) to be iterated over.
shape : tuple of ints
Shape tuple, the shape of the iterator.
value :
Value of `operands` at current iteration. Normally, this is a
tuple of array scalars, but if the flag "external_loop" is used,
it is a tuple of one dimensional arrays.
Notes
-----
`nditer` supersedes `flatiter`. The iterator implementation behind
`nditer` is also exposed by the Numpy C API.
The Python exposure supplies two iteration interfaces, one which follows
the Python iterator protocol, and another which mirrors the C-style
do-while pattern. The native Python approach is better in most cases, but
if you need the iterator's coordinates or index, use the C-style pattern.
Examples
--------
Here is how we might write an ``iter_add`` function, using the
Python iterator protocol::
def iter_add_py(x, y, out=None):
addop = np.add
it = np.nditer([x, y, out], [],
[['readonly'], ['readonly'], ['writeonly','allocate']])
for (a, b, c) in it:
addop(a, b, out=c)
return it.operands[2]
Here is the same function, but following the C-style pattern::
def iter_add(x, y, out=None):
addop = np.add
it = np.nditer([x, y, out], [],
[['readonly'], ['readonly'], ['writeonly','allocate']])
while not it.finished:
addop(it[0], it[1], out=it[2])
it.iternext()
return it.operands[2]
Here is an example outer product function::
def outer_it(x, y, out=None):
mulop = np.multiply
it = np.nditer([x, y, out], ['external_loop'],
[['readonly'], ['readonly'], ['writeonly', 'allocate']],
op_axes=[range(x.ndim)+[-1]*y.ndim,
[-1]*x.ndim+range(y.ndim),
None])
for (a, b, c) in it:
mulop(a, b, out=c)
return it.operands[2]
>>> a = np.arange(2)+1
>>> b = np.arange(3)+1
>>> outer_it(a,b)
array([[1, 2, 3],
[2, 4, 6]])
Here is an example function which operates like a "lambda" ufunc::
def luf(lamdaexpr, *args, **kwargs):
"luf(lambdaexpr, op1, ..., opn, out=None, order='K', casting='safe', buffersize=0)"
nargs = len(args)
op = (kwargs.get('out',None),) + args
it = np.nditer(op, ['buffered','external_loop'],
[['writeonly','allocate','no_broadcast']] +
[['readonly','nbo','aligned']]*nargs,
order=kwargs.get('order','K'),
casting=kwargs.get('casting','safe'),
buffersize=kwargs.get('buffersize',0))
while not it.finished:
it[0] = lamdaexpr(*it[1:])
it.iternext()
return it.operands[0]
>>> a = np.arange(5)
>>> b = np.ones(5)
>>> luf(lambda i,j:i*i + j/2, a, b)
array([ 0.5, 1.5, 4.5, 9.5, 16.5])
""")
# nditer methods
add_newdoc('numpy.core', 'nditer', ('copy',
"""
copy()
Get a copy of the iterator in its current state.
Examples
--------
>>> x = np.arange(10)
>>> y = x + 1
>>> it = np.nditer([x, y])
>>> it.next()
(array(0), array(1))
>>> it2 = it.copy()
>>> it2.next()
(array(1), array(2))
"""))
add_newdoc('numpy.core', 'nditer', ('debug_print',
"""
debug_print()
Print the current state of the `nditer` instance and debug info to stdout.
"""))
add_newdoc('numpy.core', 'nditer', ('enable_external_loop',
"""
enable_external_loop()
When the "external_loop" was not used during construction, but
is desired, this modifies the iterator to behave as if the flag
was specified.
"""))
add_newdoc('numpy.core', 'nditer', ('iternext',
"""
iternext()
Check whether iterations are left, and perform a single internal iteration
without returning the result. Used in the C-style pattern do-while
pattern. For an example, see `nditer`.
Returns
-------
iternext : bool
Whether or not there are iterations left.
"""))
add_newdoc('numpy.core', 'nditer', ('remove_axis',
"""
remove_axis(i)
Removes axis `i` from the iterator. Requires that the flag "multi_index"
be enabled.
"""))
add_newdoc('numpy.core', 'nditer', ('remove_multi_index',
"""
remove_multi_index()
When the "multi_index" flag was specified, this removes it, allowing
the internal iteration structure to be optimized further.
"""))
add_newdoc('numpy.core', 'nditer', ('reset',
"""
reset()
Reset the iterator to its initial state.
"""))
###############################################################################
#
# broadcast
#
###############################################################################
add_newdoc('numpy.core', 'broadcast',
"""
Produce an object that mimics broadcasting.
Parameters
----------
in1, in2, ... : array_like
Input parameters.
Returns
-------
b : broadcast object
Broadcast the input parameters against one another, and
return an object that encapsulates the result.
Amongst others, it has ``shape`` and ``nd`` properties, and
may be used as an iterator.
Examples
--------
Manually adding two vectors, using broadcasting:
>>> x = np.array([[1], [2], [3]])
>>> y = np.array([4, 5, 6])
>>> b = np.broadcast(x, y)
>>> out = np.empty(b.shape)
>>> out.flat = [u+v for (u,v) in b]
>>> out
array([[ 5., 6., 7.],
[ 6., 7., 8.],
[ 7., 8., 9.]])
Compare against built-in broadcasting:
>>> x + y
array([[5, 6, 7],
[6, 7, 8],
[7, 8, 9]])
""")
# attributes
add_newdoc('numpy.core', 'broadcast', ('index',
"""
current index in broadcasted result
Examples
--------
>>> x = np.array([[1], [2], [3]])
>>> y = np.array([4, 5, 6])
>>> b = np.broadcast(x, y)
>>> b.index
0
>>> b.next(), b.next(), b.next()
((1, 4), (1, 5), (1, 6))
>>> b.index
3
"""))
add_newdoc('numpy.core', 'broadcast', ('iters',
"""
tuple of iterators along ``self``'s "components."
Returns a tuple of `numpy.flatiter` objects, one for each "component"
of ``self``.
See Also
--------
numpy.flatiter
Examples
--------
>>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> row, col = b.iters
>>> row.next(), col.next()
(1, 4)
"""))
add_newdoc('numpy.core', 'broadcast', ('nd',
"""
Number of dimensions of broadcasted result.
Examples
--------
>>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> b.nd
2
"""))
add_newdoc('numpy.core', 'broadcast', ('numiter',
"""
Number of iterators possessed by the broadcasted result.
Examples
--------
>>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> b.numiter
2
"""))
add_newdoc('numpy.core', 'broadcast', ('shape',
"""
Shape of broadcasted result.
Examples
--------
>>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> b.shape
(3, 3)
"""))
add_newdoc('numpy.core', 'broadcast', ('size',
"""
Total size of broadcasted result.
Examples
--------
>>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> b.size
9
"""))
add_newdoc('numpy.core', 'broadcast', ('reset',
"""
reset()
Reset the broadcasted result's iterator(s).
Parameters
----------
None
Returns
-------
None
Examples
--------
>>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]]
>>> b = np.broadcast(x, y)
>>> b.index
0
>>> b.next(), b.next(), b.next()
((1, 4), (2, 4), (3, 4))
>>> b.index
3
>>> b.reset()
>>> b.index
0
"""))
###############################################################################
#
# numpy functions
#
###############################################################################
add_newdoc('numpy.core.multiarray', 'array',
"""
array(object, dtype=None, copy=True, order=None, subok=False, ndmin=0)
Create an array.
Parameters
----------
object : array_like
An array, any object exposing the array interface, an
object whose __array__ method returns an array, or any
(nested) sequence.
dtype : data-type, optional
The desired data-type for the array. If not given, then
the type will be determined as the minimum type required
to hold the objects in the sequence. This argument can only
be used to 'upcast' the array. For downcasting, use the
.astype(t) method.
copy : bool, optional
If true (default), then the object is copied. Otherwise, a copy
will only be made if __array__ returns a copy, if obj is a
nested sequence, or if a copy is needed to satisfy any of the other
requirements (`dtype`, `order`, etc.).
order : {'C', 'F', 'A'}, optional
Specify the order of the array. If order is 'C', then the array
will be in C-contiguous order (last-index varies the fastest).
If order is 'F', then the returned array will be in
Fortran-contiguous order (first-index varies the fastest).
If order is 'A' (default), then the returned array may be
in any order (either C-, Fortran-contiguous, or even discontiguous),
unless a copy is required, in which case it will be C-contiguous.
subok : bool, optional
If True, then sub-classes will be passed-through, otherwise
the returned array will be forced to be a base-class array (default).
ndmin : int, optional
Specifies the minimum number of dimensions that the resulting
array should have. Ones will be pre-pended to the shape as
needed to meet this requirement.
Returns
-------
out : ndarray
An array object satisfying the specified requirements.
See Also
--------
empty, empty_like, zeros, zeros_like, ones, ones_like, fill
Examples
--------
>>> np.array([1, 2, 3])
array([1, 2, 3])
Upcasting:
>>> np.array([1, 2, 3.0])
array([ 1., 2., 3.])
More than one dimension:
>>> np.array([[1, 2], [3, 4]])
array([[1, 2],
[3, 4]])
Minimum dimensions 2:
>>> np.array([1, 2, 3], ndmin=2)
array([[1, 2, 3]])
Type provided:
>>> np.array([1, 2, 3], dtype=complex)
array([ 1.+0.j, 2.+0.j, 3.+0.j])
Data-type consisting of more than one element:
>>> x = np.array([(1,2),(3,4)],dtype=[('a','<i4'),('b','<i4')])
>>> x['a']
array([1, 3])
Creating an array from sub-classes:
>>> np.array(np.mat('1 2; 3 4'))
array([[1, 2],
[3, 4]])
>>> np.array(np.mat('1 2; 3 4'), subok=True)
matrix([[1, 2],
[3, 4]])
""")
add_newdoc('numpy.core.multiarray', 'empty',
"""
empty(shape, dtype=float, order='C')
Return a new array of given shape and type, without initializing entries.
Parameters
----------
shape : int or tuple of int
Shape of the empty array
dtype : data-type, optional
Desired output data-type.
order : {'C', 'F'}, optional
Whether to store multi-dimensional data in row-major
(C-style) or column-major (Fortran-style) order in
memory.
Returns
-------
out : ndarray
Array of uninitialized (arbitrary) data of the given shape, dtype, and
order. Object arrays will be initialized to None.
See Also
--------
empty_like, zeros, ones
Notes
-----
`empty`, unlike `zeros`, does not set the array values to zero,
and may therefore be marginally faster. On the other hand, it requires
the user to manually set all the values in the array, and should be
used with caution.
Examples
--------
>>> np.empty([2, 2])
array([[ -9.74499359e+001, 6.69583040e-309],
[ 2.13182611e-314, 3.06959433e-309]]) #random
>>> np.empty([2, 2], dtype=int)
array([[-1073741821, -1067949133],
[ 496041986, 19249760]]) #random
""")
add_newdoc('numpy.core.multiarray', 'empty_like',
"""
empty_like(a, dtype=None, order='K', subok=True)
Return a new array with the same shape and type as a given array.
Parameters
----------
a : array_like
The shape and data-type of `a` define these same attributes of the
returned array.
dtype : data-type, optional
Overrides the data type of the result.
.. versionadded:: 1.6.0
order : {'C', 'F', 'A', or 'K'}, optional
Overrides the memory layout of the result. 'C' means C-order,
'F' means F-order, 'A' means 'F' if ``a`` is Fortran contiguous,
'C' otherwise. 'K' means match the layout of ``a`` as closely
as possible.
.. versionadded:: 1.6.0
subok : bool, optional.
If True, then the newly created array will use the sub-class
type of 'a', otherwise it will be a base-class array. Defaults
to True.
Returns
-------
out : ndarray
Array of uninitialized (arbitrary) data with the same
shape and type as `a`.
See Also
--------
ones_like : Return an array of ones with shape and type of input.
zeros_like : Return an array of zeros with shape and type of input.
empty : Return a new uninitialized array.
ones : Return a new array setting values to one.
zeros : Return a new array setting values to zero.
Notes
-----
This function does *not* initialize the returned array; to do that use
`zeros_like` or `ones_like` instead. It may be marginally faster than
the functions that do set the array values.
Examples
--------
>>> a = ([1,2,3], [4,5,6]) # a is array-like
>>> np.empty_like(a)
array([[-1073741821, -1073741821, 3], #random
[ 0, 0, -1073741821]])
>>> a = np.array([[1., 2., 3.],[4.,5.,6.]])
>>> np.empty_like(a)
array([[ -2.00000715e+000, 1.48219694e-323, -2.00000572e+000],#random
[ 4.38791518e-305, -2.00000715e+000, 4.17269252e-309]])
""")
add_newdoc('numpy.core.multiarray', 'scalar',
"""
scalar(dtype, obj)
Return a new scalar array of the given type initialized with obj.
This function is meant mainly for pickle support. `dtype` must be a
valid data-type descriptor. If `dtype` corresponds to an object
descriptor, then `obj` can be any object, otherwise `obj` must be a
string. If `obj` is not given, it will be interpreted as None for object
type and as zeros for all other types.
""")
add_newdoc('numpy.core.multiarray', 'zeros',
"""
zeros(shape, dtype=float, order='C')
Return a new array of given shape and type, filled with zeros.
Parameters
----------
shape : int or sequence of ints
Shape of the new array, e.g., ``(2, 3)`` or ``2``.
dtype : data-type, optional
The desired data-type for the array, e.g., `numpy.int8`. Default is
`numpy.float64`.
order : {'C', 'F'}, optional
Whether to store multidimensional data in C- or Fortran-contiguous
(row- or column-wise) order in memory.
Returns
-------
out : ndarray
Array of zeros with the given shape, dtype, and order.
See Also
--------
zeros_like : Return an array of zeros with shape and type of input.
ones_like : Return an array of ones with shape and type of input.
empty_like : Return an empty array with shape and type of input.
ones : Return a new array setting values to one.
empty : Return a new uninitialized array.
Examples
--------
>>> np.zeros(5)
array([ 0., 0., 0., 0., 0.])
>>> np.zeros((5,), dtype=np.int)
array([0, 0, 0, 0, 0])
>>> np.zeros((2, 1))
array([[ 0.],
[ 0.]])
>>> s = (2,2)
>>> np.zeros(s)
array([[ 0., 0.],
[ 0., 0.]])
>>> np.zeros((2,), dtype=[('x', 'i4'), ('y', 'i4')]) # custom dtype
array([(0, 0), (0, 0)],
dtype=[('x', '<i4'), ('y', '<i4')])
""")
add_newdoc('numpy.core.multiarray', 'count_nonzero',
"""
count_nonzero(a)
Counts the number of non-zero values in the array ``a``.
Parameters
----------
a : array_like
The array for which to count non-zeros.
Returns
-------
count : int or array of int
Number of non-zero values in the array.
See Also
--------
nonzero : Return the coordinates of all the non-zero values.
Examples
--------
>>> np.count_nonzero(np.eye(4))
4
>>> np.count_nonzero([[0,1,7,0,0],[3,0,0,2,19]])
5
""")
add_newdoc('numpy.core.multiarray', 'set_typeDict',
"""set_typeDict(dict)
Set the internal dictionary that can look up an array type using a
registered code.
""")
add_newdoc('numpy.core.multiarray', 'fromstring',
"""
fromstring(string, dtype=float, count=-1, sep='')
A new 1-D array initialized from raw binary or text data in a string.
Parameters
----------
string : str
A string containing the data.
dtype : data-type, optional
The data type of the array; default: float. For binary input data,
the data must be in exactly this format.
count : int, optional
Read this number of `dtype` elements from the data. If this is
negative (the default), the count will be determined from the
length of the data.
sep : str, optional
If not provided or, equivalently, the empty string, the data will
be interpreted as binary data; otherwise, as ASCII text with
decimal numbers. Also in this latter case, this argument is
interpreted as the string separating numbers in the data; extra
whitespace between elements is also ignored.
Returns
-------
arr : ndarray
The constructed array.
Raises
------
ValueError
If the string is not the correct size to satisfy the requested
`dtype` and `count`.
See Also
--------
frombuffer, fromfile, fromiter
Examples
--------
>>> np.fromstring('\\x01\\x02', dtype=np.uint8)
array([1, 2], dtype=uint8)
>>> np.fromstring('1 2', dtype=int, sep=' ')
array([1, 2])
>>> np.fromstring('1, 2', dtype=int, sep=',')
array([1, 2])
>>> np.fromstring('\\x01\\x02\\x03\\x04\\x05', dtype=np.uint8, count=3)
array([1, 2, 3], dtype=uint8)
""")
add_newdoc('numpy.core.multiarray', 'fromiter',
"""
fromiter(iterable, dtype, count=-1)
Create a new 1-dimensional array from an iterable object.
Parameters
----------
iterable : iterable object
An iterable object providing data for the array.
dtype : data-type
The data-type of the returned array.
count : int, optional
The number of items to read from *iterable*. The default is -1,
which means all data is read.
Returns
-------
out : ndarray
The output array.
Notes
-----
Specify `count` to improve performance. It allows ``fromiter`` to
pre-allocate the output array, instead of resizing it on demand.
Examples
--------
>>> iterable = (x*x for x in range(5))
>>> np.fromiter(iterable, np.float)
array([ 0., 1., 4., 9., 16.])
""")
add_newdoc('numpy.core.multiarray', 'fromfile',
"""
fromfile(file, dtype=float, count=-1, sep='')
Construct an array from data in a text or binary file.
A highly efficient way of reading binary data with a known data-type,
as well as parsing simply formatted text files. Data written using the
`tofile` method can be read using this function.
Parameters
----------
file : file or str
Open file object or filename.
dtype : data-type
Data type of the returned array.
For binary files, it is used to determine the size and byte-order
of the items in the file.
count : int
Number of items to read. ``-1`` means all items (i.e., the complete
file).
sep : str
Separator between items if file is a text file.
Empty ("") separator means the file should be treated as binary.
Spaces (" ") in the separator match zero or more whitespace characters.
A separator consisting only of spaces must match at least one
whitespace.
See also
--------
load, save
ndarray.tofile
loadtxt : More flexible way of loading data from a text file.
Notes
-----
Do not rely on the combination of `tofile` and `fromfile` for
data storage, as the binary files generated are are not platform
independent. In particular, no byte-order or data-type information is
saved. Data can be stored in the platform independent ``.npy`` format
using `save` and `load` instead.
Examples
--------
Construct an ndarray:
>>> dt = np.dtype([('time', [('min', int), ('sec', int)]),
... ('temp', float)])
>>> x = np.zeros((1,), dtype=dt)
>>> x['time']['min'] = 10; x['temp'] = 98.25
>>> x
array([((10, 0), 98.25)],
dtype=[('time', [('min', '<i4'), ('sec', '<i4')]), ('temp', '<f8')])
Save the raw data to disk:
>>> import os
>>> fname = os.tmpnam()
>>> x.tofile(fname)
Read the raw data from disk:
>>> np.fromfile(fname, dtype=dt)
array([((10, 0), 98.25)],
dtype=[('time', [('min', '<i4'), ('sec', '<i4')]), ('temp', '<f8')])
The recommended way to store and load data:
>>> np.save(fname, x)
>>> np.load(fname + '.npy')
array([((10, 0), 98.25)],
dtype=[('time', [('min', '<i4'), ('sec', '<i4')]), ('temp', '<f8')])
""")
add_newdoc('numpy.core.multiarray', 'frombuffer',
"""
frombuffer(buffer, dtype=float, count=-1, offset=0)
Interpret a buffer as a 1-dimensional array.
Parameters
----------
buffer : buffer_like
An object that exposes the buffer interface.
dtype : data-type, optional
Data-type of the returned array; default: float.
count : int, optional
Number of items to read. ``-1`` means all data in the buffer.
offset : int, optional
Start reading the buffer from this offset; default: 0.
Notes
-----
If the buffer has data that is not in machine byte-order, this should
be specified as part of the data-type, e.g.::
>>> dt = np.dtype(int)
>>> dt = dt.newbyteorder('>')
>>> np.frombuffer(buf, dtype=dt)
The data of the resulting array will not be byteswapped, but will be
interpreted correctly.
Examples
--------
>>> s = 'hello world'
>>> np.frombuffer(s, dtype='S1', count=5, offset=6)
array(['w', 'o', 'r', 'l', 'd'],
dtype='|S1')
""")
add_newdoc('numpy.core.multiarray', 'concatenate',
"""
concatenate((a1, a2, ...), axis=0)
Join a sequence of arrays along an existing axis.
Parameters
----------
a1, a2, ... : sequence of array_like
The arrays must have the same shape, except in the dimension
corresponding to `axis` (the first, by default).
axis : int, optional
The axis along which the arrays will be joined. Default is 0.
Returns
-------
res : ndarray
The concatenated array.
See Also
--------
ma.concatenate : Concatenate function that preserves input masks.
array_split : Split an array into multiple sub-arrays of equal or
near-equal size.
split : Split array into a list of multiple sub-arrays of equal size.
hsplit : Split array into multiple sub-arrays horizontally (column wise)
vsplit : Split array into multiple sub-arrays vertically (row wise)
dsplit : Split array into multiple sub-arrays along the 3rd axis (depth).
stack : Stack a sequence of arrays along a new axis.
hstack : Stack arrays in sequence horizontally (column wise)
vstack : Stack arrays in sequence vertically (row wise)
dstack : Stack arrays in sequence depth wise (along third dimension)
Notes
-----
When one or more of the arrays to be concatenated is a MaskedArray,
this function will return a MaskedArray object instead of an ndarray,
but the input masks are *not* preserved. In cases where a MaskedArray
is expected as input, use the ma.concatenate function from the masked
array module instead.
Examples
--------
>>> a = np.array([[1, 2], [3, 4]])
>>> b = np.array([[5, 6]])
>>> np.concatenate((a, b), axis=0)
array([[1, 2],
[3, 4],
[5, 6]])
>>> np.concatenate((a, b.T), axis=1)
array([[1, 2, 5],
[3, 4, 6]])
This function will not preserve masking of MaskedArray inputs.
>>> a = np.ma.arange(3)
>>> a[1] = np.ma.masked
>>> b = np.arange(2, 5)
>>> a
masked_array(data = [0 -- 2],
mask = [False True False],
fill_value = 999999)
>>> b
array([2, 3, 4])
>>> np.concatenate([a, b])
masked_array(data = [0 1 2 2 3 4],
mask = False,
fill_value = 999999)
>>> np.ma.concatenate([a, b])
masked_array(data = [0 -- 2 2 3 4],
mask = [False True False False False False],
fill_value = 999999)
""")
add_newdoc('numpy.core', 'inner',
"""
inner(a, b)
Inner product of two arrays.
Ordinary inner product of vectors for 1-D arrays (without complex
conjugation), in higher dimensions a sum product over the last axes.
Parameters
----------
a, b : array_like
If `a` and `b` are nonscalar, their last dimensions must match.
Returns
-------
out : ndarray
`out.shape = a.shape[:-1] + b.shape[:-1]`
Raises
------
ValueError
If the last dimension of `a` and `b` has different size.
See Also
--------
tensordot : Sum products over arbitrary axes.
dot : Generalised matrix product, using second last dimension of `b`.
einsum : Einstein summation convention.
Notes
-----
For vectors (1-D arrays) it computes the ordinary inner-product::
np.inner(a, b) = sum(a[:]*b[:])
More generally, if `ndim(a) = r > 0` and `ndim(b) = s > 0`::
np.inner(a, b) = np.tensordot(a, b, axes=(-1,-1))
or explicitly::
np.inner(a, b)[i0,...,ir-1,j0,...,js-1]
= sum(a[i0,...,ir-1,:]*b[j0,...,js-1,:])
In addition `a` or `b` may be scalars, in which case::
np.inner(a,b) = a*b
Examples
--------
Ordinary inner product for vectors:
>>> a = np.array([1,2,3])
>>> b = np.array([0,1,0])
>>> np.inner(a, b)
2
A multidimensional example:
>>> a = np.arange(24).reshape((2,3,4))
>>> b = np.arange(4)
>>> np.inner(a, b)
array([[ 14, 38, 62],
[ 86, 110, 134]])
An example where `b` is a scalar:
>>> np.inner(np.eye(2), 7)
array([[ 7., 0.],
[ 0., 7.]])
""")
add_newdoc('numpy.core', 'fastCopyAndTranspose',
"""_fastCopyAndTranspose(a)""")
add_newdoc('numpy.core.multiarray', 'correlate',
"""cross_correlate(a,v, mode=0)""")
add_newdoc('numpy.core.multiarray', 'arange',
"""
arange([start,] stop[, step,], dtype=None)
Return evenly spaced values within a given interval.
Values are generated within the half-open interval ``[start, stop)``
(in other words, the interval including `start` but excluding `stop`).
For integer arguments the function is equivalent to the Python built-in
`range <http://docs.python.org/lib/built-in-funcs.html>`_ function,
but returns an ndarray rather than a list.
When using a non-integer step, such as 0.1, the results will often not
be consistent. It is better to use ``linspace`` for these cases.
Parameters
----------
start : number, optional
Start of interval. The interval includes this value. The default
start value is 0.
stop : number
End of interval. The interval does not include this value, except
in some cases where `step` is not an integer and floating point
round-off affects the length of `out`.
step : number, optional
Spacing between values. For any output `out`, this is the distance
between two adjacent values, ``out[i+1] - out[i]``. The default
step size is 1. If `step` is specified, `start` must also be given.
dtype : dtype
The type of the output array. If `dtype` is not given, infer the data
type from the other input arguments.
Returns
-------
arange : ndarray
Array of evenly spaced values.
For floating point arguments, the length of the result is
``ceil((stop - start)/step)``. Because of floating point overflow,
this rule may result in the last element of `out` being greater
than `stop`.
See Also
--------
linspace : Evenly spaced numbers with careful handling of endpoints.
ogrid: Arrays of evenly spaced numbers in N-dimensions.
mgrid: Grid-shaped arrays of evenly spaced numbers in N-dimensions.
Examples
--------
>>> np.arange(3)
array([0, 1, 2])
>>> np.arange(3.0)
array([ 0., 1., 2.])
>>> np.arange(3,7)
array([3, 4, 5, 6])
>>> np.arange(3,7,2)
array([3, 5])
""")
add_newdoc('numpy.core.multiarray', '_get_ndarray_c_version',
"""_get_ndarray_c_version()
Return the compile time NDARRAY_VERSION number.
""")
add_newdoc('numpy.core.multiarray', '_reconstruct',
"""_reconstruct(subtype, shape, dtype)
Construct an empty array. Used by Pickles.
""")
add_newdoc('numpy.core.multiarray', 'set_string_function',
"""
set_string_function(f, repr=1)
Internal method to set a function to be used when pretty printing arrays.
""")
add_newdoc('numpy.core.multiarray', 'set_numeric_ops',
"""
set_numeric_ops(op1=func1, op2=func2, ...)
Set numerical operators for array objects.
Parameters
----------
op1, op2, ... : callable
Each ``op = func`` pair describes an operator to be replaced.
For example, ``add = lambda x, y: np.add(x, y) % 5`` would replace
addition by modulus 5 addition.
Returns
-------
saved_ops : list of callables
A list of all operators, stored before making replacements.
Notes
-----
.. WARNING::
Use with care! Incorrect usage may lead to memory errors.
A function replacing an operator cannot make use of that operator.
For example, when replacing add, you may not use ``+``. Instead,
directly call ufuncs.
Examples
--------
>>> def add_mod5(x, y):
... return np.add(x, y) % 5
...
>>> old_funcs = np.set_numeric_ops(add=add_mod5)
>>> x = np.arange(12).reshape((3, 4))
>>> x + x
array([[0, 2, 4, 1],
[3, 0, 2, 4],
[1, 3, 0, 2]])
>>> ignore = np.set_numeric_ops(**old_funcs) # restore operators
""")
add_newdoc('numpy.core.multiarray', 'where',
"""
where(condition, [x, y])
Return elements, either from `x` or `y`, depending on `condition`.
If only `condition` is given, return ``condition.nonzero()``.
Parameters
----------
condition : array_like, bool
When True, yield `x`, otherwise yield `y`.
x, y : array_like, optional
Values from which to choose. `x` and `y` need to have the same
shape as `condition`.
Returns
-------
out : ndarray or tuple of ndarrays
If both `x` and `y` are specified, the output array contains
elements of `x` where `condition` is True, and elements from
`y` elsewhere.
If only `condition` is given, return the tuple
``condition.nonzero()``, the indices where `condition` is True.
See Also
--------
nonzero, choose
Notes
-----
If `x` and `y` are given and input arrays are 1-D, `where` is
equivalent to::
[xv if c else yv for (c,xv,yv) in zip(condition,x,y)]
Examples
--------
>>> np.where([[True, False], [True, True]],
... [[1, 2], [3, 4]],
... [[9, 8], [7, 6]])
array([[1, 8],
[3, 4]])
>>> np.where([[0, 1], [1, 0]])
(array([0, 1]), array([1, 0]))
>>> x = np.arange(9.).reshape(3, 3)
>>> np.where( x > 5 )
(array([2, 2, 2]), array([0, 1, 2]))
>>> x[np.where( x > 3.0 )] # Note: result is 1D.
array([ 4., 5., 6., 7., 8.])
>>> np.where(x < 5, x, -1) # Note: broadcasting.
array([[ 0., 1., 2.],
[ 3., 4., -1.],
[-1., -1., -1.]])
Find the indices of elements of `x` that are in `goodvalues`.
>>> goodvalues = [3, 4, 7]
>>> ix = np.in1d(x.ravel(), goodvalues).reshape(x.shape)
>>> ix
array([[False, False, False],
[ True, True, False],
[False, True, False]], dtype=bool)
>>> np.where(ix)
(array([1, 1, 2]), array([0, 1, 1]))
""")
add_newdoc('numpy.core.multiarray', 'lexsort',
"""
lexsort(keys, axis=-1)
Perform an indirect sort using a sequence of keys.
Given multiple sorting keys, which can be interpreted as columns in a
spreadsheet, lexsort returns an array of integer indices that describes
the sort order by multiple columns. The last key in the sequence is used
for the primary sort order, the second-to-last key for the secondary sort
order, and so on. The keys argument must be a sequence of objects that
can be converted to arrays of the same shape. If a 2D array is provided
for the keys argument, it's rows are interpreted as the sorting keys and
sorting is according to the last row, second last row etc.
Parameters
----------
keys : (k, N) array or tuple containing k (N,)-shaped sequences
The `k` different "columns" to be sorted. The last column (or row if
`keys` is a 2D array) is the primary sort key.
axis : int, optional
Axis to be indirectly sorted. By default, sort over the last axis.
Returns
-------
indices : (N,) ndarray of ints
Array of indices that sort the keys along the specified axis.
See Also
--------
argsort : Indirect sort.
ndarray.sort : In-place sort.
sort : Return a sorted copy of an array.
Examples
--------
Sort names: first by surname, then by name.
>>> surnames = ('Hertz', 'Galilei', 'Hertz')
>>> first_names = ('Heinrich', 'Galileo', 'Gustav')
>>> ind = np.lexsort((first_names, surnames))
>>> ind
array([1, 2, 0])
>>> [surnames[i] + ", " + first_names[i] for i in ind]
['Galilei, Galileo', 'Hertz, Gustav', 'Hertz, Heinrich']
Sort two columns of numbers:
>>> a = [1,5,1,4,3,4,4] # First column
>>> b = [9,4,0,4,0,2,1] # Second column
>>> ind = np.lexsort((b,a)) # Sort by a, then by b
>>> print(ind)
[2 0 4 6 5 3 1]
>>> [(a[i],b[i]) for i in ind]
[(1, 0), (1, 9), (3, 0), (4, 1), (4, 2), (4, 4), (5, 4)]
Note that sorting is first according to the elements of ``a``.
Secondary sorting is according to the elements of ``b``.
A normal ``argsort`` would have yielded:
>>> [(a[i],b[i]) for i in np.argsort(a)]
[(1, 9), (1, 0), (3, 0), (4, 4), (4, 2), (4, 1), (5, 4)]
Structured arrays are sorted lexically by ``argsort``:
>>> x = np.array([(1,9), (5,4), (1,0), (4,4), (3,0), (4,2), (4,1)],
... dtype=np.dtype([('x', int), ('y', int)]))
>>> np.argsort(x) # or np.argsort(x, order=('x', 'y'))
array([2, 0, 4, 6, 5, 3, 1])
""")
add_newdoc('numpy.core.multiarray', 'can_cast',
"""
can_cast(from, totype, casting = 'safe')
Returns True if cast between data types can occur according to the
casting rule. If from is a scalar or array scalar, also returns
True if the scalar value can be cast without overflow or truncation
to an integer.
Parameters
----------
from : dtype, dtype specifier, scalar, or array
Data type, scalar, or array to cast from.
totype : dtype or dtype specifier
Data type to cast to.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
Controls what kind of data casting may occur.
* 'no' means the data types should not be cast at all.
* 'equiv' means only byte-order changes are allowed.
* 'safe' means only casts which can preserve values are allowed.
* 'same_kind' means only safe casts or casts within a kind,
like float64 to float32, are allowed.
* 'unsafe' means any data conversions may be done.
Returns
-------
out : bool
True if cast can occur according to the casting rule.
Notes
-----
Starting in NumPy 1.9, can_cast function now returns False in 'safe'
casting mode for integer/float dtype and string dtype if the string dtype
length is not long enough to store the max integer/float value converted
to a string. Previously can_cast in 'safe' mode returned True for
integer/float dtype and a string dtype of any length.
See also
--------
dtype, result_type
Examples
--------
Basic examples
>>> np.can_cast(np.int32, np.int64)
True
>>> np.can_cast(np.float64, np.complex)
True
>>> np.can_cast(np.complex, np.float)
False
>>> np.can_cast('i8', 'f8')
True
>>> np.can_cast('i8', 'f4')
False
>>> np.can_cast('i4', 'S4')
False
Casting scalars
>>> np.can_cast(100, 'i1')
True
>>> np.can_cast(150, 'i1')
False
>>> np.can_cast(150, 'u1')
True
>>> np.can_cast(3.5e100, np.float32)
False
>>> np.can_cast(1000.0, np.float32)
True
Array scalar checks the value, array does not
>>> np.can_cast(np.array(1000.0), np.float32)
True
>>> np.can_cast(np.array([1000.0]), np.float32)
False
Using the casting rules
>>> np.can_cast('i8', 'i8', 'no')
True
>>> np.can_cast('<i8', '>i8', 'no')
False
>>> np.can_cast('<i8', '>i8', 'equiv')
True
>>> np.can_cast('<i4', '>i8', 'equiv')
False
>>> np.can_cast('<i4', '>i8', 'safe')
True
>>> np.can_cast('<i8', '>i4', 'safe')
False
>>> np.can_cast('<i8', '>i4', 'same_kind')
True
>>> np.can_cast('<i8', '>u4', 'same_kind')
False
>>> np.can_cast('<i8', '>u4', 'unsafe')
True
""")
add_newdoc('numpy.core.multiarray', 'promote_types',
"""
promote_types(type1, type2)
Returns the data type with the smallest size and smallest scalar
kind to which both ``type1`` and ``type2`` may be safely cast.
The returned data type is always in native byte order.
This function is symmetric and associative.
Parameters
----------
type1 : dtype or dtype specifier
First data type.
type2 : dtype or dtype specifier
Second data type.
Returns
-------
out : dtype
The promoted data type.
Notes
-----
.. versionadded:: 1.6.0
Starting in NumPy 1.9, promote_types function now returns a valid string
length when given an integer or float dtype as one argument and a string
dtype as another argument. Previously it always returned the input string
dtype, even if it wasn't long enough to store the max integer/float value
converted to a string.
See Also
--------
result_type, dtype, can_cast
Examples
--------
>>> np.promote_types('f4', 'f8')
dtype('float64')
>>> np.promote_types('i8', 'f4')
dtype('float64')
>>> np.promote_types('>i8', '<c8')
dtype('complex128')
>>> np.promote_types('i4', 'S8')
dtype('S11')
""")
add_newdoc('numpy.core.multiarray', 'min_scalar_type',
"""
min_scalar_type(a)
For scalar ``a``, returns the data type with the smallest size
and smallest scalar kind which can hold its value. For non-scalar
array ``a``, returns the vector's dtype unmodified.
Floating point values are not demoted to integers,
and complex values are not demoted to floats.
Parameters
----------
a : scalar or array_like
The value whose minimal data type is to be found.
Returns
-------
out : dtype
The minimal data type.
Notes
-----
.. versionadded:: 1.6.0
See Also
--------
result_type, promote_types, dtype, can_cast
Examples
--------
>>> np.min_scalar_type(10)
dtype('uint8')
>>> np.min_scalar_type(-260)
dtype('int16')
>>> np.min_scalar_type(3.1)
dtype('float16')
>>> np.min_scalar_type(1e50)
dtype('float64')
>>> np.min_scalar_type(np.arange(4,dtype='f8'))
dtype('float64')
""")
add_newdoc('numpy.core.multiarray', 'result_type',
"""
result_type(*arrays_and_dtypes)
Returns the type that results from applying the NumPy
type promotion rules to the arguments.
Type promotion in NumPy works similarly to the rules in languages
like C++, with some slight differences. When both scalars and
arrays are used, the array's type takes precedence and the actual value
of the scalar is taken into account.
For example, calculating 3*a, where a is an array of 32-bit floats,
intuitively should result in a 32-bit float output. If the 3 is a
32-bit integer, the NumPy rules indicate it can't convert losslessly
into a 32-bit float, so a 64-bit float should be the result type.
By examining the value of the constant, '3', we see that it fits in
an 8-bit integer, which can be cast losslessly into the 32-bit float.
Parameters
----------
arrays_and_dtypes : list of arrays and dtypes
The operands of some operation whose result type is needed.
Returns
-------
out : dtype
The result type.
See also
--------
dtype, promote_types, min_scalar_type, can_cast
Notes
-----
.. versionadded:: 1.6.0
The specific algorithm used is as follows.
Categories are determined by first checking which of boolean,
integer (int/uint), or floating point (float/complex) the maximum
kind of all the arrays and the scalars are.
If there are only scalars or the maximum category of the scalars
is higher than the maximum category of the arrays,
the data types are combined with :func:`promote_types`
to produce the return value.
Otherwise, `min_scalar_type` is called on each array, and
the resulting data types are all combined with :func:`promote_types`
to produce the return value.
The set of int values is not a subset of the uint values for types
with the same number of bits, something not reflected in
:func:`min_scalar_type`, but handled as a special case in `result_type`.
Examples
--------
>>> np.result_type(3, np.arange(7, dtype='i1'))
dtype('int8')
>>> np.result_type('i4', 'c8')
dtype('complex128')
>>> np.result_type(3.0, -2)
dtype('float64')
""")
add_newdoc('numpy.core.multiarray', 'newbuffer',
"""
newbuffer(size)
Return a new uninitialized buffer object.
Parameters
----------
size : int
Size in bytes of returned buffer object.
Returns
-------
newbuffer : buffer object
Returned, uninitialized buffer object of `size` bytes.
""")
add_newdoc('numpy.core.multiarray', 'getbuffer',
"""
getbuffer(obj [,offset[, size]])
Create a buffer object from the given object referencing a slice of
length size starting at offset.
Default is the entire buffer. A read-write buffer is attempted followed
by a read-only buffer.
Parameters
----------
obj : object
offset : int, optional
size : int, optional
Returns
-------
buffer_obj : buffer
Examples
--------
>>> buf = np.getbuffer(np.ones(5), 1, 3)
>>> len(buf)
3
>>> buf[0]
'\\x00'
>>> buf
<read-write buffer for 0x8af1e70, size 3, offset 1 at 0x8ba4ec0>
""")
add_newdoc('numpy.core', 'dot',
"""
dot(a, b, out=None)
Dot product of two arrays.
For 2-D arrays it is equivalent to matrix multiplication, and for 1-D
arrays to inner product of vectors (without complex conjugation). For
N dimensions it is a sum product over the last axis of `a` and
the second-to-last of `b`::
dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m])
Parameters
----------
a : array_like
First argument.
b : array_like
Second argument.
out : ndarray, optional
Output argument. This must have the exact kind that would be returned
if it was not used. In particular, it must have the right type, must be
C-contiguous, and its dtype must be the dtype that would be returned
for `dot(a,b)`. This is a performance feature. Therefore, if these
conditions are not met, an exception is raised, instead of attempting
to be flexible.
Returns
-------
output : ndarray
Returns the dot product of `a` and `b`. If `a` and `b` are both
scalars or both 1-D arrays then a scalar is returned; otherwise
an array is returned.
If `out` is given, then it is returned.
Raises
------
ValueError
If the last dimension of `a` is not the same size as
the second-to-last dimension of `b`.
See Also
--------
vdot : Complex-conjugating dot product.
tensordot : Sum products over arbitrary axes.
einsum : Einstein summation convention.
matmul : '@' operator as method with out parameter.
Examples
--------
>>> np.dot(3, 4)
12
Neither argument is complex-conjugated:
>>> np.dot([2j, 3j], [2j, 3j])
(-13+0j)
For 2-D arrays it is the matrix product:
>>> a = [[1, 0], [0, 1]]
>>> b = [[4, 1], [2, 2]]
>>> np.dot(a, b)
array([[4, 1],
[2, 2]])
>>> a = np.arange(3*4*5*6).reshape((3,4,5,6))
>>> b = np.arange(3*4*5*6)[::-1].reshape((5,4,6,3))
>>> np.dot(a, b)[2,3,2,1,2,2]
499128
>>> sum(a[2,3,2,:] * b[1,2,:,2])
499128
""")
add_newdoc('numpy.core', 'matmul',
"""
matmul(a, b, out=None)
Matrix product of two arrays.
The behavior depends on the arguments in the following way.
- If both arguments are 2-D they are multiplied like conventional
matrices.
- If either argument is N-D, N > 2, it is treated as a stack of
matrices residing in the last two indexes and broadcast accordingly.
- If the first argument is 1-D, it is promoted to a matrix by
prepending a 1 to its dimensions. After matrix multiplication
the prepended 1 is removed.
- If the second argument is 1-D, it is promoted to a matrix by
appending a 1 to its dimensions. After matrix multiplication
the appended 1 is removed.
Multiplication by a scalar is not allowed, use ``*`` instead. Note that
multiplying a stack of matrices with a vector will result in a stack of
vectors, but matmul will not recognize it as such.
``matmul`` differs from ``dot`` in two important ways.
- Multiplication by scalars is not allowed.
- Stacks of matrices are broadcast together as if the matrices
were elements.
.. warning::
This function is preliminary and included in Numpy 1.10 for testing
and documentation. Its semantics will not change, but the number and
order of the optional arguments will.
.. versionadded:: 1.10.0
Parameters
----------
a : array_like
First argument.
b : array_like
Second argument.
out : ndarray, optional
Output argument. This must have the exact kind that would be returned
if it was not used. In particular, it must have the right type, must be
C-contiguous, and its dtype must be the dtype that would be returned
for `dot(a,b)`. This is a performance feature. Therefore, if these
conditions are not met, an exception is raised, instead of attempting
to be flexible.
Returns
-------
output : ndarray
Returns the dot product of `a` and `b`. If `a` and `b` are both
1-D arrays then a scalar is returned; otherwise an array is
returned. If `out` is given, then it is returned.
Raises
------
ValueError
If the last dimension of `a` is not the same size as
the second-to-last dimension of `b`.
If scalar value is passed.
See Also
--------
vdot : Complex-conjugating dot product.
tensordot : Sum products over arbitrary axes.
einsum : Einstein summation convention.
dot : alternative matrix product with different broadcasting rules.
Notes
-----
The matmul function implements the semantics of the `@` operator introduced
in Python 3.5 following PEP465.
Examples
--------
For 2-D arrays it is the matrix product:
>>> a = [[1, 0], [0, 1]]
>>> b = [[4, 1], [2, 2]]
>>> np.matmul(a, b)
array([[4, 1],
[2, 2]])
For 2-D mixed with 1-D, the result is the usual.
>>> a = [[1, 0], [0, 1]]
>>> b = [1, 2]
>>> np.matmul(a, b)
array([1, 2])
>>> np.matmul(b, a)
array([1, 2])
Broadcasting is conventional for stacks of arrays
>>> a = np.arange(2*2*4).reshape((2,2,4))
>>> b = np.arange(2*2*4).reshape((2,4,2))
>>> np.matmul(a,b).shape
(2, 2, 2)
>>> np.matmul(a,b)[0,1,1]
98
>>> sum(a[0,1,:] * b[0,:,1])
98
Vector, vector returns the scalar inner product, but neither argument
is complex-conjugated:
>>> np.matmul([2j, 3j], [2j, 3j])
(-13+0j)
Scalar multiplication raises an error.
>>> np.matmul([1,2], 3)
Traceback (most recent call last):
...
ValueError: Scalar operands are not allowed, use '*' instead
""")
add_newdoc('numpy.core', 'einsum',
"""
einsum(subscripts, *operands, out=None, dtype=None, order='K', casting='safe')
Evaluates the Einstein summation convention on the operands.
Using the Einstein summation convention, many common multi-dimensional
array operations can be represented in a simple fashion. This function
provides a way to compute such summations. The best way to understand this
function is to try the examples below, which show how many common NumPy
functions can be implemented as calls to `einsum`.
Parameters
----------
subscripts : str
Specifies the subscripts for summation.
operands : list of array_like
These are the arrays for the operation.
out : ndarray, optional
If provided, the calculation is done into this array.
dtype : data-type, optional
If provided, forces the calculation to use the data type specified.
Note that you may have to also give a more liberal `casting`
parameter to allow the conversions.
order : {'C', 'F', 'A', 'K'}, optional
Controls the memory layout of the output. 'C' means it should
be C contiguous. 'F' means it should be Fortran contiguous,
'A' means it should be 'F' if the inputs are all 'F', 'C' otherwise.
'K' means it should be as close to the layout as the inputs as
is possible, including arbitrarily permuted axes.
Default is 'K'.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
Controls what kind of data casting may occur. Setting this to
'unsafe' is not recommended, as it can adversely affect accumulations.
* 'no' means the data types should not be cast at all.
* 'equiv' means only byte-order changes are allowed.
* 'safe' means only casts which can preserve values are allowed.
* 'same_kind' means only safe casts or casts within a kind,
like float64 to float32, are allowed.
* 'unsafe' means any data conversions may be done.
Returns
-------
output : ndarray
The calculation based on the Einstein summation convention.
See Also
--------
dot, inner, outer, tensordot
Notes
-----
.. versionadded:: 1.6.0
The subscripts string is a comma-separated list of subscript labels,
where each label refers to a dimension of the corresponding operand.
Repeated subscripts labels in one operand take the diagonal. For example,
``np.einsum('ii', a)`` is equivalent to ``np.trace(a)``.
Whenever a label is repeated, it is summed, so ``np.einsum('i,i', a, b)``
is equivalent to ``np.inner(a,b)``. If a label appears only once,
it is not summed, so ``np.einsum('i', a)`` produces a view of ``a``
with no changes.
The order of labels in the output is by default alphabetical. This
means that ``np.einsum('ij', a)`` doesn't affect a 2D array, while
``np.einsum('ji', a)`` takes its transpose.
The output can be controlled by specifying output subscript labels
as well. This specifies the label order, and allows summing to
be disallowed or forced when desired. The call ``np.einsum('i->', a)``
is like ``np.sum(a, axis=-1)``, and ``np.einsum('ii->i', a)``
is like ``np.diag(a)``. The difference is that `einsum` does not
allow broadcasting by default.
To enable and control broadcasting, use an ellipsis. Default
NumPy-style broadcasting is done by adding an ellipsis
to the left of each term, like ``np.einsum('...ii->...i', a)``.
To take the trace along the first and last axes,
you can do ``np.einsum('i...i', a)``, or to do a matrix-matrix
product with the left-most indices instead of rightmost, you can do
``np.einsum('ij...,jk...->ik...', a, b)``.
When there is only one operand, no axes are summed, and no output
parameter is provided, a view into the operand is returned instead
of a new array. Thus, taking the diagonal as ``np.einsum('ii->i', a)``
produces a view.
An alternative way to provide the subscripts and operands is as
``einsum(op0, sublist0, op1, sublist1, ..., [sublistout])``. The examples
below have corresponding `einsum` calls with the two parameter methods.
.. versionadded:: 1.10.0
Views returned from einsum are now writeable whenever the input array
is writeable. For example, ``np.einsum('ijk...->kji...', a)`` will now
have the same effect as ``np.swapaxes(a, 0, 2)`` and
``np.einsum('ii->i', a)`` will return a writeable view of the diagonal
of a 2D array.
Examples
--------
>>> a = np.arange(25).reshape(5,5)
>>> b = np.arange(5)
>>> c = np.arange(6).reshape(2,3)
>>> np.einsum('ii', a)
60
>>> np.einsum(a, [0,0])
60
>>> np.trace(a)
60
>>> np.einsum('ii->i', a)
array([ 0, 6, 12, 18, 24])
>>> np.einsum(a, [0,0], [0])
array([ 0, 6, 12, 18, 24])
>>> np.diag(a)
array([ 0, 6, 12, 18, 24])
>>> np.einsum('ij,j', a, b)
array([ 30, 80, 130, 180, 230])
>>> np.einsum(a, [0,1], b, [1])
array([ 30, 80, 130, 180, 230])
>>> np.dot(a, b)
array([ 30, 80, 130, 180, 230])
>>> np.einsum('...j,j', a, b)
array([ 30, 80, 130, 180, 230])
>>> np.einsum('ji', c)
array([[0, 3],
[1, 4],
[2, 5]])
>>> np.einsum(c, [1,0])
array([[0, 3],
[1, 4],
[2, 5]])
>>> c.T
array([[0, 3],
[1, 4],
[2, 5]])
>>> np.einsum('..., ...', 3, c)
array([[ 0, 3, 6],
[ 9, 12, 15]])
>>> np.einsum(3, [Ellipsis], c, [Ellipsis])
array([[ 0, 3, 6],
[ 9, 12, 15]])
>>> np.multiply(3, c)
array([[ 0, 3, 6],
[ 9, 12, 15]])
>>> np.einsum('i,i', b, b)
30
>>> np.einsum(b, [0], b, [0])
30
>>> np.inner(b,b)
30
>>> np.einsum('i,j', np.arange(2)+1, b)
array([[0, 1, 2, 3, 4],
[0, 2, 4, 6, 8]])
>>> np.einsum(np.arange(2)+1, [0], b, [1])
array([[0, 1, 2, 3, 4],
[0, 2, 4, 6, 8]])
>>> np.outer(np.arange(2)+1, b)
array([[0, 1, 2, 3, 4],
[0, 2, 4, 6, 8]])
>>> np.einsum('i...->...', a)
array([50, 55, 60, 65, 70])
>>> np.einsum(a, [0,Ellipsis], [Ellipsis])
array([50, 55, 60, 65, 70])
>>> np.sum(a, axis=0)
array([50, 55, 60, 65, 70])
>>> a = np.arange(60.).reshape(3,4,5)
>>> b = np.arange(24.).reshape(4,3,2)
>>> np.einsum('ijk,jil->kl', a, b)
array([[ 4400., 4730.],
[ 4532., 4874.],
[ 4664., 5018.],
[ 4796., 5162.],
[ 4928., 5306.]])
>>> np.einsum(a, [0,1,2], b, [1,0,3], [2,3])
array([[ 4400., 4730.],
[ 4532., 4874.],
[ 4664., 5018.],
[ 4796., 5162.],
[ 4928., 5306.]])
>>> np.tensordot(a,b, axes=([1,0],[0,1]))
array([[ 4400., 4730.],
[ 4532., 4874.],
[ 4664., 5018.],
[ 4796., 5162.],
[ 4928., 5306.]])
>>> a = np.arange(6).reshape((3,2))
>>> b = np.arange(12).reshape((4,3))
>>> np.einsum('ki,jk->ij', a, b)
array([[10, 28, 46, 64],
[13, 40, 67, 94]])
>>> np.einsum('ki,...k->i...', a, b)
array([[10, 28, 46, 64],
[13, 40, 67, 94]])
>>> np.einsum('k...,jk', a, b)
array([[10, 28, 46, 64],
[13, 40, 67, 94]])
>>> # since version 1.10.0
>>> a = np.zeros((3, 3))
>>> np.einsum('ii->i', a)[:] = 1
>>> a
array([[ 1., 0., 0.],
[ 0., 1., 0.],
[ 0., 0., 1.]])
""")
add_newdoc('numpy.core', 'vdot',
"""
vdot(a, b)
Return the dot product of two vectors.
The vdot(`a`, `b`) function handles complex numbers differently than
dot(`a`, `b`). If the first argument is complex the complex conjugate
of the first argument is used for the calculation of the dot product.
Note that `vdot` handles multidimensional arrays differently than `dot`:
it does *not* perform a matrix product, but flattens input arguments
to 1-D vectors first. Consequently, it should only be used for vectors.
Parameters
----------
a : array_like
If `a` is complex the complex conjugate is taken before calculation
of the dot product.
b : array_like
Second argument to the dot product.
Returns
-------
output : ndarray
Dot product of `a` and `b`. Can be an int, float, or
complex depending on the types of `a` and `b`.
See Also
--------
dot : Return the dot product without using the complex conjugate of the
first argument.
Examples
--------
>>> a = np.array([1+2j,3+4j])
>>> b = np.array([5+6j,7+8j])
>>> np.vdot(a, b)
(70-8j)
>>> np.vdot(b, a)
(70+8j)
Note that higher-dimensional arrays are flattened!
>>> a = np.array([[1, 4], [5, 6]])
>>> b = np.array([[4, 1], [2, 2]])
>>> np.vdot(a, b)
30
>>> np.vdot(b, a)
30
>>> 1*4 + 4*1 + 5*2 + 6*2
30
""")
##############################################################################
#
# Documentation for ndarray attributes and methods
#
##############################################################################
##############################################################################
#
# ndarray object
#
##############################################################################
add_newdoc('numpy.core.multiarray', 'ndarray',
"""
ndarray(shape, dtype=float, buffer=None, offset=0,
strides=None, order=None)
An array object represents a multidimensional, homogeneous array
of fixed-size items. An associated data-type object describes the
format of each element in the array (its byte-order, how many bytes it
occupies in memory, whether it is an integer, a floating point number,
or something else, etc.)
Arrays should be constructed using `array`, `zeros` or `empty` (refer
to the See Also section below). The parameters given here refer to
a low-level method (`ndarray(...)`) for instantiating an array.
For more information, refer to the `numpy` module and examine the
the methods and attributes of an array.
Parameters
----------
(for the __new__ method; see Notes below)
shape : tuple of ints
Shape of created array.
dtype : data-type, optional
Any object that can be interpreted as a numpy data type.
buffer : object exposing buffer interface, optional
Used to fill the array with data.
offset : int, optional
Offset of array data in buffer.
strides : tuple of ints, optional
Strides of data in memory.
order : {'C', 'F'}, optional
Row-major (C-style) or column-major (Fortran-style) order.
Attributes
----------
T : ndarray
Transpose of the array.
data : buffer
The array's elements, in memory.
dtype : dtype object
Describes the format of the elements in the array.
flags : dict
Dictionary containing information related to memory use, e.g.,
'C_CONTIGUOUS', 'OWNDATA', 'WRITEABLE', etc.
flat : numpy.flatiter object
Flattened version of the array as an iterator. The iterator
allows assignments, e.g., ``x.flat = 3`` (See `ndarray.flat` for
assignment examples; TODO).
imag : ndarray
Imaginary part of the array.
real : ndarray
Real part of the array.
size : int
Number of elements in the array.
itemsize : int
The memory use of each array element in bytes.
nbytes : int
The total number of bytes required to store the array data,
i.e., ``itemsize * size``.
ndim : int
The array's number of dimensions.
shape : tuple of ints
Shape of the array.
strides : tuple of ints
The step-size required to move from one element to the next in
memory. For example, a contiguous ``(3, 4)`` array of type
``int16`` in C-order has strides ``(8, 2)``. This implies that
to move from element to element in memory requires jumps of 2 bytes.
To move from row-to-row, one needs to jump 8 bytes at a time
(``2 * 4``).
ctypes : ctypes object
Class containing properties of the array needed for interaction
with ctypes.
base : ndarray
If the array is a view into another array, that array is its `base`
(unless that array is also a view). The `base` array is where the
array data is actually stored.
See Also
--------
array : Construct an array.
zeros : Create an array, each element of which is zero.
empty : Create an array, but leave its allocated memory unchanged (i.e.,
it contains "garbage").
dtype : Create a data-type.
Notes
-----
There are two modes of creating an array using ``__new__``:
1. If `buffer` is None, then only `shape`, `dtype`, and `order`
are used.
2. If `buffer` is an object exposing the buffer interface, then
all keywords are interpreted.
No ``__init__`` method is needed because the array is fully initialized
after the ``__new__`` method.
Examples
--------
These examples illustrate the low-level `ndarray` constructor. Refer
to the `See Also` section above for easier ways of constructing an
ndarray.
First mode, `buffer` is None:
>>> np.ndarray(shape=(2,2), dtype=float, order='F')
array([[ -1.13698227e+002, 4.25087011e-303],
[ 2.88528414e-306, 3.27025015e-309]]) #random
Second mode:
>>> np.ndarray((2,), buffer=np.array([1,2,3]),
... offset=np.int_().itemsize,
... dtype=int) # offset = 1*itemsize, i.e. skip first element
array([2, 3])
""")
##############################################################################
#
# ndarray attributes
#
##############################################################################
add_newdoc('numpy.core.multiarray', 'ndarray', ('__array_interface__',
"""Array protocol: Python side."""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('__array_finalize__',
"""None."""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('__array_priority__',
"""Array priority."""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('__array_struct__',
"""Array protocol: C-struct side."""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('_as_parameter_',
"""Allow the array to be interpreted as a ctypes object by returning the
data-memory location as an integer
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('base',
"""
Base object if memory is from some other object.
Examples
--------
The base of an array that owns its memory is None:
>>> x = np.array([1,2,3,4])
>>> x.base is None
True
Slicing creates a view, whose memory is shared with x:
>>> y = x[2:]
>>> y.base is x
True
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('ctypes',
"""
An object to simplify the interaction of the array with the ctypes
module.
This attribute creates an object that makes it easier to use arrays
when calling shared libraries with the ctypes module. The returned
object has, among others, data, shape, and strides attributes (see
Notes below) which themselves return ctypes objects that can be used
as arguments to a shared library.
Parameters
----------
None
Returns
-------
c : Python object
Possessing attributes data, shape, strides, etc.
See Also
--------
numpy.ctypeslib
Notes
-----
Below are the public attributes of this object which were documented
in "Guide to NumPy" (we have omitted undocumented public attributes,
as well as documented private attributes):
* data: A pointer to the memory area of the array as a Python integer.
This memory area may contain data that is not aligned, or not in correct
byte-order. The memory area may not even be writeable. The array
flags and data-type of this array should be respected when passing this
attribute to arbitrary C-code to avoid trouble that can include Python
crashing. User Beware! The value of this attribute is exactly the same
as self._array_interface_['data'][0].
* shape (c_intp*self.ndim): A ctypes array of length self.ndim where
the basetype is the C-integer corresponding to dtype('p') on this
platform. This base-type could be c_int, c_long, or c_longlong
depending on the platform. The c_intp type is defined accordingly in
numpy.ctypeslib. The ctypes array contains the shape of the underlying
array.
* strides (c_intp*self.ndim): A ctypes array of length self.ndim where
the basetype is the same as for the shape attribute. This ctypes array
contains the strides information from the underlying array. This strides
information is important for showing how many bytes must be jumped to
get to the next element in the array.
* data_as(obj): Return the data pointer cast to a particular c-types object.
For example, calling self._as_parameter_ is equivalent to
self.data_as(ctypes.c_void_p). Perhaps you want to use the data as a
pointer to a ctypes array of floating-point data:
self.data_as(ctypes.POINTER(ctypes.c_double)).
* shape_as(obj): Return the shape tuple as an array of some other c-types
type. For example: self.shape_as(ctypes.c_short).
* strides_as(obj): Return the strides tuple as an array of some other
c-types type. For example: self.strides_as(ctypes.c_longlong).
Be careful using the ctypes attribute - especially on temporary
arrays or arrays constructed on the fly. For example, calling
``(a+b).ctypes.data_as(ctypes.c_void_p)`` returns a pointer to memory
that is invalid because the array created as (a+b) is deallocated
before the next Python statement. You can avoid this problem using
either ``c=a+b`` or ``ct=(a+b).ctypes``. In the latter case, ct will
hold a reference to the array until ct is deleted or re-assigned.
If the ctypes module is not available, then the ctypes attribute
of array objects still returns something useful, but ctypes objects
are not returned and errors may be raised instead. In particular,
the object will still have the as parameter attribute which will
return an integer equal to the data attribute.
Examples
--------
>>> import ctypes
>>> x
array([[0, 1],
[2, 3]])
>>> x.ctypes.data
30439712
>>> x.ctypes.data_as(ctypes.POINTER(ctypes.c_long))
<ctypes.LP_c_long object at 0x01F01300>
>>> x.ctypes.data_as(ctypes.POINTER(ctypes.c_long)).contents
c_long(0)
>>> x.ctypes.data_as(ctypes.POINTER(ctypes.c_longlong)).contents
c_longlong(4294967296L)
>>> x.ctypes.shape
<numpy.core._internal.c_long_Array_2 object at 0x01FFD580>
>>> x.ctypes.shape_as(ctypes.c_long)
<numpy.core._internal.c_long_Array_2 object at 0x01FCE620>
>>> x.ctypes.strides
<numpy.core._internal.c_long_Array_2 object at 0x01FCE620>
>>> x.ctypes.strides_as(ctypes.c_longlong)
<numpy.core._internal.c_longlong_Array_2 object at 0x01F01300>
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('data',
"""Python buffer object pointing to the start of the array's data."""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('dtype',
"""
Data-type of the array's elements.
Parameters
----------
None
Returns
-------
d : numpy dtype object
See Also
--------
numpy.dtype
Examples
--------
>>> x
array([[0, 1],
[2, 3]])
>>> x.dtype
dtype('int32')
>>> type(x.dtype)
<type 'numpy.dtype'>
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('imag',
"""
The imaginary part of the array.
Examples
--------
>>> x = np.sqrt([1+0j, 0+1j])
>>> x.imag
array([ 0. , 0.70710678])
>>> x.imag.dtype
dtype('float64')
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('itemsize',
"""
Length of one array element in bytes.
Examples
--------
>>> x = np.array([1,2,3], dtype=np.float64)
>>> x.itemsize
8
>>> x = np.array([1,2,3], dtype=np.complex128)
>>> x.itemsize
16
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('flags',
"""
Information about the memory layout of the array.
Attributes
----------
C_CONTIGUOUS (C)
The data is in a single, C-style contiguous segment.
F_CONTIGUOUS (F)
The data is in a single, Fortran-style contiguous segment.
OWNDATA (O)
The array owns the memory it uses or borrows it from another object.
WRITEABLE (W)
The data area can be written to. Setting this to False locks
the data, making it read-only. A view (slice, etc.) inherits WRITEABLE
from its base array at creation time, but a view of a writeable
array may be subsequently locked while the base array remains writeable.
(The opposite is not true, in that a view of a locked array may not
be made writeable. However, currently, locking a base object does not
lock any views that already reference it, so under that circumstance it
is possible to alter the contents of a locked array via a previously
created writeable view onto it.) Attempting to change a non-writeable
array raises a RuntimeError exception.
ALIGNED (A)
The data and all elements are aligned appropriately for the hardware.
UPDATEIFCOPY (U)
This array is a copy of some other array. When this array is
deallocated, the base array will be updated with the contents of
this array.
FNC
F_CONTIGUOUS and not C_CONTIGUOUS.
FORC
F_CONTIGUOUS or C_CONTIGUOUS (one-segment test).
BEHAVED (B)
ALIGNED and WRITEABLE.
CARRAY (CA)
BEHAVED and C_CONTIGUOUS.
FARRAY (FA)
BEHAVED and F_CONTIGUOUS and not C_CONTIGUOUS.
Notes
-----
The `flags` object can be accessed dictionary-like (as in ``a.flags['WRITEABLE']``),
or by using lowercased attribute names (as in ``a.flags.writeable``). Short flag
names are only supported in dictionary access.
Only the UPDATEIFCOPY, WRITEABLE, and ALIGNED flags can be changed by
the user, via direct assignment to the attribute or dictionary entry,
or by calling `ndarray.setflags`.
The array flags cannot be set arbitrarily:
- UPDATEIFCOPY can only be set ``False``.
- ALIGNED can only be set ``True`` if the data is truly aligned.
- WRITEABLE can only be set ``True`` if the array owns its own memory
or the ultimate owner of the memory exposes a writeable buffer
interface or is a string.
Arrays can be both C-style and Fortran-style contiguous simultaneously.
This is clear for 1-dimensional arrays, but can also be true for higher
dimensional arrays.
Even for contiguous arrays a stride for a given dimension
``arr.strides[dim]`` may be *arbitrary* if ``arr.shape[dim] == 1``
or the array has no elements.
It does *not* generally hold that ``self.strides[-1] == self.itemsize``
for C-style contiguous arrays or ``self.strides[0] == self.itemsize`` for
Fortran-style contiguous arrays is true.
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('flat',
"""
A 1-D iterator over the array.
This is a `numpy.flatiter` instance, which acts similarly to, but is not
a subclass of, Python's built-in iterator object.
See Also
--------
flatten : Return a copy of the array collapsed into one dimension.
flatiter
Examples
--------
>>> x = np.arange(1, 7).reshape(2, 3)
>>> x
array([[1, 2, 3],
[4, 5, 6]])
>>> x.flat[3]
4
>>> x.T
array([[1, 4],
[2, 5],
[3, 6]])
>>> x.T.flat[3]
5
>>> type(x.flat)
<type 'numpy.flatiter'>
An assignment example:
>>> x.flat = 3; x
array([[3, 3, 3],
[3, 3, 3]])
>>> x.flat[[1,4]] = 1; x
array([[3, 1, 3],
[3, 1, 3]])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('nbytes',
"""
Total bytes consumed by the elements of the array.
Notes
-----
Does not include memory consumed by non-element attributes of the
array object.
Examples
--------
>>> x = np.zeros((3,5,2), dtype=np.complex128)
>>> x.nbytes
480
>>> np.prod(x.shape) * x.itemsize
480
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('ndim',
"""
Number of array dimensions.
Examples
--------
>>> x = np.array([1, 2, 3])
>>> x.ndim
1
>>> y = np.zeros((2, 3, 4))
>>> y.ndim
3
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('real',
"""
The real part of the array.
Examples
--------
>>> x = np.sqrt([1+0j, 0+1j])
>>> x.real
array([ 1. , 0.70710678])
>>> x.real.dtype
dtype('float64')
See Also
--------
numpy.real : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('shape',
"""
Tuple of array dimensions.
Notes
-----
May be used to "reshape" the array, as long as this would not
require a change in the total number of elements
Examples
--------
>>> x = np.array([1, 2, 3, 4])
>>> x.shape
(4,)
>>> y = np.zeros((2, 3, 4))
>>> y.shape
(2, 3, 4)
>>> y.shape = (3, 8)
>>> y
array([[ 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0.]])
>>> y.shape = (3, 6)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: total size of new array must be unchanged
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('size',
"""
Number of elements in the array.
Equivalent to ``np.prod(a.shape)``, i.e., the product of the array's
dimensions.
Examples
--------
>>> x = np.zeros((3, 5, 2), dtype=np.complex128)
>>> x.size
30
>>> np.prod(x.shape)
30
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('strides',
"""
Tuple of bytes to step in each dimension when traversing an array.
The byte offset of element ``(i[0], i[1], ..., i[n])`` in an array `a`
is::
offset = sum(np.array(i) * a.strides)
A more detailed explanation of strides can be found in the
"ndarray.rst" file in the NumPy reference guide.
Notes
-----
Imagine an array of 32-bit integers (each 4 bytes)::
x = np.array([[0, 1, 2, 3, 4],
[5, 6, 7, 8, 9]], dtype=np.int32)
This array is stored in memory as 40 bytes, one after the other
(known as a contiguous block of memory). The strides of an array tell
us how many bytes we have to skip in memory to move to the next position
along a certain axis. For example, we have to skip 4 bytes (1 value) to
move to the next column, but 20 bytes (5 values) to get to the same
position in the next row. As such, the strides for the array `x` will be
``(20, 4)``.
See Also
--------
numpy.lib.stride_tricks.as_strided
Examples
--------
>>> y = np.reshape(np.arange(2*3*4), (2,3,4))
>>> y
array([[[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11]],
[[12, 13, 14, 15],
[16, 17, 18, 19],
[20, 21, 22, 23]]])
>>> y.strides
(48, 16, 4)
>>> y[1,1,1]
17
>>> offset=sum(y.strides * np.array((1,1,1)))
>>> offset/y.itemsize
17
>>> x = np.reshape(np.arange(5*6*7*8), (5,6,7,8)).transpose(2,3,1,0)
>>> x.strides
(32, 4, 224, 1344)
>>> i = np.array([3,5,2,2])
>>> offset = sum(i * x.strides)
>>> x[3,5,2,2]
813
>>> offset / x.itemsize
813
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('T',
"""
Same as self.transpose(), except that self is returned if
self.ndim < 2.
Examples
--------
>>> x = np.array([[1.,2.],[3.,4.]])
>>> x
array([[ 1., 2.],
[ 3., 4.]])
>>> x.T
array([[ 1., 3.],
[ 2., 4.]])
>>> x = np.array([1.,2.,3.,4.])
>>> x
array([ 1., 2., 3., 4.])
>>> x.T
array([ 1., 2., 3., 4.])
"""))
##############################################################################
#
# ndarray methods
#
##############################################################################
add_newdoc('numpy.core.multiarray', 'ndarray', ('__array__',
""" a.__array__(|dtype) -> reference if type unchanged, copy otherwise.
Returns either a new reference to self if dtype is not given or a new array
of provided data type if dtype is different from the current dtype of the
array.
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('__array_prepare__',
"""a.__array_prepare__(obj) -> Object of same type as ndarray object obj.
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('__array_wrap__',
"""a.__array_wrap__(obj) -> Object of same type as ndarray object a.
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('__copy__',
"""a.__copy__([order])
Return a copy of the array.
Parameters
----------
order : {'C', 'F', 'A'}, optional
If order is 'C' (False) then the result is contiguous (default).
If order is 'Fortran' (True) then the result has fortran order.
If order is 'Any' (None) then the result has fortran order
only if the array already is in fortran order.
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('__deepcopy__',
"""a.__deepcopy__() -> Deep copy of array.
Used if copy.deepcopy is called on an array.
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('__reduce__',
"""a.__reduce__()
For pickling.
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('__setstate__',
"""a.__setstate__(version, shape, dtype, isfortran, rawdata)
For unpickling.
Parameters
----------
version : int
optional pickle version. If omitted defaults to 0.
shape : tuple
dtype : data-type
isFortran : bool
rawdata : string or list
a binary string with the data (or a list if 'a' is an object array)
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('all',
"""
a.all(axis=None, out=None, keepdims=False)
Returns True if all elements evaluate to True.
Refer to `numpy.all` for full documentation.
See Also
--------
numpy.all : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('any',
"""
a.any(axis=None, out=None, keepdims=False)
Returns True if any of the elements of `a` evaluate to True.
Refer to `numpy.any` for full documentation.
See Also
--------
numpy.any : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('argmax',
"""
a.argmax(axis=None, out=None)
Return indices of the maximum values along the given axis.
Refer to `numpy.argmax` for full documentation.
See Also
--------
numpy.argmax : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('argmin',
"""
a.argmin(axis=None, out=None)
Return indices of the minimum values along the given axis of `a`.
Refer to `numpy.argmin` for detailed documentation.
See Also
--------
numpy.argmin : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('argsort',
"""
a.argsort(axis=-1, kind='quicksort', order=None)
Returns the indices that would sort this array.
Refer to `numpy.argsort` for full documentation.
See Also
--------
numpy.argsort : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('argpartition',
"""
a.argpartition(kth, axis=-1, kind='introselect', order=None)
Returns the indices that would partition this array.
Refer to `numpy.argpartition` for full documentation.
.. versionadded:: 1.8.0
See Also
--------
numpy.argpartition : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('astype',
"""
a.astype(dtype, order='K', casting='unsafe', subok=True, copy=True)
Copy of the array, cast to a specified type.
Parameters
----------
dtype : str or dtype
Typecode or data-type to which the array is cast.
order : {'C', 'F', 'A', 'K'}, optional
Controls the memory layout order of the result.
'C' means C order, 'F' means Fortran order, 'A'
means 'F' order if all the arrays are Fortran contiguous,
'C' order otherwise, and 'K' means as close to the
order the array elements appear in memory as possible.
Default is 'K'.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
Controls what kind of data casting may occur. Defaults to 'unsafe'
for backwards compatibility.
* 'no' means the data types should not be cast at all.
* 'equiv' means only byte-order changes are allowed.
* 'safe' means only casts which can preserve values are allowed.
* 'same_kind' means only safe casts or casts within a kind,
like float64 to float32, are allowed.
* 'unsafe' means any data conversions may be done.
subok : bool, optional
If True, then sub-classes will be passed-through (default), otherwise
the returned array will be forced to be a base-class array.
copy : bool, optional
By default, astype always returns a newly allocated array. If this
is set to false, and the `dtype`, `order`, and `subok`
requirements are satisfied, the input array is returned instead
of a copy.
Returns
-------
arr_t : ndarray
Unless `copy` is False and the other conditions for returning the input
array are satisfied (see description for `copy` input parameter), `arr_t`
is a new array of the same shape as the input array, with dtype, order
given by `dtype`, `order`.
Notes
-----
Starting in NumPy 1.9, astype method now returns an error if the string
dtype to cast to is not long enough in 'safe' casting mode to hold the max
value of integer/float array that is being casted. Previously the casting
was allowed even if the result was truncated.
Raises
------
ComplexWarning
When casting from complex to float or int. To avoid this,
one should use ``a.real.astype(t)``.
Examples
--------
>>> x = np.array([1, 2, 2.5])
>>> x
array([ 1. , 2. , 2.5])
>>> x.astype(int)
array([1, 2, 2])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('byteswap',
"""
a.byteswap(inplace)
Swap the bytes of the array elements
Toggle between low-endian and big-endian data representation by
returning a byteswapped array, optionally swapped in-place.
Parameters
----------
inplace : bool, optional
If ``True``, swap bytes in-place, default is ``False``.
Returns
-------
out : ndarray
The byteswapped array. If `inplace` is ``True``, this is
a view to self.
Examples
--------
>>> A = np.array([1, 256, 8755], dtype=np.int16)
>>> map(hex, A)
['0x1', '0x100', '0x2233']
>>> A.byteswap(True)
array([ 256, 1, 13090], dtype=int16)
>>> map(hex, A)
['0x100', '0x1', '0x3322']
Arrays of strings are not swapped
>>> A = np.array(['ceg', 'fac'])
>>> A.byteswap()
array(['ceg', 'fac'],
dtype='|S3')
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('choose',
"""
a.choose(choices, out=None, mode='raise')
Use an index array to construct a new array from a set of choices.
Refer to `numpy.choose` for full documentation.
See Also
--------
numpy.choose : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('clip',
"""
a.clip(min=None, max=None, out=None)
Return an array whose values are limited to ``[min, max]``.
One of max or min must be given.
Refer to `numpy.clip` for full documentation.
See Also
--------
numpy.clip : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('compress',
"""
a.compress(condition, axis=None, out=None)
Return selected slices of this array along given axis.
Refer to `numpy.compress` for full documentation.
See Also
--------
numpy.compress : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('conj',
"""
a.conj()
Complex-conjugate all elements.
Refer to `numpy.conjugate` for full documentation.
See Also
--------
numpy.conjugate : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('conjugate',
"""
a.conjugate()
Return the complex conjugate, element-wise.
Refer to `numpy.conjugate` for full documentation.
See Also
--------
numpy.conjugate : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('copy',
"""
a.copy(order='C')
Return a copy of the array.
Parameters
----------
order : {'C', 'F', 'A', 'K'}, optional
Controls the memory layout of the copy. 'C' means C-order,
'F' means F-order, 'A' means 'F' if `a` is Fortran contiguous,
'C' otherwise. 'K' means match the layout of `a` as closely
as possible. (Note that this function and :func:numpy.copy are very
similar, but have different default values for their order=
arguments.)
See also
--------
numpy.copy
numpy.copyto
Examples
--------
>>> x = np.array([[1,2,3],[4,5,6]], order='F')
>>> y = x.copy()
>>> x.fill(0)
>>> x
array([[0, 0, 0],
[0, 0, 0]])
>>> y
array([[1, 2, 3],
[4, 5, 6]])
>>> y.flags['C_CONTIGUOUS']
True
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('cumprod',
"""
a.cumprod(axis=None, dtype=None, out=None)
Return the cumulative product of the elements along the given axis.
Refer to `numpy.cumprod` for full documentation.
See Also
--------
numpy.cumprod : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('cumsum',
"""
a.cumsum(axis=None, dtype=None, out=None)
Return the cumulative sum of the elements along the given axis.
Refer to `numpy.cumsum` for full documentation.
See Also
--------
numpy.cumsum : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('diagonal',
"""
a.diagonal(offset=0, axis1=0, axis2=1)
Return specified diagonals. In NumPy 1.9 the returned array is a
read-only view instead of a copy as in previous NumPy versions. In
NumPy 1.10 the read-only restriction will be removed.
Refer to :func:`numpy.diagonal` for full documentation.
See Also
--------
numpy.diagonal : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('dot',
"""
a.dot(b, out=None)
Dot product of two arrays.
Refer to `numpy.dot` for full documentation.
See Also
--------
numpy.dot : equivalent function
Examples
--------
>>> a = np.eye(2)
>>> b = np.ones((2, 2)) * 2
>>> a.dot(b)
array([[ 2., 2.],
[ 2., 2.]])
This array method can be conveniently chained:
>>> a.dot(b).dot(b)
array([[ 8., 8.],
[ 8., 8.]])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('dump',
"""a.dump(file)
Dump a pickle of the array to the specified file.
The array can be read back with pickle.load or numpy.load.
Parameters
----------
file : str
A string naming the dump file.
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('dumps',
"""
a.dumps()
Returns the pickle of the array as a string.
pickle.loads or numpy.loads will convert the string back to an array.
Parameters
----------
None
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('fill',
"""
a.fill(value)
Fill the array with a scalar value.
Parameters
----------
value : scalar
All elements of `a` will be assigned this value.
Examples
--------
>>> a = np.array([1, 2])
>>> a.fill(0)
>>> a
array([0, 0])
>>> a = np.empty(2)
>>> a.fill(1)
>>> a
array([ 1., 1.])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('flatten',
"""
a.flatten(order='C')
Return a copy of the array collapsed into one dimension.
Parameters
----------
order : {'C', 'F', 'A', 'K'}, optional
'C' means to flatten in row-major (C-style) order.
'F' means to flatten in column-major (Fortran-
style) order. 'A' means to flatten in column-major
order if `a` is Fortran *contiguous* in memory,
row-major order otherwise. 'K' means to flatten
`a` in the order the elements occur in memory.
The default is 'C'.
Returns
-------
y : ndarray
A copy of the input array, flattened to one dimension.
See Also
--------
ravel : Return a flattened array.
flat : A 1-D flat iterator over the array.
Examples
--------
>>> a = np.array([[1,2], [3,4]])
>>> a.flatten()
array([1, 2, 3, 4])
>>> a.flatten('F')
array([1, 3, 2, 4])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('getfield',
"""
a.getfield(dtype, offset=0)
Returns a field of the given array as a certain type.
A field is a view of the array data with a given data-type. The values in
the view are determined by the given type and the offset into the current
array in bytes. The offset needs to be such that the view dtype fits in the
array dtype; for example an array of dtype complex128 has 16-byte elements.
If taking a view with a 32-bit integer (4 bytes), the offset needs to be
between 0 and 12 bytes.
Parameters
----------
dtype : str or dtype
The data type of the view. The dtype size of the view can not be larger
than that of the array itself.
offset : int
Number of bytes to skip before beginning the element view.
Examples
--------
>>> x = np.diag([1.+1.j]*2)
>>> x[1, 1] = 2 + 4.j
>>> x
array([[ 1.+1.j, 0.+0.j],
[ 0.+0.j, 2.+4.j]])
>>> x.getfield(np.float64)
array([[ 1., 0.],
[ 0., 2.]])
By choosing an offset of 8 bytes we can select the complex part of the
array for our view:
>>> x.getfield(np.float64, offset=8)
array([[ 1., 0.],
[ 0., 4.]])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('item',
"""
a.item(*args)
Copy an element of an array to a standard Python scalar and return it.
Parameters
----------
\\*args : Arguments (variable number and type)
* none: in this case, the method only works for arrays
with one element (`a.size == 1`), which element is
copied into a standard Python scalar object and returned.
* int_type: this argument is interpreted as a flat index into
the array, specifying which element to copy and return.
* tuple of int_types: functions as does a single int_type argument,
except that the argument is interpreted as an nd-index into the
array.
Returns
-------
z : Standard Python scalar object
A copy of the specified element of the array as a suitable
Python scalar
Notes
-----
When the data type of `a` is longdouble or clongdouble, item() returns
a scalar array object because there is no available Python scalar that
would not lose information. Void arrays return a buffer object for item(),
unless fields are defined, in which case a tuple is returned.
`item` is very similar to a[args], except, instead of an array scalar,
a standard Python scalar is returned. This can be useful for speeding up
access to elements of the array and doing arithmetic on elements of the
array using Python's optimized math.
Examples
--------
>>> x = np.random.randint(9, size=(3, 3))
>>> x
array([[3, 1, 7],
[2, 8, 3],
[8, 5, 3]])
>>> x.item(3)
2
>>> x.item(7)
5
>>> x.item((0, 1))
1
>>> x.item((2, 2))
3
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('itemset',
"""
a.itemset(*args)
Insert scalar into an array (scalar is cast to array's dtype, if possible)
There must be at least 1 argument, and define the last argument
as *item*. Then, ``a.itemset(*args)`` is equivalent to but faster
than ``a[args] = item``. The item should be a scalar value and `args`
must select a single item in the array `a`.
Parameters
----------
\*args : Arguments
If one argument: a scalar, only used in case `a` is of size 1.
If two arguments: the last argument is the value to be set
and must be a scalar, the first argument specifies a single array
element location. It is either an int or a tuple.
Notes
-----
Compared to indexing syntax, `itemset` provides some speed increase
for placing a scalar into a particular location in an `ndarray`,
if you must do this. However, generally this is discouraged:
among other problems, it complicates the appearance of the code.
Also, when using `itemset` (and `item`) inside a loop, be sure
to assign the methods to a local variable to avoid the attribute
look-up at each loop iteration.
Examples
--------
>>> x = np.random.randint(9, size=(3, 3))
>>> x
array([[3, 1, 7],
[2, 8, 3],
[8, 5, 3]])
>>> x.itemset(4, 0)
>>> x.itemset((2, 2), 9)
>>> x
array([[3, 1, 7],
[2, 0, 3],
[8, 5, 9]])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('max',
"""
a.max(axis=None, out=None)
Return the maximum along a given axis.
Refer to `numpy.amax` for full documentation.
See Also
--------
numpy.amax : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('mean',
"""
a.mean(axis=None, dtype=None, out=None, keepdims=False)
Returns the average of the array elements along given axis.
Refer to `numpy.mean` for full documentation.
See Also
--------
numpy.mean : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('min',
"""
a.min(axis=None, out=None, keepdims=False)
Return the minimum along a given axis.
Refer to `numpy.amin` for full documentation.
See Also
--------
numpy.amin : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'shares_memory',
"""
shares_memory(a, b, max_work=None)
Determine if two arrays share memory
Parameters
----------
a, b : ndarray
Input arrays
max_work : int, optional
Effort to spend on solving the overlap problem (maximum number
of candidate solutions to consider). The following special
values are recognized:
max_work=MAY_SHARE_EXACT (default)
The problem is solved exactly. In this case, the function returns
True only if there is an element shared between the arrays.
max_work=MAY_SHARE_BOUNDS
Only the memory bounds of a and b are checked.
Raises
------
numpy.TooHardError
Exceeded max_work.
Returns
-------
out : bool
See Also
--------
may_share_memory
Examples
--------
>>> np.may_share_memory(np.array([1,2]), np.array([5,8,9]))
False
""")
add_newdoc('numpy.core.multiarray', 'may_share_memory',
"""
may_share_memory(a, b, max_work=None)
Determine if two arrays might share memory
A return of True does not necessarily mean that the two arrays
share any element. It just means that they *might*.
Only the memory bounds of a and b are checked by default.
Parameters
----------
a, b : ndarray
Input arrays
max_work : int, optional
Effort to spend on solving the overlap problem. See
`shares_memory` for details. Default for ``may_share_memory``
is to do a bounds check.
Returns
-------
out : bool
See Also
--------
shares_memory
Examples
--------
>>> np.may_share_memory(np.array([1,2]), np.array([5,8,9]))
False
>>> x = np.zeros([3, 4])
>>> np.may_share_memory(x[:,0], x[:,1])
True
""")
add_newdoc('numpy.core.multiarray', 'ndarray', ('newbyteorder',
"""
arr.newbyteorder(new_order='S')
Return the array with the same data viewed with a different byte order.
Equivalent to::
arr.view(arr.dtype.newbytorder(new_order))
Changes are also made in all fields and sub-arrays of the array data
type.
Parameters
----------
new_order : string, optional
Byte order to force; a value from the byte order specifications
above. `new_order` codes can be any of::
* 'S' - swap dtype from current to opposite endian
* {'<', 'L'} - little endian
* {'>', 'B'} - big endian
* {'=', 'N'} - native order
* {'|', 'I'} - ignore (no change to byte order)
The default value ('S') results in swapping the current
byte order. The code does a case-insensitive check on the first
letter of `new_order` for the alternatives above. For example,
any of 'B' or 'b' or 'biggish' are valid to specify big-endian.
Returns
-------
new_arr : array
New array object with the dtype reflecting given change to the
byte order.
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('nonzero',
"""
a.nonzero()
Return the indices of the elements that are non-zero.
Refer to `numpy.nonzero` for full documentation.
See Also
--------
numpy.nonzero : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('prod',
"""
a.prod(axis=None, dtype=None, out=None, keepdims=False)
Return the product of the array elements over the given axis
Refer to `numpy.prod` for full documentation.
See Also
--------
numpy.prod : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('ptp',
"""
a.ptp(axis=None, out=None)
Peak to peak (maximum - minimum) value along a given axis.
Refer to `numpy.ptp` for full documentation.
See Also
--------
numpy.ptp : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('put',
"""
a.put(indices, values, mode='raise')
Set ``a.flat[n] = values[n]`` for all `n` in indices.
Refer to `numpy.put` for full documentation.
See Also
--------
numpy.put : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'copyto',
"""
copyto(dst, src, casting='same_kind', where=None)
Copies values from one array to another, broadcasting as necessary.
Raises a TypeError if the `casting` rule is violated, and if
`where` is provided, it selects which elements to copy.
.. versionadded:: 1.7.0
Parameters
----------
dst : ndarray
The array into which values are copied.
src : array_like
The array from which values are copied.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
Controls what kind of data casting may occur when copying.
* 'no' means the data types should not be cast at all.
* 'equiv' means only byte-order changes are allowed.
* 'safe' means only casts which can preserve values are allowed.
* 'same_kind' means only safe casts or casts within a kind,
like float64 to float32, are allowed.
* 'unsafe' means any data conversions may be done.
where : array_like of bool, optional
A boolean array which is broadcasted to match the dimensions
of `dst`, and selects elements to copy from `src` to `dst`
wherever it contains the value True.
""")
add_newdoc('numpy.core.multiarray', 'putmask',
"""
putmask(a, mask, values)
Changes elements of an array based on conditional and input values.
Sets ``a.flat[n] = values[n]`` for each n where ``mask.flat[n]==True``.
If `values` is not the same size as `a` and `mask` then it will repeat.
This gives behavior different from ``a[mask] = values``.
Parameters
----------
a : array_like
Target array.
mask : array_like
Boolean mask array. It has to be the same shape as `a`.
values : array_like
Values to put into `a` where `mask` is True. If `values` is smaller
than `a` it will be repeated.
See Also
--------
place, put, take, copyto
Examples
--------
>>> x = np.arange(6).reshape(2, 3)
>>> np.putmask(x, x>2, x**2)
>>> x
array([[ 0, 1, 2],
[ 9, 16, 25]])
If `values` is smaller than `a` it is repeated:
>>> x = np.arange(5)
>>> np.putmask(x, x>1, [-33, -44])
>>> x
array([ 0, 1, -33, -44, -33])
""")
add_newdoc('numpy.core.multiarray', 'ndarray', ('ravel',
"""
a.ravel([order])
Return a flattened array.
Refer to `numpy.ravel` for full documentation.
See Also
--------
numpy.ravel : equivalent function
ndarray.flat : a flat iterator on the array.
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('repeat',
"""
a.repeat(repeats, axis=None)
Repeat elements of an array.
Refer to `numpy.repeat` for full documentation.
See Also
--------
numpy.repeat : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('reshape',
"""
a.reshape(shape, order='C')
Returns an array containing the same data with a new shape.
Refer to `numpy.reshape` for full documentation.
See Also
--------
numpy.reshape : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('resize',
"""
a.resize(new_shape, refcheck=True)
Change shape and size of array in-place.
Parameters
----------
new_shape : tuple of ints, or `n` ints
Shape of resized array.
refcheck : bool, optional
If False, reference count will not be checked. Default is True.
Returns
-------
None
Raises
------
ValueError
If `a` does not own its own data or references or views to it exist,
and the data memory must be changed.
SystemError
If the `order` keyword argument is specified. This behaviour is a
bug in NumPy.
See Also
--------
resize : Return a new array with the specified shape.
Notes
-----
This reallocates space for the data area if necessary.
Only contiguous arrays (data elements consecutive in memory) can be
resized.
The purpose of the reference count check is to make sure you
do not use this array as a buffer for another Python object and then
reallocate the memory. However, reference counts can increase in
other ways so if you are sure that you have not shared the memory
for this array with another Python object, then you may safely set
`refcheck` to False.
Examples
--------
Shrinking an array: array is flattened (in the order that the data are
stored in memory), resized, and reshaped:
>>> a = np.array([[0, 1], [2, 3]], order='C')
>>> a.resize((2, 1))
>>> a
array([[0],
[1]])
>>> a = np.array([[0, 1], [2, 3]], order='F')
>>> a.resize((2, 1))
>>> a
array([[0],
[2]])
Enlarging an array: as above, but missing entries are filled with zeros:
>>> b = np.array([[0, 1], [2, 3]])
>>> b.resize(2, 3) # new_shape parameter doesn't have to be a tuple
>>> b
array([[0, 1, 2],
[3, 0, 0]])
Referencing an array prevents resizing...
>>> c = a
>>> a.resize((1, 1))
Traceback (most recent call last):
...
ValueError: cannot resize an array that has been referenced ...
Unless `refcheck` is False:
>>> a.resize((1, 1), refcheck=False)
>>> a
array([[0]])
>>> c
array([[0]])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('round',
"""
a.round(decimals=0, out=None)
Return `a` with each element rounded to the given number of decimals.
Refer to `numpy.around` for full documentation.
See Also
--------
numpy.around : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('searchsorted',
"""
a.searchsorted(v, side='left', sorter=None)
Find indices where elements of v should be inserted in a to maintain order.
For full documentation, see `numpy.searchsorted`
See Also
--------
numpy.searchsorted : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('setfield',
"""
a.setfield(val, dtype, offset=0)
Put a value into a specified place in a field defined by a data-type.
Place `val` into `a`'s field defined by `dtype` and beginning `offset`
bytes into the field.
Parameters
----------
val : object
Value to be placed in field.
dtype : dtype object
Data-type of the field in which to place `val`.
offset : int, optional
The number of bytes into the field at which to place `val`.
Returns
-------
None
See Also
--------
getfield
Examples
--------
>>> x = np.eye(3)
>>> x.getfield(np.float64)
array([[ 1., 0., 0.],
[ 0., 1., 0.],
[ 0., 0., 1.]])
>>> x.setfield(3, np.int32)
>>> x.getfield(np.int32)
array([[3, 3, 3],
[3, 3, 3],
[3, 3, 3]])
>>> x
array([[ 1.00000000e+000, 1.48219694e-323, 1.48219694e-323],
[ 1.48219694e-323, 1.00000000e+000, 1.48219694e-323],
[ 1.48219694e-323, 1.48219694e-323, 1.00000000e+000]])
>>> x.setfield(np.eye(3), np.int32)
>>> x
array([[ 1., 0., 0.],
[ 0., 1., 0.],
[ 0., 0., 1.]])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('setflags',
"""
a.setflags(write=None, align=None, uic=None)
Set array flags WRITEABLE, ALIGNED, and UPDATEIFCOPY, respectively.
These Boolean-valued flags affect how numpy interprets the memory
area used by `a` (see Notes below). The ALIGNED flag can only
be set to True if the data is actually aligned according to the type.
The UPDATEIFCOPY flag can never be set to True. The flag WRITEABLE
can only be set to True if the array owns its own memory, or the
ultimate owner of the memory exposes a writeable buffer interface,
or is a string. (The exception for string is made so that unpickling
can be done without copying memory.)
Parameters
----------
write : bool, optional
Describes whether or not `a` can be written to.
align : bool, optional
Describes whether or not `a` is aligned properly for its type.
uic : bool, optional
Describes whether or not `a` is a copy of another "base" array.
Notes
-----
Array flags provide information about how the memory area used
for the array is to be interpreted. There are 6 Boolean flags
in use, only three of which can be changed by the user:
UPDATEIFCOPY, WRITEABLE, and ALIGNED.
WRITEABLE (W) the data area can be written to;
ALIGNED (A) the data and strides are aligned appropriately for the hardware
(as determined by the compiler);
UPDATEIFCOPY (U) this array is a copy of some other array (referenced
by .base). When this array is deallocated, the base array will be
updated with the contents of this array.
All flags can be accessed using their first (upper case) letter as well
as the full name.
Examples
--------
>>> y
array([[3, 1, 7],
[2, 0, 0],
[8, 5, 9]])
>>> y.flags
C_CONTIGUOUS : True
F_CONTIGUOUS : False
OWNDATA : True
WRITEABLE : True
ALIGNED : True
UPDATEIFCOPY : False
>>> y.setflags(write=0, align=0)
>>> y.flags
C_CONTIGUOUS : True
F_CONTIGUOUS : False
OWNDATA : True
WRITEABLE : False
ALIGNED : False
UPDATEIFCOPY : False
>>> y.setflags(uic=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: cannot set UPDATEIFCOPY flag to True
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('sort',
"""
a.sort(axis=-1, kind='quicksort', order=None)
Sort an array, in-place.
Parameters
----------
axis : int, optional
Axis along which to sort. Default is -1, which means sort along the
last axis.
kind : {'quicksort', 'mergesort', 'heapsort'}, optional
Sorting algorithm. Default is 'quicksort'.
order : str or list of str, optional
When `a` is an array with fields defined, this argument specifies
which fields to compare first, second, etc. A single field can
be specified as a string, and not all fields need be specified,
but unspecified fields will still be used, in the order in which
they come up in the dtype, to break ties.
See Also
--------
numpy.sort : Return a sorted copy of an array.
argsort : Indirect sort.
lexsort : Indirect stable sort on multiple keys.
searchsorted : Find elements in sorted array.
partition: Partial sort.
Notes
-----
See ``sort`` for notes on the different sorting algorithms.
Examples
--------
>>> a = np.array([[1,4], [3,1]])
>>> a.sort(axis=1)
>>> a
array([[1, 4],
[1, 3]])
>>> a.sort(axis=0)
>>> a
array([[1, 3],
[1, 4]])
Use the `order` keyword to specify a field to use when sorting a
structured array:
>>> a = np.array([('a', 2), ('c', 1)], dtype=[('x', 'S1'), ('y', int)])
>>> a.sort(order='y')
>>> a
array([('c', 1), ('a', 2)],
dtype=[('x', '|S1'), ('y', '<i4')])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('partition',
"""
a.partition(kth, axis=-1, kind='introselect', order=None)
Rearranges the elements in the array in such a way that value of the
element in kth position is in the position it would be in a sorted array.
All elements smaller than the kth element are moved before this element and
all equal or greater are moved behind it. The ordering of the elements in
the two partitions is undefined.
.. versionadded:: 1.8.0
Parameters
----------
kth : int or sequence of ints
Element index to partition by. The kth element value will be in its
final sorted position and all smaller elements will be moved before it
and all equal or greater elements behind it.
The order all elements in the partitions is undefined.
If provided with a sequence of kth it will partition all elements
indexed by kth of them into their sorted position at once.
axis : int, optional
Axis along which to sort. Default is -1, which means sort along the
last axis.
kind : {'introselect'}, optional
Selection algorithm. Default is 'introselect'.
order : str or list of str, optional
When `a` is an array with fields defined, this argument specifies
which fields to compare first, second, etc. A single field can
be specified as a string, and not all fields need be specified,
but unspecified fields will still be used, in the order in which
they come up in the dtype, to break ties.
See Also
--------
numpy.partition : Return a parititioned copy of an array.
argpartition : Indirect partition.
sort : Full sort.
Notes
-----
See ``np.partition`` for notes on the different algorithms.
Examples
--------
>>> a = np.array([3, 4, 2, 1])
>>> a.partition(a, 3)
>>> a
array([2, 1, 3, 4])
>>> a.partition((1, 3))
array([1, 2, 3, 4])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('squeeze',
"""
a.squeeze(axis=None)
Remove single-dimensional entries from the shape of `a`.
Refer to `numpy.squeeze` for full documentation.
See Also
--------
numpy.squeeze : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('std',
"""
a.std(axis=None, dtype=None, out=None, ddof=0, keepdims=False)
Returns the standard deviation of the array elements along given axis.
Refer to `numpy.std` for full documentation.
See Also
--------
numpy.std : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('sum',
"""
a.sum(axis=None, dtype=None, out=None, keepdims=False)
Return the sum of the array elements over the given axis.
Refer to `numpy.sum` for full documentation.
See Also
--------
numpy.sum : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('swapaxes',
"""
a.swapaxes(axis1, axis2)
Return a view of the array with `axis1` and `axis2` interchanged.
Refer to `numpy.swapaxes` for full documentation.
See Also
--------
numpy.swapaxes : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('take',
"""
a.take(indices, axis=None, out=None, mode='raise')
Return an array formed from the elements of `a` at the given indices.
Refer to `numpy.take` for full documentation.
See Also
--------
numpy.take : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('tofile',
"""
a.tofile(fid, sep="", format="%s")
Write array to a file as text or binary (default).
Data is always written in 'C' order, independent of the order of `a`.
The data produced by this method can be recovered using the function
fromfile().
Parameters
----------
fid : file or str
An open file object, or a string containing a filename.
sep : str
Separator between array items for text output.
If "" (empty), a binary file is written, equivalent to
``file.write(a.tobytes())``.
format : str
Format string for text file output.
Each entry in the array is formatted to text by first converting
it to the closest Python type, and then using "format" % item.
Notes
-----
This is a convenience function for quick storage of array data.
Information on endianness and precision is lost, so this method is not a
good choice for files intended to archive data or transport data between
machines with different endianness. Some of these problems can be overcome
by outputting the data as text files, at the expense of speed and file
size.
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('tolist',
"""
a.tolist()
Return the array as a (possibly nested) list.
Return a copy of the array data as a (nested) Python list.
Data items are converted to the nearest compatible Python type.
Parameters
----------
none
Returns
-------
y : list
The possibly nested list of array elements.
Notes
-----
The array may be recreated, ``a = np.array(a.tolist())``.
Examples
--------
>>> a = np.array([1, 2])
>>> a.tolist()
[1, 2]
>>> a = np.array([[1, 2], [3, 4]])
>>> list(a)
[array([1, 2]), array([3, 4])]
>>> a.tolist()
[[1, 2], [3, 4]]
"""))
tobytesdoc = """
a.{name}(order='C')
Construct Python bytes containing the raw data bytes in the array.
Constructs Python bytes showing a copy of the raw contents of
data memory. The bytes object can be produced in either 'C' or 'Fortran',
or 'Any' order (the default is 'C'-order). 'Any' order means C-order
unless the F_CONTIGUOUS flag in the array is set, in which case it
means 'Fortran' order.
{deprecated}
Parameters
----------
order : {{'C', 'F', None}}, optional
Order of the data for multidimensional arrays:
C, Fortran, or the same as for the original array.
Returns
-------
s : bytes
Python bytes exhibiting a copy of `a`'s raw data.
Examples
--------
>>> x = np.array([[0, 1], [2, 3]])
>>> x.tobytes()
b'\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x03\\x00\\x00\\x00'
>>> x.tobytes('C') == x.tobytes()
True
>>> x.tobytes('F')
b'\\x00\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x03\\x00\\x00\\x00'
"""
add_newdoc('numpy.core.multiarray', 'ndarray',
('tostring', tobytesdoc.format(name='tostring',
deprecated=
'This function is a compatibility '
'alias for tobytes. Despite its '
'name it returns bytes not '
'strings.')))
add_newdoc('numpy.core.multiarray', 'ndarray',
('tobytes', tobytesdoc.format(name='tobytes',
deprecated='.. versionadded:: 1.9.0')))
add_newdoc('numpy.core.multiarray', 'ndarray', ('trace',
"""
a.trace(offset=0, axis1=0, axis2=1, dtype=None, out=None)
Return the sum along diagonals of the array.
Refer to `numpy.trace` for full documentation.
See Also
--------
numpy.trace : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('transpose',
"""
a.transpose(*axes)
Returns a view of the array with axes transposed.
For a 1-D array, this has no effect. (To change between column and
row vectors, first cast the 1-D array into a matrix object.)
For a 2-D array, this is the usual matrix transpose.
For an n-D array, if axes are given, their order indicates how the
axes are permuted (see Examples). If axes are not provided and
``a.shape = (i[0], i[1], ... i[n-2], i[n-1])``, then
``a.transpose().shape = (i[n-1], i[n-2], ... i[1], i[0])``.
Parameters
----------
axes : None, tuple of ints, or `n` ints
* None or no argument: reverses the order of the axes.
* tuple of ints: `i` in the `j`-th place in the tuple means `a`'s
`i`-th axis becomes `a.transpose()`'s `j`-th axis.
* `n` ints: same as an n-tuple of the same ints (this form is
intended simply as a "convenience" alternative to the tuple form)
Returns
-------
out : ndarray
View of `a`, with axes suitably permuted.
See Also
--------
ndarray.T : Array property returning the array transposed.
Examples
--------
>>> a = np.array([[1, 2], [3, 4]])
>>> a
array([[1, 2],
[3, 4]])
>>> a.transpose()
array([[1, 3],
[2, 4]])
>>> a.transpose((1, 0))
array([[1, 3],
[2, 4]])
>>> a.transpose(1, 0)
array([[1, 3],
[2, 4]])
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('var',
"""
a.var(axis=None, dtype=None, out=None, ddof=0, keepdims=False)
Returns the variance of the array elements, along given axis.
Refer to `numpy.var` for full documentation.
See Also
--------
numpy.var : equivalent function
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('view',
"""
a.view(dtype=None, type=None)
New view of array with the same data.
Parameters
----------
dtype : data-type or ndarray sub-class, optional
Data-type descriptor of the returned view, e.g., float32 or int16. The
default, None, results in the view having the same data-type as `a`.
This argument can also be specified as an ndarray sub-class, which
then specifies the type of the returned object (this is equivalent to
setting the ``type`` parameter).
type : Python type, optional
Type of the returned view, e.g., ndarray or matrix. Again, the
default None results in type preservation.
Notes
-----
``a.view()`` is used two different ways:
``a.view(some_dtype)`` or ``a.view(dtype=some_dtype)`` constructs a view
of the array's memory with a different data-type. This can cause a
reinterpretation of the bytes of memory.
``a.view(ndarray_subclass)`` or ``a.view(type=ndarray_subclass)`` just
returns an instance of `ndarray_subclass` that looks at the same array
(same shape, dtype, etc.) This does not cause a reinterpretation of the
memory.
For ``a.view(some_dtype)``, if ``some_dtype`` has a different number of
bytes per entry than the previous dtype (for example, converting a
regular array to a structured array), then the behavior of the view
cannot be predicted just from the superficial appearance of ``a`` (shown
by ``print(a)``). It also depends on exactly how ``a`` is stored in
memory. Therefore if ``a`` is C-ordered versus fortran-ordered, versus
defined as a slice or transpose, etc., the view may give different
results.
Examples
--------
>>> x = np.array([(1, 2)], dtype=[('a', np.int8), ('b', np.int8)])
Viewing array data using a different type and dtype:
>>> y = x.view(dtype=np.int16, type=np.matrix)
>>> y
matrix([[513]], dtype=int16)
>>> print(type(y))
<class 'numpy.matrixlib.defmatrix.matrix'>
Creating a view on a structured array so it can be used in calculations
>>> x = np.array([(1, 2),(3,4)], dtype=[('a', np.int8), ('b', np.int8)])
>>> xv = x.view(dtype=np.int8).reshape(-1,2)
>>> xv
array([[1, 2],
[3, 4]], dtype=int8)
>>> xv.mean(0)
array([ 2., 3.])
Making changes to the view changes the underlying array
>>> xv[0,1] = 20
>>> print(x)
[(1, 20) (3, 4)]
Using a view to convert an array to a recarray:
>>> z = x.view(np.recarray)
>>> z.a
array([1], dtype=int8)
Views share data:
>>> x[0] = (9, 10)
>>> z[0]
(9, 10)
Views that change the dtype size (bytes per entry) should normally be
avoided on arrays defined by slices, transposes, fortran-ordering, etc.:
>>> x = np.array([[1,2,3],[4,5,6]], dtype=np.int16)
>>> y = x[:, 0:2]
>>> y
array([[1, 2],
[4, 5]], dtype=int16)
>>> y.view(dtype=[('width', np.int16), ('length', np.int16)])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: new type not compatible with array.
>>> z = y.copy()
>>> z.view(dtype=[('width', np.int16), ('length', np.int16)])
array([[(1, 2)],
[(4, 5)]], dtype=[('width', '<i2'), ('length', '<i2')])
"""))
##############################################################################
#
# umath functions
#
##############################################################################
add_newdoc('numpy.core.umath', 'frompyfunc',
"""
frompyfunc(func, nin, nout)
Takes an arbitrary Python function and returns a Numpy ufunc.
Can be used, for example, to add broadcasting to a built-in Python
function (see Examples section).
Parameters
----------
func : Python function object
An arbitrary Python function.
nin : int
The number of input arguments.
nout : int
The number of objects returned by `func`.
Returns
-------
out : ufunc
Returns a Numpy universal function (``ufunc``) object.
Notes
-----
The returned ufunc always returns PyObject arrays.
Examples
--------
Use frompyfunc to add broadcasting to the Python function ``oct``:
>>> oct_array = np.frompyfunc(oct, 1, 1)
>>> oct_array(np.array((10, 30, 100)))
array([012, 036, 0144], dtype=object)
>>> np.array((oct(10), oct(30), oct(100))) # for comparison
array(['012', '036', '0144'],
dtype='|S4')
""")
add_newdoc('numpy.core.umath', 'geterrobj',
"""
geterrobj()
Return the current object that defines floating-point error handling.
The error object contains all information that defines the error handling
behavior in Numpy. `geterrobj` is used internally by the other
functions that get and set error handling behavior (`geterr`, `seterr`,
`geterrcall`, `seterrcall`).
Returns
-------
errobj : list
The error object, a list containing three elements:
[internal numpy buffer size, error mask, error callback function].
The error mask is a single integer that holds the treatment information
on all four floating point errors. The information for each error type
is contained in three bits of the integer. If we print it in base 8, we
can see what treatment is set for "invalid", "under", "over", and
"divide" (in that order). The printed string can be interpreted with
* 0 : 'ignore'
* 1 : 'warn'
* 2 : 'raise'
* 3 : 'call'
* 4 : 'print'
* 5 : 'log'
See Also
--------
seterrobj, seterr, geterr, seterrcall, geterrcall
getbufsize, setbufsize
Notes
-----
For complete documentation of the types of floating-point exceptions and
treatment options, see `seterr`.
Examples
--------
>>> np.geterrobj() # first get the defaults
[10000, 0, None]
>>> def err_handler(type, flag):
... print("Floating point error (%s), with flag %s" % (type, flag))
...
>>> old_bufsize = np.setbufsize(20000)
>>> old_err = np.seterr(divide='raise')
>>> old_handler = np.seterrcall(err_handler)
>>> np.geterrobj()
[20000, 2, <function err_handler at 0x91dcaac>]
>>> old_err = np.seterr(all='ignore')
>>> np.base_repr(np.geterrobj()[1], 8)
'0'
>>> old_err = np.seterr(divide='warn', over='log', under='call',
invalid='print')
>>> np.base_repr(np.geterrobj()[1], 8)
'4351'
""")
add_newdoc('numpy.core.umath', 'seterrobj',
"""
seterrobj(errobj)
Set the object that defines floating-point error handling.
The error object contains all information that defines the error handling
behavior in Numpy. `seterrobj` is used internally by the other
functions that set error handling behavior (`seterr`, `seterrcall`).
Parameters
----------
errobj : list
The error object, a list containing three elements:
[internal numpy buffer size, error mask, error callback function].
The error mask is a single integer that holds the treatment information
on all four floating point errors. The information for each error type
is contained in three bits of the integer. If we print it in base 8, we
can see what treatment is set for "invalid", "under", "over", and
"divide" (in that order). The printed string can be interpreted with
* 0 : 'ignore'
* 1 : 'warn'
* 2 : 'raise'
* 3 : 'call'
* 4 : 'print'
* 5 : 'log'
See Also
--------
geterrobj, seterr, geterr, seterrcall, geterrcall
getbufsize, setbufsize
Notes
-----
For complete documentation of the types of floating-point exceptions and
treatment options, see `seterr`.
Examples
--------
>>> old_errobj = np.geterrobj() # first get the defaults
>>> old_errobj
[10000, 0, None]
>>> def err_handler(type, flag):
... print("Floating point error (%s), with flag %s" % (type, flag))
...
>>> new_errobj = [20000, 12, err_handler]
>>> np.seterrobj(new_errobj)
>>> np.base_repr(12, 8) # int for divide=4 ('print') and over=1 ('warn')
'14'
>>> np.geterr()
{'over': 'warn', 'divide': 'print', 'invalid': 'ignore', 'under': 'ignore'}
>>> np.geterrcall() is err_handler
True
""")
##############################################################################
#
# compiled_base functions
#
##############################################################################
add_newdoc('numpy.core.multiarray', 'digitize',
"""
digitize(x, bins, right=False)
Return the indices of the bins to which each value in input array belongs.
Each index ``i`` returned is such that ``bins[i-1] <= x < bins[i]`` if
`bins` is monotonically increasing, or ``bins[i-1] > x >= bins[i]`` if
`bins` is monotonically decreasing. If values in `x` are beyond the
bounds of `bins`, 0 or ``len(bins)`` is returned as appropriate. If right
is True, then the right bin is closed so that the index ``i`` is such
that ``bins[i-1] < x <= bins[i]`` or bins[i-1] >= x > bins[i]`` if `bins`
is monotonically increasing or decreasing, respectively.
Parameters
----------
x : array_like
Input array to be binned. Prior to Numpy 1.10.0, this array had to
be 1-dimensional, but can now have any shape.
bins : array_like
Array of bins. It has to be 1-dimensional and monotonic.
right : bool, optional
Indicating whether the intervals include the right or the left bin
edge. Default behavior is (right==False) indicating that the interval
does not include the right edge. The left bin end is open in this
case, i.e., bins[i-1] <= x < bins[i] is the default behavior for
monotonically increasing bins.
Returns
-------
out : ndarray of ints
Output array of indices, of same shape as `x`.
Raises
------
ValueError
If `bins` is not monotonic.
TypeError
If the type of the input is complex.
See Also
--------
bincount, histogram, unique
Notes
-----
If values in `x` are such that they fall outside the bin range,
attempting to index `bins` with the indices that `digitize` returns
will result in an IndexError.
.. versionadded:: 1.10.0
`np.digitize` is implemented in terms of `np.searchsorted`. This means
that a binary search is used to bin the values, which scales much better
for larger number of bins than the previous linear search. It also removes
the requirement for the input array to be 1-dimensional.
Examples
--------
>>> x = np.array([0.2, 6.4, 3.0, 1.6])
>>> bins = np.array([0.0, 1.0, 2.5, 4.0, 10.0])
>>> inds = np.digitize(x, bins)
>>> inds
array([1, 4, 3, 2])
>>> for n in range(x.size):
... print(bins[inds[n]-1], "<=", x[n], "<", bins[inds[n]])
...
0.0 <= 0.2 < 1.0
4.0 <= 6.4 < 10.0
2.5 <= 3.0 < 4.0
1.0 <= 1.6 < 2.5
>>> x = np.array([1.2, 10.0, 12.4, 15.5, 20.])
>>> bins = np.array([0, 5, 10, 15, 20])
>>> np.digitize(x,bins,right=True)
array([1, 2, 3, 4, 4])
>>> np.digitize(x,bins,right=False)
array([1, 3, 3, 4, 5])
""")
add_newdoc('numpy.core.multiarray', 'bincount',
"""
bincount(x, weights=None, minlength=None)
Count number of occurrences of each value in array of non-negative ints.
The number of bins (of size 1) is one larger than the largest value in
`x`. If `minlength` is specified, there will be at least this number
of bins in the output array (though it will be longer if necessary,
depending on the contents of `x`).
Each bin gives the number of occurrences of its index value in `x`.
If `weights` is specified the input array is weighted by it, i.e. if a
value ``n`` is found at position ``i``, ``out[n] += weight[i]`` instead
of ``out[n] += 1``.
Parameters
----------
x : array_like, 1 dimension, nonnegative ints
Input array.
weights : array_like, optional
Weights, array of the same shape as `x`.
minlength : int, optional
A minimum number of bins for the output array.
.. versionadded:: 1.6.0
Returns
-------
out : ndarray of ints
The result of binning the input array.
The length of `out` is equal to ``np.amax(x)+1``.
Raises
------
ValueError
If the input is not 1-dimensional, or contains elements with negative
values, or if `minlength` is non-positive.
TypeError
If the type of the input is float or complex.
See Also
--------
histogram, digitize, unique
Examples
--------
>>> np.bincount(np.arange(5))
array([1, 1, 1, 1, 1])
>>> np.bincount(np.array([0, 1, 1, 3, 2, 1, 7]))
array([1, 3, 1, 1, 0, 0, 0, 1])
>>> x = np.array([0, 1, 1, 3, 2, 1, 7, 23])
>>> np.bincount(x).size == np.amax(x)+1
True
The input array needs to be of integer dtype, otherwise a
TypeError is raised:
>>> np.bincount(np.arange(5, dtype=np.float))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: array cannot be safely cast to required type
A possible use of ``bincount`` is to perform sums over
variable-size chunks of an array, using the ``weights`` keyword.
>>> w = np.array([0.3, 0.5, 0.2, 0.7, 1., -0.6]) # weights
>>> x = np.array([0, 1, 1, 2, 2, 2])
>>> np.bincount(x, weights=w)
array([ 0.3, 0.7, 1.1])
""")
add_newdoc('numpy.core.multiarray', 'ravel_multi_index',
"""
ravel_multi_index(multi_index, dims, mode='raise', order='C')
Converts a tuple of index arrays into an array of flat
indices, applying boundary modes to the multi-index.
Parameters
----------
multi_index : tuple of array_like
A tuple of integer arrays, one array for each dimension.
dims : tuple of ints
The shape of array into which the indices from ``multi_index`` apply.
mode : {'raise', 'wrap', 'clip'}, optional
Specifies how out-of-bounds indices are handled. Can specify
either one mode or a tuple of modes, one mode per index.
* 'raise' -- raise an error (default)
* 'wrap' -- wrap around
* 'clip' -- clip to the range
In 'clip' mode, a negative index which would normally
wrap will clip to 0 instead.
order : {'C', 'F'}, optional
Determines whether the multi-index should be viewed as
indexing in row-major (C-style) or column-major
(Fortran-style) order.
Returns
-------
raveled_indices : ndarray
An array of indices into the flattened version of an array
of dimensions ``dims``.
See Also
--------
unravel_index
Notes
-----
.. versionadded:: 1.6.0
Examples
--------
>>> arr = np.array([[3,6,6],[4,5,1]])
>>> np.ravel_multi_index(arr, (7,6))
array([22, 41, 37])
>>> np.ravel_multi_index(arr, (7,6), order='F')
array([31, 41, 13])
>>> np.ravel_multi_index(arr, (4,6), mode='clip')
array([22, 23, 19])
>>> np.ravel_multi_index(arr, (4,4), mode=('clip','wrap'))
array([12, 13, 13])
>>> np.ravel_multi_index((3,1,4,1), (6,7,8,9))
1621
""")
add_newdoc('numpy.core.multiarray', 'unravel_index',
"""
unravel_index(indices, dims, order='C')
Converts a flat index or array of flat indices into a tuple
of coordinate arrays.
Parameters
----------
indices : array_like
An integer array whose elements are indices into the flattened
version of an array of dimensions ``dims``. Before version 1.6.0,
this function accepted just one index value.
dims : tuple of ints
The shape of the array to use for unraveling ``indices``.
order : {'C', 'F'}, optional
Determines whether the indices should be viewed as indexing in
row-major (C-style) or column-major (Fortran-style) order.
.. versionadded:: 1.6.0
Returns
-------
unraveled_coords : tuple of ndarray
Each array in the tuple has the same shape as the ``indices``
array.
See Also
--------
ravel_multi_index
Examples
--------
>>> np.unravel_index([22, 41, 37], (7,6))
(array([3, 6, 6]), array([4, 5, 1]))
>>> np.unravel_index([31, 41, 13], (7,6), order='F')
(array([3, 6, 6]), array([4, 5, 1]))
>>> np.unravel_index(1621, (6,7,8,9))
(3, 1, 4, 1)
""")
add_newdoc('numpy.core.multiarray', 'add_docstring',
"""
add_docstring(obj, docstring)
Add a docstring to a built-in obj if possible.
If the obj already has a docstring raise a RuntimeError
If this routine does not know how to add a docstring to the object
raise a TypeError
""")
add_newdoc('numpy.core.umath', '_add_newdoc_ufunc',
"""
add_ufunc_docstring(ufunc, new_docstring)
Replace the docstring for a ufunc with new_docstring.
This method will only work if the current docstring for
the ufunc is NULL. (At the C level, i.e. when ufunc->doc is NULL.)
Parameters
----------
ufunc : numpy.ufunc
A ufunc whose current doc is NULL.
new_docstring : string
The new docstring for the ufunc.
Notes
-----
This method allocates memory for new_docstring on
the heap. Technically this creates a mempory leak, since this
memory will not be reclaimed until the end of the program
even if the ufunc itself is removed. However this will only
be a problem if the user is repeatedly creating ufuncs with
no documentation, adding documentation via add_newdoc_ufunc,
and then throwing away the ufunc.
""")
add_newdoc('numpy.core.multiarray', 'packbits',
"""
packbits(myarray, axis=None)
Packs the elements of a binary-valued array into bits in a uint8 array.
The result is padded to full bytes by inserting zero bits at the end.
Parameters
----------
myarray : array_like
An integer type array whose elements should be packed to bits.
axis : int, optional
The dimension over which bit-packing is done.
``None`` implies packing the flattened array.
Returns
-------
packed : ndarray
Array of type uint8 whose elements represent bits corresponding to the
logical (0 or nonzero) value of the input elements. The shape of
`packed` has the same number of dimensions as the input (unless `axis`
is None, in which case the output is 1-D).
See Also
--------
unpackbits: Unpacks elements of a uint8 array into a binary-valued output
array.
Examples
--------
>>> a = np.array([[[1,0,1],
... [0,1,0]],
... [[1,1,0],
... [0,0,1]]])
>>> b = np.packbits(a, axis=-1)
>>> b
array([[[160],[64]],[[192],[32]]], dtype=uint8)
Note that in binary 160 = 1010 0000, 64 = 0100 0000, 192 = 1100 0000,
and 32 = 0010 0000.
""")
add_newdoc('numpy.core.multiarray', 'unpackbits',
"""
unpackbits(myarray, axis=None)
Unpacks elements of a uint8 array into a binary-valued output array.
Each element of `myarray` represents a bit-field that should be unpacked
into a binary-valued output array. The shape of the output array is either
1-D (if `axis` is None) or the same shape as the input array with unpacking
done along the axis specified.
Parameters
----------
myarray : ndarray, uint8 type
Input array.
axis : int, optional
Unpacks along this axis.
Returns
-------
unpacked : ndarray, uint8 type
The elements are binary-valued (0 or 1).
See Also
--------
packbits : Packs the elements of a binary-valued array into bits in a uint8
array.
Examples
--------
>>> a = np.array([[2], [7], [23]], dtype=np.uint8)
>>> a
array([[ 2],
[ 7],
[23]], dtype=uint8)
>>> b = np.unpackbits(a, axis=1)
>>> b
array([[0, 0, 0, 0, 0, 0, 1, 0],
[0, 0, 0, 0, 0, 1, 1, 1],
[0, 0, 0, 1, 0, 1, 1, 1]], dtype=uint8)
""")
##############################################################################
#
# Documentation for ufunc attributes and methods
#
##############################################################################
##############################################################################
#
# ufunc object
#
##############################################################################
add_newdoc('numpy.core', 'ufunc',
"""
Functions that operate element by element on whole arrays.
To see the documentation for a specific ufunc, use np.info(). For
example, np.info(np.sin). Because ufuncs are written in C
(for speed) and linked into Python with NumPy's ufunc facility,
Python's help() function finds this page whenever help() is called
on a ufunc.
A detailed explanation of ufuncs can be found in the "ufuncs.rst"
file in the NumPy reference guide.
Unary ufuncs:
=============
op(X, out=None)
Apply op to X elementwise
Parameters
----------
X : array_like
Input array.
out : array_like
An array to store the output. Must be the same shape as `X`.
Returns
-------
r : array_like
`r` will have the same shape as `X`; if out is provided, `r`
will be equal to out.
Binary ufuncs:
==============
op(X, Y, out=None)
Apply `op` to `X` and `Y` elementwise. May "broadcast" to make
the shapes of `X` and `Y` congruent.
The broadcasting rules are:
* Dimensions of length 1 may be prepended to either array.
* Arrays may be repeated along dimensions of length 1.
Parameters
----------
X : array_like
First input array.
Y : array_like
Second input array.
out : array_like
An array to store the output. Must be the same shape as the
output would have.
Returns
-------
r : array_like
The return value; if out is provided, `r` will be equal to out.
""")
##############################################################################
#
# ufunc attributes
#
##############################################################################
add_newdoc('numpy.core', 'ufunc', ('identity',
"""
The identity value.
Data attribute containing the identity element for the ufunc, if it has one.
If it does not, the attribute value is None.
Examples
--------
>>> np.add.identity
0
>>> np.multiply.identity
1
>>> np.power.identity
1
>>> print(np.exp.identity)
None
"""))
add_newdoc('numpy.core', 'ufunc', ('nargs',
"""
The number of arguments.
Data attribute containing the number of arguments the ufunc takes, including
optional ones.
Notes
-----
Typically this value will be one more than what you might expect because all
ufuncs take the optional "out" argument.
Examples
--------
>>> np.add.nargs
3
>>> np.multiply.nargs
3
>>> np.power.nargs
3
>>> np.exp.nargs
2
"""))
add_newdoc('numpy.core', 'ufunc', ('nin',
"""
The number of inputs.
Data attribute containing the number of arguments the ufunc treats as input.
Examples
--------
>>> np.add.nin
2
>>> np.multiply.nin
2
>>> np.power.nin
2
>>> np.exp.nin
1
"""))
add_newdoc('numpy.core', 'ufunc', ('nout',
"""
The number of outputs.
Data attribute containing the number of arguments the ufunc treats as output.
Notes
-----
Since all ufuncs can take output arguments, this will always be (at least) 1.
Examples
--------
>>> np.add.nout
1
>>> np.multiply.nout
1
>>> np.power.nout
1
>>> np.exp.nout
1
"""))
add_newdoc('numpy.core', 'ufunc', ('ntypes',
"""
The number of types.
The number of numerical NumPy types - of which there are 18 total - on which
the ufunc can operate.
See Also
--------
numpy.ufunc.types
Examples
--------
>>> np.add.ntypes
18
>>> np.multiply.ntypes
18
>>> np.power.ntypes
17
>>> np.exp.ntypes
7
>>> np.remainder.ntypes
14
"""))
add_newdoc('numpy.core', 'ufunc', ('types',
"""
Returns a list with types grouped input->output.
Data attribute listing the data-type "Domain-Range" groupings the ufunc can
deliver. The data-types are given using the character codes.
See Also
--------
numpy.ufunc.ntypes
Examples
--------
>>> np.add.types
['??->?', 'bb->b', 'BB->B', 'hh->h', 'HH->H', 'ii->i', 'II->I', 'll->l',
'LL->L', 'qq->q', 'QQ->Q', 'ff->f', 'dd->d', 'gg->g', 'FF->F', 'DD->D',
'GG->G', 'OO->O']
>>> np.multiply.types
['??->?', 'bb->b', 'BB->B', 'hh->h', 'HH->H', 'ii->i', 'II->I', 'll->l',
'LL->L', 'qq->q', 'QQ->Q', 'ff->f', 'dd->d', 'gg->g', 'FF->F', 'DD->D',
'GG->G', 'OO->O']
>>> np.power.types
['bb->b', 'BB->B', 'hh->h', 'HH->H', 'ii->i', 'II->I', 'll->l', 'LL->L',
'qq->q', 'QQ->Q', 'ff->f', 'dd->d', 'gg->g', 'FF->F', 'DD->D', 'GG->G',
'OO->O']
>>> np.exp.types
['f->f', 'd->d', 'g->g', 'F->F', 'D->D', 'G->G', 'O->O']
>>> np.remainder.types
['bb->b', 'BB->B', 'hh->h', 'HH->H', 'ii->i', 'II->I', 'll->l', 'LL->L',
'qq->q', 'QQ->Q', 'ff->f', 'dd->d', 'gg->g', 'OO->O']
"""))
##############################################################################
#
# ufunc methods
#
##############################################################################
add_newdoc('numpy.core', 'ufunc', ('reduce',
"""
reduce(a, axis=0, dtype=None, out=None, keepdims=False)
Reduces `a`'s dimension by one, by applying ufunc along one axis.
Let :math:`a.shape = (N_0, ..., N_i, ..., N_{M-1})`. Then
:math:`ufunc.reduce(a, axis=i)[k_0, ..,k_{i-1}, k_{i+1}, .., k_{M-1}]` =
the result of iterating `j` over :math:`range(N_i)`, cumulatively applying
ufunc to each :math:`a[k_0, ..,k_{i-1}, j, k_{i+1}, .., k_{M-1}]`.
For a one-dimensional array, reduce produces results equivalent to:
::
r = op.identity # op = ufunc
for i in range(len(A)):
r = op(r, A[i])
return r
For example, add.reduce() is equivalent to sum().
Parameters
----------
a : array_like
The array to act on.
axis : None or int or tuple of ints, optional
Axis or axes along which a reduction is performed.
The default (`axis` = 0) is perform a reduction over the first
dimension of the input array. `axis` may be negative, in
which case it counts from the last to the first axis.
.. versionadded:: 1.7.0
If this is `None`, a reduction is performed over all the axes.
If this is a tuple of ints, a reduction is performed on multiple
axes, instead of a single axis or all the axes as before.
For operations which are either not commutative or not associative,
doing a reduction over multiple axes is not well-defined. The
ufuncs do not currently raise an exception in this case, but will
likely do so in the future.
dtype : data-type code, optional
The type used to represent the intermediate results. Defaults
to the data-type of the output array if this is provided, or
the data-type of the input array if no output array is provided.
out : ndarray, optional
A location into which the result is stored. If not provided, a
freshly-allocated array is returned.
keepdims : bool, optional
If this is set to True, the axes which are reduced are left
in the result as dimensions with size one. With this option,
the result will broadcast correctly against the original `arr`.
.. versionadded:: 1.7.0
Returns
-------
r : ndarray
The reduced array. If `out` was supplied, `r` is a reference to it.
Examples
--------
>>> np.multiply.reduce([2,3,5])
30
A multi-dimensional array example:
>>> X = np.arange(8).reshape((2,2,2))
>>> X
array([[[0, 1],
[2, 3]],
[[4, 5],
[6, 7]]])
>>> np.add.reduce(X, 0)
array([[ 4, 6],
[ 8, 10]])
>>> np.add.reduce(X) # confirm: default axis value is 0
array([[ 4, 6],
[ 8, 10]])
>>> np.add.reduce(X, 1)
array([[ 2, 4],
[10, 12]])
>>> np.add.reduce(X, 2)
array([[ 1, 5],
[ 9, 13]])
"""))
add_newdoc('numpy.core', 'ufunc', ('accumulate',
"""
accumulate(array, axis=0, dtype=None, out=None)
Accumulate the result of applying the operator to all elements.
For a one-dimensional array, accumulate produces results equivalent to::
r = np.empty(len(A))
t = op.identity # op = the ufunc being applied to A's elements
for i in range(len(A)):
t = op(t, A[i])
r[i] = t
return r
For example, add.accumulate() is equivalent to np.cumsum().
For a multi-dimensional array, accumulate is applied along only one
axis (axis zero by default; see Examples below) so repeated use is
necessary if one wants to accumulate over multiple axes.
Parameters
----------
array : array_like
The array to act on.
axis : int, optional
The axis along which to apply the accumulation; default is zero.
dtype : data-type code, optional
The data-type used to represent the intermediate results. Defaults
to the data-type of the output array if such is provided, or the
the data-type of the input array if no output array is provided.
out : ndarray, optional
A location into which the result is stored. If not provided a
freshly-allocated array is returned.
Returns
-------
r : ndarray
The accumulated values. If `out` was supplied, `r` is a reference to
`out`.
Examples
--------
1-D array examples:
>>> np.add.accumulate([2, 3, 5])
array([ 2, 5, 10])
>>> np.multiply.accumulate([2, 3, 5])
array([ 2, 6, 30])
2-D array examples:
>>> I = np.eye(2)
>>> I
array([[ 1., 0.],
[ 0., 1.]])
Accumulate along axis 0 (rows), down columns:
>>> np.add.accumulate(I, 0)
array([[ 1., 0.],
[ 1., 1.]])
>>> np.add.accumulate(I) # no axis specified = axis zero
array([[ 1., 0.],
[ 1., 1.]])
Accumulate along axis 1 (columns), through rows:
>>> np.add.accumulate(I, 1)
array([[ 1., 1.],
[ 0., 1.]])
"""))
add_newdoc('numpy.core', 'ufunc', ('reduceat',
"""
reduceat(a, indices, axis=0, dtype=None, out=None)
Performs a (local) reduce with specified slices over a single axis.
For i in ``range(len(indices))``, `reduceat` computes
``ufunc.reduce(a[indices[i]:indices[i+1]])``, which becomes the i-th
generalized "row" parallel to `axis` in the final result (i.e., in a
2-D array, for example, if `axis = 0`, it becomes the i-th row, but if
`axis = 1`, it becomes the i-th column). There are three exceptions to this:
* when ``i = len(indices) - 1`` (so for the last index),
``indices[i+1] = a.shape[axis]``.
* if ``indices[i] >= indices[i + 1]``, the i-th generalized "row" is
simply ``a[indices[i]]``.
* if ``indices[i] >= len(a)`` or ``indices[i] < 0``, an error is raised.
The shape of the output depends on the size of `indices`, and may be
larger than `a` (this happens if ``len(indices) > a.shape[axis]``).
Parameters
----------
a : array_like
The array to act on.
indices : array_like
Paired indices, comma separated (not colon), specifying slices to
reduce.
axis : int, optional
The axis along which to apply the reduceat.
dtype : data-type code, optional
The type used to represent the intermediate results. Defaults
to the data type of the output array if this is provided, or
the data type of the input array if no output array is provided.
out : ndarray, optional
A location into which the result is stored. If not provided a
freshly-allocated array is returned.
Returns
-------
r : ndarray
The reduced values. If `out` was supplied, `r` is a reference to
`out`.
Notes
-----
A descriptive example:
If `a` is 1-D, the function `ufunc.accumulate(a)` is the same as
``ufunc.reduceat(a, indices)[::2]`` where `indices` is
``range(len(array) - 1)`` with a zero placed
in every other element:
``indices = zeros(2 * len(a) - 1)``, ``indices[1::2] = range(1, len(a))``.
Don't be fooled by this attribute's name: `reduceat(a)` is not
necessarily smaller than `a`.
Examples
--------
To take the running sum of four successive values:
>>> np.add.reduceat(np.arange(8),[0,4, 1,5, 2,6, 3,7])[::2]
array([ 6, 10, 14, 18])
A 2-D example:
>>> x = np.linspace(0, 15, 16).reshape(4,4)
>>> x
array([[ 0., 1., 2., 3.],
[ 4., 5., 6., 7.],
[ 8., 9., 10., 11.],
[ 12., 13., 14., 15.]])
::
# reduce such that the result has the following five rows:
# [row1 + row2 + row3]
# [row4]
# [row2]
# [row3]
# [row1 + row2 + row3 + row4]
>>> np.add.reduceat(x, [0, 3, 1, 2, 0])
array([[ 12., 15., 18., 21.],
[ 12., 13., 14., 15.],
[ 4., 5., 6., 7.],
[ 8., 9., 10., 11.],
[ 24., 28., 32., 36.]])
::
# reduce such that result has the following two columns:
# [col1 * col2 * col3, col4]
>>> np.multiply.reduceat(x, [0, 3], 1)
array([[ 0., 3.],
[ 120., 7.],
[ 720., 11.],
[ 2184., 15.]])
"""))
add_newdoc('numpy.core', 'ufunc', ('outer',
"""
outer(A, B)
Apply the ufunc `op` to all pairs (a, b) with a in `A` and b in `B`.
Let ``M = A.ndim``, ``N = B.ndim``. Then the result, `C`, of
``op.outer(A, B)`` is an array of dimension M + N such that:
.. math:: C[i_0, ..., i_{M-1}, j_0, ..., j_{N-1}] =
op(A[i_0, ..., i_{M-1}], B[j_0, ..., j_{N-1}])
For `A` and `B` one-dimensional, this is equivalent to::
r = empty(len(A),len(B))
for i in range(len(A)):
for j in range(len(B)):
r[i,j] = op(A[i], B[j]) # op = ufunc in question
Parameters
----------
A : array_like
First array
B : array_like
Second array
Returns
-------
r : ndarray
Output array
See Also
--------
numpy.outer
Examples
--------
>>> np.multiply.outer([1, 2, 3], [4, 5, 6])
array([[ 4, 5, 6],
[ 8, 10, 12],
[12, 15, 18]])
A multi-dimensional example:
>>> A = np.array([[1, 2, 3], [4, 5, 6]])
>>> A.shape
(2, 3)
>>> B = np.array([[1, 2, 3, 4]])
>>> B.shape
(1, 4)
>>> C = np.multiply.outer(A, B)
>>> C.shape; C
(2, 3, 1, 4)
array([[[[ 1, 2, 3, 4]],
[[ 2, 4, 6, 8]],
[[ 3, 6, 9, 12]]],
[[[ 4, 8, 12, 16]],
[[ 5, 10, 15, 20]],
[[ 6, 12, 18, 24]]]])
"""))
add_newdoc('numpy.core', 'ufunc', ('at',
"""
at(a, indices, b=None)
Performs unbuffered in place operation on operand 'a' for elements
specified by 'indices'. For addition ufunc, this method is equivalent to
`a[indices] += b`, except that results are accumulated for elements that
are indexed more than once. For example, `a[[0,0]] += 1` will only
increment the first element once because of buffering, whereas
`add.at(a, [0,0], 1)` will increment the first element twice.
.. versionadded:: 1.8.0
Parameters
----------
a : array_like
The array to perform in place operation on.
indices : array_like or tuple
Array like index object or slice object for indexing into first
operand. If first operand has multiple dimensions, indices can be a
tuple of array like index objects or slice objects.
b : array_like
Second operand for ufuncs requiring two operands. Operand must be
broadcastable over first operand after indexing or slicing.
Examples
--------
Set items 0 and 1 to their negative values:
>>> a = np.array([1, 2, 3, 4])
>>> np.negative.at(a, [0, 1])
>>> print(a)
array([-1, -2, 3, 4])
::
Increment items 0 and 1, and increment item 2 twice:
>>> a = np.array([1, 2, 3, 4])
>>> np.add.at(a, [0, 1, 2, 2], 1)
>>> print(a)
array([2, 3, 5, 4])
::
Add items 0 and 1 in first array to second array,
and store results in first array:
>>> a = np.array([1, 2, 3, 4])
>>> b = np.array([1, 2])
>>> np.add.at(a, [0, 1], b)
>>> print(a)
array([2, 4, 3, 4])
"""))
##############################################################################
#
# Documentation for dtype attributes and methods
#
##############################################################################
##############################################################################
#
# dtype object
#
##############################################################################
add_newdoc('numpy.core.multiarray', 'dtype',
"""
dtype(obj, align=False, copy=False)
Create a data type object.
A numpy array is homogeneous, and contains elements described by a
dtype object. A dtype object can be constructed from different
combinations of fundamental numeric types.
Parameters
----------
obj
Object to be converted to a data type object.
align : bool, optional
Add padding to the fields to match what a C compiler would output
for a similar C-struct. Can be ``True`` only if `obj` is a dictionary
or a comma-separated string. If a struct dtype is being created,
this also sets a sticky alignment flag ``isalignedstruct``.
copy : bool, optional
Make a new copy of the data-type object. If ``False``, the result
may just be a reference to a built-in data-type object.
See also
--------
result_type
Examples
--------
Using array-scalar type:
>>> np.dtype(np.int16)
dtype('int16')
Structured type, one field name 'f1', containing int16:
>>> np.dtype([('f1', np.int16)])
dtype([('f1', '<i2')])
Structured type, one field named 'f1', in itself containing a structured
type with one field:
>>> np.dtype([('f1', [('f1', np.int16)])])
dtype([('f1', [('f1', '<i2')])])
Structured type, two fields: the first field contains an unsigned int, the
second an int32:
>>> np.dtype([('f1', np.uint), ('f2', np.int32)])
dtype([('f1', '<u4'), ('f2', '<i4')])
Using array-protocol type strings:
>>> np.dtype([('a','f8'),('b','S10')])
dtype([('a', '<f8'), ('b', '|S10')])
Using comma-separated field formats. The shape is (2,3):
>>> np.dtype("i4, (2,3)f8")
dtype([('f0', '<i4'), ('f1', '<f8', (2, 3))])
Using tuples. ``int`` is a fixed type, 3 the field's shape. ``void``
is a flexible type, here of size 10:
>>> np.dtype([('hello',(np.int,3)),('world',np.void,10)])
dtype([('hello', '<i4', 3), ('world', '|V10')])
Subdivide ``int16`` into 2 ``int8``'s, called x and y. 0 and 1 are
the offsets in bytes:
>>> np.dtype((np.int16, {'x':(np.int8,0), 'y':(np.int8,1)}))
dtype(('<i2', [('x', '|i1'), ('y', '|i1')]))
Using dictionaries. Two fields named 'gender' and 'age':
>>> np.dtype({'names':['gender','age'], 'formats':['S1',np.uint8]})
dtype([('gender', '|S1'), ('age', '|u1')])
Offsets in bytes, here 0 and 25:
>>> np.dtype({'surname':('S25',0),'age':(np.uint8,25)})
dtype([('surname', '|S25'), ('age', '|u1')])
""")
##############################################################################
#
# dtype attributes
#
##############################################################################
add_newdoc('numpy.core.multiarray', 'dtype', ('alignment',
"""
The required alignment (bytes) of this data-type according to the compiler.
More information is available in the C-API section of the manual.
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('byteorder',
"""
A character indicating the byte-order of this data-type object.
One of:
=== ==============
'=' native
'<' little-endian
'>' big-endian
'|' not applicable
=== ==============
All built-in data-type objects have byteorder either '=' or '|'.
Examples
--------
>>> dt = np.dtype('i2')
>>> dt.byteorder
'='
>>> # endian is not relevant for 8 bit numbers
>>> np.dtype('i1').byteorder
'|'
>>> # or ASCII strings
>>> np.dtype('S2').byteorder
'|'
>>> # Even if specific code is given, and it is native
>>> # '=' is the byteorder
>>> import sys
>>> sys_is_le = sys.byteorder == 'little'
>>> native_code = sys_is_le and '<' or '>'
>>> swapped_code = sys_is_le and '>' or '<'
>>> dt = np.dtype(native_code + 'i2')
>>> dt.byteorder
'='
>>> # Swapped code shows up as itself
>>> dt = np.dtype(swapped_code + 'i2')
>>> dt.byteorder == swapped_code
True
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('char',
"""A unique character code for each of the 21 different built-in types."""))
add_newdoc('numpy.core.multiarray', 'dtype', ('descr',
"""
Array-interface compliant full description of the data-type.
The format is that required by the 'descr' key in the
`__array_interface__` attribute.
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('fields',
"""
Dictionary of named fields defined for this data type, or ``None``.
The dictionary is indexed by keys that are the names of the fields.
Each entry in the dictionary is a tuple fully describing the field::
(dtype, offset[, title])
If present, the optional title can be any object (if it is a string
or unicode then it will also be a key in the fields dictionary,
otherwise it's meta-data). Notice also that the first two elements
of the tuple can be passed directly as arguments to the ``ndarray.getfield``
and ``ndarray.setfield`` methods.
See Also
--------
ndarray.getfield, ndarray.setfield
Examples
--------
>>> dt = np.dtype([('name', np.str_, 16), ('grades', np.float64, (2,))])
>>> print(dt.fields)
{'grades': (dtype(('float64',(2,))), 16), 'name': (dtype('|S16'), 0)}
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('flags',
"""
Bit-flags describing how this data type is to be interpreted.
Bit-masks are in `numpy.core.multiarray` as the constants
`ITEM_HASOBJECT`, `LIST_PICKLE`, `ITEM_IS_POINTER`, `NEEDS_INIT`,
`NEEDS_PYAPI`, `USE_GETITEM`, `USE_SETITEM`. A full explanation
of these flags is in C-API documentation; they are largely useful
for user-defined data-types.
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('hasobject',
"""
Boolean indicating whether this dtype contains any reference-counted
objects in any fields or sub-dtypes.
Recall that what is actually in the ndarray memory representing
the Python object is the memory address of that object (a pointer).
Special handling may be required, and this attribute is useful for
distinguishing data types that may contain arbitrary Python objects
and data-types that won't.
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('isbuiltin',
"""
Integer indicating how this dtype relates to the built-in dtypes.
Read-only.
= ========================================================================
0 if this is a structured array type, with fields
1 if this is a dtype compiled into numpy (such as ints, floats etc)
2 if the dtype is for a user-defined numpy type
A user-defined type uses the numpy C-API machinery to extend
numpy to handle a new array type. See
:ref:`user.user-defined-data-types` in the Numpy manual.
= ========================================================================
Examples
--------
>>> dt = np.dtype('i2')
>>> dt.isbuiltin
1
>>> dt = np.dtype('f8')
>>> dt.isbuiltin
1
>>> dt = np.dtype([('field1', 'f8')])
>>> dt.isbuiltin
0
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('isnative',
"""
Boolean indicating whether the byte order of this dtype is native
to the platform.
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('isalignedstruct',
"""
Boolean indicating whether the dtype is a struct which maintains
field alignment. This flag is sticky, so when combining multiple
structs together, it is preserved and produces new dtypes which
are also aligned.
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('itemsize',
"""
The element size of this data-type object.
For 18 of the 21 types this number is fixed by the data-type.
For the flexible data-types, this number can be anything.
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('kind',
"""
A character code (one of 'biufcmMOSUV') identifying the general kind of data.
= ======================
b boolean
i signed integer
u unsigned integer
f floating-point
c complex floating-point
m timedelta
M datetime
O object
S (byte-)string
U Unicode
V void
= ======================
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('name',
"""
A bit-width name for this data-type.
Un-sized flexible data-type objects do not have this attribute.
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('names',
"""
Ordered list of field names, or ``None`` if there are no fields.
The names are ordered according to increasing byte offset. This can be
used, for example, to walk through all of the named fields in offset order.
Examples
--------
>>> dt = np.dtype([('name', np.str_, 16), ('grades', np.float64, (2,))])
>>> dt.names
('name', 'grades')
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('num',
"""
A unique number for each of the 21 different built-in types.
These are roughly ordered from least-to-most precision.
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('shape',
"""
Shape tuple of the sub-array if this data type describes a sub-array,
and ``()`` otherwise.
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('str',
"""The array-protocol typestring of this data-type object."""))
add_newdoc('numpy.core.multiarray', 'dtype', ('subdtype',
"""
Tuple ``(item_dtype, shape)`` if this `dtype` describes a sub-array, and
None otherwise.
The *shape* is the fixed shape of the sub-array described by this
data type, and *item_dtype* the data type of the array.
If a field whose dtype object has this attribute is retrieved,
then the extra dimensions implied by *shape* are tacked on to
the end of the retrieved array.
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('type',
"""The type object used to instantiate a scalar of this data-type."""))
##############################################################################
#
# dtype methods
#
##############################################################################
add_newdoc('numpy.core.multiarray', 'dtype', ('newbyteorder',
"""
newbyteorder(new_order='S')
Return a new dtype with a different byte order.
Changes are also made in all fields and sub-arrays of the data type.
Parameters
----------
new_order : string, optional
Byte order to force; a value from the byte order
specifications below. The default value ('S') results in
swapping the current byte order.
`new_order` codes can be any of::
* 'S' - swap dtype from current to opposite endian
* {'<', 'L'} - little endian
* {'>', 'B'} - big endian
* {'=', 'N'} - native order
* {'|', 'I'} - ignore (no change to byte order)
The code does a case-insensitive check on the first letter of
`new_order` for these alternatives. For example, any of '>'
or 'B' or 'b' or 'brian' are valid to specify big-endian.
Returns
-------
new_dtype : dtype
New dtype object with the given change to the byte order.
Notes
-----
Changes are also made in all fields and sub-arrays of the data type.
Examples
--------
>>> import sys
>>> sys_is_le = sys.byteorder == 'little'
>>> native_code = sys_is_le and '<' or '>'
>>> swapped_code = sys_is_le and '>' or '<'
>>> native_dt = np.dtype(native_code+'i2')
>>> swapped_dt = np.dtype(swapped_code+'i2')
>>> native_dt.newbyteorder('S') == swapped_dt
True
>>> native_dt.newbyteorder() == swapped_dt
True
>>> native_dt == swapped_dt.newbyteorder('S')
True
>>> native_dt == swapped_dt.newbyteorder('=')
True
>>> native_dt == swapped_dt.newbyteorder('N')
True
>>> native_dt == native_dt.newbyteorder('|')
True
>>> np.dtype('<i2') == native_dt.newbyteorder('<')
True
>>> np.dtype('<i2') == native_dt.newbyteorder('L')
True
>>> np.dtype('>i2') == native_dt.newbyteorder('>')
True
>>> np.dtype('>i2') == native_dt.newbyteorder('B')
True
"""))
##############################################################################
#
# Datetime-related Methods
#
##############################################################################
add_newdoc('numpy.core.multiarray', 'busdaycalendar',
"""
busdaycalendar(weekmask='1111100', holidays=None)
A business day calendar object that efficiently stores information
defining valid days for the busday family of functions.
The default valid days are Monday through Friday ("business days").
A busdaycalendar object can be specified with any set of weekly
valid days, plus an optional "holiday" dates that always will be invalid.
Once a busdaycalendar object is created, the weekmask and holidays
cannot be modified.
.. versionadded:: 1.7.0
Parameters
----------
weekmask : str or array_like of bool, optional
A seven-element array indicating which of Monday through Sunday are
valid days. May be specified as a length-seven list or array, like
[1,1,1,1,1,0,0]; a length-seven string, like '1111100'; or a string
like "Mon Tue Wed Thu Fri", made up of 3-character abbreviations for
weekdays, optionally separated by white space. Valid abbreviations
are: Mon Tue Wed Thu Fri Sat Sun
holidays : array_like of datetime64[D], optional
An array of dates to consider as invalid dates, no matter which
weekday they fall upon. Holiday dates may be specified in any
order, and NaT (not-a-time) dates are ignored. This list is
saved in a normalized form that is suited for fast calculations
of valid days.
Returns
-------
out : busdaycalendar
A business day calendar object containing the specified
weekmask and holidays values.
See Also
--------
is_busday : Returns a boolean array indicating valid days.
busday_offset : Applies an offset counted in valid days.
busday_count : Counts how many valid days are in a half-open date range.
Attributes
----------
Note: once a busdaycalendar object is created, you cannot modify the
weekmask or holidays. The attributes return copies of internal data.
weekmask : (copy) seven-element array of bool
holidays : (copy) sorted array of datetime64[D]
Examples
--------
>>> # Some important days in July
... bdd = np.busdaycalendar(
... holidays=['2011-07-01', '2011-07-04', '2011-07-17'])
>>> # Default is Monday to Friday weekdays
... bdd.weekmask
array([ True, True, True, True, True, False, False], dtype='bool')
>>> # Any holidays already on the weekend are removed
... bdd.holidays
array(['2011-07-01', '2011-07-04'], dtype='datetime64[D]')
""")
add_newdoc('numpy.core.multiarray', 'busdaycalendar', ('weekmask',
"""A copy of the seven-element boolean mask indicating valid days."""))
add_newdoc('numpy.core.multiarray', 'busdaycalendar', ('holidays',
"""A copy of the holiday array indicating additional invalid days."""))
add_newdoc('numpy.core.multiarray', 'is_busday',
"""
is_busday(dates, weekmask='1111100', holidays=None, busdaycal=None, out=None)
Calculates which of the given dates are valid days, and which are not.
.. versionadded:: 1.7.0
Parameters
----------
dates : array_like of datetime64[D]
The array of dates to process.
weekmask : str or array_like of bool, optional
A seven-element array indicating which of Monday through Sunday are
valid days. May be specified as a length-seven list or array, like
[1,1,1,1,1,0,0]; a length-seven string, like '1111100'; or a string
like "Mon Tue Wed Thu Fri", made up of 3-character abbreviations for
weekdays, optionally separated by white space. Valid abbreviations
are: Mon Tue Wed Thu Fri Sat Sun
holidays : array_like of datetime64[D], optional
An array of dates to consider as invalid dates. They may be
specified in any order, and NaT (not-a-time) dates are ignored.
This list is saved in a normalized form that is suited for
fast calculations of valid days.
busdaycal : busdaycalendar, optional
A `busdaycalendar` object which specifies the valid days. If this
parameter is provided, neither weekmask nor holidays may be
provided.
out : array of bool, optional
If provided, this array is filled with the result.
Returns
-------
out : array of bool
An array with the same shape as ``dates``, containing True for
each valid day, and False for each invalid day.
See Also
--------
busdaycalendar: An object that specifies a custom set of valid days.
busday_offset : Applies an offset counted in valid days.
busday_count : Counts how many valid days are in a half-open date range.
Examples
--------
>>> # The weekdays are Friday, Saturday, and Monday
... np.is_busday(['2011-07-01', '2011-07-02', '2011-07-18'],
... holidays=['2011-07-01', '2011-07-04', '2011-07-17'])
array([False, False, True], dtype='bool')
""")
add_newdoc('numpy.core.multiarray', 'busday_offset',
"""
busday_offset(dates, offsets, roll='raise', weekmask='1111100', holidays=None, busdaycal=None, out=None)
First adjusts the date to fall on a valid day according to
the ``roll`` rule, then applies offsets to the given dates
counted in valid days.
.. versionadded:: 1.7.0
Parameters
----------
dates : array_like of datetime64[D]
The array of dates to process.
offsets : array_like of int
The array of offsets, which is broadcast with ``dates``.
roll : {'raise', 'nat', 'forward', 'following', 'backward', 'preceding', 'modifiedfollowing', 'modifiedpreceding'}, optional
How to treat dates that do not fall on a valid day. The default
is 'raise'.
* 'raise' means to raise an exception for an invalid day.
* 'nat' means to return a NaT (not-a-time) for an invalid day.
* 'forward' and 'following' mean to take the first valid day
later in time.
* 'backward' and 'preceding' mean to take the first valid day
earlier in time.
* 'modifiedfollowing' means to take the first valid day
later in time unless it is across a Month boundary, in which
case to take the first valid day earlier in time.
* 'modifiedpreceding' means to take the first valid day
earlier in time unless it is across a Month boundary, in which
case to take the first valid day later in time.
weekmask : str or array_like of bool, optional
A seven-element array indicating which of Monday through Sunday are
valid days. May be specified as a length-seven list or array, like
[1,1,1,1,1,0,0]; a length-seven string, like '1111100'; or a string
like "Mon Tue Wed Thu Fri", made up of 3-character abbreviations for
weekdays, optionally separated by white space. Valid abbreviations
are: Mon Tue Wed Thu Fri Sat Sun
holidays : array_like of datetime64[D], optional
An array of dates to consider as invalid dates. They may be
specified in any order, and NaT (not-a-time) dates are ignored.
This list is saved in a normalized form that is suited for
fast calculations of valid days.
busdaycal : busdaycalendar, optional
A `busdaycalendar` object which specifies the valid days. If this
parameter is provided, neither weekmask nor holidays may be
provided.
out : array of datetime64[D], optional
If provided, this array is filled with the result.
Returns
-------
out : array of datetime64[D]
An array with a shape from broadcasting ``dates`` and ``offsets``
together, containing the dates with offsets applied.
See Also
--------
busdaycalendar: An object that specifies a custom set of valid days.
is_busday : Returns a boolean array indicating valid days.
busday_count : Counts how many valid days are in a half-open date range.
Examples
--------
>>> # First business day in October 2011 (not accounting for holidays)
... np.busday_offset('2011-10', 0, roll='forward')
numpy.datetime64('2011-10-03','D')
>>> # Last business day in February 2012 (not accounting for holidays)
... np.busday_offset('2012-03', -1, roll='forward')
numpy.datetime64('2012-02-29','D')
>>> # Third Wednesday in January 2011
... np.busday_offset('2011-01', 2, roll='forward', weekmask='Wed')
numpy.datetime64('2011-01-19','D')
>>> # 2012 Mother's Day in Canada and the U.S.
... np.busday_offset('2012-05', 1, roll='forward', weekmask='Sun')
numpy.datetime64('2012-05-13','D')
>>> # First business day on or after a date
... np.busday_offset('2011-03-20', 0, roll='forward')
numpy.datetime64('2011-03-21','D')
>>> np.busday_offset('2011-03-22', 0, roll='forward')
numpy.datetime64('2011-03-22','D')
>>> # First business day after a date
... np.busday_offset('2011-03-20', 1, roll='backward')
numpy.datetime64('2011-03-21','D')
>>> np.busday_offset('2011-03-22', 1, roll='backward')
numpy.datetime64('2011-03-23','D')
""")
add_newdoc('numpy.core.multiarray', 'busday_count',
"""
busday_count(begindates, enddates, weekmask='1111100', holidays=[], busdaycal=None, out=None)
Counts the number of valid days between `begindates` and
`enddates`, not including the day of `enddates`.
If ``enddates`` specifies a date value that is earlier than the
corresponding ``begindates`` date value, the count will be negative.
.. versionadded:: 1.7.0
Parameters
----------
begindates : array_like of datetime64[D]
The array of the first dates for counting.
enddates : array_like of datetime64[D]
The array of the end dates for counting, which are excluded
from the count themselves.
weekmask : str or array_like of bool, optional
A seven-element array indicating which of Monday through Sunday are
valid days. May be specified as a length-seven list or array, like
[1,1,1,1,1,0,0]; a length-seven string, like '1111100'; or a string
like "Mon Tue Wed Thu Fri", made up of 3-character abbreviations for
weekdays, optionally separated by white space. Valid abbreviations
are: Mon Tue Wed Thu Fri Sat Sun
holidays : array_like of datetime64[D], optional
An array of dates to consider as invalid dates. They may be
specified in any order, and NaT (not-a-time) dates are ignored.
This list is saved in a normalized form that is suited for
fast calculations of valid days.
busdaycal : busdaycalendar, optional
A `busdaycalendar` object which specifies the valid days. If this
parameter is provided, neither weekmask nor holidays may be
provided.
out : array of int, optional
If provided, this array is filled with the result.
Returns
-------
out : array of int
An array with a shape from broadcasting ``begindates`` and ``enddates``
together, containing the number of valid days between
the begin and end dates.
See Also
--------
busdaycalendar: An object that specifies a custom set of valid days.
is_busday : Returns a boolean array indicating valid days.
busday_offset : Applies an offset counted in valid days.
Examples
--------
>>> # Number of weekdays in January 2011
... np.busday_count('2011-01', '2011-02')
21
>>> # Number of weekdays in 2011
... np.busday_count('2011', '2012')
260
>>> # Number of Saturdays in 2011
... np.busday_count('2011', '2012', weekmask='Sat')
53
""")
##############################################################################
#
# nd_grid instances
#
##############################################################################
add_newdoc('numpy.lib.index_tricks', 'mgrid',
"""
`nd_grid` instance which returns a dense multi-dimensional "meshgrid".
An instance of `numpy.lib.index_tricks.nd_grid` which returns an dense
(or fleshed out) mesh-grid when indexed, so that each returned argument
has the same shape. The dimensions and number of the output arrays are
equal to the number of indexing dimensions. If the step length is not a
complex number, then the stop is not inclusive.
However, if the step length is a **complex number** (e.g. 5j), then
the integer part of its magnitude is interpreted as specifying the
number of points to create between the start and stop values, where
the stop value **is inclusive**.
Returns
----------
mesh-grid `ndarrays` all of the same dimensions
See Also
--------
numpy.lib.index_tricks.nd_grid : class of `ogrid` and `mgrid` objects
ogrid : like mgrid but returns open (not fleshed out) mesh grids
r_ : array concatenator
Examples
--------
>>> np.mgrid[0:5,0:5]
array([[[0, 0, 0, 0, 0],
[1, 1, 1, 1, 1],
[2, 2, 2, 2, 2],
[3, 3, 3, 3, 3],
[4, 4, 4, 4, 4]],
[[0, 1, 2, 3, 4],
[0, 1, 2, 3, 4],
[0, 1, 2, 3, 4],
[0, 1, 2, 3, 4],
[0, 1, 2, 3, 4]]])
>>> np.mgrid[-1:1:5j]
array([-1. , -0.5, 0. , 0.5, 1. ])
""")
add_newdoc('numpy.lib.index_tricks', 'ogrid',
"""
`nd_grid` instance which returns an open multi-dimensional "meshgrid".
An instance of `numpy.lib.index_tricks.nd_grid` which returns an open
(i.e. not fleshed out) mesh-grid when indexed, so that only one dimension
of each returned array is greater than 1. The dimension and number of the
output arrays are equal to the number of indexing dimensions. If the step
length is not a complex number, then the stop is not inclusive.
However, if the step length is a **complex number** (e.g. 5j), then
the integer part of its magnitude is interpreted as specifying the
number of points to create between the start and stop values, where
the stop value **is inclusive**.
Returns
----------
mesh-grid `ndarrays` with only one dimension :math:`\\neq 1`
See Also
--------
np.lib.index_tricks.nd_grid : class of `ogrid` and `mgrid` objects
mgrid : like `ogrid` but returns dense (or fleshed out) mesh grids
r_ : array concatenator
Examples
--------
>>> from numpy import ogrid
>>> ogrid[-1:1:5j]
array([-1. , -0.5, 0. , 0.5, 1. ])
>>> ogrid[0:5,0:5]
[array([[0],
[1],
[2],
[3],
[4]]), array([[0, 1, 2, 3, 4]])]
""")
##############################################################################
#
# Documentation for `generic` attributes and methods
#
##############################################################################
add_newdoc('numpy.core.numerictypes', 'generic',
"""
Base class for numpy scalar types.
Class from which most (all?) numpy scalar types are derived. For
consistency, exposes the same API as `ndarray`, despite many
consequent attributes being either "get-only," or completely irrelevant.
This is the class from which it is strongly suggested users should derive
custom scalar types.
""")
# Attributes
add_newdoc('numpy.core.numerictypes', 'generic', ('T',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class so as to
provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('base',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class so as to
a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('data',
"""Pointer to start of data."""))
add_newdoc('numpy.core.numerictypes', 'generic', ('dtype',
"""Get array data-descriptor."""))
add_newdoc('numpy.core.numerictypes', 'generic', ('flags',
"""The integer value of flags."""))
add_newdoc('numpy.core.numerictypes', 'generic', ('flat',
"""A 1-D view of the scalar."""))
add_newdoc('numpy.core.numerictypes', 'generic', ('imag',
"""The imaginary part of the scalar."""))
add_newdoc('numpy.core.numerictypes', 'generic', ('itemsize',
"""The length of one element in bytes."""))
add_newdoc('numpy.core.numerictypes', 'generic', ('nbytes',
"""The length of the scalar in bytes."""))
add_newdoc('numpy.core.numerictypes', 'generic', ('ndim',
"""The number of array dimensions."""))
add_newdoc('numpy.core.numerictypes', 'generic', ('real',
"""The real part of the scalar."""))
add_newdoc('numpy.core.numerictypes', 'generic', ('shape',
"""Tuple of array dimensions."""))
add_newdoc('numpy.core.numerictypes', 'generic', ('size',
"""The number of elements in the gentype."""))
add_newdoc('numpy.core.numerictypes', 'generic', ('strides',
"""Tuple of bytes steps in each dimension."""))
# Methods
add_newdoc('numpy.core.numerictypes', 'generic', ('all',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('any',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('argmax',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('argmin',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('argsort',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('astype',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('byteswap',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class so as to
provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('choose',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('clip',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('compress',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('conjugate',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('copy',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('cumprod',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('cumsum',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('diagonal',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('dump',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('dumps',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('fill',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('flatten',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('getfield',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('item',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('itemset',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('max',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('mean',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('min',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('newbyteorder',
"""
newbyteorder(new_order='S')
Return a new `dtype` with a different byte order.
Changes are also made in all fields and sub-arrays of the data type.
The `new_order` code can be any from the following:
* {'<', 'L'} - little endian
* {'>', 'B'} - big endian
* {'=', 'N'} - native order
* 'S' - swap dtype from current to opposite endian
* {'|', 'I'} - ignore (no change to byte order)
Parameters
----------
new_order : str, optional
Byte order to force; a value from the byte order specifications
above. The default value ('S') results in swapping the current
byte order. The code does a case-insensitive check on the first
letter of `new_order` for the alternatives above. For example,
any of 'B' or 'b' or 'biggish' are valid to specify big-endian.
Returns
-------
new_dtype : dtype
New `dtype` object with the given change to the byte order.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('nonzero',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('prod',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('ptp',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('put',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('ravel',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('repeat',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('reshape',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('resize',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('round',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('searchsorted',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('setfield',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('setflags',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class so as to
provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('sort',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('squeeze',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('std',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('sum',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('swapaxes',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('take',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('tofile',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('tolist',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('tostring',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('trace',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('transpose',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('var',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
add_newdoc('numpy.core.numerictypes', 'generic', ('view',
"""
Not implemented (virtual attribute)
Class generic exists solely to derive numpy scalars from, and possesses,
albeit unimplemented, all the attributes of the ndarray class
so as to provide a uniform API.
See Also
--------
The corresponding attribute of the derived class of interest.
"""))
##############################################################################
#
# Documentation for other scalar classes
#
##############################################################################
add_newdoc('numpy.core.numerictypes', 'bool_',
"""Numpy's Boolean type. Character code: ``?``. Alias: bool8""")
add_newdoc('numpy.core.numerictypes', 'complex64',
"""
Complex number type composed of two 32 bit floats. Character code: 'F'.
""")
add_newdoc('numpy.core.numerictypes', 'complex128',
"""
Complex number type composed of two 64 bit floats. Character code: 'D'.
Python complex compatible.
""")
add_newdoc('numpy.core.numerictypes', 'complex256',
"""
Complex number type composed of two 128-bit floats. Character code: 'G'.
""")
add_newdoc('numpy.core.numerictypes', 'float32',
"""
32-bit floating-point number. Character code 'f'. C float compatible.
""")
add_newdoc('numpy.core.numerictypes', 'float64',
"""
64-bit floating-point number. Character code 'd'. Python float compatible.
""")
add_newdoc('numpy.core.numerictypes', 'float96',
"""
""")
add_newdoc('numpy.core.numerictypes', 'float128',
"""
128-bit floating-point number. Character code: 'g'. C long float
compatible.
""")
add_newdoc('numpy.core.numerictypes', 'int8',
"""8-bit integer. Character code ``b``. C char compatible.""")
add_newdoc('numpy.core.numerictypes', 'int16',
"""16-bit integer. Character code ``h``. C short compatible.""")
add_newdoc('numpy.core.numerictypes', 'int32',
"""32-bit integer. Character code 'i'. C int compatible.""")
add_newdoc('numpy.core.numerictypes', 'int64',
"""64-bit integer. Character code 'l'. Python int compatible.""")
add_newdoc('numpy.core.numerictypes', 'object_',
"""Any Python object. Character code: 'O'.""")
| {
"content_hash": "18e165ea03a7bc4de9198abedc769b7d",
"timestamp": "",
"source": "github",
"line_count": 7672,
"max_line_length": 128,
"avg_line_length": 29.15980187695516,
"alnum_prop": 0.5882600105491833,
"repo_name": "mwiebe/numpy",
"id": "7eef07c4a2f0cc7d8188d61027606a6d8343a6de",
"size": "223714",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "numpy/add_newdocs.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "7649557"
},
{
"name": "C++",
"bytes": "28556"
},
{
"name": "FORTRAN",
"bytes": "6310"
},
{
"name": "Makefile",
"bytes": "2574"
},
{
"name": "Python",
"bytes": "6046475"
}
],
"symlink_target": ""
} |
package dao
import "TruckMonitor-Backend/model"
type StoreDao interface {
FindById(id int) (*model.Store, error)
}
| {
"content_hash": "fa53ec5f69c3cb37c816ad4b8b6b083a",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 39,
"avg_line_length": 16.857142857142858,
"alnum_prop": 0.7542372881355932,
"repo_name": "VTUZ-12IE1bzud/TruckMonitor-Backend",
"id": "2365b7f6eb0bb3a12ac884360e03e53c2bebcdc8",
"size": "118",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "dao/store.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "236"
},
{
"name": "Go",
"bytes": "44439"
}
],
"symlink_target": ""
} |
package com.arjinmc.recyclerviewdecoration;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import java.util.List;
/**
* Sticky Head for RecyclerView
* Created by Eminem Lo on 2017/9/12.
* email: arjinmc@hotmail.com
* <p>
* <p> Attention!</p>
* RecyclerViewStickyHeadItemDecoration
* only support of the RecyclerView with LinearLayoutManager.VERTICAL
*/
public class RecyclerViewStickyHeadItemDecoration extends RecyclerView.ItemDecoration {
private View mStickyView;
private RecyclerView mParent;
/**
* mark the group view's width and height
*/
private int mStickyViewHeight;
private int mStickyViewMarginTop;
/**
* default group view type is zero.
*/
private int mGroupViewType = 0;
/**
* position list
*/
private List<Integer> mStickyPositionList = new ArrayList<>();
/**
* bind position of sticky view
*/
private int mBindStickyViewPosition = -1;
/**
* current StickyView Holder
*/
private RecyclerView.ViewHolder mCurrentStickyViewHolder;
public void setParam(Param param) {
mGroupViewType = param.groupViewType;
}
@Override
public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state) {
super.onDrawOver(c, parent, state);
if (parent == null || parent.getAdapter() == null || parent.getAdapter().getItemCount() == 0
|| parent.getLayoutManager() == null) {
return;
}
if (parent.getLayoutManager() instanceof LinearLayoutManager) {
LinearLayoutManager layoutManager = (LinearLayoutManager) parent.getLayoutManager();
boolean findStickView = false;
int itemCount = parent.getChildCount();
for (int i = 0; i < itemCount; i++) {
View view = parent.getChildAt(i);
if (isGroupViewType(parent.getChildAdapterPosition(view))) {
findStickView = true;
if (mCurrentStickyViewHolder == null) {
mCurrentStickyViewHolder = parent.getAdapter().onCreateViewHolder(parent, mGroupViewType);
mStickyView = mCurrentStickyViewHolder.itemView;
}
if (view.getTop() <= 0) {
bindDataForStickyView(layoutManager.findFirstVisibleItemPosition());
} else {
if (mStickyPositionList.size() > 0) {
if (mStickyPositionList.size() == 1) {
bindDataForStickyView(mStickyPositionList.get(0));
} else {
int currentPosition = layoutManager.findFirstVisibleItemPosition() + i;
int indexOfCurrentPosition = mStickyPositionList.lastIndexOf(currentPosition);
bindDataForStickyView(mStickyPositionList.get(indexOfCurrentPosition - 1));
}
}
}
if (view.getTop() > 0 && view.getTop() <= mStickyViewHeight) {
mStickyViewMarginTop = mStickyViewHeight - view.getTop();
} else {
mStickyViewMarginTop = 0;
View nextStickyView = getNextStickyView();
if (nextStickyView != null && nextStickyView.getTop() <= mStickyViewHeight) {
mStickyViewMarginTop = mStickyViewHeight - nextStickyView.getTop();
}
}
drawStickyView(c);
break;
}
}
if (!findStickView) {
mStickyViewMarginTop = 0;
if (layoutManager.findFirstVisibleItemPosition() + parent.getChildCount() == parent.getAdapter().getItemCount()
&& mStickyPositionList.size() > 0) {
bindDataForStickyView(mStickyPositionList.get(mStickyPositionList.size() - 1));
}
drawStickyView(c);
}
} else {
try {
throw new IllegalAccessException("Only support RecyclerView LinearLayoutManager.VERTICAL");
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
if (mParent == null) {
if (parent.getLayoutManager() instanceof LinearLayoutManager) {
if (((LinearLayoutManager) parent.getLayoutManager()).getOrientation()
!= RecyclerView.VERTICAL) {
throw new IllegalArgumentException("Only support LinearLayoutManager.VERTICAL");
}
}
mParent = parent;
initListener();
}
}
/**
* add listener to RecyclerView
*/
private void initListener() {
// update sticky position list if data of RecyclerView has changed
mParent.getAdapter().registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
@Override
public void onChanged() {
super.onChanged();
initStickyPositionList();
}
@Override
public void onItemRangeChanged(int positionStart, int itemCount) {
super.onItemRangeChanged(positionStart, itemCount);
initStickyPositionList();
}
@Override
public void onItemRangeChanged(int positionStart, int itemCount, @Nullable Object payload) {
super.onItemRangeChanged(positionStart, itemCount, payload);
initStickyPositionList();
}
@Override
public void onItemRangeInserted(int positionStart, int itemCount) {
super.onItemRangeInserted(positionStart, itemCount);
initStickyPositionList();
}
@Override
public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount) {
super.onItemRangeMoved(fromPosition, toPosition, itemCount);
initStickyPositionList();
}
@Override
public void onItemRangeRemoved(int positionStart, int itemCount) {
super.onItemRangeRemoved(positionStart, itemCount);
initStickyPositionList();
}
});
initStickyPositionList();
}
private void initStickyPositionList() {
if (mParent == null || mParent.getAdapter() == null) {
return;
}
if (mStickyPositionList == null) {
mStickyPositionList = new ArrayList<>();
} else {
mStickyPositionList.clear();
}
mBindStickyViewPosition = -1;
int itemCount = mParent.getAdapter().getItemCount();
if (itemCount > 0) {
for (int i = 0; i < itemCount; i++) {
if (isGroupViewType(i)) {
mStickyPositionList.add(i);
}
}
View lGroupView = mParent.getChildAt(mStickyPositionList.get(0));
if (lGroupView != null) {
lGroupView.measure(0, 0);
mStickyViewHeight = lGroupView.getMeasuredHeight();
}
}
}
/**
* draw sticky view
*
* @param canvas
*/
private void drawStickyView(Canvas canvas) {
if (mStickyView == null) {
return;
}
int saveCount = canvas.save();
canvas.translate(0, -mStickyViewMarginTop);
mStickyView.draw(canvas);
canvas.restoreToCount(saveCount);
}
/**
* bind data for sticky view
*
* @param position
*/
private void bindDataForStickyView(int position) {
if (mBindStickyViewPosition == position || mCurrentStickyViewHolder == null) {
return;
}
mBindStickyViewPosition = position;
mParent.getAdapter().onBindViewHolder(mCurrentStickyViewHolder, mBindStickyViewPosition);
mStickyView = mCurrentStickyViewHolder.itemView;
measureStickyView();
mStickyViewHeight = mCurrentStickyViewHolder.itemView.getBottom() - mCurrentStickyViewHolder.itemView.getTop();
}
/**
* get the next sticky view
*
* @return view
*/
private View getNextStickyView() {
if (mParent == null) {
return null;
}
int num = 0;
View nextStickyView = null;
int size = mParent.getChildCount();
for (int i = 0; i < size; i++) {
View view = mParent.getChildAt(i);
if (isGroupViewType(mParent.getChildAdapterPosition(view))) {
nextStickyView = view;
num++;
}
if (num == 2) {
break;
}
}
return num >= 2 ? nextStickyView : null;
}
/**
* measure sticky view
*/
private void measureStickyView() {
if (mParent == null || mStickyView == null || !mStickyView.isLayoutRequested()) {
return;
}
int parentWidth = mParent.getMeasuredWidth();
int widthSpec = View.MeasureSpec.makeMeasureSpec(parentWidth, View.MeasureSpec.EXACTLY);
int heightSpec;
ViewGroup.LayoutParams layoutParams = mStickyView.getLayoutParams();
if (layoutParams != null && layoutParams.height > 0) {
heightSpec = View.MeasureSpec.makeMeasureSpec(layoutParams.height, View.MeasureSpec.EXACTLY);
} else {
heightSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
}
mStickyView.measure(widthSpec, heightSpec);
mStickyView.layout(0, 0, mStickyView.getMeasuredWidth(), mStickyView.getMeasuredHeight());
}
/**
* chech the view of target position is GroupView type
*
* @param position
* @return
*/
private boolean isGroupViewType(int position) {
if (mParent == null || mParent.getAdapter() == null || position < 0) {
return false;
}
if (mParent.getAdapter().getItemCount() != 0
&& mParent.getAdapter().getItemCount() > position
&& mParent.getAdapter().getItemViewType(position) == mGroupViewType) {
return true;
}
return false;
}
/**
* Builder to create Sticky Head
*/
public static class Builder {
private Param param;
public Builder() {
param = new Param();
}
public Builder groupViewType(int groupViewType) {
param.groupViewType = groupViewType;
return this;
}
public RecyclerViewStickyHeadItemDecoration create() {
RecyclerViewStickyHeadItemDecoration recyclerViewStickyHeadItemDecoration = new RecyclerViewStickyHeadItemDecoration();
recyclerViewStickyHeadItemDecoration.setParam(param);
return recyclerViewStickyHeadItemDecoration;
}
}
private static class Param {
public int groupViewType;
}
}
| {
"content_hash": "ac1abcdbd66df38de9456d5c115a21f8",
"timestamp": "",
"source": "github",
"line_count": 343,
"max_line_length": 131,
"avg_line_length": 33.880466472303205,
"alnum_prop": 0.5749935461664228,
"repo_name": "arjinmc/RecyclerViewDecoration",
"id": "8f7b67c581b0eec23578ea191be9ffd428c802f2",
"size": "11621",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "RecyclerViewDecoration/recyclerviewdecoration/src/main/java/com/arjinmc/recyclerviewdecoration/RecyclerViewStickyHeadItemDecoration.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "88692"
}
],
"symlink_target": ""
} |
module Guide.Views.Auth
(
module Guide.Views.Auth.Login,
module Guide.Views.Auth.Register,
)
where
import Guide.Views.Auth.Login
import Guide.Views.Auth.Register
| {
"content_hash": "6b62296cae884be9fdc836ddfed0b0d2",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 35,
"avg_line_length": 18.555555555555557,
"alnum_prop": 0.7844311377245509,
"repo_name": "aelve/guide",
"id": "2a951808763f7add35fabd41ec767e90d0cee037",
"size": "237",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "back/src/Guide/Views/Auth.hs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "14628"
},
{
"name": "Dockerfile",
"bytes": "1376"
},
{
"name": "HTML",
"bytes": "273"
},
{
"name": "Haskell",
"bytes": "453157"
},
{
"name": "JavaScript",
"bytes": "57453"
},
{
"name": "Makefile",
"bytes": "2314"
},
{
"name": "Nix",
"bytes": "168"
},
{
"name": "Shell",
"bytes": "599"
},
{
"name": "TypeScript",
"bytes": "38640"
},
{
"name": "Vue",
"bytes": "97975"
}
],
"symlink_target": ""
} |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="hi_IN" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Gridcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"/>
<source><b>Gridcoin</b> version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2014 The Gridcoin developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Double-click to edit address or label</source>
<translation>?? ??? ????? ??? ??? ?? ???? ?????? ???? ?? ??? !</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>??? ??? ????? !</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>???????? ??? ?? ?????? ?????????? ?? ???? ??? !</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-46"/>
<source>These are your Gridcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<source>&Copy Address</source>
<translation>&??? ???? ???</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a Gridcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Verify a message to ensure it was signed with a specified Gridcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&????? !!</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+65"/>
<source>Copy &Label</source>
<translation>&???? ???? ??? </translation>
</message>
<message>
<location line="+2"/>
<source>&Edit</source>
<translation>&????</translation>
</message>
<message>
<location line="+250"/>
<source>Export Address Book Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Comma separated file (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>????</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>???</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(??? ???? ??? !)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>????? ????/????? ????? !</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>??? ????? ????/????? ????? !</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>?????? ??? ????? ????/????? ????? !</translation>
</message>
<message>
<location line="+33"/>
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>For staking only</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+35"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>??? ????? ????/????? ????? ?? ????? ! <br/> ???? ???? ????? ???? ??? <br> 10 ?? ?????? ???????? ?? ???????? ??? </b>,?? <b>?? ?? ???? ?? ?????? ????? ?? ???????? ???</b> !</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>????????? ????? !</translation>
</message>
<message>
<location line="+7"/>
<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 <b>LOSE ALL OF YOUR COINS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+103"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-133"/>
<location line="+60"/>
<source>Wallet encrypted</source>
<translation>????? ????????? ?? ??? !</translation>
</message>
<message>
<location line="-58"/>
<source>Gridcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+44"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>????? ????????? ??? ???!</translation>
</message>
<message>
<location line="-56"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>????? ????????? ????? ?? ??? ??????? ??? ?? ??? ??! ???? ????? ???????? ??? ??? ??!</translation>
</message>
<message>
<location line="+7"/>
<location line="+50"/>
<source>The supplied passphrases do not match.</source>
<translation>???? ?????? ???? ??? ????? ????/????? ????? ??? ?? !</translation>
</message>
<message>
<location line="-38"/>
<source>Wallet unlock failed</source>
<translation>????? ?? ??? ??? ???? !</translation>
</message>
<message>
<location line="+1"/>
<location line="+12"/>
<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 type="unfinished"/>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+280"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+242"/>
<source>Synchronizing with network...</source>
<translation>??????? ?? ??????? (???) ??? ?? ...</translation>
</message>
<message>
<location line="-308"/>
<source>&Overview</source>
<translation>&?????</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>????? ?? ??????? ????? ????? !</translation>
</message>
<message>
<location line="+17"/>
<source>&Transactions</source>
<translation>& ???-???
</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>????? ?????? ???-??? ?? ????? !</translation>
</message>
<message>
<location line="+5"/>
<source>&Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit the list of stored addresses and labels</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-13"/>
<source>&Receive coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show the list of addresses for receiving payments</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-7"/>
<source>&Send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>E&xit</source>
<translation>???? ?????</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>????????? ?? ???? ?????? !</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about Gridcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&??????</translation>
</message>
<message>
<location line="+4"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>&???? ?????</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+250"/>
<source>~%n block(s) remaining</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-247"/>
<source>&Export...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-62"/>
<source>Send coins to a Gridcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Modify configuration options for Gridcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Encrypt or decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>????? ????/????? ?? ????? ????????? ?? ??? ???????? ???? ?? ??? ?????!</translation>
</message>
<message>
<location line="+10"/>
<source>&Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-200"/>
<source>Gridcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet</source>
<translation>?????</translation>
</message>
<message>
<location line="+178"/>
<source>&About Gridcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Lock Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Lock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>&File</source>
<translation>&????</translation>
</message>
<message>
<location line="+8"/>
<source>&Settings</source>
<translation>&??????????</translation>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation>&???</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>???? ??????</translation>
</message>
<message>
<location line="+8"/>
<source>Actions toolbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+9"/>
<source>[testnet]</source>
<translation>[????????]</translation>
</message>
<message>
<location line="+0"/>
<location line="+60"/>
<source>Gridcoin client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+70"/>
<source>%n active connection(s) to Gridcoin network</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+40"/>
<source>Downloaded %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+413"/>
<source>Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Not staking because wallet is locked</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is syncing</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because you don't have mature coins</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-403"/>
<source>%n second(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="-284"/>
<source>&Unlock Wallet...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+288"/>
<source>%n minute(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Up to date</source>
<translation>??????</translation>
</message>
<message>
<location line="+7"/>
<source>Catching up...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Last received block was generated %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Sent transaction</source>
<translation>???? ??????????</translation>
</message>
<message>
<location line="+1"/>
<source>Incoming transaction</source>
<translation>??????? ??? ??????????</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>?????: %1\n
????: %2\n
????: %3\n
???:%4\n</translation>
</message>
<message>
<location line="+100"/>
<location line="+15"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<location line="+15"/>
<source>URI can not be parsed! This can be caused by an invalid Gridcoin address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>????? ???????????? ?? ??? ??? ????? ???? ??</translation>
</message>
<message>
<location line="+10"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>????? ???????????? ?? ??? ??? ????? ??</translation>
</message>
<message>
<location line="+25"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+76"/>
<source>%n second(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s)</source>
<translation><numerusform>%n ????</numerusform><numerusform>%n ????</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation><numerusform>%n ???</numerusform><numerusform>%n ????</numerusform></translation>
</message>
<message>
<location line="+18"/>
<source>Not staking</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitcoin.cpp" line="+109"/>
<source>A fatal error occurred. Gridcoin can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+90"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="+14"/>
<source>Coin Control</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation>???? :</translation>
</message>
<message>
<location line="+32"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+551"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation>????</translation>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation>???</translation>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation>taareek</translation>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation>?????</translation>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-515"/>
<source>Copy address</source>
<translation>??? ???? ???</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>???? ???? ??? </translation>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation>???? ????</translation>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+317"/>
<source>highest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium-high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>low-medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>low</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>lowest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+155"/>
<source>DUST</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>yes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transactions with higher priority get more likely into a block.
This label turns red, if the priority is smaller than "medium".
This means a fee of at least %1 per kb is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+66"/>
<source>(no label)</source>
<translation>(??? ???? ??? !)</translation>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>??? ???? ????</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&????</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&???</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+20"/>
<source>New receiving address</source>
<translation>??? ????????? ???</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 "%1" is already in the address book.</source>
<translation>???? ??? ??? "%1" ?????? ??? ??? ???? ?? ?? ????? ??|</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Gridcoin address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>????? ?? unlock ???? ???? ?? ????|</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="+420"/>
<location line="+12"/>
<source>Gridcoin-Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>??????</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Reserved amount does not participate in staking and is therefore spendable at any time.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Reserve</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start Gridcoin after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start Gridcoin on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Detach databases at shutdown</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Gridcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Connect to the Gridcoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Gridcoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show Gridcoin addresses in the transaction list or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Whether to show coin control features or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Display coin &control features (experts only!)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>&???</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&??????</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+55"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+149"/>
<location line="+9"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Gridcoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>?????</translation>
</message>
<message>
<location line="+33"/>
<location line="+231"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Gridcoin network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-160"/>
<source>Stake:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-107"/>
<source>Wallet</source>
<translation>?????</translation>
</message>
<message>
<location line="+49"/>
<source>Spendable:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current spendable balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Total:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current total balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>??? ?? ???-???</b></translation>
</message>
<message>
<location line="-108"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Total of coins that was staked, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../overviewpage.cpp" line="+113"/>
<location line="+1"/>
<source>out of sync</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+348"/>
<source>N/A</source>
<translation>???? ???
</translation>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the Gridcoin-Qt help message to get a list with possible Gridcoin command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-104"/>
<source>Gridcoin - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Gridcoin Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the Gridcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-33"/>
<source>Welcome to the Gridcoin RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+182"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>?????? ?????|</translation>
</message>
<message>
<location line="+76"/>
<source>Coin Control Features</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Inputs...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>automatically selected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Insufficient funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+35"/>
<source>0</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-19"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Amount:</source>
<translation>???? :</translation>
</message>
<message>
<location line="+22"/>
<location line="+86"/>
<location line="+86"/>
<location line="+32"/>
<source>0.00 BC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-191"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>custom change address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+106"/>
<source>Send to multiple recipients at once</source>
<translation>?? ??? ?? ?????????????? ?? ?????</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Balance:</source>
<translation>???? ??? :</translation>
</message>
<message>
<location line="+16"/>
<source>123.456 BC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>????? ?? ?????? ????</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-173"/>
<source>Enter a Gridcoin address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>???? ????</translation>
</message>
<message>
<location line="+1"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+86"/>
<source><b>%1</b> to %2 (%3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>?????? ????? ?? ?????? ????</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>???? ??? ?????? ????? ?? ???? ???? ?????|</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+251"/>
<source>WARNING: Invalid Gridcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>(no label)</source>
<translation>(??? ???? ??? !)</translation>
</message>
<message>
<location line="+4"/>
<source>WARNING: unknown change address</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>??????:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>????????????:</translation>
</message>
<message>
<location line="+24"/>
<location filename="../sendcoinsentry.cpp" line="+25"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>???? ?????? ??? ??? ?? ?????? ?? ??? ?? ???? ?????</translation>
</message>
<message>
<location line="+9"/>
<source>&Label:</source>
<translation>????:</translation>
</message>
<message>
<location line="+18"/>
<source>The address to send the payment to (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Choose address from address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt-A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Clipboard ?? ?????? paste ????</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt-P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Gridcoin address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+124"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-118"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+203"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-193"/>
<location line="+203"/>
<source>Alt+A</source>
<translation>Alt-A</translation>
</message>
<message>
<location line="-193"/>
<source>Paste address from clipboard</source>
<translation>Clipboard ?? ?????? paste ????</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt-P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this Gridcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<location line="+70"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Gridcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Gridcoin address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter Gridcoin signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+19"/>
<source>Open until %1</source>
<translation>???? ?? ???? %1</translation>
</message>
<message numerus="yes">
<location line="-2"/>
<source>Open for %n block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+8"/>
<source>conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/??????</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 ?????????</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>taareek</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 510 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>????</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>???</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>???</translation>
</message>
<message>
<location line="-211"/>
<source>, has not been successfully broadcast yet</source>
<translation>, ??? ?? ??????????? ???????? ???? ???? ??? ??</translation>
</message>
<message>
<location line="+35"/>
<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="+226"/>
<source>Date</source>
<translation>taareek</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>????</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>???</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>????</translation>
</message>
<message>
<location line="+60"/>
<source>Open until %1</source>
<translation>???? ?? ???? %1</translation>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation>????? ( %1 ????? ????)</translation>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>?? ????? ???? ?? ?? ??? ?? ???? ??? ?? ! ???? ?? ????? ??? ?? ??? ???????? ?? ??? !</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>?????? ???? ??? ????? ???????? ??? ??? !</translation>
</message>
<message>
<location line="+42"/>
<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="+190"/>
<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="+55"/>
<location line="+16"/>
<source>All</source>
<translation>???</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>??</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>?? ?????</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>?? ?????</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>????? ?????</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>?? ???</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>???????...</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>??????? ????</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 type="unfinished"/>
</message>
<message>
<location line="+144"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Comma separated file (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>?????</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>taareek</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>ID</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>???????:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>??</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+206"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+33"/>
<source>Gridcoin version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Usage:</source>
<translation>??? :</translation>
</message>
<message>
<location line="+1"/>
<source>Send command to -server or Gridcoind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>List commands</source>
<translation>commands ?? ????? ?????</translation>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation>???? command ?? ??? ??? ???</translation>
</message>
<message>
<location line="+2"/>
<source>Options:</source>
<translation>??????:</translation>
</message>
<message>
<location line="+2"/>
<source>Specify configuration file (default: Gridcoin.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: Gridcoind.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify wallet file (within data directory)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>???? ?????????? ????? </translation>
</message>
<message>
<location line="+2"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Listen for connections on <port> (default: 15714 or testnet: 25714)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Bind to given address. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Stake your coins to support network and gain reward (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Detach block and address databases. Increases shutdown time (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<source>Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-11"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+101"/>
<source>Error: Transaction creation failed </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>Error: Wallet locked, unable to create transaction </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-8"/>
<source>Importing blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Importing bootstrap blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-88"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>?????????? ??? ????? ?? ?? ?? ??? ??? ??????? ??????? ???? </translation>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation>????? ??????? ?? ???????? ??? </translation>
</message>
<message>
<location line="-24"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-38"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+117"/>
<source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+61"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Gridcoin will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-18"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-30"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-62"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+94"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-90"/>
<source>Find peers using DNS lookup (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync checkpoints policy (default: strict)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+83"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Invalid amount for -reservebalance=<amount></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-82"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-74"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-42"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<source>Unable to sign checkpoint, wrong checkpointkey?
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Verifying database integrity...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+57"/>
<source>WARNING: syncronized checkpoint violation detected, but skipped!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-48"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-54"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-84"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=Gridcoinrpc
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 "Gridcoin Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Find peers using internet relay chat (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Require a confirmations for change (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 2500, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Imports blocks from external blk000?.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+53"/>
<source>Error: Wallet unlocked for staking only, unable to create transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-158"/>
<source>This help message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+95"/>
<source>Wallet %s resides outside data directory %s.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot obtain a lock on data directory %s. Gridcoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-98"/>
<source>Gridcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+140"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Loading addresses...</source>
<translation>??? ?????? ? ??? ??...</translation>
</message>
<message>
<location line="-15"/>
<source>Error loading blkindex.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error loading wallet.dat: Wallet requires newer version of Gridcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart Gridcoin to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Error: could not start node</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Invalid amount</source>
<translation>???? ??? ??</translation>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-34"/>
<source>Loading block index...</source>
<translation>????? ??????? ? ??? ??...</translation>
</message>
<message>
<location line="-103"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Unable to bind to %s on this computer. Gridcoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-97"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+55"/>
<source>Invalid amount for -mininput=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Loading wallet...</source>
<translation>????? ? ??? ??...</translation>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot initialize keypool</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation>??-??????-???...</translation>
</message>
<message>
<location line="+5"/>
<source>Done loading</source>
<translation>??? ?? ???|</translation>
</message>
<message>
<location line="-167"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Error</source>
<translation>???</translation>
</message>
<message>
<location line="+6"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation type="unfinished"/>
</message>
</context>
</TS> | {
"content_hash": "1a9543101cf6fdc75e5d2673ce317e1b",
"timestamp": "",
"source": "github",
"line_count": 3280,
"max_line_length": 395,
"avg_line_length": 33.48689024390244,
"alnum_prop": 0.5665121953440098,
"repo_name": "icede/Gridcoin-Research",
"id": "736a29deb0c8d641fb88a33abafbde30f126f7f2",
"size": "109840",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/qt/locale/bitcoin_hi_IN.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "51312"
},
{
"name": "Batchfile",
"bytes": "12171"
},
{
"name": "C",
"bytes": "528965"
},
{
"name": "C#",
"bytes": "239392"
},
{
"name": "C++",
"bytes": "3525596"
},
{
"name": "CMake",
"bytes": "14722"
},
{
"name": "CSS",
"bytes": "1127"
},
{
"name": "Groff",
"bytes": "130690"
},
{
"name": "HTML",
"bytes": "50640"
},
{
"name": "M4",
"bytes": "2144"
},
{
"name": "Makefile",
"bytes": "137256"
},
{
"name": "NSIS",
"bytes": "5914"
},
{
"name": "Objective-C",
"bytes": "858"
},
{
"name": "Objective-C++",
"bytes": "3537"
},
{
"name": "Python",
"bytes": "41580"
},
{
"name": "QMake",
"bytes": "15223"
},
{
"name": "Shell",
"bytes": "314076"
},
{
"name": "TypeScript",
"bytes": "283460"
},
{
"name": "Visual Basic",
"bytes": "1348660"
}
],
"symlink_target": ""
} |
class ProfilesController < ApplicationController
before_filter :authenticate_user!, :except => [:view]
autocomplete :profile, :keyboard
def view
@profile = Profile.find params[:id]
@records = @profile.records.sort do |a, b|
a.created_at - b.created_at
end
@wpm_data = @records.map do |rec|
rec.wpm
end
@cpm_data = @records.map do |rec|
rec.cpm
end
end
# Add or create a profile and associate it with the current user.
respond_to :json
def save
profile = Profile.find_or_create_by_keyboard_and_layout params[:keyboard], params[:layout]
current_user.profiles << profile
respond_with profile
end
# Delete a profile from a user's account.
# (This doesn't actually delete the profile, just the association.)
respond_to :json
def delete
current_user.profiles.delete Profile.find(params[:id])
render :json => true
end
def choose
if params[:profile_id] and params[:type]
p params[:profile_id], params[:type]
session[:profile_id] = params[:profile_id]
if params[:type] == 'practice'
redirect_to :controller => 'type', :action => 'practice'
elsif params[:type] == 'compete'
redirect_to :controller => 'type', :action => 'compete'
end
else
@profiles = current_user.profiles
end
end
def profile_url something
""
end
end
| {
"content_hash": "2aaa9f51e85e514e14c48d7c2185041c",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 94,
"avg_line_length": 25.321428571428573,
"alnum_prop": 0.6311706629055007,
"repo_name": "hans/typr",
"id": "d124fbfcc49348846d36329e2e9acb7e5e77d780",
"size": "1418",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/controllers/profiles_controller.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "70521"
},
{
"name": "Ruby",
"bytes": "40835"
}
],
"symlink_target": ""
} |
package com.google.firebase.database.connection;
public interface ConnectionAuthTokenProvider {
/**
* Gets the token that should currently be used for authenticated requests.
*
* @param forceRefresh Pass true to get a new, up-to-date token rather than a (potentially
* expired) cached token.
* @param callback Callback to be notified after operation completes.
*/
void getToken(boolean forceRefresh, GetTokenCallback callback);
interface GetTokenCallback {
/**
* Called if the getToken operation completed successfully. Token may be null if there is no
* auth state currently.
*/
void onSuccess(String token);
/**
* Called if the getToken operation fails.
*
* <p>TODO: Figure out sane way to plumb errors through.
*/
void onError(String error);
}
}
| {
"content_hash": "b0274e67d8d0c828abb1baf7d811ddb9",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 96,
"avg_line_length": 27,
"alnum_prop": 0.6929510155316607,
"repo_name": "firebase/firebase-admin-java",
"id": "8874238ed25e5485c18642530981a69467def09a",
"size": "1431",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/com/google/firebase/database/connection/ConnectionAuthTokenProvider.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "3736707"
},
{
"name": "Shell",
"bytes": "2174"
}
],
"symlink_target": ""
} |
require_relative 'test_helper'
class TestSearch < Test::Unit::TestCase
class FakeConnection
def search(args)
OpenStruct.new(:result_code => Net::LDAP::ResultCodeOperationsError, :message => "error", :success? => false)
end
end
def setup
@service = MockInstrumentationService.new
@connection = Net::LDAP.new :instrumentation_service => @service
@connection.instance_variable_set(:@open_connection, FakeConnection.new)
end
def test_true_result
assert_nil @connection.search(:return_result => true)
end
def test_false_result
refute @connection.search(:return_result => false)
end
def test_no_result
assert_nil @connection.search
end
def test_instrumentation_publishes_event
events = @service.subscribe "search.net_ldap"
@connection.search(:filter => "test")
payload, result = events.pop
assert payload.key?(:result)
assert payload.key?(:filter)
assert_equal "test", payload[:filter]
end
end
| {
"content_hash": "dd2f22eeaff14e3e050d11d8f8d882ed",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 115,
"avg_line_length": 25.842105263157894,
"alnum_prop": 0.7026476578411406,
"repo_name": "cloudvolumes/ruby-net-ldap",
"id": "c577a6a230c4cd658ef2cb0dde0f40e182213efa",
"size": "1013",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "test/test_search.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "256505"
},
{
"name": "Shell",
"bytes": "5448"
}
],
"symlink_target": ""
} |
insert into csm_application(APPLICATION_NAME,APPLICATION_DESCRIPTION,DECLARATIVE_FLAG,ACTIVE_FLAG,UPDATE_DATE)
values ("csmupt","CSM UPT Super Admin Application",0,0,sysdate());
insert into csm_user (LOGIN_NAME,FIRST_NAME,LAST_NAME,PASSWORD,UPDATE_DATE)
values ("superadmin","super.admin.first.name","super.admin.last.name","zJPWCwDeSgG8j2uyHEABIQ==",sysdate());
insert into csm_protection_element(PROTECTION_ELEMENT_NAME,PROTECTION_ELEMENT_DESCRIPTION,OBJECT_ID,APPLICATION_ID,UPDATE_DATE)
values("csmupt","CSM UPT Super Admin Application Protection Element","csmupt",1,sysdate());
insert into csm_user_pe(PROTECTION_ELEMENT_ID,USER_ID)
values(1,1);
#
# The following entry is for your application.
# Replace <<application_context_name>> with your application name.
#
INSERT INTO csm_application(APPLICATION_NAME,APPLICATION_DESCRIPTION,DECLARATIVE_FLAG,ACTIVE_FLAG,UPDATE_DATE,DATABASE_URL,DATABASE_USER_NAME,DATABASE_PASSWORD,DATABASE_DIALECT,DATABASE_DRIVER,CSM_VERSION)
VALUES ("CLM","CLM",0,0,sysdate(),"jdbc:mysql://localhost:3306/clm","clm","nGNTxuVEogo=","org.hibernate.dialect.MySQLDialect","com.mysql.jdbc.Driver","4.2");
insert into csm_protection_element(PROTECTION_ELEMENT_NAME,PROTECTION_ELEMENT_DESCRIPTION,OBJECT_ID,APPLICATION_ID,UPDATE_DATE)
values("CLM","CLM","CLM",1,sysdate());
insert into csm_user_pe(PROTECTION_ELEMENT_ID,USER_ID)
values(2,1);
insert into csm_protection_element(PROTECTION_ELEMENT_NAME,PROTECTION_ELEMENT_DESCRIPTION,OBJECT_ID,APPLICATION_ID,UPDATE_DATE)
values("APPLICATION_NAME:csmupt","APPLICATION_NAME:csmupt","APPLICATION_NAME:csmupt",2,sysdate());
insert into csm_protection_group(PROTECTION_GROUP_NAME,PROTECTION_GROUP_DESCRIPTION,APPLICATION_ID,LARGE_ELEMENT_COUNT_FLAG,UPDATE_DATE)
values("APPLICATION_NAME","APPLICATION_NAME",2,0,sysdate());
insert into csm_pg_pe(protection_group_id,protection_element_id,update_date) values (1,3,sysdate());
insert into csm_role(role_name,role_description,application_id,active_flag,update_date)
values("READ_ROLE","READ_ROLE",2,1,sysdate());
insert into csm_user_group_role_pg(user_id,role_id,protection_group_id,update_date)
values(1,1,1,sysdate());
#
# The following entries are Common Set of Privileges
#
INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES("CREATE","This privilege grants permission to a user to create an entity. This entity can be an object, a database entry, or a resource such as a network connection", sysdate());
INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES("ACCESS","This privilege allows a user to access a particular resource. Examples of resources include a network or database connection, socket, module of the application, or even the application itself", sysdate());
INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES("READ","This privilege permits the user to read data from a file, URL, database, an object, etc. This can be used at an entity level signifying that the user is allowed to read data about a particular entry", sysdate());
INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES("WRITE","This privilege allows a user to write data to a file, URL, database, an object, etc. This can be used at an entity level signifying that the user is allowed to write data about a particular entity", sysdate());
INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES("UPDATE","This privilege grants permission at an entity level and signifies that the user is allowed to update data for a particular entity. Entities may include an object, object attribute, database row etc", sysdate());
INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES("DELETE","This privilege permits a user to delete a logical entity. This entity can be an object, a database entry, a resource such as a network connection, etc", sysdate());
INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES("EXECUTE","This privilege allows a user to execute a particular resource. The resource can be a method, function, behavior of the application, URL, button etc", sysdate());
insert into csm_role_privilege(role_id,privilege_id) values (1,3);
COMMIT;
| {
"content_hash": "f9e175722f8ea1ff9f369cdd8cede4b2",
"timestamp": "",
"source": "github",
"line_count": 74,
"max_line_length": 228,
"avg_line_length": 58.24324324324324,
"alnum_prop": 0.7839907192575406,
"repo_name": "NCIP/caarray",
"id": "e29b575a4f8bee9a847bb761a082c8df554c985e",
"size": "4690",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "software/third-party/ncicb.clm/common/resources/db/db-install/mysql/DataPrimingMySQL.sql",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "615"
},
{
"name": "CSS",
"bytes": "126854"
},
{
"name": "FreeMarker",
"bytes": "4941"
},
{
"name": "Groovy",
"bytes": "4998"
},
{
"name": "HTML",
"bytes": "101282"
},
{
"name": "Java",
"bytes": "7360097"
},
{
"name": "JavaScript",
"bytes": "1167628"
},
{
"name": "Mathematica",
"bytes": "104531225"
},
{
"name": "PLSQL",
"bytes": "38277"
},
{
"name": "XSLT",
"bytes": "53231"
}
],
"symlink_target": ""
} |
package utils
import io.github.honeycombcheesecake.play.silhouette.api.Env
import io.github.honeycombcheesecake.play.silhouette.impl.authenticators.SessionAuthenticator
import models.User
trait DefaultEnv extends Env {
type I = User
type A = SessionAuthenticator
}
| {
"content_hash": "50e1094f571faee3892e1df65c123a9e",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 93,
"avg_line_length": 27.1,
"alnum_prop": 0.8302583025830258,
"repo_name": "wjglerum/bamboesmanager",
"id": "5cbeb84a3ba2607495393cedc23444a23d3cad1b",
"size": "271",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/utils/DefaultEnv.scala",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "949"
},
{
"name": "HTML",
"bytes": "44427"
},
{
"name": "JavaScript",
"bytes": "5267"
},
{
"name": "Scala",
"bytes": "77307"
}
],
"symlink_target": ""
} |
#include "El.hpp"
namespace El {
template<typename F>
void Ris( Matrix<F>& R, Int n )
{
DEBUG_ONLY(CSE cse("Ris"))
R.Resize( n, n );
const F oneHalf = F(1)/F(2);
auto risFill = [=]( Int i, Int j ) { return oneHalf/(F(n-i-j)-oneHalf); };
IndexDependentFill( R, function<F(Int,Int)>(risFill) );
}
template<typename F>
void Ris( AbstractDistMatrix<F>& R, Int n )
{
DEBUG_ONLY(CSE cse("Ris"))
R.Resize( n, n );
const F oneHalf = F(1)/F(2);
auto risFill = [=]( Int i, Int j ) { return oneHalf/(F(n-i-j)-oneHalf); };
IndexDependentFill( R, function<F(Int,Int)>(risFill) );
}
template<typename F>
void Ris( AbstractBlockDistMatrix<F>& R, Int n )
{
DEBUG_ONLY(CSE cse("Ris"))
R.Resize( n, n );
const F oneHalf = F(1)/F(2);
auto risFill = [=]( Int i, Int j ) { return oneHalf/(F(n-i-j)-oneHalf); };
IndexDependentFill( R, function<F(Int,Int)>(risFill) );
}
#define PROTO(F) \
template void Ris( Matrix<F>& R, Int n ); \
template void Ris( AbstractDistMatrix<F>& R, Int n ); \
template void Ris( AbstractBlockDistMatrix<F>& R, Int n );
#define EL_NO_INT_PROTO
#define EL_ENABLE_QUAD
#include "El/macros/Instantiate.h"
} // namespace El
| {
"content_hash": "9ae08c4af7c07b801a6171de308d8f13",
"timestamp": "",
"source": "github",
"line_count": 45,
"max_line_length": 78,
"avg_line_length": 26.68888888888889,
"alnum_prop": 0.6161532056619484,
"repo_name": "birm/Elemental",
"id": "459f7e09e5ec7c1a05bc5850a670592289bfe28b",
"size": "1465",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/matrices/Ris.cpp",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "765465"
},
{
"name": "C++",
"bytes": "7506377"
},
{
"name": "CMake",
"bytes": "191511"
},
{
"name": "Makefile",
"bytes": "313"
},
{
"name": "Matlab",
"bytes": "13306"
},
{
"name": "Python",
"bytes": "954574"
},
{
"name": "Ruby",
"bytes": "1393"
},
{
"name": "Shell",
"bytes": "1335"
},
{
"name": "TeX",
"bytes": "23728"
}
],
"symlink_target": ""
} |
// RobotBuilder Version: 2.0
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.
package org.usfirst.frc862.sirius.commands;
import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc862.sirius.Robot;
/**
*
*/
public class PivottoIntake extends Command {
private static final double INTAKE_ANGLE = 20;
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR
public PivottoIntake() {
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
}
// Called just before this Command runs the first time
protected void initialize() {
System.out.println("Move to intake");
}
// Called repeatedly when this Command is scheduled to run
protected void execute() {
System.out.printf("Angle %f\n", Robot.pivot.getAngle());
Robot.pivot.moveToAngle(INTAKE_ANGLE);
if (Math.abs(Robot.pivot.getAngle()) > 30) {
Robot.pivot.setPower(0);
}
}
// Make this return true when this Command no longer needs to run execute()
protected boolean isFinished() {
return Robot.pivot.atAngle(INTAKE_ANGLE);
}
// Called once after isFinished returns true
protected void end() {
Robot.pivot.hold();
}
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
protected void interrupted() {
end();
}
}
| {
"content_hash": "dd3cbf6a828f3cb0011d4627fbf591dc",
"timestamp": "",
"source": "github",
"line_count": 70,
"max_line_length": 79,
"avg_line_length": 32.357142857142854,
"alnum_prop": 0.7006622516556291,
"repo_name": "frc-862/SummerSirius",
"id": "471da34ea6d50f4ede2128ed23aeb4184b26807a",
"size": "2265",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/org/usfirst/frc862/sirius/commands/PivottoIntake.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "452"
},
{
"name": "HTML",
"bytes": "5764"
},
{
"name": "Java",
"bytes": "602772"
},
{
"name": "Shell",
"bytes": "479"
}
],
"symlink_target": ""
} |
#pragma once
#include "antlr4-common.h"
namespace antlr4 {
namespace tree {
class ANTLR4CPP_PUBLIC ParseTreeWalker {
public:
static ParseTreeWalker DEFAULT;
virtual ~ParseTreeWalker() {};
virtual void walk(ParseTreeListener *listener, ParseTree *t) const;
protected:
/// The discovery of a rule node, involves sending two events: the generic
/// <seealso cref="ParseTreeListener#enterEveryRule"/> and a
/// <seealso cref="RuleContext"/>-specific event. First we trigger the generic and then
/// the rule specific. We do them in reverse order upon finishing the node.
virtual void enterRule(ParseTreeListener *listener, ParseTree *r) const;
virtual void exitRule(ParseTreeListener *listener, ParseTree *r) const;
};
} // namespace tree
} // namespace antlr4
| {
"content_hash": "82a6ad3a2c38e741515a45271f6df7c4",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 91,
"avg_line_length": 28.964285714285715,
"alnum_prop": 0.7225647348951911,
"repo_name": "lamthientruc/vac",
"id": "c835d213908c3a7bd2fd4a71f03a44fe98c3f52d",
"size": "1009",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "src/VACSAT/deps/antlr4-4.7/include/antlr4-runtime/tree/ParseTreeWalker.h",
"mode": "33188",
"license": "bsd-2-clause",
"language": [],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.