// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

//! Trait Resolution. See doc.rs.

pub use self::SelectionError::*;
pub use self::FulfillmentErrorCode::*;
pub use self::Vtable::*;
pub use self::ObligationCauseCode::*;

use middle::mem_categorization::Typer;
use middle::subst;
use middle::ty::{mod, Ty};
use middle::infer::InferCtxt;
use std::rc::Rc;
use std::slice::Items;
use syntax::ast;
use syntax::codemap::{Span, DUMMY_SP};
use util::common::ErrorReported;

pub use self::fulfill::FulfillmentContext;
pub use self::select::SelectionContext;
pub use self::select::SelectionCache;
pub use self::select::{MethodMatchResult, MethodMatched, MethodAmbiguous, MethodDidNotMatch};
pub use self::select::{MethodMatchedData}; // intentionally don't export variants
pub use self::util::supertraits;
pub use self::util::transitive_bounds;
pub use self::util::Supertraits;
pub use self::util::search_trait_and_supertraits_from_bound;

mod coherence;
mod fulfill;
mod select;
mod util;

/// An `Obligation` represents some trait reference (e.g. `int:Eq`) for
/// which the vtable must be found.  The process of finding a vtable is
/// called "resolving" the `Obligation`. This process consists of
/// either identifying an `impl` (e.g., `impl Eq for int`) that
/// provides the required vtable, or else finding a bound that is in
/// scope. The eventual result is usually a `Selection` (defined below).
#[deriving(Clone)]
pub struct Obligation<'tcx> {
    pub cause: ObligationCause<'tcx>,
    pub recursion_depth: uint,
    pub trait_ref: Rc<ty::TraitRef<'tcx>>,
}

/// Why did we incur this obligation? Used for error reporting.
#[deriving(Clone)]
pub struct ObligationCause<'tcx> {
    pub span: Span,
    pub code: ObligationCauseCode<'tcx>
}

impl<'tcx> Copy for ObligationCause<'tcx> {}

#[deriving(Clone)]
pub enum ObligationCauseCode<'tcx> {
    /// Not well classified or should be obvious from span.
    MiscObligation,

    /// In an impl of trait X for type Y, type Y must
    /// also implement all supertraits of X.
    ItemObligation(ast::DefId),

    /// Obligation incurred due to an object cast.
    ObjectCastObligation(/* Object type */ Ty<'tcx>),

    /// To implement drop, type must be sendable.
    DropTrait,

    /// Various cases where expressions must be sized/copy/etc:
    AssignmentLhsSized,        // L = X implies that L is Sized
    StructInitializerSized,    // S { ... } must be Sized
    VariableType(ast::NodeId), // Type of each variable must be Sized
    ReturnType,                // Return type must be Sized
    RepeatVec,                 // [T,..n] --> T must be Copy

    // Captures of variable the given id by a closure (span is the
    // span of the closure)
    ClosureCapture(ast::NodeId, Span),

    // Types of fields (other than the last) in a struct must be sized.
    FieldSized,

    // Only Sized types can be made into objects
    ObjectSized,
}

pub type Obligations<'tcx> = subst::VecPerParamSpace<Obligation<'tcx>>;

impl<'tcx> Copy for ObligationCauseCode<'tcx> {}

pub type Selection<'tcx> = Vtable<'tcx, Obligation<'tcx>>;

#[deriving(Clone,Show)]
pub enum SelectionError<'tcx> {
    Unimplemented,
    Overflow,
    OutputTypeParameterMismatch(Rc<ty::TraitRef<'tcx>>, ty::type_err<'tcx>)
}

pub struct FulfillmentError<'tcx> {
    pub obligation: Obligation<'tcx>,
    pub code: FulfillmentErrorCode<'tcx>
}

#[deriving(Clone)]
pub enum FulfillmentErrorCode<'tcx> {
    CodeSelectionError(SelectionError<'tcx>),
    CodeAmbiguity,
}

/// When performing resolution, it is typically the case that there
/// can be one of three outcomes:
///
/// - `Ok(Some(r))`: success occurred with result `r`
/// - `Ok(None)`: could not definitely determine anything, usually due
///   to inconclusive type inference.
/// - `Err(e)`: error `e` occurred
pub type SelectionResult<'tcx, T> = Result<Option<T>, SelectionError<'tcx>>;

/// Given the successful resolution of an obligation, the `Vtable`
/// indicates where the vtable comes from. Note that while we call this
/// a "vtable", it does not necessarily indicate dynamic dispatch at
/// runtime. `Vtable` instances just tell the compiler where to find
/// methods, but in generic code those methods are typically statically
/// dispatched -- only when an object is constructed is a `Vtable`
/// instance reified into an actual vtable.
///
/// For example, the vtable may be tied to a specific impl (case A),
/// or it may be relative to some bound that is in scope (case B).
///
///
/// ```
/// impl<T:Clone> Clone<T> for Option<T> { ... } // Impl_1
/// impl<T:Clone> Clone<T> for Box<T> { ... }    // Impl_2
/// impl Clone for int { ... }             // Impl_3
///
/// fn foo<T:Clone>(concrete: Option<Box<int>>,
///                 param: T,
///                 mixed: Option<T>) {
///
///    // Case A: Vtable points at a specific impl. Only possible when
///    // type is concretely known. If the impl itself has bounded
///    // type parameters, Vtable will carry resolutions for those as well:
///    concrete.clone(); // Vtable(Impl_1, [Vtable(Impl_2, [Vtable(Impl_3)])])
///
///    // Case B: Vtable must be provided by caller. This applies when
///    // type is a type parameter.
///    param.clone();    // VtableParam(Oblig_1)
///
///    // Case C: A mix of cases A and B.
///    mixed.clone();    // Vtable(Impl_1, [VtableParam(Oblig_1)])
/// }
/// ```
///
/// ### The type parameter `N`
///
/// See explanation on `VtableImplData`.
#[deriving(Show,Clone)]
pub enum Vtable<'tcx, N> {
    /// Vtable identifying a particular impl.
    VtableImpl(VtableImplData<'tcx, N>),

    /// Successful resolution to an obligation provided by the caller
    /// for some type parameter.
    VtableParam(VtableParamData<'tcx>),

    /// Successful resolution for a builtin trait.
    VtableBuiltin(VtableBuiltinData<N>),

    /// Vtable automatically generated for an unboxed closure. The def
    /// ID is the ID of the closure expression. This is a `VtableImpl`
    /// in spirit, but the impl is generated by the compiler and does
    /// not appear in the source.
    VtableUnboxedClosure(ast::DefId, subst::Substs<'tcx>),

    /// Same as above, but for a fn pointer type with the given signature.
    VtableFnPointer(ty::Ty<'tcx>),
}

/// Identifies a particular impl in the source, along with a set of
/// substitutions from the impl's type/lifetime parameters. The
/// `nested` vector corresponds to the nested obligations attached to
/// the impl's type parameters.
///
/// The type parameter `N` indicates the type used for "nested
/// obligations" that are required by the impl. During type check, this
/// is `Obligation`, as one might expect. During trans, however, this
/// is `()`, because trans only requires a shallow resolution of an
/// impl, and nested obligations are satisfied later.
#[deriving(Clone)]
pub struct VtableImplData<'tcx, N> {
    pub impl_def_id: ast::DefId,
    pub substs: subst::Substs<'tcx>,
    pub nested: subst::VecPerParamSpace<N>
}

#[deriving(Show,Clone)]
pub struct VtableBuiltinData<N> {
    pub nested: subst::VecPerParamSpace<N>
}

/// A vtable provided as a parameter by the caller. For example, in a
/// function like `fn foo<T:Eq>(...)`, if the `eq()` method is invoked
/// on an instance of `T`, the vtable would be of type `VtableParam`.
#[deriving(PartialEq,Eq,Clone)]
pub struct VtableParamData<'tcx> {
    // In the above example, this would `Eq`
    pub bound: Rc<ty::TraitRef<'tcx>>,
}

/// Matches the self type of the inherent impl `impl_def_id`
/// against `self_ty` and returns the resulting resolution.  This
/// routine may modify the surrounding type context (for example,
/// it may unify variables).
pub fn select_inherent_impl<'a,'tcx>(infcx: &InferCtxt<'a,'tcx>,
                                     param_env: &ty::ParameterEnvironment<'tcx>,
                                     typer: &Typer<'tcx>,
                                     cause: ObligationCause<'tcx>,
                                     impl_def_id: ast::DefId,
                                     self_ty: Ty<'tcx>)
                                     -> SelectionResult<'tcx,
                                            VtableImplData<'tcx, Obligation<'tcx>>>
{
    // This routine is only suitable for inherent impls. This is
    // because it does not attempt to unify the output type parameters
    // from the trait ref against the values from the obligation.
    // (These things do not apply to inherent impls, for which there
    // is no trait ref nor obligation.)
    //
    // Matching against non-inherent impls should be done with
    // `try_resolve_obligation()`.
    assert!(ty::impl_trait_ref(infcx.tcx, impl_def_id).is_none());

    let mut selcx = select::SelectionContext::new(infcx, param_env, typer);
    selcx.select_inherent_impl(impl_def_id, cause, self_ty)
}

/// True if neither the trait nor self type is local. Note that `impl_def_id` must refer to an impl
/// of a trait, not an inherent impl.
pub fn is_orphan_impl(tcx: &ty::ctxt,
                      impl_def_id: ast::DefId)
                      -> bool
{
    !coherence::impl_is_local(tcx, impl_def_id)
}

/// True if there exist types that satisfy both of the two given impls.
pub fn overlapping_impls(infcx: &InferCtxt,
                         impl1_def_id: ast::DefId,
                         impl2_def_id: ast::DefId)
                         -> bool
{
    coherence::impl_can_satisfy(infcx, impl1_def_id, impl2_def_id) &&
    coherence::impl_can_satisfy(infcx, impl2_def_id, impl1_def_id)
}

/// Given generic bounds from an impl like:
///
///    impl<A:Foo, B:Bar+Qux> ...
///
/// along with the bindings for the types `A` and `B` (e.g., `<A=A0, B=B0>`), yields a result like
///
///    [[Foo for A0, Bar for B0, Qux for B0], [], []]
///
/// Expects that `generic_bounds` have already been fully substituted, late-bound regions liberated
/// and so forth, so that they are in the same namespace as `type_substs`.
pub fn obligations_for_generics<'tcx>(tcx: &ty::ctxt<'tcx>,
                                      cause: ObligationCause<'tcx>,
                                      generic_bounds: &ty::GenericBounds<'tcx>,
                                      type_substs: &subst::VecPerParamSpace<Ty<'tcx>>)
                                      -> subst::VecPerParamSpace<Obligation<'tcx>>
{
    util::obligations_for_generics(tcx, cause, 0, generic_bounds, type_substs)
}

pub fn obligation_for_builtin_bound<'tcx>(tcx: &ty::ctxt<'tcx>,
                                          cause: ObligationCause<'tcx>,
                                          source_ty: Ty<'tcx>,
                                          builtin_bound: ty::BuiltinBound)
                                          -> Result<Obligation<'tcx>, ErrorReported>
{
    util::obligation_for_builtin_bound(tcx, cause, builtin_bound, 0, source_ty)
}

impl<'tcx> Obligation<'tcx> {
    pub fn new(cause: ObligationCause<'tcx>, trait_ref: Rc<ty::TraitRef<'tcx>>)
               -> Obligation<'tcx> {
        Obligation { cause: cause,
                     recursion_depth: 0,
                     trait_ref: trait_ref }
    }

    pub fn misc(span: Span, trait_ref: Rc<ty::TraitRef<'tcx>>) -> Obligation<'tcx> {
        Obligation::new(ObligationCause::misc(span), trait_ref)
    }

    pub fn self_ty(&self) -> Ty<'tcx> {
        self.trait_ref.self_ty()
    }
}

impl<'tcx> ObligationCause<'tcx> {
    pub fn new(span: Span, code: ObligationCauseCode<'tcx>)
               -> ObligationCause<'tcx> {
        ObligationCause { span: span, code: code }
    }

    pub fn misc(span: Span) -> ObligationCause<'tcx> {
        ObligationCause { span: span, code: MiscObligation }
    }

    pub fn dummy() -> ObligationCause<'tcx> {
        ObligationCause { span: DUMMY_SP, code: MiscObligation }
    }
}

impl<'tcx, N> Vtable<'tcx, N> {
    pub fn iter_nested(&self) -> Items<N> {
        match *self {
            VtableImpl(ref i) => i.iter_nested(),
            VtableFnPointer(..) => (&[]).iter(),
            VtableUnboxedClosure(..) => (&[]).iter(),
            VtableParam(_) => (&[]).iter(),
            VtableBuiltin(ref i) => i.iter_nested(),
        }
    }

    pub fn map_nested<M>(&self, op: |&N| -> M) -> Vtable<'tcx, M> {
        match *self {
            VtableImpl(ref i) => VtableImpl(i.map_nested(op)),
            VtableFnPointer(ref sig) => VtableFnPointer((*sig).clone()),
            VtableUnboxedClosure(d, ref s) => VtableUnboxedClosure(d, s.clone()),
            VtableParam(ref p) => VtableParam((*p).clone()),
            VtableBuiltin(ref b) => VtableBuiltin(b.map_nested(op)),
        }
    }

    pub fn map_move_nested<M>(self, op: |N| -> M) -> Vtable<'tcx, M> {
        match self {
            VtableImpl(i) => VtableImpl(i.map_move_nested(op)),
            VtableFnPointer(sig) => VtableFnPointer(sig),
            VtableUnboxedClosure(d, s) => VtableUnboxedClosure(d, s),
            VtableParam(p) => VtableParam(p),
            VtableBuiltin(no) => VtableBuiltin(no.map_move_nested(op)),
        }
    }
}

impl<'tcx, N> VtableImplData<'tcx, N> {
    pub fn iter_nested(&self) -> Items<N> {
        self.nested.iter()
    }

    pub fn map_nested<M>(&self,
                         op: |&N| -> M)
                         -> VtableImplData<'tcx, M>
    {
        VtableImplData {
            impl_def_id: self.impl_def_id,
            substs: self.substs.clone(),
            nested: self.nested.map(op)
        }
    }

    pub fn map_move_nested<M>(self, op: |N| -> M)
                              -> VtableImplData<'tcx, M> {
        let VtableImplData { impl_def_id, substs, nested } = self;
        VtableImplData {
            impl_def_id: impl_def_id,
            substs: substs,
            nested: nested.map_move(op)
        }
    }
}

impl<N> VtableBuiltinData<N> {
    pub fn iter_nested(&self) -> Items<N> {
        self.nested.iter()
    }

    pub fn map_nested<M>(&self,
                         op: |&N| -> M)
                         -> VtableBuiltinData<M>
    {
        VtableBuiltinData {
            nested: self.nested.map(op)
        }
    }

    pub fn map_move_nested<M>(self, op: |N| -> M) -> VtableBuiltinData<M> {
        VtableBuiltinData {
            nested: self.nested.map_move(op)
        }
    }
}

impl<'tcx> FulfillmentError<'tcx> {
    fn new(obligation: Obligation<'tcx>, code: FulfillmentErrorCode<'tcx>)
           -> FulfillmentError<'tcx>
    {
        FulfillmentError { obligation: obligation, code: code }
    }

    pub fn is_overflow(&self) -> bool {
        match self.code {
            CodeAmbiguity => false,
            CodeSelectionError(Overflow) => true,
            CodeSelectionError(_) => false,
        }
    }
}


<?php

/**
 * This class provides a list of HTTP status codes and their values
 *
 * @package     Nails
 * @subpackage  common
 * @category    Library
 * @author      Nails Dev Team
 */

namespace Nails\Common\Service;

class HttpCodes
{

    //  1xx Informational
    const STATUS_100                 = 'Continue';
    const STATUS_CONTINUE            = 100;
    const STATUS_101                 = 'Switching Protocols';
    const STATUS_SWITCHING_PROTOCOLS = 101;

    //  2xx Success
    const STATUS_200                           = 'OK';
    const STATUS_OK                            = 200;
    const STATUS_201                           = 'Created';
    const STATUS_CREATED                       = 201;
    const STATUS_202                           = 'Accepted';
    const STATUS_ACCEPTED                      = 202;
    const STATUS_203                           = 'Non-Authoritative Information';
    const STATUS_NON_AUTHORITATIVE_INFORMATION = 203;
    const STATUS_204                           = 'No Content';
    const STATUS_NO_CONTENT                    = 204;
    const STATUS_205                           = 'Reset Content';
    const STATUS_RESET_CONTENT                 = 205;
    const STATUS_206                           = 'Partial Content';
    const STATUS_PARTIAL_CONTENT               = 206;
    const STATUS_207                           = 'Multi-status';
    const STATUS_MULTI_STATUS                  = 207;
    const STATUS_208                           = 'Already imported';
    const STATUS_ALREADY_IMPORTED              = 208;
    const STATUS_226                           = 'IM used';
    const STATUS_IM_USED                       = 226;

    //  3xx Redirection
    const STATUS_300                = 'Multiple Choices';
    const STATUS_MULTIPLE_CHOICES   = 300;
    const STATUS_301                = 'Moved Permanently';
    const STATUS_MOVED_PERMANENTLY  = 301;
    const STATUS_302                = 'Found';
    const STATUS_FOUND              = 302;
    const STATUS_303                = 'See Other';
    const STATUS_SEE_OTHER          = 303;
    const STATUS_304                = 'Not Modified';
    const STATUS_NOT_MODIFIED       = 304;
    const STATUS_305                = 'Use Proxy';
    const STATUS_USE_PROXY          = 305;
    const STATUS_306                = 'Switch Proxy';
    const STATUS_SWITCH_PROXY       = 306;
    const STATUS_307                = 'Temporary redirect';
    const STATUS_TEMPORARY_REDIRECT = 307;
    const STATUS_308                = 'Permanent redirect';
    const STATUS_PERMANENT_REDIRECT = 308;

    //  4xxx Client Error
    const STATUS_400                             = 'Bad Request';
    const STATUS_BAD_REQUEST                     = 400;
    const STATUS_401                             = 'Unauthorized';
    const STATUS_UNAUTHORIZED                    = 401;
    const STATUS_402                             = 'Payment Required';
    const STATUS_PAYMENT_REQUIRED                = 402;
    const STATUS_403                             = 'Forbidden';
    const STATUS_FORBIDDEN                       = 403;
    const STATUS_404                             = 'Not Found';
    const STATUS_NOT_FOUND                       = 404;
    const STATUS_405                             = 'Method Not Allowed';
    const STATUS_METHOD_NOT_ALLOWED              = 405;
    const STATUS_406                             = 'Not Acceptable';
    const STATUS_NOT_ACCEPTABLE                  = 406;
    const STATUS_407                             = 'Proxy Authentication Required';
    const STATUS_PROXY_AUTHENTICATION_REQUIRED   = 407;
    const STATUS_408                             = 'Request Timeout';
    const STATUS_REQUEST_TIMEOUT                 = 408;
    const STATUS_409                             = 'Conflict';
    const STATUS_CONFLICT                        = 409;
    const STATUS_410                             = 'Gone';
    const STATUS_GONE                            = 410;
    const STATUS_411                             = 'Length Required';
    const STATUS_LENGTH_REQUIRED                 = 411;
    const STATUS_412                             = 'Precondition Failed';
    const STATUS_PRECONDITION_FAILED             = 412;
    const STATUS_413                             = 'Request Entity Too Large';
    const STATUS_REQUEST_ENTITY_TOO_LARGE        = 413;
    const STATUS_414                             = 'Request-URI Too Long';
    const STATUS_REQUES_URI_TOO_LONG             = 414;
    const STATUS_415                             = 'Unsupported Media Type';
    const STATUS_UNSUPPORTED_MEDIA_TYPE          = 415;
    const STATUS_416                             = 'Requested Range Not Satisfiable';
    const STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
    const STATUS_417                             = 'Expectation Failed';
    const STATUS_EXPECTATION_FAILED              = 417;
    const STATUS_421                             = 'Misdirected request';
    const STATUS_MISDIRECTED_REQUEST             = 421;
    const STATUS_422                             = 'Unprocessable entity';
    const STATUS_UNPROCESSABLE_ENTITY            = 422;
    const STATUS_423                             = 'Locked';
    const STATUS_LOCKED                          = 423;
    const STATUS_424                             = 'Failed dependency';
    const STATUS_FAILED_DEPENDENCY               = 424;
    const STATUS_426                             = 'Upgrade required';
    const STATUS_UPGRADE_REQUIRED                = 426;
    const STATUS_428                             = 'Precondition required';
    const STATUS_PRECONDITION_REQUIRED           = 428;
    const STATUS_429                             = 'Too many requests';
    const STATUS_TOO_MANY_REQUESTS               = 429;
    const STATUS_431                             = 'Request header fields too large';
    const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;

    //  5xx Server Error
    const STATUS_500                             = 'Internal Server Error';
    const STATUS_INTERNAL_SERVER_ERROR           = 500;
    const STATUS_501                             = 'Not Implemented';
    const STATUS_NOT_IMPLEMENTED                 = 501;
    const STATUS_502                             = 'Bad Gateway';
    const STATUS_BAD_GATEWAY                     = 502;
    const STATUS_503                             = 'Service Unavailable';
    const STATUS_SERVICE_UNAVAILABLE             = 503;
    const STATUS_504                             = 'Gateway Timeout';
    const STATUS_GATEWAY_TIMEOUT                 = 504;
    const STATUS_505                             = 'HTTP Version Not Supported';
    const STATUS_HTTP_VERSION_NOT_SUPPORTED      = 505;
    const STATUS_506                             = 'Variant also negotiates';
    const STATUS_VARIANT_ALSO_NEGOTIATES         = 506;
    const STATUS_507                             = 'Insufficient storage';
    const STATUS_INSUFFICIENT_STORAGE            = 507;
    const STATUS_508                             = 'Loop detected';
    const STATUS_LOOP_DETECTED                   = 508;
    const STATUS_510                             = 'Not extended';
    const STATUS_NOT_EXTENDED                    = 510;
    const STATUS_511                             = 'Network authentication required';
    const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511;

    // --------------------------------------------------------------------------

    /**
     * Returns the human readable portion of an HTTP status code
     *
     * @param $iCode integer The numerical HTTP status code
     *
     * @return null
     */
    public static function getByCode($iCode)
    {
        $sConstant = 'static::STATUS_' . $iCode;
        if (defined($sConstant)) {
            return constant($sConstant);
        }

        return null;
    }
}


typedef void(^SFAlertViewCompletion)(NSInteger buttonIndex, NSString *buttonTitle);

@interface UIAlertView (SFAddition_quickAlert)

+ (void)sf_dismissPresentingDialogAnimated:(BOOL)animated __attribute__((deprecated));

+ (UIAlertView *)sf_alertWithTitle:(NSString *)title message:(NSString *)message completion:(SFAlertViewCompletion)completion cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ... __attribute__((deprecated));

+ (UIAlertView *)sf_alertWithTitle:(NSString *)title message:(NSString *)message completion:(SFAlertViewCompletion)completion cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitleList:(NSArray *)otherButtonTitleList __attribute__((deprecated));

+ (UIAlertView *)sf_alertWithTitle:(NSString *)title message:(NSString *)message completion:(void(^)(void))completion __attribute__((deprecated));

+ (UIAlertView *)sf_alertWithMessage:(NSString *)message completion:(void (^)(void))completion __attribute__((deprecated));

@end

@interface UIAlertView (SFAddition_confirmDialog)

+ (void)sf_confirmWithTitle:(NSString *)title message:(NSString *)message approve:(void(^)(void))approve __attribute__((deprecated));
+ (void)sf_confirmWithTitle:(NSString *)title message:(NSString *)message approve:(void(^)(void))approve cancel:(void(^)(void))cancel __attribute__((deprecated));

@end

@interface UIAlertView (SFAddition_inputDialog)

+ (UITextField *)sf_inputWithTitle:(NSString *)title message:(NSString *)message cancelButtonTitle:(NSString *)cancelButtonTitle approveButtonTitle:(NSString *)approveButtonTitle completion:(void(^)(NSString *input, BOOL cancelled))completion __attribute__((deprecated));

+ (UITextField *)sf_inputWithTitle:(NSString *)title message:(NSString *)message secureTextEntry:(BOOL)secureTextEntry cancelButtonTitle:(NSString *)cancelButtonTitle approveButtonTitle:(NSString *)approveButtonTitle completion:(void(^)(NSString *input, BOOL cancelled))completion __attribute__((deprecated));

@end

@interface UIAlertView (SFAddition)

- (UILabel *)sf_messageLabel __attribute__((deprecated));
- (UILabel *)sf_titleLabel __attribute__((deprecated));

@end


<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <solid android:color="#399C03"/>
    <corners android:radius="25dp"/>
</shape>


//## begin module%3744298B0396.cm preserve=no
//	  %X% %Q% %Z% %W%
//## end module%3744298B0396.cm

//## begin module%3744298B0396.cp preserve=yes
//	********************************************************************************
//
//	Copyright: Nortel Networks 1999
//
//	Classification: Confidential
//
//	Project Name: RRM Simulator / Scheduler
//
//	Package: Statistics Calculation
//
//	File Name: ContinuousHistogram.cpp
//
//	Description: Implementation file for the ContinuousHistogram class.
//
//	Author:	Hélio Azevedo
//
//	Creation Date: May/20/99
//
//	Visual Source Safe $Revision: 8 $
//
//	Last check in $Date: 16/06/99 9:28 $
//
//	********************************************************************************
//## end module%3744298B0396.cp

//## Module: ContinuousHistogram%3744298B0396; Pseudo Package body
//## Source file: T:\StatisticsCalculation\ContinuousHistogram.cpp

//## begin module%3744298B0396.additionalIncludes preserve=no
//## end module%3744298B0396.additionalIncludes

//## begin module%3744298B0396.includes preserve=yes

#include "MemLeak.h"
#include <assert.h>	  // define the assert macro

//## end module%3744298B0396.includes

// ContinuousHistogram
#include "ContinuousHistogram.h"
//## begin module%3744298B0396.additionalDeclarations preserve=yes

using namespace std;

namespace sch {

//## end module%3744298B0396.additionalDeclarations

// Class ContinuousHistogram

//## Operation: ContinuousHistogram%37442A26021C
//	********************************************************************************
//
//	Name: ContinuousHistogram(Float minVal,Float maxVal, Int intervals)
//
//	Description: Non-default constructor - requires the lower boundary, upper boundary and number of intervals. The pValues array is
//	allocated.
//
//	Input parameters: Float minVal;     //lower boundary of the input data stream
//	                 Float maxVal;     //upper boundary of the input data stream
//	                  Int intervals;  //number of intervals in the histogram
//
//	Returns: none
//
//	Exceptions: SchException, with one of the following error codes:
//	               SCH_ALLOCATION_ERROR       = could not allocate pValues array
//	               SCH_INVALID_RANGE          = upper boundary is not greater than lower boundary
//
//	********************************************************************************
ContinuousHistogram::ContinuousHistogram (Float minVal, Float maxVal, Int intervals)
  //## begin ContinuousHistogram::ContinuousHistogram%37442A26021C.hasinit preserve=no
      : maxValue(maxVal),
        minValue(minVal),
        numIntervals(intervals),
        pValues(NULL),
        maxSample(SIM_HUGE_VAL),
        minSample(SIM_HUGE_VAL),
        numSamples(0),
        cumSum(0.0),
        cumSumOfSquares(0.0)
  //## end ContinuousHistogram::ContinuousHistogram%37442A26021C.hasinit
  //## begin ContinuousHistogram::ContinuousHistogram%37442A26021C.initialization preserve=yes
  //## end ContinuousHistogram::ContinuousHistogram%37442A26021C.initialization
{
  //## begin ContinuousHistogram::ContinuousHistogram%37442A26021C.body preserve=yes

	RetCode rc = SCH_SUCCESS;   // used to provide a single point for raising exception

	//
	// upper boundary must be greater than lower boundary
	//
	if (minValue > maxValue)
	{
		rc = SCH_INVALID_RANGE;
	}

	if (rc == SCH_SUCCESS)
	{
		//
		// calculate width of each interval
		//
		intervalWidth = (maxValue - minValue) / numIntervals;

		//
		// allocate pValues array
		//
		pValues = new Int[numIntervals];     // allocate array
		if (pValues == NULL)
		{
			rc = SCH_ALLOCATION_ERROR;       // could not create array
		}
		else
		{
			memset (pValues, 0, numIntervals * sizeof (Int)); // set all values to 0
		}
	}

	if (rc != SCH_SUCCESS)
	{
		throw SchException (rc);     // an error occurred, abort object construction
	}

	return;

  //## end ContinuousHistogram::ContinuousHistogram%37442A26021C.body
}

//## Other Operations (implementation)
//## Operation: getResult%37442A34033F
//	********************************************************************************
//
//	Name: RetCode getResult(Int intervalNumber, Int *pResult)
//
//	Description: Returns the contents (frequency) of the corresponding interval number.
//
//	Input parameters: Int intervalNumber;  //first interval number  is zero and the last is  interval-1
//
//	Output parameters: Int *pResult;  //contents of the corresponding interval number
//
//	Returns: SCH_SUCCESS
//	         SCH_INVALID_PARAMETER - pResult is NULL
//	         SCH_INVALID_INTERVAL  - interval number is negative or above higher interval - ignore contents of pResult
//
//	********************************************************************************
RetCode ContinuousHistogram::getResult (Int intervalNumber, Int *pResult)
{
  //## begin ContinuousHistogram::getResult%37442A34033F.body preserve=yes

	RetCode rc = SCH_SUCCESS;

	assert (pValues);

	if (pResult == NULL)
	{
		rc = SCH_INVALID_PARAMETER;
	}

	//
	// intervalNumber within valid range?
	//
	else if ((intervalNumber >= 0) && (intervalNumber < numIntervals))
	{
		*pResult = pValues[intervalNumber];   // yes, return interval frequency
	}
	else
	{
		rc = SCH_INVALID_INTERVAL;
	}

	return (rc);

  //## end ContinuousHistogram::getResult%37442A34033F.body
}

//## Operation: nextSample%37442A34035D
//	********************************************************************************
//
//	Name: RetCode nextSample (Float sample)
//
//	Description: Includes the next sample in the sequence and increments the contents of the interval which this sample falls into.
//
//	Input parameters:Float sample;  //next sample in the sequence
//
//	Returns: SCH_SUCCESS
//
//	********************************************************************************
RetCode ContinuousHistogram::nextSample (Float sample)
{
  //## begin ContinuousHistogram::nextSample%37442A34035D.body preserve=yes

	RetCode rc = SCH_SUCCESS;
	Int     index; 			   // position of pValues to be incremented

	assert (pValues);

	// update minimum and maximun samples
	if (numSamples == 0) {
		maxSample = sample;
		minSample = sample;
	}
	else {
		if (sample < minSample) minSample = sample;
		if (sample > maxSample) maxSample = sample;
	}

	numSamples++;				// increments number of samples
	cumSum = cumSum + sample;
	cumSumOfSquares = cumSumOfSquares + sample*sample;

	if (sample < minValue)
	{
		//
		// account sample in first interval if sample is below the lower boundary
		//
		index = 0;
	}
	else if (sample >= maxValue)
	{
		//
		// account sample in last interval if sample is above the higher boundary
		//
		index = numIntervals - 1;
	}
	else
	{
		//
		// account sample in appropriate interval
		// the interval number is actually the index of pValues, which is calculated by
		//        index = (sample - minValue) div intervalWidth
		//  where div is an integer division
		//
		index = (sample - minValue) / intervalWidth;
	}

	//
	// increment contents of target interval
	//
	pValues [index]++;

	return (rc);

  //## end ContinuousHistogram::nextSample%37442A34035D.body
}

//## Operation: reset%374C031B03A1
//	********************************************************************************
//
//	Name:RetCode reset (void)
//
//	Description: Reset all attributes allowing the start of a new sequence of samples.
//
//	Parameters: none
//
//	Returns: SCH_SUCCESS
//	           Error code in case of error
//
//	Remarks:Note that all old information is lost after the reset.
//
//	********************************************************************************
RetCode ContinuousHistogram::reset ()
{
  //## begin ContinuousHistogram::reset%374C031B03A1.body preserve=yes

	// resets attributes variables
	maxSample  = SIM_HUGE_VAL;
	minSample  = SIM_HUGE_VAL;
	numSamples = 0;
	cumSum = 0.0;
	cumSumOfSquares = 0.0;

	if (pValues == NULL)
		return SCH_ALLOCATION_ERROR;       // the objetct has not been created
	else
		memset (pValues, 0, numIntervals * sizeof (Int)); // set all values to 0

	return SCH_SUCCESS;

  //## end ContinuousHistogram::reset%374C031B03A1.body
}

// Additional Declarations
  //## begin ContinuousHistogram%3744298B0396.declarations preserve=yes
  //## end ContinuousHistogram%3744298B0396.declarations

//## begin module%3744298B0396.epilog preserve=yes

} // namespace sch

//## end module%3744298B0396.epilog


package com.bbva.kltt.apirest.core.generator.output.language;

import org.junit.Test;

import com.bbva.kltt.apirest.core.parsed_info.ParsedInfoHandlerTest;
import com.bbva.kltt.apirest.core.parsed_info.responses.ResponseTest;
import com.bbva.kltt.apirest.core.util.APIRestGeneratorException;
import com.bbva.kltt.apirest.core.util.ConstantsTest;

/**
 * ------------------------------------------------
 * @author Francisco Manuel Benitez Chico
 * ------------------------------------------------
 */
public class OutputLanguageExceptionsTest
{
	@Test
	public void fullTest() throws APIRestGeneratorException
	{
		final OutputLanguageExceptions outputLanguageExceptions = new OutputLanguageExceptions(ParsedInfoHandlerTest.generateDummyParsedInfoHandler(),
																						 	   new MyOutputLanguageNaming(),
																						 	   new MyOutputLanguageOperations()) ;

		outputLanguageExceptions.getCommonException() ;
		outputLanguageExceptions.getCommonExceptionClassName() ;
		outputLanguageExceptions.getCustomExceptionAsClassName(ConstantsTest.OPERATION_ID, ResponseTest.generateDummyResponse()) ;
		outputLanguageExceptions.getCustomExceptionsList(ConstantsTest.OPERATION_ID, ConstantsTest.PATH_OPERATION) ;
		outputLanguageExceptions.getOutboundServerExceptionsMap() ;

		outputLanguageExceptions.getParsedInfoHandler() ;
	}
}


{% extends "theme_bootstrap/base.html" %}

{% load staticfiles %}
{% load metron_tags %}
{% load i18n %}

{% block styles %}
{% include "_styles.html" %}

{% endblock %}

{% block extra_head_base %}
{% block extra_head %}

{% endblock %}
{% endblock %}
{% block topbar_base %}

            {% block topbar %}

                <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

                </button>
                {% block site_brand %}{{ SITE_NAME }}{% endblock %}

                {% block nav %}

People

Teams

                {% endblock %}
                {% block account_bar %}{% include "_account_bar.html" %}{% endblock %}

            {% endblock %}

{% endblock %}

{% block footer %}
{% include "_footer.html" %}
{% endblock %}

{% block scripts %}
{% include "_scripts.html" %}

{% endblock %}

{% block extra_body_base %}
{% analytics %}
{% block extra_body %}{% endblock %}
{% endblock %}


<?php
namespace App\Test\TestCase\Model\Table;

use App\Model\Table\RoomsTable;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;

/**
 * App\Model\Table\RoomsTable Test Case
 */
class RoomsTableTest extends TestCase
{

    /**
     * Test subject
     *
     * @var \App\Model\Table\RoomsTable
     */
    public $Rooms;

    /**
     * Fixtures
     *
     * @var array
     */
    public $fixtures = [
        'app.rooms',
        'app.statuses'
    ];

    /**
     * setUp method
     *
     * @return void
     */
    public function setUp()
    {
        parent::setUp();
        $config = TableRegistry::exists('Rooms') ? [] : ['className' => RoomsTable::class];
        $this->Rooms = TableRegistry::get('Rooms', $config);
    }

    /**
     * tearDown method
     *
     * @return void
     */
    public function tearDown()
    {
        unset($this->Rooms);

        parent::tearDown();
    }

    /**
     * Test initialize method
     *
     * @return void
     */
    public function testInitialize()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }

    /**
     * Test validationDefault method
     *
     * @return void
     */
    public function testValidationDefault()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }

    /**
     * Test buildRules method
     *
     * @return void
     */
    public function testBuildRules()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }
}


<?php
namespace Analogue\ORM\System\Proxies;

use Analogue\ORM\Mappable;

interface ProxyInterface
{
    /**
     * Convert a proxy into the underlying related Object
     *
     * @return Mappable|\Analogue\ORM\EntityCollection
     */
    public function load();

    /**
     * Return true if the underlying relation has been lazy loaded
     *
     * @return boolean
     */
    public function isLoaded();
}


<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <Preference
        android:key="pref_disable_battery_optimization"
        android:title="@string/pref_disable_battery_optimization"
        android:summary="@string/pref_disable_battery_optimization_summary"
        android:icon="@drawable/ic_exclamation"
        android:shouldDisableView="true"
        app:isPreferenceVisible="false" />

    <com.apps.adrcotfas.goodtime.settings.DayOfWeekPreference
        app:key="pref_reminder_days"
        app:layout="@layout/preference_days_of_week"
        app:allowDividerAbove="false"
        app:iconSpaceReserved="false"/>

    <Preference
        app:key="pref_reminder_time"
        app:title="@string/reminder_time"
        android:dependency="pref_reminder_days"
        app:layout="@layout/preference_compact"
        app:iconSpaceReserved="false"/>

    <PreferenceCategory
        android:title="@string/pref_header_general"
        app:iconSpaceReserved="false">

        <Preference
            android:key="pref_timer_duration"
            app:fragment="com.apps.adrcotfas.goodtime.settings.DurationsSettingsFragment"
            android:title="@string/pref_timer_duration"
            android:summary="@string/timer_durations"
            android:icon="@drawable/ic_status_goodtime"/>

        <Preference
            app:key="pref_work_day_start"
            app:title="@string/pref_work_day_start"
            app:layout="@layout/preference_compact"
            app:iconSpaceReserved="false"/>

        <ListPreference
            android:dialogTitle="@string/pref_timer_style"
            android:key="pref_timer_style"
            android:entries="@array/pref_timer_style"
            android:defaultValue="@string/pref_timer_style_default_value"
            android:entryValues="@array/pref_timer_style_values"
            android:persistent="true"
            android:summary="%s"
            android:title="@string/pref_timer_style"
            app:iconSpaceReserved="false"/>

        <CheckBoxPreference
            android:defaultValue="false"
            android:key="pref_fullscreen"
            android:title="@string/pref_fullscreen"
            app:iconSpaceReserved="false"/>

        <CheckBoxPreference
            android:defaultValue="true"
            android:key="pref_keep_screen_on"
            android:title="@string/pref_keep_screen_on"
            app:iconSpaceReserved="false"/>

        <CheckBoxPreference
            android:defaultValue="false"
            android:dependency="pref_keep_screen_on"
            android:key="pref_screen_saver"
            android:title="@string/pref_screen_saver"
            android:summary="@string/pref_screen_saver_summary"
            app:iconSpaceReserved="false"/>

        <SwitchPreferenceCompat
            android:defaultValue="true"
            android:persistent="true"
            android:key="pref_amoled"
            android:title="@string/pref_amoled"
            app:iconSpaceReserved="false"/>

        <CheckBoxPreference
            android:defaultValue="true"
            android:key="pref_sessions_counter"
            android:persistent="true"
            android:title="@string/pref_session_counter"
            android:summary="@string/pref_session_counter_summary"
            app:iconSpaceReserved="false"/>

        <CheckBoxPreference
            android:defaultValue="false"
            android:key="pref_show_label"
            android:persistent="true"
            android:title="@string/pref_show_label"
            android:summary="@string/pref_show_label_summary"
            app:iconSpaceReserved="false"/>

    </PreferenceCategory>

    <PreferenceCategory
        android:title="@string/pref_header_notifications"
        app:iconSpaceReserved="false">

        <SwitchPreferenceCompat
            android:defaultValue="true"
            android:key="pref_enable_ringtone"
            android:title="@string/pref_enable_ringtone"
            android:icon="@drawable/ic_notifications"/>

        <SwitchPreferenceCompat
            android:defaultValue="false"
            android:key="pref_priority_alarm"
            android:title="@string/pref_priority_alarm"
            android:summary="@string/pref_priority_alarm_summary"
            android:dependency="pref_enable_ringtone"
            app:iconSpaceReserved="false"/>

        <Preference
            android:key="pref_notification_sound_work"
            android:summary="@string/pref_ringtone_summary"
            android:title="@string/pref_ringtone"
            android:dependency="pref_enable_ringtone"
            app:layout="@layout/preference_default"
            app:iconSpaceReserved="false"/>

        <Preference
            android:key="pref_notification_sound_break"
            android:summary="@string/pref_ringtone_summary"
            android:title="@string/pref_ringtone_break"
            android:dependency="pref_enable_ringtone"
            app:layout="@layout/preference_default"
            app:iconSpaceReserved="false"/>

        <ListPreference
            android:key="pref_vibration_type"
            android:defaultValue="@string/pref_vibration_values_strong"
            android:entryValues="@array/pref_vibration_values"
            android:entries="@array/pref_vibration_types"
            android:title="@string/pref_vibrate"
            android:summary="%s"
            android:icon="@drawable/ic_vibration"/>

        <SwitchPreferenceCompat
            android:defaultValue="false"
            android:key="pref_flashing_notification"
            android:title="@string/pref_flashing_notification"
            android:summary="@string/pref_flashing_notification_summary"
            android:icon="@drawable/ic_flash"/>

        <SwitchPreferenceCompat
            android:defaultValue="false"
            android:key="pref_one_minute_left_notification"
            android:title="@string/pref_one_minute_left_notification"
            android:summary="@string/pref_one_minute_left_notification_summary"
            app:iconSpaceReserved="false">
        </SwitchPreferenceCompat>

        <CheckBoxPreference
            android:defaultValue="false"
            android:key="pref_auto_start_break"
            android:title="@string/pref_auto_start_break"
            android:summary="@string/pref_auto_start_break_summary"
            app:iconSpaceReserved="false"/>

        <CheckBoxPreference
            android:defaultValue="false"
            android:key="pref_auto_start_work"
            android:title="@string/pref_auto_start_work"
            android:summary="@string/pref_auto_start_work_summary"
            app:iconSpaceReserved="false"/>

        <CheckBoxPreference
            android:defaultValue="false"
            android:key="pref_ringtone_insistent"
            android:title="@string/pref_ringtone_insistent"
            android:summary="@string/pref_ringtone_insistent_summary"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>

    <PreferenceCategory
        android:title="@string/pref_header_during_work_sessions"
        app:iconSpaceReserved="false">

        <CheckBoxPreference
            android:defaultValue="false"
            android:key="pref_disable_sound_and_vibration"
            android:title="@string/pref_disable_sound_and_vibration"
            app:iconSpaceReserved="false"/>

        <CheckBoxPreference
            android:defaultValue="false"
            android:key="pref_dnd"
            android:title="@string/pref_dnd"
            app:iconSpaceReserved="false"/>

        <CheckBoxPreference
            android:defaultValue="false"
            android:key="pref_disable_wifi"
            android:title="@string/pref_disable_wifi"
            app:iconSpaceReserved="false"/>
    </PreferenceCategory>

</PreferenceScreen>


<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>equations: Not compatible 👼</title>
    <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
    <link href="../../../../../bootstrap.min.css" rel="stylesheet">
    <link href="../../../../../bootstrap-custom.css" rel="stylesheet">
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

             Coq bench

clean / released

8.13.2 / equations - 1.2.3+8.12

            « Up

              equations

                1.2.3+8.12
                Not compatible 👼

📅  (2022-10-06 11:12:50 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-threads        base
base-unix           base
conf-findutils      1           Virtual package relying on findutils
conf-gmp            4           Virtual package relying on a GMP lib system installation
coq                 8.13.2      Formal proof management system
num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.06.1      The OCaml compiler (virtual package)
ocaml-base-compiler 4.06.1      Official 4.06.1 release
ocaml-config        1           OCaml Switch Configuration
ocamlfind           1.9.5       A library manager for OCaml
zarith              1.12        Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
authors: [ "Matthieu Sozeau <matthieu.sozeau@inria.fr>" "Cyprien Mangin <cyprien.mangin@m4x.org>" ]
dev-repo: "git+https://github.com/mattam82/Coq-Equations.git#8.12"
maintainer: "matthieu.sozeau@inria.fr"
homepage: "https://mattam82.github.io/Coq-Equations"
bug-reports: "https://github.com/mattam82/Coq-Equations/issues"
license: "LGPL-2.1-only"
synopsis: "A function definition package for Coq"
description: """
Equations is a function definition plugin for Coq, that allows the
definition of functions by dependent pattern-matching and well-founded,
mutual or nested structural recursion and compiles them into core
terms. It automatically derives the clauses equations, the graph of the
function and its associated elimination principle.
"""
tags: [
  "keyword:dependent pattern-matching"
  "keyword:functional elimination"
  "category:Miscellaneous/Coq Extensions"
  "logpath:Equations"
]
build: [
  ["./configure.sh"]
  [make "-j%{jobs}%"]
]
install: [
  [make "install"]
]
run-test: [
  [make "test-suite"]
]
depends: [
  "coq" {>= "8.12.0" & < "8.13~"}
]
url {
  src:
    "https://github.com/mattam82/Coq-Equations/archive/v1.2.3-8.12.tar.gz"
  checksum: "sha512=c19617ef127a56916d67b2c347f21cd267b250a23988424bb1486336e784a5df7a6c85ee355eb99e148431f8d7b3534993f3fdba3aaa4769d74f8c3548fb2efa"
}

Lint

Command

true

Return code

0

Dry install 🏜

Dry install with the current Coq version:

Command

opam install -y --show-action coq-equations.1.2.3+8.12 coq.8.13.2

Return code

5120

Output

[NOTE] Package coq is already installed (current version is 8.13.2).
The following dependencies couldn't be met:
  - coq-equations -> coq < 8.13~ -> ocaml < 4.06.0
      base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
  - No available version of coq satisfies the constraints
No solution found, exiting

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command

opam remove -y coq; opam install -y --show-action --unlock-base coq-equations.1.2.3+8.12

Return code

0

Install dependencies

Command

true

Return code

0

Duration

0 s

Install 🚀

Command

true

Return code

0

Duration

0 s

Installation size

No files were installed.

Uninstall 🧹

Command

true

Return code

0

Missing removes

                none

Wrong removes

                none

          Sources are on GitHub © Guillaume Claret 🐣


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="huyifei.mymvp.test.HashMapActivity">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:orientation="horizontal">

        <TextView
            android:textSize="25sp"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:padding="5dp"
            android:text="key: "/>

        <EditText
            android:id="@+id/key"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:layout_weight="3"
            android:padding="5dp"/>

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:orientation="horizontal">

        <TextView
            android:textSize="25sp"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:padding="5dp"
            android:text="value: "/>

        <EditText
            android:id="@+id/value"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:layout_weight="3"
            android:padding="5dp"/>

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:orientation="horizontal">

        <Button
            android:id="@+id/put"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:layout_weight="1"
            android:text="put"/>

        <Button
            android:id="@+id/get"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:layout_weight="1"
            android:text="get"/>

        <Button
            android:id="@+id/remove"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:layout_weight="1"
            android:text="remove"/>

    </LinearLayout>

    <TextView
        android:id="@+id/result"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"/>

</LinearLayout>


@{

# Script module or binary module file associated with this manifest.
RootModule = 'SBAuthorizationRule.psm1'

# Version number of this module.
ModuleVersion = '0.10.1.0'

# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID = '286b166a-9bff-4ed0-859a-b22ff26a4733'

# Author of this module
Author = 'Ryan Spletzer'

# Company or vendor of this module
CompanyName = ''

# Copyright statement for this module
Copyright = '(c) 2017 Ryan Spletzer. All rights reserved.'

# Description of the functionality provided by this module
# Description = ''

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '5.0'

# Name of the Windows PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the Windows PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# CLRVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
# RequiredModules = @()

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
NestedModules = @( '..\..\Modules\SB.Util\SB.Util.psd1' )

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
# FunctionsToExport = @()

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
# CmdletsToExport = @()

# Variables to export from this module
# VariablesToExport = '*'

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
# AliasesToExport = @()

# DSC resources to export from this module
DscResourcesToExport = 'SBAuthorizationRule'

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# HelpInfo URI of this module
# HelpInfoURI = ''

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

}


package org.jboss.pnc.executor;

import org.jboss.pnc.common.Configuration;
import org.jboss.pnc.common.json.ConfigurationParseException;
import org.jboss.pnc.common.json.moduleconfig.SystemConfig;
import org.jboss.pnc.common.json.moduleprovider.PncConfigProvider;
import org.jboss.pnc.executor.exceptions.BuildProcessException;
import org.jboss.pnc.executor.servicefactories.BuildDriverFactory;
import org.jboss.pnc.executor.servicefactories.EnvironmentDriverFactory;
import org.jboss.pnc.executor.servicefactories.RepositoryManagerFactory;
import org.jboss.pnc.model.RepositoryType;
import org.jboss.pnc.spi.BuildExecutionStatus;
import org.jboss.pnc.spi.builddriver.BuildDriver;
import org.jboss.pnc.spi.builddriver.BuildDriverResult;
import org.jboss.pnc.spi.builddriver.BuildDriverStatus;
import org.jboss.pnc.spi.builddriver.CompletedBuild;
import org.jboss.pnc.spi.builddriver.RunningBuild;
import org.jboss.pnc.spi.environment.DestroyableEnvironment;
import org.jboss.pnc.spi.environment.EnvironmentDriver;
import org.jboss.pnc.spi.environment.RunningEnvironment;
import org.jboss.pnc.spi.environment.StartedEnvironment;
import org.jboss.pnc.spi.environment.exception.EnvironmentDriverException;
import org.jboss.pnc.spi.events.BuildExecutionStatusChangedEvent;
import org.jboss.pnc.spi.executor.BuildExecutionConfiguration;
import org.jboss.pnc.spi.executor.BuildExecutionSession;
import org.jboss.pnc.spi.executor.BuildExecutor;
import org.jboss.pnc.spi.executor.exceptions.ExecutorException;
import org.jboss.pnc.spi.repositorymanager.BuildExecution;
import org.jboss.pnc.spi.repositorymanager.RepositoryManager;
import org.jboss.pnc.spi.repositorymanager.RepositoryManagerResult;
import org.jboss.pnc.spi.repositorymanager.model.RepositorySession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.PreDestroy;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.net.URI;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.function.Consumer;

/**
 * @author Matej Lazar
 */
@ApplicationScoped
public class DefaultBuildExecutor implements BuildExecutor {

    private final Logger log = LoggerFactory.getLogger(DefaultBuildExecutor.class);

    private ExecutorService executor;

    private RepositoryManagerFactory repositoryManagerFactory;
    private BuildDriverFactory buildDriverFactory;
    private EnvironmentDriverFactory environmentDriverFactory;
    private final Map<Integer, BuildExecutionSession> runningExecutions = new HashMap<>();

    @Deprecated
    public DefaultBuildExecutor() {}; //CDI workaround for constructor injection

    @Inject
    public DefaultBuildExecutor(
            RepositoryManagerFactory repositoryManagerFactory,
            BuildDriverFactory buildDriverFactory,
            EnvironmentDriverFactory environmentDriverFactory,
            Configuration configuration) {

        this.repositoryManagerFactory = repositoryManagerFactory;
        this.buildDriverFactory = buildDriverFactory;
        this.environmentDriverFactory = environmentDriverFactory;

        int executorThreadPoolSize = 12;
        try {
            String executorThreadPoolSizeStr = configuration.getModuleConfig(new PncConfigProvider<>(SystemConfig.class)).getExecutorThreadPoolSize();
            if (executorThreadPoolSizeStr != null) {
                executorThreadPoolSize = Integer.parseInt(executorThreadPoolSizeStr);
            }
        } catch (ConfigurationParseException e) {
            log.warn("Unable parse config. Using defaults.");
        }

        executor = Executors.newFixedThreadPool(executorThreadPoolSize);
    }

    @Override
    public BuildExecutionSession startBuilding(
            BuildExecutionConfiguration buildExecutionConfiguration,
            Consumer<BuildExecutionStatusChangedEvent> onBuildExecutionStatusChangedEvent) throws ExecutorException {

        BuildExecutionSession buildExecutionSession = new DefaultBuildExecutionSession(buildExecutionConfiguration, onBuildExecutionStatusChangedEvent);
        buildExecutionSession.setStatus(BuildExecutionStatus.NEW);

        //TODO update logging: log.info("Staring build execution task: {}; Build Configuration id: {}.", buildExecutionConfiguration.getId(), buildExecutionConfiguration.etBuildConfiguration().getId());

        runningExecutions.put(buildExecutionConfiguration.getId(), buildExecutionSession);

        CompletableFuture.supplyAsync(() -> configureRepository(buildExecutionSession), executor)
                .thenApplyAsync(repositoryConfiguration -> setUpEnvironment(buildExecutionSession, repositoryConfiguration), executor)
                .thenComposeAsync(startedEnvironment -> waitForEnvironmentInitialization(buildExecutionSession, startedEnvironment), executor)
                .thenApplyAsync(nul -> buildSetUp(buildExecutionSession), executor)
                .thenComposeAsync(runningBuild -> waitBuildToComplete(buildExecutionSession, runningBuild), executor)
                .thenApplyAsync(completedBuild -> retrieveBuildDriverResults(buildExecutionSession, completedBuild), executor)
                .thenApplyAsync(nul -> retrieveRepositoryManagerResults(buildExecutionSession), executor)
                .thenApplyAsync(nul -> destroyEnvironment(buildExecutionSession), executor)
                .handleAsync((nul, e) -> completeExecution(buildExecutionSession, e), executor);

        //TODO re-connect running instances in case of crash
        return buildExecutionSession;
    }

    @Override
    public BuildExecutionSession getRunningExecution(int buildExecutionTaskId) {
        return runningExecutions.get(buildExecutionTaskId);
    }

    private RepositorySession configureRepository(BuildExecutionSession buildExecutionSession) {
        buildExecutionSession.setStatus(BuildExecutionStatus.REPO_SETTING_UP);
        try {
            RepositoryManager repositoryManager = repositoryManagerFactory.getRepositoryManager(RepositoryType.MAVEN);
            BuildExecution buildExecution = buildExecutionSession.getBuildExecutionConfiguration();
            return repositoryManager.createBuildRepository(buildExecution);
        } catch (Throwable e) {
            throw new BuildProcessException(e);
        }
    }

    private StartedEnvironment setUpEnvironment(BuildExecutionSession buildExecutionSession, RepositorySession repositorySession) {
        buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_ENV_SETTING_UP);
        BuildExecutionConfiguration buildExecutionConfiguration = buildExecutionSession.getBuildExecutionConfiguration();
        try {
            EnvironmentDriver envDriver = environmentDriverFactory.getDriver(buildExecutionConfiguration.getBuildType());
            StartedEnvironment startedEnv = envDriver.buildEnvironment(
                    buildExecutionConfiguration.getBuildType(),
                    repositorySession);
            return startedEnv;
        } catch (Throwable e) {
            throw new BuildProcessException(e);
        }
    }

    private CompletableFuture<Void> waitForEnvironmentInitialization(BuildExecutionSession buildExecutionSession, StartedEnvironment startedEnvironment) {
        CompletableFuture<Void> waitToCompleteFuture = new CompletableFuture<>();
        try {
            Consumer<RunningEnvironment> onComplete = (runningEnvironment) -> {
                buildExecutionSession.setRunningEnvironment(runningEnvironment);
                buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_ENV_SETUP_COMPLETE_SUCCESS);
                waitToCompleteFuture.complete(null);
            };
            Consumer<Exception> onError = (e) -> {
                buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_ENV_SETUP_COMPLETE_WITH_ERROR);
                waitToCompleteFuture.completeExceptionally(new BuildProcessException(e, startedEnvironment));
            };
            buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_ENV_WAITING);

            startedEnvironment.monitorInitialization(onComplete, onError);
        } catch (Throwable e) {
            waitToCompleteFuture.completeExceptionally(new BuildProcessException(e, startedEnvironment));
        }
        return waitToCompleteFuture;
    }

    private RunningBuild buildSetUp(BuildExecutionSession buildExecutionSession) {
        buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_SETTING_UP);
        RunningEnvironment runningEnvironment = buildExecutionSession.getRunningEnvironment();
        try {
            String liveLogWebSocketUrl = runningEnvironment.getBuildAgentUrl();
            log.debug("Setting live log websocket url: {}", liveLogWebSocketUrl);
            buildExecutionSession.setLiveLogsUri(Optional.of(new URI(liveLogWebSocketUrl)));
            buildExecutionSession.setStartTime(new Date());
            BuildDriver buildDriver = buildDriverFactory.getBuildDriver(buildExecutionSession.getBuildExecutionConfiguration().getBuildType());
            return buildDriver.startProjectBuild(buildExecutionSession, runningEnvironment);
        } catch (Throwable e) {
            throw new BuildProcessException(e, runningEnvironment);
        }
    }

    private CompletableFuture<CompletedBuild> waitBuildToComplete(BuildExecutionSession buildExecutionSession, RunningBuild runningBuild) {
        CompletableFuture<CompletedBuild> waitToCompleteFuture = new CompletableFuture<>();
        try {
            Consumer<CompletedBuild> onComplete = (completedBuild) -> {
                waitToCompleteFuture.complete(completedBuild);
            };
            Consumer<Throwable> onError = (e) -> {
                waitToCompleteFuture.completeExceptionally(new BuildProcessException(e, runningBuild.getRunningEnvironment()));
            };

            buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_WAITING);

            runningBuild.monitor(onComplete, onError);
        } catch (Throwable exception) {
            waitToCompleteFuture.completeExceptionally(
                    new BuildProcessException(exception, runningBuild.getRunningEnvironment()));
        }
        return waitToCompleteFuture;
    }

    private Void retrieveBuildDriverResults(BuildExecutionSession buildExecutionSession, CompletedBuild completedBuild) {
        buildExecutionSession.setStatus(BuildExecutionStatus.COLLECTING_RESULTS_FROM_BUILD_DRIVER);
        try {
            BuildDriverResult buildResult = completedBuild.getBuildResult();
            BuildDriverStatus buildDriverStatus = buildResult.getBuildDriverStatus();
            buildExecutionSession.setBuildDriverResult(buildResult);
            if (buildDriverStatus.completedSuccessfully()) {
                buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_COMPLETED_SUCCESS);
            } else {
                buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_COMPLETED_WITH_ERROR);
            }
            return null;
        } catch (Throwable e) {
            throw new BuildProcessException(e, completedBuild.getRunningEnvironment());
        }
    }

    private Void retrieveRepositoryManagerResults(BuildExecutionSession buildExecutionSession) {
        try {
            buildExecutionSession.setStatus(BuildExecutionStatus.COLLECTING_RESULTS_FROM_REPOSITORY_NAMAGER);
            RunningEnvironment runningEnvironment = buildExecutionSession.getRunningEnvironment();
            buildExecutionSession.setRunningEnvironment(runningEnvironment);

            RepositorySession repositorySession = runningEnvironment.getRepositorySession();
            RepositoryManagerResult repositoryManagerResult = repositorySession.extractBuildArtifacts();
            buildExecutionSession.setRepositoryManagerResult(repositoryManagerResult);
        } catch (Throwable e) {
            throw new BuildProcessException(e, buildExecutionSession.getRunningEnvironment());
        }
        return null;
    }

    private Void destroyEnvironment(BuildExecutionSession buildExecutionSession) {
        try {
            buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_ENV_DESTROYING);
            buildExecutionSession.getRunningEnvironment().destroyEnvironment();
            buildExecutionSession.setStatus(BuildExecutionStatus.BUILD_ENV_DESTROYED);
        } catch (Throwable e) {
            throw new BuildProcessException(e);
        }
        return null;
    }

    private Void completeExecution(BuildExecutionSession buildExecutionSession, Throwable e) {
        buildExecutionSession.setStatus(BuildExecutionStatus.FINALIZING_EXECUTION);

        if (buildExecutionSession.getStartTime() == null) {
            buildExecutionSession.setException(new ExecutorException("Missing start time."));
        }
        if (e != null) {
            stopRunningEnvironment(e);
        }

        if (e != null) {
            buildExecutionSession.setException(new ExecutorException(e));
        }

        if (buildExecutionSession.getEndTime() != null) {
            buildExecutionSession.setException(new ExecutorException("End time already set."));
        } else {
            buildExecutionSession.setEndTime(new Date());
        }

        //check if any of previous statuses indicated "failed" state
        if (buildExecutionSession.hasFailed()) { //TODO differentiate build and system error
            buildExecutionSession.setStatus(BuildExecutionStatus.DONE_WITH_ERRORS);
        } else {
            buildExecutionSession.setStatus(BuildExecutionStatus.DONE);
        }

        log.debug("Removing buildExecutionTask [" + buildExecutionSession.getId() + "] form list of running tasks.");
        runningExecutions.remove(buildExecutionSession.getId());

        return null;
    }

    /**
     * Tries to stop running environment if the exception contains information about running environment
     *
     * @param ex Exception in build process (To stop the environment it has to be instance of BuildProcessException)
     */
    private void stopRunningEnvironment(Throwable ex) {
        DestroyableEnvironment destroyableEnvironment = null;
        if(ex instanceof BuildProcessException) {
            BuildProcessException bpEx = (BuildProcessException) ex;
            destroyableEnvironment = bpEx.getDestroyableEnvironment();
        } else if(ex.getCause() instanceof BuildProcessException) {
            BuildProcessException bpEx = (BuildProcessException) ex.getCause();
            destroyableEnvironment = bpEx.getDestroyableEnvironment();
        } else {
            //It shouldn't never happen - Throwable should be caught in all steps of build chain
            //and BuildProcessException should be thrown instead of that
            log.warn("Possible leak of a running environment! Build process ended with exception, "
                    + "but the exception didn't contain information about running environment.", ex);
        }

        try {
            if (destroyableEnvironment != null)
                destroyableEnvironment.destroyEnvironment();

        } catch (EnvironmentDriverException envE) {
            log.warn("Running environment" + destroyableEnvironment + " couldn't be destroyed!", envE);
        }
    }

    @Override
    @PreDestroy
    public void shutdown() {
        executor.shutdown();
    }
}


package mil.nga.giat.mage.sdk.event;

public interface IUserDispatcher {

	/**
	 * Adds a listener
	 *
	 * @param listener
	 * @return
	 * @throws Exception
	 */
    boolean addListener(final IUserEventListener listener) throws Exception;

	/**
	 * Removes the listener
	 *
	 * @param listener
	 * @return
	 * @throws Exception
	 */
    boolean removeListener(final IUserEventListener listener) throws Exception;
}


<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context="com.hmsoft.weargoproremote.ui.TestActivity">
    <item android:id="@+id/action_video_vga60" android:title="@string/action_video_vga60"
        android:orderInCategory="100" android:showAsAction="never" />
    <item android:id="@+id/action_video_72030" android:title="@string/action_video_72030"
        android:orderInCategory="100" android:showAsAction="never" />
    <item android:id="@+id/action_video_720g60" android:title="@string/action_video_72060"
        android:orderInCategory="100" android:showAsAction="never" />
    <item android:id="@+id/action_video_96030" android:title="@string/action_video_96030"
        android:orderInCategory="100" android:showAsAction="never" />
    <item android:id="@+id/action_video_108030" android:title="@string/action_video_108030"
        android:orderInCategory="100" android:showAsAction="never" />
</menu>


/*[clinic input]
preserve
[clinic start generated code]*/

PyDoc_STRVAR(_io_open__doc__,
"open($module, /, file, mode=\'r\', buffering=-1, encoding=None,\n"
"     errors=None, newline=None, closefd=True, opener=None)\n"
"--\n"
"\n"
"Open file and return a stream.  Raise OSError upon failure.\n"
"\n"
"file is either a text or byte string giving the name (and the path\n"
"if the file isn\'t in the current working directory) of the file to\n"
"be opened or an integer file descriptor of the file to be\n"
"wrapped. (If a file descriptor is given, it is closed when the\n"
"returned I/O object is closed, unless closefd is set to False.)\n"
"\n"
"mode is an optional string that specifies the mode in which the file\n"
"is opened. It defaults to \'r\' which means open for reading in text\n"
"mode.  Other common values are \'w\' for writing (truncating the file if\n"
"it already exists), \'x\' for creating and writing to a new file, and\n"
"\'a\' for appending (which on some Unix systems, means that all writes\n"
"append to the end of the file regardless of the current seek position).\n"
"In text mode, if encoding is not specified the encoding used is platform\n"
"dependent: locale.getpreferredencoding(False) is called to get the\n"
"current locale encoding. (For reading and writing raw bytes use binary\n"
"mode and leave encoding unspecified.) The available modes are:\n"
"\n"
"========= ===============================================================\n"
"Character Meaning\n"
"--------- ---------------------------------------------------------------\n"
"\'r\'       open for reading (default)\n"
"\'w\'       open for writing, truncating the file first\n"
"\'x\'       create a new file and open it for writing\n"
"\'a\'       open for writing, appending to the end of the file if it exists\n"
"\'b\'       binary mode\n"
"\'t\'       text mode (default)\n"
"\'+\'       open a disk file for updating (reading and writing)\n"
"\'U\'       universal newline mode (deprecated)\n"
"========= ===============================================================\n"
"\n"
"The default mode is \'rt\' (open for reading text). For binary random\n"
"access, the mode \'w+b\' opens and truncates the file to 0 bytes, while\n"
"\'r+b\' opens the file without truncation. The \'x\' mode implies \'w\' and\n"
"raises an `FileExistsError` if the file already exists.\n"
"\n"
"Python distinguishes between files opened in binary and text modes,\n"
"even when the underlying operating system doesn\'t. Files opened in\n"
"binary mode (appending \'b\' to the mode argument) return contents as\n"
"bytes objects without any decoding. In text mode (the default, or when\n"
"\'t\' is appended to the mode argument), the contents of the file are\n"
"returned as strings, the bytes having been first decoded using a\n"
"platform-dependent encoding or using the specified encoding if given.\n"
"\n"
"\'U\' mode is deprecated and will raise an exception in future versions\n"
"of Python.  It has no effect in Python 3.  Use newline to control\n"
"universal newlines mode.\n"
"\n"
"buffering is an optional integer used to set the buffering policy.\n"
"Pass 0 to switch buffering off (only allowed in binary mode), 1 to select\n"
"line buffering (only usable in text mode), and an integer > 1 to indicate\n"
"the size of a fixed-size chunk buffer.  When no buffering argument is\n"
"given, the default buffering policy works as follows:\n"
"\n"
"* Binary files are buffered in fixed-size chunks; the size of the buffer\n"
"  is chosen using a heuristic trying to determine the underlying device\'s\n"
"  \"block size\" and falling back on `io.DEFAULT_BUFFER_SIZE`.\n"
"  On many systems, the buffer will typically be 4096 or 8192 bytes long.\n"
"\n"
"* \"Interactive\" text files (files for which isatty() returns True)\n"
"  use line buffering.  Other text files use the policy described above\n"
"  for binary files.\n"
"\n"
"encoding is the name of the encoding used to decode or encode the\n"
"file. This should only be used in text mode. The default encoding is\n"
"platform dependent, but any encoding supported by Python can be\n"
"passed.  See the codecs module for the list of supported encodings.\n"
"\n"
"errors is an optional string that specifies how encoding errors are to\n"
"be handled---this argument should not be used in binary mode. Pass\n"
"\'strict\' to raise a ValueError exception if there is an encoding error\n"
"(the default of None has the same effect), or pass \'ignore\' to ignore\n"
"errors. (Note that ignoring encoding errors can lead to data loss.)\n"
"See the documentation for codecs.register or run \'help(codecs.Codec)\'\n"
"for a list of the permitted encoding error strings.\n"
"\n"
"newline controls how universal newlines works (it only applies to text\n"
"mode). It can be None, \'\', \'\\n\', \'\\r\', and \'\\r\\n\'.  It works as\n"
"follows:\n"
"\n"
"* On input, if newline is None, universal newlines mode is\n"
"  enabled. Lines in the input can end in \'\\n\', \'\\r\', or \'\\r\\n\', and\n"
"  these are translated into \'\\n\' before being returned to the\n"
"  caller. If it is \'\', universal newline mode is enabled, but line\n"
"  endings are returned to the caller untranslated. If it has any of\n"
"  the other legal values, input lines are only terminated by the given\n"
"  string, and the line ending is returned to the caller untranslated.\n"
"\n"
"* On output, if newline is None, any \'\\n\' characters written are\n"
"  translated to the system default line separator, os.linesep. If\n"
"  newline is \'\' or \'\\n\', no translation takes place. If newline is any\n"
"  of the other legal values, any \'\\n\' characters written are translated\n"
"  to the given string.\n"
"\n"
"If closefd is False, the underlying file descriptor will be kept open\n"
"when the file is closed. This does not work when a file name is given\n"
"and must be True in that case.\n"
"\n"
"A custom opener can be used by passing a callable as *opener*. The\n"
"underlying file descriptor for the file object is then obtained by\n"
"calling *opener* with (*file*, *flags*). *opener* must return an open\n"
"file descriptor (passing os.open as *opener* results in functionality\n"
"similar to passing None).\n"
"\n"
"open() returns a file object whose type depends on the mode, and\n"
"through which the standard file operations such as reading and writing\n"
"are performed. When open() is used to open a file in a text mode (\'w\',\n"
"\'r\', \'wt\', \'rt\', etc.), it returns a TextIOWrapper. When used to open\n"
"a file in a binary mode, the returned class varies: in read binary\n"
"mode, it returns a BufferedReader; in write binary and append binary\n"
"modes, it returns a BufferedWriter, and in read/write mode, it returns\n"
"a BufferedRandom.\n"
"\n"
"It is also possible to use a string or bytearray as a file for both\n"
"reading and writing. For strings StringIO can be used like a file\n"
"opened in a text mode, and for bytes a BytesIO can be used like a file\n"
"opened in a binary mode.");

#define _IO_OPEN_METHODDEF    \
    {"open", (PyCFunction)(void(*)(void))_io_open, METH_FASTCALL|METH_KEYWORDS, _io_open__doc__},

static PyObject *
_io_open_impl(PyObject *module, PyObject *file, const char *mode,
              int buffering, const char *encoding, const char *errors,
              const char *newline, int closefd, PyObject *opener);

static PyObject *
_io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
    PyObject *return_value = NULL;
    static const char * const _keywords[] = {"file", "mode", "buffering", "encoding", "errors", "newline", "closefd", "opener", NULL};
    static _PyArg_Parser _parser = {NULL, _keywords, "open", 0};
    PyObject *argsbuf[8];
    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
    PyObject *file;
    const char *mode = "r";
    int buffering = -1;
    const char *encoding = NULL;
    const char *errors = NULL;
    const char *newline = NULL;
    int closefd = 1;
    PyObject *opener = Py_None;

    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 8, 0, argsbuf);
    if (!args) {
        goto exit;
    }
    file = args[0];
    if (!noptargs) {
        goto skip_optional_pos;
    }
    if (args[1]) {
        if (!PyUnicode_Check(args[1])) {
            _PyArg_BadArgument("open", "argument 'mode'", "str", args[1]);
            goto exit;
        }
        Py_ssize_t mode_length;
        mode = PyUnicode_AsUTF8AndSize(args[1], &mode_length);
        if (mode == NULL) {
            goto exit;
        }
        if (strlen(mode) != (size_t)mode_length) {
            PyErr_SetString(PyExc_ValueError, "embedded null character");
            goto exit;
        }
        if (!--noptargs) {
            goto skip_optional_pos;
        }
    }
    if (args[2]) {
        if (PyFloat_Check(args[2])) {
            PyErr_SetString(PyExc_TypeError,
                            "integer argument expected, got float" );
            goto exit;
        }
        buffering = _PyLong_AsInt(args[2]);
        if (buffering == -1 && PyErr_Occurred()) {
            goto exit;
        }
        if (!--noptargs) {
            goto skip_optional_pos;
        }
    }
    if (args[3]) {
        if (args[3] == Py_None) {
            encoding = NULL;
        }
        else if (PyUnicode_Check(args[3])) {
            Py_ssize_t encoding_length;
            encoding = PyUnicode_AsUTF8AndSize(args[3], &encoding_length);
            if (encoding == NULL) {
                goto exit;
            }
            if (strlen(encoding) != (size_t)encoding_length) {
                PyErr_SetString(PyExc_ValueError, "embedded null character");
                goto exit;
            }
        }
        else {
            _PyArg_BadArgument("open", "argument 'encoding'", "str or None", args[3]);
            goto exit;
        }
        if (!--noptargs) {
            goto skip_optional_pos;
        }
    }
    if (args[4]) {
        if (args[4] == Py_None) {
            errors = NULL;
        }
        else if (PyUnicode_Check(args[4])) {
            Py_ssize_t errors_length;
            errors = PyUnicode_AsUTF8AndSize(args[4], &errors_length);
            if (errors == NULL) {
                goto exit;
            }
            if (strlen(errors) != (size_t)errors_length) {
                PyErr_SetString(PyExc_ValueError, "embedded null character");
                goto exit;
            }
        }
        else {
            _PyArg_BadArgument("open", "argument 'errors'", "str or None", args[4]);
            goto exit;
        }
        if (!--noptargs) {
            goto skip_optional_pos;
        }
    }
    if (args[5]) {
        if (args[5] == Py_None) {
            newline = NULL;
        }
        else if (PyUnicode_Check(args[5])) {
            Py_ssize_t newline_length;
            newline = PyUnicode_AsUTF8AndSize(args[5], &newline_length);
            if (newline == NULL) {
                goto exit;
            }
            if (strlen(newline) != (size_t)newline_length) {
                PyErr_SetString(PyExc_ValueError, "embedded null character");
                goto exit;
            }
        }
        else {
            _PyArg_BadArgument("open", "argument 'newline'", "str or None", args[5]);
            goto exit;
        }
        if (!--noptargs) {
            goto skip_optional_pos;
        }
    }
    if (args[6]) {
        if (PyFloat_Check(args[6])) {
            PyErr_SetString(PyExc_TypeError,
                            "integer argument expected, got float" );
            goto exit;
        }
        closefd = _PyLong_AsInt(args[6]);
        if (closefd == -1 && PyErr_Occurred()) {
            goto exit;
        }
        if (!--noptargs) {
            goto skip_optional_pos;
        }
    }
    opener = args[7];
skip_optional_pos:
    return_value = _io_open_impl(module, file, mode, buffering, encoding, errors, newline, closefd, opener);

exit:
    return return_value;
}

PyDoc_STRVAR(_io_open_code__doc__,
"open_code($module, /, path)\n"
"--\n"
"\n"
"Opens the provided file with the intent to import the contents.\n"
"\n"
"This may perform extra validation beyond open(), but is otherwise interchangeable\n"
"with calling open(path, \'rb\').");

#define _IO_OPEN_CODE_METHODDEF    \
    {"open_code", (PyCFunction)(void(*)(void))_io_open_code, METH_FASTCALL|METH_KEYWORDS, _io_open_code__doc__},

static PyObject *
_io_open_code_impl(PyObject *module, PyObject *path);

static PyObject *
_io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
    PyObject *return_value = NULL;
    static const char * const _keywords[] = {"path", NULL};
    static _PyArg_Parser _parser = {NULL, _keywords, "open_code", 0};
    PyObject *argsbuf[1];
    PyObject *path;

    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
    if (!args) {
        goto exit;
    }
    if (!PyUnicode_Check(args[0])) {
        _PyArg_BadArgument("open_code", "argument 'path'", "str", args[0]);
        goto exit;
    }
    if (PyUnicode_READY(args[0]) == -1) {
        goto exit;
    }
    path = args[0];
    return_value = _io_open_code_impl(module, path);

exit:
    return return_value;
}
/*[clinic end generated code: output=3df6bc6d91697545 input=a9049054013a1b77]*/


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Class com.box.boxjavalibv2.BoxConfigBuilder</title>
<meta name="date" content="2014-03-17">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
com.box.boxjavalibv2.BoxConfigBuilder

No usage of com.box.boxjavalibv2.BoxConfigBuilder

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


<!DOCTYPE html>

    <meta charset="UTF-8" />
    <title>Title</title>

SHACLEX API

API Documentation

Check RDF Data

Check schemas

Validate RDF Data with a Schema

About SHACLEX


class Scene
{
public:
	Scene(const std::string& SceneFilePath);

	void UnLoad();

	void LoadSceneObject(const json& obj, Transform* parent);
	bool Load(SharedPtr<World> InWorld);
	void LoadCore(json& core);

	bool IsNewScene();

	void Save(const std::string& fileName, Transform* root);
	void SaveSceneRecursively(json& d, Transform* CurrentTransform);

	SharedPtr<World> GameWorld;
	File CurrentLevel;
	Path FilePath;
};


<?php

// autoload_psr4.php @generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
    'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/type-resolver/src', $vendorDir . '/phpdocumentor/reflection-docblock/src'),
    'Wn\\Generators\\' => array($vendorDir . '/wn/lumen-generators/src'),
    'When\\' => array($vendorDir . '/tplaner/when/src'),
    'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
    'TijsVerkoyen\\CssToInlineStyles\\' => array($vendorDir . '/tijsverkoyen/css-to-inline-styles/src'),
    'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
    'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
    'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
    'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
    'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'),
    'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'),
    'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
    'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
    'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
    'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'),
    'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
    'SocialiteProviders\\Manager\\Test\\' => array($vendorDir . '/socialiteproviders/manager/tests'),
    'SocialiteProviders\\Manager\\' => array($vendorDir . '/socialiteproviders/manager/src'),
    'SocialiteProviders\\Google\\' => array($vendorDir . '/socialiteproviders/google'),
    'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
    'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
    'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
    'League\\OAuth1\\' => array($vendorDir . '/league/oauth1-client/src'),
    'League\\Flysystem\\AwsS3v3\\' => array($vendorDir . '/league/flysystem-aws-s3-v3/src'),
    'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
    'Laravel\\Socialite\\' => array($vendorDir . '/laravel/socialite/src'),
    'Laravel\\Lumen\\' => array($vendorDir . '/laravel/lumen-framework/src'),
    'JmesPath\\' => array($vendorDir . '/mtdowling/jmespath.php/src'),
    'Illuminate\\View\\' => array($vendorDir . '/illuminate/view'),
    'Illuminate\\Validation\\' => array($vendorDir . '/illuminate/validation'),
    'Illuminate\\Translation\\' => array($vendorDir . '/illuminate/translation'),
    'Illuminate\\Support\\' => array($vendorDir . '/illuminate/support'),
    'Illuminate\\Session\\' => array($vendorDir . '/illuminate/session'),
    'Illuminate\\Queue\\' => array($vendorDir . '/illuminate/queue'),
    'Illuminate\\Pipeline\\' => array($vendorDir . '/illuminate/pipeline'),
    'Illuminate\\Pagination\\' => array($vendorDir . '/illuminate/pagination'),
    'Illuminate\\Mail\\' => array($vendorDir . '/illuminate/mail'),
    'Illuminate\\Http\\' => array($vendorDir . '/illuminate/http'),
    'Illuminate\\Hashing\\' => array($vendorDir . '/illuminate/hashing'),
    'Illuminate\\Filesystem\\' => array($vendorDir . '/illuminate/filesystem'),
    'Illuminate\\Events\\' => array($vendorDir . '/illuminate/events'),
    'Illuminate\\Encryption\\' => array($vendorDir . '/illuminate/encryption'),
    'Illuminate\\Database\\' => array($vendorDir . '/illuminate/database'),
    'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'),
    'Illuminate\\Container\\' => array($vendorDir . '/illuminate/container'),
    'Illuminate\\Console\\' => array($vendorDir . '/illuminate/console'),
    'Illuminate\\Config\\' => array($vendorDir . '/illuminate/config'),
    'Illuminate\\Cache\\' => array($vendorDir . '/illuminate/cache'),
    'Illuminate\\Bus\\' => array($vendorDir . '/illuminate/bus'),
    'Illuminate\\Broadcasting\\' => array($vendorDir . '/illuminate/broadcasting'),
    'Illuminate\\Auth\\' => array($vendorDir . '/illuminate/auth'),
    'Ical\\' => array($vendorDir . '/calendar/icsfile/src'),
    'Hashids\\' => array($vendorDir . '/hashids/hashids/src'),
    'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
    'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
    'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
    'FastRoute\\' => array($vendorDir . '/nikic/fast-route/src'),
    'Faker\\' => array($vendorDir . '/fzaninotto/faker/src/Faker'),
    'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
    'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
    'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
    'Cron\\' => array($vendorDir . '/mtdowling/cron-expression/src/Cron'),
    'Collective\\Html\\' => array($vendorDir . '/vluzrmos/collective-html/src'),
    'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
    'Aws\\' => array($vendorDir . '/aws/aws-sdk-php/src'),
    'App\\' => array($baseDir . '/app'),
);


//
// This code was auto-generated by AFNOR StoredProcedureSystem, version 1.0
//

using SOURCE.Data.Context;
using SOURCE.Domaine;
using SOURCE.Business.Depots;
using System.Linq;

namespace SOURCE.Data.Depots
{
    public partial class DepotLien_Droit_ActionGenerale : Depot<Lien_Droit_ActionGenerale>, IDepotLien_Droit_ActionGenerale
    {
        /// <summary>
        /// Initialise une nouvelle instance du dépôt.
        /// </summary>
        /// <param name="dataContext">Contexte de la base de donnée.</param>
        public DepotLien_Droit_ActionGenerale(ISourceDbContext dataContext)
            : base(dataContext)
        {
        }
    }
}


var ExtensionBase = require('tau/core/extension.base');

module.exports = ExtensionBase.extend({
    'bus afterInit': function () {
        this.fire('dataBind');
    }
});