// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Aws.Emr.Outputs
{

    [OutputType]
    public sealed class ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecification
    {
        /// <summary>
        /// Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is `capacity-optimized` (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.
        /// </summary>
        public readonly string AllocationStrategy;
        /// <summary>
        /// The defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
        /// </summary>
        public readonly int? BlockDurationMinutes;
        /// <summary>
        /// The action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are `TERMINATE_CLUSTER` and `SWITCH_TO_ON_DEMAND`. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.
        /// </summary>
        public readonly string TimeoutAction;
        /// <summary>
        /// The spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.
        /// </summary>
        public readonly int TimeoutDurationMinutes;

        [OutputConstructor]
        private ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecification(
            string allocationStrategy,

            int? blockDurationMinutes,

            string timeoutAction,

            int timeoutDurationMinutes)
        {
            AllocationStrategy = allocationStrategy;
            BlockDurationMinutes = blockDurationMinutes;
            TimeoutAction = timeoutAction;
            TimeoutDurationMinutes = timeoutDurationMinutes;
        }
    }
}


<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="PublishConfigData" serverName="lab">
    <serverData>
      <paths name="lab">
        <serverdata>
          <mappings>
            <mapping deploy="/LidarDet" local="$PROJECT_DIR$" web="/" />
          </mappings>
        </serverdata>
      </paths>
    </serverData>
  </component>
</project>


//------------------------------------------------------------------------------
// <copyright file="BridgeDataReader.cs" company="Microsoft">
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
// @owner  Microsoft
// @backupOwner Microsoft
//---------------------------------------------------------------------

namespace System.Data.Query.ResultAssembly {

    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.Common;
    using System.Data.Common.Internal.Materialization;
    using System.Data.Common.Utils;
    using System.Data.Metadata.Edm;
    using System.Data.Query.InternalTrees;
    using System.Data.Query.PlanCompiler;
    using System.Diagnostics;

    /// <summary>
    /// DbDataReader functionality for the bridge.
    /// </summary>
    internal sealed class BridgeDataReader : DbDataReader, IExtendedDataRecord {

        #region private state

        /// <summary>
        /// Object that holds the state needed by the coordinator and the root enumerator
        /// </summary>
        private Shaper<RecordState> Shaper;

        /// <summary>
        /// Enumerator over shapers for NextResult() calls.
        /// Null for nested data readers (depth > 0);
        /// </summary>
        private IEnumerator<KeyValuePair<Shaper<RecordState>, CoordinatorFactory<RecordState>>> NextResultShaperInfoEnumerator;

        /// <summary>
        /// The coordinator we're responsible for returning results for.
        /// </summary>
        private CoordinatorFactory<RecordState> CoordinatorFactory;

        /// <summary>
        /// The default record (pre-read/past-end) state
        /// </summary>
        private RecordState DefaultRecordState;

        /// <summary>
        /// We delegate to this on our getters, to avoid duplicate code.
        /// </summary>
        private BridgeDataRecord DataRecord;

        /// <summary>
        /// Do we have a row to read?  Determined in the constructor and
        /// should not be changed.
        /// </summary>
        private bool _hasRows;

        /// <summary>
        /// Set to true only when we've been closed through the Close() method
        /// </summary>
        private bool _isClosed;

        #endregion

        #region constructors

        /// <summary>
        /// Constructor used by the ResultColumn when doing GetValue, and by the Create factory
        /// method.
        /// </summary>
        /// <param name="collection"></param>
        /// <param name="isRoot"></param>
        /// <param name="nextResultShaperInfos">enumrator of the shapers for NextResult() calls</param>
        internal BridgeDataReader(Shaper<RecordState> shaper, CoordinatorFactory<RecordState> coordinatorFactory, int depth, IEnumerator<KeyValuePair<Shaper<RecordState>, CoordinatorFactory<RecordState>>> nextResultShaperInfos)
            : base() {
            Debug.Assert(null != shaper, "null shaper?");
            Debug.Assert(null != coordinatorFactory, "null coordinatorFactory?");
            Debug.Assert(depth == 0 || nextResultShaperInfos == null, "Nested data readers should not have multiple result sets.");

            NextResultShaperInfoEnumerator = nextResultShaperInfos != null ? nextResultShaperInfos : null;
            SetShaper(shaper, coordinatorFactory, depth);
        }

        private void SetShaper(Shaper<RecordState> shaper, CoordinatorFactory<RecordState> coordinatorFactory, int depth)
        {
            Shaper = shaper;
            CoordinatorFactory = coordinatorFactory;
            DataRecord = new BridgeDataRecord(shaper, depth);

            // To determine whether there are any rows for this coordinator at this place in
            // the root enumerator, we pretty much just look at it's current record (we'll read
            // one if there isn't one waiting) and if it matches our coordinator, we've got rows.
            _hasRows = false;

            if (!Shaper.DataWaiting) {
                Shaper.DataWaiting = Shaper.RootEnumerator.MoveNext();
            }
            if (Shaper.DataWaiting) {
                RecordState currentRecord = Shaper.RootEnumerator.Current;

                if (null != currentRecord) {
                    _hasRows = (currentRecord.CoordinatorFactory == CoordinatorFactory);
                }
            }

            // Once we've created the root enumerator, we can get the default record state
            DefaultRecordState = coordinatorFactory.GetDefaultRecordState(Shaper);
            Debug.Assert(null != DefaultRecordState, "no default?");
        }

        /// <summary>
        /// The primary factory method to produce the BridgeDataReader; given a store data
        /// reader and a column map, create the BridgeDataReader, hooking up the IteratorSources
        /// and ResultColumn Hierarchy.  All construction of top level data readers go through
        /// this method.
        /// </summary>
        /// <param name="storeDataReader"></param>
        /// <param name="columnMap">column map of the first result set</param>
        /// <param name="nextResultColumnMaps">enumerable of the column maps for NextResult() calls.</param>
        /// <returns></returns>
        static internal DbDataReader Create(DbDataReader storeDataReader, ColumnMap columnMap, MetadataWorkspace workspace, IEnumerable<ColumnMap> nextResultColumnMaps) {
            Debug.Assert(storeDataReader != null, "null storeDataReaders?");
            Debug.Assert(columnMap != null, "null columnMap?");
            Debug.Assert(workspace != null, "null workspace?");

            var shaperInfo = CreateShaperInfo(storeDataReader, columnMap, workspace);
            DbDataReader result = new BridgeDataReader(shaperInfo.Key, shaperInfo.Value, /*depth:*/ 0, GetNextResultShaperInfo(storeDataReader, workspace, nextResultColumnMaps).GetEnumerator());
            return result;
        }

        private static KeyValuePair<Shaper<RecordState>, CoordinatorFactory<RecordState>> CreateShaperInfo(DbDataReader storeDataReader, ColumnMap columnMap, MetadataWorkspace workspace)
        {
            Debug.Assert(storeDataReader != null, "null storeDataReaders?");
            Debug.Assert(columnMap != null, "null columnMap?");
            Debug.Assert(workspace != null, "null workspace?");

            System.Data.Common.QueryCache.QueryCacheManager cacheManager = workspace.GetQueryCacheManager();
            const System.Data.Objects.MergeOption NoTracking = System.Data.Objects.MergeOption.NoTracking;

            ShaperFactory<RecordState> shaperFactory = Translator.TranslateColumnMap<RecordState>(cacheManager, columnMap, workspace, null, NoTracking, true);
            Shaper<RecordState> recordShaper = shaperFactory.Create(storeDataReader, null, workspace, System.Data.Objects.MergeOption.NoTracking, true);

            return new KeyValuePair<Shaper<RecordState>, CoordinatorFactory<RecordState>>(recordShaper, recordShaper.RootCoordinator.TypedCoordinatorFactory);
        }

        private static IEnumerable<KeyValuePair<Shaper<RecordState>, CoordinatorFactory<RecordState>>> GetNextResultShaperInfo(DbDataReader storeDataReader, MetadataWorkspace workspace, IEnumerable<ColumnMap> nextResultColumnMaps)
        {
            foreach (var nextResultColumnMap in nextResultColumnMaps)
            {
                yield return CreateShaperInfo(storeDataReader, nextResultColumnMap, workspace);
            }
        }

        #endregion

        #region helpers

        /// <summary>
        /// Implicitly close this (nested) data reader; will be called whenever
        /// the user has done a GetValue() or a Read() on a parent reader/record
        /// to ensure that we consume all our results.  We do that because we
        /// our design requires us to be positioned at the next nested reader's
        /// first row.
        /// </summary>
        internal void CloseImplicitly() {
            Consume();
            DataRecord.CloseImplicitly();
        }

        /// <summary>
        /// Reads to the end of the source enumerator provided
        /// </summary>
        private void Consume() {
            while (ReadInternal()) ;
        }

        /// <summary>
        /// Figure out the CLR type from the TypeMetadata object; For scalars,
        /// we can get this from the metadata workspace, but for the rest, we
        /// just guess at "Object".  You need to use the DataRecordInfo property
        /// to get better information for those.
        /// </summary>
        /// <param name="typeUsage"></param>
        /// <returns></returns>
        internal static Type GetClrTypeFromTypeMetadata(TypeUsage typeUsage) {
            Type result;

            PrimitiveType primitiveType;
            if (TypeHelpers.TryGetEdmType<PrimitiveType>(typeUsage, out primitiveType)) {
                result = primitiveType.ClrEquivalentType;
            }
            else {
                if (TypeSemantics.IsReferenceType(typeUsage)) {
                    result = typeof(EntityKey);
                }
                else if (TypeUtils.IsStructuredType(typeUsage)) {
                    result = typeof(DbDataRecord);
                }
                else if (TypeUtils.IsCollectionType(typeUsage)) {
                    result = typeof(DbDataReader);
                }
                else if (TypeUtils.IsEnumerationType(typeUsage)) {
                    result = ((EnumType)typeUsage.EdmType).UnderlyingType.ClrEquivalentType;
                }
                else {
                    result = typeof(object);
                }
            }
            return result;
        }

        #endregion

        #region data reader specific properties and methods

        /// <summary>
        /// implementation for DbDataReader.Depth property
        /// </summary>
        override public int Depth {
            get {
                AssertReaderIsOpen("Depth");
                return DataRecord.Depth;
            }
        }

        /// <summary>
        /// implementation for DbDataReader.HasRows property
        /// </summary>
        override public bool HasRows {
            get {
                AssertReaderIsOpen("HasRows");
                return _hasRows;
            }
        }

        /// <summary>
        /// implementation for DbDataReader.IsClosed property
        /// </summary>
        override public bool IsClosed {
            get {
                // Rather that try and track this in two places; we just delegate
                // to the data record that we constructed; it has more reasons to
                // have to know this than we do in the data reader.  (Of course,
                // we look at our own closed state too...)
                return ((_isClosed) || DataRecord.IsClosed);
            }
        }

        /// <summary>
        /// implementation for DbDataReader.RecordsAffected property
        /// </summary>
        override public int RecordsAffected {
            get {
                int result = -1; // For nested readers, return -1 which is the default for queries.

                // We defer to the store reader for rows affected count. Note that for queries,
                // the provider is generally expected to return -1.
                //
                if (DataRecord.Depth == 0) {
                    result = Shaper.Reader.RecordsAffected;
                }
                return result;
            }
        }

        /// <summary>
        /// Ensures that the reader is actually open, and throws an exception if not
        /// </summary>
        private void AssertReaderIsOpen(string methodName) {
            if (IsClosed) {
                if (DataRecord.IsImplicitlyClosed) {
                    throw EntityUtil.ImplicitlyClosedDataReaderError();
                }
                if (DataRecord.IsExplicitlyClosed) {
                    throw EntityUtil.DataReaderClosed(methodName);
                }
            }
        }

        /// <summary>
        /// implementation for DbDataReader.Close() method
        /// </summary>
        override public void Close() {
            // Make sure we explicitly closed the data record, since that's what
            // where using to track closed state.
            DataRecord.CloseExplicitly();

            if (!_isClosed) {
                _isClosed = true;

                if (0 == DataRecord.Depth) {
                    // If we're the root collection, we want to ensure the remainder of
                    // the result column hierarchy is closed out, to avoid dangling
                    // references to it, should it be reused. We also want to physically
                    // close out the source reader as well.
                    Shaper.Reader.Close();
                }
                else {
                    // For non-root collections, we have to consume all the data, or we'll
                    // not be positioned propertly for what comes afterward.
                    Consume();
                }
            }

            if (NextResultShaperInfoEnumerator != null)
            {
                NextResultShaperInfoEnumerator.Dispose();
                NextResultShaperInfoEnumerator = null;
            }
        }

        /// <summary>
        /// implementation for DbDataReader.GetEnumerator() method
        /// </summary>
        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
        override public IEnumerator GetEnumerator() {
            IEnumerator result = new DbEnumerator((IDataReader)this, true); // We always want to close the reader;
            return result;
        }

        /// <summary>
        /// implementation for DbDataReader.GetSchemaTable() method
        ///
        /// This is awaiting some common code
        /// </summary>
        /// <returns></returns>
        /// <exception cref="NotSupportedException">GetSchemaTable is not supported at this time</exception>
        override public DataTable GetSchemaTable() {
            throw EntityUtil.NotSupported(System.Data.Entity.Strings.ADP_GetSchemaTableIsNotSupported);
        }

        /// <summary>
        /// implementation for DbDataReader.NextResult() method
        /// </summary>
        /// <returns></returns>
        override public bool NextResult() {
            AssertReaderIsOpen("NextResult");

            // If there is a next result set available, serve it.
            if (NextResultShaperInfoEnumerator != null &&
                Shaper.Reader.NextResult() &&
                NextResultShaperInfoEnumerator.MoveNext())
            {
                Debug.Assert(DataRecord.Depth == 0, "Nested data readers should not have multiple result sets.");
                var nextResultShaperInfo = NextResultShaperInfoEnumerator.Current;
                DataRecord.CloseImplicitly();
                SetShaper(nextResultShaperInfo.Key, nextResultShaperInfo.Value, depth: 0);
                return true;
            }

            if (0 == DataRecord.Depth) {
                // NOTE:: this is required to ensure that output parameter values
                // are set in SQL Server, and other providers where they come after
                // the results.
                CommandHelper.ConsumeReader(Shaper.Reader);
            }
            else {
                // For nested readers, make sure we're positioned properly for
                // the following columns...
                Consume();
            }

            // SQLBUDT #631726 - ensure we close the records that may be
            // outstanding...
            // SQLBUDT #632494 - do this after we consume the underlying reader
            // so we don't run result assembly through it...
            CloseImplicitly();

            // Reset any state on our attached data record, since we've now
            // gone past the end of the reader.
            DataRecord.SetRecordSource(null, false);

            return false;
        }

        /// <summary>
        /// implementation for DbDataReader.Read() method
        /// </summary>
        /// <returns></returns>
        override public bool Read() {
            AssertReaderIsOpen("Read");

            // First of all we need to inform each of the nested records that
            // have been returned that they're "implicitly" closed -- that is
            // we've moved on.  This will also ensure that any records remaining
            // in any active nested readers are consumed
            DataRecord.CloseImplicitly();

            // OK, now go ahead and advance the source enumerator and set the
            // record source up
            bool result = ReadInternal();
            DataRecord.SetRecordSource(Shaper.RootEnumerator.Current, result);
            return result;
        }

        /// <summary>
        /// Internal read method; does the work of advancing the root enumerator
        /// as needed and determining whether it's current record is for our
        /// coordinator.  The public Read method does the assertions and such that
        /// we don't want to do when we're called from internal methods to do things
        /// like consume the rest of the reader's contents.
        /// </summary>
        /// <param name="rootEnumerator"></param>
        /// <returns></returns>
        private bool ReadInternal() {
            bool result = false;

            // If there's nothing waiting for the root enumerator, then attempt
            // to advance it.
            if (!Shaper.DataWaiting) {
                Shaper.DataWaiting = Shaper.RootEnumerator.MoveNext();
            }

            // If we have some data (we may have just read it above) then figure
            // out who it belongs to-- us or someone else. We also skip over any
            // records that are for our children (nested readers); if we're being
            // asked to read, it's too late for them to read them.
            while (Shaper.DataWaiting
                        && Shaper.RootEnumerator.Current.CoordinatorFactory != CoordinatorFactory
                        && Shaper.RootEnumerator.Current.CoordinatorFactory.Depth > CoordinatorFactory.Depth) {
                Shaper.DataWaiting = Shaper.RootEnumerator.MoveNext();
            }

            if (Shaper.DataWaiting) {
                // We found something, go ahead and indicate to the shaper we want
                // this record, set up the data record, etc.
                if (Shaper.RootEnumerator.Current.CoordinatorFactory == CoordinatorFactory) {
                    Shaper.DataWaiting = false;
                    Shaper.RootEnumerator.Current.AcceptPendingValues();
                    result = true;
                }
            }
            return result;
        }

        #endregion

        #region metadata properties and methods

        /// <summary>
        /// implementation for DbDataReader.DataRecordInfo property
        /// </summary>
        public DataRecordInfo DataRecordInfo {
            get {
                AssertReaderIsOpen("DataRecordInfo");

                DataRecordInfo result;
                if (DataRecord.HasData) {
                    result = DataRecord.DataRecordInfo;
                }
                else {
                    result = DefaultRecordState.DataRecordInfo;
                }
                return result;
            }
        }

        /// <summary>
        /// implementation for DbDataReader.FieldCount property
        /// </summary>
        override public int FieldCount {
            get {
                AssertReaderIsOpen("FieldCount");

                // In this method, we need to return a constant value, regardless
                // of how polymorphic the result is, because there is a lot of code
                // in the wild that expects it to be constant; Ideally, we'd return
                // the number of columns in the actual type that we have, but since
                // that would probably break folks, I'm leaving it at returning the
                // base set of columns that all rows will have.

                int result = DefaultRecordState.ColumnCount;
                return result;
            }
        }

        /// <summary>
        /// implementation for DbDataReader.GetDataTypeName() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public string GetDataTypeName(int ordinal) {
            AssertReaderIsOpen("GetDataTypeName");
            string result;
            if (DataRecord.HasData) {
                result = DataRecord.GetDataTypeName(ordinal);
            }
            else {
                result = TypeHelpers.GetFullName(DefaultRecordState.GetTypeUsage(ordinal));
            }
            return result;
        }

        /// <summary>
        /// implementation for DbDataReader.GetFieldType() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public Type GetFieldType(int ordinal) {
            AssertReaderIsOpen("GetFieldType");
            Type result;
            if (DataRecord.HasData) {
                result = DataRecord.GetFieldType(ordinal);
            }
            else {
                result = GetClrTypeFromTypeMetadata(DefaultRecordState.GetTypeUsage(ordinal));
            }
            return result;
        }

        /// <summary>
        /// implementation for DbDataReader.GetName() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public string GetName(int ordinal) {
            AssertReaderIsOpen("GetName");
            string result;
            if (DataRecord.HasData) {
                result = DataRecord.GetName(ordinal);
            }
            else {
                result = DefaultRecordState.GetName(ordinal);
            }
            return result;
        }

        /// <summary>
        /// implementation for DbDataReader.GetOrdinal() method
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>

        override public int GetOrdinal(string name) {
            AssertReaderIsOpen("GetOrdinal");
            int result;
            if (DataRecord.HasData) {
                result = DataRecord.GetOrdinal(name);
            }
            else {
                result = DefaultRecordState.GetOrdinal(name);
            }
            return result;
        }

        /// <summary>
        /// implementation for DbDataReader.GetProviderSpecificFieldType() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        /// <exception cref="NotSupportedException">GetProviderSpecificFieldType is not supported at this time</exception>
        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
        override public Type GetProviderSpecificFieldType(int ordinal) {
            throw EntityUtil.NotSupported();
        }

        #endregion

        #region data record properties and methods

        ////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////
        //
        // The remaining methods on this class delegate to the inner data record
        //
        ////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////

        #region general getter methods and indexer properties

        /// <summary>
        /// implementation for DbDataReader[ordinal] indexer value getter
        /// </summary>
        override public object this[int ordinal] {
            get {
                return DataRecord[ordinal];
            }
        }

        /// <summary>
        /// implementation for DbDataReader[name] indexer value getter
        /// </summary>
        override public object this[string name] {
            get {
                int ordinal = GetOrdinal(name);
                return DataRecord[ordinal];
            }
        }

        /// <summary>
        /// implementation for DbDataReader.GetProviderSpecificValue() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        /// <exception cref="NotSupportedException">GetProviderSpecificValue is not supported at this time</exception>
        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
        public override object GetProviderSpecificValue(int ordinal) {
            throw EntityUtil.NotSupported();
        }

        /// <summary>
        /// implementation for DbDataReader.GetProviderSpecificValues() method
        /// </summary>
        /// <param name="values"></param>
        /// <returns></returns>
        /// <exception cref="NotSupportedException">GetProviderSpecificValues is not supported at this time</exception>
        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
        public override int GetProviderSpecificValues(object[] values) {
            throw EntityUtil.NotSupported();
        }

        /// <summary>
        /// implementation for DbDataReader.GetValue() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public Object GetValue(int ordinal) {
            return DataRecord.GetValue(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetValues() method
        /// </summary>
        /// <param name="values"></param>
        /// <returns></returns>
        override public int GetValues(object[] values) {
            return DataRecord.GetValues(values);
        }

        #endregion

        #region simple scalar value getter methods

        /// <summary>
        /// implementation for DbDataReader.GetBoolean() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public bool GetBoolean(int ordinal) {
            return DataRecord.GetBoolean(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetByte() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public byte GetByte(int ordinal) {
            return DataRecord.GetByte(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetChar() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public char GetChar(int ordinal) {
            return DataRecord.GetChar(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetDateTime() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public DateTime GetDateTime(int ordinal) {
            return DataRecord.GetDateTime(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetDecimal() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public Decimal GetDecimal(int ordinal) {
            return DataRecord.GetDecimal(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetDouble() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public double GetDouble(int ordinal) {
            return DataRecord.GetDouble(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetFloat() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public float GetFloat(int ordinal) {
            return DataRecord.GetFloat(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetGuid() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public Guid GetGuid(int ordinal) {
            return DataRecord.GetGuid(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetInt16() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public Int16 GetInt16(int ordinal) {
            return DataRecord.GetInt16(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetInt32() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public Int32 GetInt32(int ordinal) {
            return DataRecord.GetInt32(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetInt64() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public Int64 GetInt64(int ordinal) {
            return DataRecord.GetInt64(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetString() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public String GetString(int ordinal) {
            return DataRecord.GetString(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.IsDBNull() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override public bool IsDBNull(int ordinal) {
            return DataRecord.IsDBNull(ordinal);
        }

        #endregion

        #region array scalar value getter methods

        /// <summary>
        /// implementation for DbDataReader.GetBytes() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <param name="dataOffset"></param>
        /// <param name="buffer"></param>
        /// <param name="bufferOffset"></param>
        /// <param name="length"></param>
        /// <returns></returns>
        override public long GetBytes(int ordinal, long dataOffset, byte[] buffer, int bufferOffset, int length) {
            return DataRecord.GetBytes(ordinal, dataOffset, buffer, bufferOffset, length);
        }

        /// <summary>
        /// implementation for DbDataReader.GetChars() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <param name="dataOffset"></param>
        /// <param name="buffer"></param>
        /// <param name="bufferOffset"></param>
        /// <param name="length"></param>
        /// <returns></returns>
        override public long GetChars(int ordinal, long dataOffset, char[] buffer, int bufferOffset, int length) {
            return DataRecord.GetChars(ordinal, dataOffset, buffer, bufferOffset, length);
        }

        #endregion

        #region complex type getters

        /// <summary>
        /// implementation for DbDataReader.GetData() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        override protected DbDataReader GetDbDataReader(int ordinal) {
            return (DbDataReader)DataRecord.GetData(ordinal);
        }

        /// <summary>
        /// implementation for DbDataReader.GetDataRecord() method
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        public DbDataRecord GetDataRecord(int ordinal) {
            return DataRecord.GetDataRecord(ordinal);
        }

        /// <summary>
        /// Used to return a nested result
        /// </summary>
        /// <param name="ordinal"></param>
        /// <returns></returns>
        public DbDataReader GetDataReader(int ordinal) {
            return this.GetDbDataReader(ordinal);
        }

        #endregion

        #endregion
    }
}


/*
 * cocos2d for iPhone: http://www.cocos2d-iphone.org
 *
 * Copyright (c) 2011 Ricardo Quesada
 * Copyright (c) 2012 Zynga Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

const char* ccPositionColor_frag = STRINGIFY(

\n#ifdef GL_ES\n
precision lowp float;
\n#endif\n

varying vec4 v_fragmentColor;

void main()
{
    gl_FragColor = v_fragmentColor;
}
);


using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Dasync.EntityFrameworkCore.UnitOfWork
{
    public class UnitOfWorkRecordConfiguration : IEntityTypeConfiguration<UnitOfWorkRecord>
    {
        public void Configure(EntityTypeBuilder<UnitOfWorkRecord> builder)
        {
            builder.ToTable("uow", "dasync");
        }
    }
}


{% if theme.vkontakte_api.enable %}

{% endif %}


#
# Solution to Project Euler problem 287
# Copyright (c) Project Nayuki. All rights reserved.
#
# https://www.nayuki.io/page/project-euler-solutions
# https://github.com/nayuki/Project-Euler-solutions
#

# Let R = 2^(N-1) denote the radius of the circle (filled disk) being drawn.
#
# First, we can simplify the problem by translating (shifting) the coordinate system.
# Instead of x and y each in [0, 2^N) for the formula [x - 2^(N-1)]^2 + [y - 2^(N-1)]^2 <= R^2,
# we shall consider x and y each in [-(2^(N-1)), 2^(N-1)) for the formula x^2 + y^2 <= R^2.
#
# Suppose we are given a square 2D region with endpoints [xstart, xend) and [ystart, yend).
# If the region is entirely white or entirely black, then it takes 2 bits to encode the region.
# Otherwise the region must have both white and black pixels, so we use 1 bit
# to encode the split, recurse on the 4 sub-squares, and sum their code lengths.
#
# Within the region, what are the possible values of the left side of the formula, x^2 + y^2?
# To minimize or maximize x^2 + y^2, we can min/maximize each of x^2 and y^2 independently.
# - To minimize x^2, we minimize |x|. If 0 is in [xstart, xend),
#   then the minimum |x| is 0, and thus the minimum x^2 is 0.
#   Otherwise, either all possible x values are negative or all
#   are positive, so the minimum |x| is min(|xstart|, |xend-1|).
# - To maximize x^2, we maximize |x|. This simply equals max(|xstart|, |xend-1|).
# - The same arguments apply to minimizing/maximizing y^2.
#
# Now evaluate minR^2 = minX^2 + minY^2, and maxR^2 = maxX^2 + maxY^2.
# - If maxR^2 <= R^2, then all points in the region satisfy
#   x^2 + y^2 <= R^2, hence the entire region is black.
# - Similarly, if minR^2 > R^2, then all points in the region
#   satisfy x^2 + y^2 > R^2, hence the entire region is white.
# - Otherwise, the region must contain both black and white points,
#   so we split into 4 subregions and recurse.
#
# One further optimization: If the region [xstart, xend) * [ystart, yend) lies
# entirely within a quadrant, then calculating minR and maxR becomes trivial.
# In fact, only the root call to compressed_length() spans both positive
# and negative coordinates; all deeper calls are entirely within a quadrant.
# For a region with [xstart, xend) where xstart < xend <= 0, compressed_length()
# yields the same result when the range is replaced with [-xend + 1, -xstart + 1).
# Hence by symmetry, we can only consider cases where 0 <= xstart < xend,
# and not deal with negative ranges. This optimized bit length algorithm can
# no longer be adapted to encode the actual compressed bit stream, however.
def compute():
	N = 24
	RADIUS_SQUARED = 2**(2 * N - 2)

	# Returns the exact minimum number of bits required to encode
	# the circle image's region of [xstart, end) * [ystart, yend),
	# requiring 0 <= xstart < xend and 0 <= ystart < yend.
	def compressed_length(xstart, xend, ystart, yend):
		if xstart * xstart + ystart * ystart > RADIUS_SQUARED:  # All white
			return 2
		elif (xend - 1) * (xend - 1) + (yend - 1) * (yend - 1) <= RADIUS_SQUARED:  # All black
			return 2
		else:  # Subdivide and recurse
			xmid = (xstart + xend) >> 1
			ymid = (ystart + yend) >> 1
			return (1 +
				compressed_length(xstart, xmid, ymid  , yend) +  # Top left
				compressed_length(xmid  , xend, ymid  , yend) +  # Top right
				compressed_length(xstart, xmid, ystart, ymid) +  # Bottom left
				compressed_length(xmid  , xend, ystart, ymid))   # Bottom right

	temp = 2**(N - 1)
	return str(1 +
		compressed_length(0, temp, 0, temp) +
		compressed_length(0, temp, 1, temp + 1) +
		compressed_length(1, temp + 1, 0, temp) +
		compressed_length(1, temp + 1, 1, temp + 1))

if __name__ == "__main__":
	print(compute())


package br.padroes.abstractFactory;

public class Fiesta implements CarroPopular {

	@Override
	public void exibirInfoPopular() {
		System.out.println("Modelo: Fiesta\nFábrica: Ford\nCategoria:Popular");
	}

}


<mockup version="1.0" skin="sketch" measuredW="1143" measuredH="842" mockupW="800" mockupH="800">
  <controls>
    <control controlID="1" controlTypeID="com.balsamiq.mockups::Canvas" x="333" y="32" w="800" h="800" measuredW="100" measuredH="70" zOrder="0" locked="false" isInGroup="-1"/>
    <control controlID="10" controlTypeID="com.balsamiq.mockups::TextInput" x="361" y="33" w="726" h="-1" measuredW="113" measuredH="27" zOrder="1" locked="false" isInGroup="-1">
      <controlProperties>
        <text>System%20Message</text>
      </controlProperties>
    </control>
    <control controlID="14" controlTypeID="com.balsamiq.mockups::MenuBar" x="573" y="82" w="336" h="30" measuredW="330" measuredH="29" zOrder="2" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Home%2CProfile%2CAbout%2CContact%20Us%2CHelp</text>
      </controlProperties>
    </control>
    <control controlID="15" controlTypeID="com.balsamiq.mockups::TextInput" x="1037" y="85" w="46" h="-1" measuredW="43" measuredH="27" zOrder="3" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Login</text>
      </controlProperties>
    </control>
    <control controlID="17" controlTypeID="com.balsamiq.mockups::TabBar" x="573" y="126" w="514" h="612" measuredW="193" measuredH="100" zOrder="4" locked="false" isInGroup="-1">
      <controlProperties>
        <text>%5BHome%5D%2CRemote</text>
      </controlProperties>
    </control>
    <control controlID="19" controlTypeID="com.balsamiq.mockups::FieldSet" x="588" y="302" w="484" h="387" measuredW="200" measuredH="170" zOrder="5" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Join</text>
      </controlProperties>
    </control>
    <control controlID="20" controlTypeID="com.balsamiq.mockups::Label" x="380" y="165" w="163" h="33" measuredW="162" measuredH="27" zOrder="28" locked="false" isInGroup="-1">
      <controlProperties>
        <size>16</size>
        <text>Join%20Information%20Title</text>
      </controlProperties>
    </control>
    <control controlID="21" controlTypeID="com.balsamiq.mockups::Paragraph" x="380" y="198" w="163" h="198" measuredW="200" measuredH="140" zOrder="27" locked="false" isInGroup="-1">
      <controlProperties>
        <text>%28Description%29%20Pellentesque%20vitae%20nisl%20quis%20neque%20vestibulum%20vehicula.%20Lorem%20ipsum%20dolor%20sit%20amet%2C%20consectetur%20adipiscing%20elit.%20Aliquam%20suscipit%20volutpat%20varius.%20Suspendisse%20fermentum%20mauris%20sed%20libero%20iaculis%20blandit.%20</text>
      </controlProperties>
    </control>
    <control controlID="28" controlTypeID="com.balsamiq.mockups::TextInput" x="687" y="354" w="285" h="-1" measuredW="79" measuredH="27" zOrder="6" locked="false" isInGroup="-1">
      <controlProperties>
        <backgroundAlpha>1</backgroundAlpha>
        <text/>
      </controlProperties>
    </control>
    <control controlID="29" controlTypeID="com.balsamiq.mockups::Label" x="687" y="329" w="110" h="23" measuredW="65" measuredH="23" zOrder="7" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Full%20Name</text>
      </controlProperties>
    </control>
    <control controlID="30" controlTypeID="com.balsamiq.mockups::TextInput" x="687" y="404" w="285" h="-1" measuredW="79" measuredH="27" zOrder="8" locked="false" isInGroup="-1">
      <controlProperties>
        <backgroundAlpha>1</backgroundAlpha>
        <text/>
      </controlProperties>
    </control>
    <control controlID="31" controlTypeID="com.balsamiq.mockups::Label" x="687" y="381" w="109" h="23" measuredW="64" measuredH="23" zOrder="9" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Username</text>
      </controlProperties>
    </control>
    <control controlID="32" controlTypeID="com.balsamiq.mockups::TextInput" x="687" y="454" w="285" h="-1" measuredW="79" measuredH="27" zOrder="10" locked="false" isInGroup="-1">
      <controlProperties>
        <backgroundAlpha>1</backgroundAlpha>
        <text/>
      </controlProperties>
    </control>
    <control controlID="33" controlTypeID="com.balsamiq.mockups::Label" x="687" y="431" w="61" h="23" measuredW="36" measuredH="23" zOrder="11" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Email</text>
      </controlProperties>
    </control>
    <control controlID="34" controlTypeID="com.balsamiq.mockups::TextInput" x="687" y="504" w="285" h="-1" measuredW="79" measuredH="27" zOrder="12" locked="false" isInGroup="-1">
      <controlProperties>
        <backgroundAlpha>1</backgroundAlpha>
        <text/>
      </controlProperties>
    </control>
    <control controlID="35" controlTypeID="com.balsamiq.mockups::Label" x="687" y="481" w="102" h="23" measuredW="60" measuredH="23" zOrder="13" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Password</text>
      </controlProperties>
    </control>
    <control controlID="36" controlTypeID="com.balsamiq.mockups::TextInput" x="687" y="554" w="285" h="-1" measuredW="79" measuredH="27" zOrder="14" locked="false" isInGroup="-1">
      <controlProperties>
        <backgroundAlpha>1</backgroundAlpha>
        <text/>
      </controlProperties>
    </control>
    <control controlID="37" controlTypeID="com.balsamiq.mockups::Label" x="687" y="531" w="188" h="23" measuredW="111" measuredH="23" zOrder="15" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Confirm%20Password</text>
      </controlProperties>
    </control>
    <control controlID="38" controlTypeID="com.balsamiq.mockups::TextInput" x="687" y="604" w="285" h="-1" measuredW="79" measuredH="27" zOrder="16" locked="false" isInGroup="-1">
      <controlProperties>
        <backgroundAlpha>1</backgroundAlpha>
        <text/>
      </controlProperties>
    </control>
    <control controlID="39" controlTypeID="com.balsamiq.mockups::Label" x="687" y="581" w="124" h="23" measuredW="73" measuredH="23" zOrder="17" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Invite%20Code</text>
      </controlProperties>
    </control>
    <control controlID="40" controlTypeID="com.balsamiq.mockups::Button" x="925" y="646" w="-1" h="-1" measuredW="47" measuredH="28" zOrder="18" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Join</text>
      </controlProperties>
    </control>
    <control controlID="41" controlTypeID="com.balsamiq.mockups::Image" x="368" y="83" w="193" h="23" measuredW="77" measuredH="79" zOrder="19" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Logo</text>
      </controlProperties>
    </control>
    <control controlID="42" controlTypeID="com.balsamiq.mockups::CheckBox" x="849" y="247" w="110" h="22" measuredW="110" measuredH="22" zOrder="20" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Remember%20Me</text>
      </controlProperties>
    </control>
    <control controlID="43" controlTypeID="com.balsamiq.mockups::Button" x="1003" y="247" w="-1" h="-1" measuredW="54" measuredH="28" zOrder="21" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Login</text>
      </controlProperties>
    </control>
    <control controlID="44" controlTypeID="com.balsamiq.mockups::TextInput" x="603" y="213" w="208" h="-1" measuredW="79" measuredH="27" zOrder="22" locked="false" isInGroup="-1">
      <controlProperties>
        <backgroundAlpha>1</backgroundAlpha>
        <text/>
      </controlProperties>
    </control>
    <control controlID="45" controlTypeID="com.balsamiq.mockups::TextInput" x="849" y="212" w="208" h="-1" measuredW="43" measuredH="27" zOrder="23" locked="false" isInGroup="-1">
      <controlProperties>
        <text>*****</text>
      </controlProperties>
    </control>
    <control controlID="46" controlTypeID="com.balsamiq.mockups::Label" x="603" y="188" w="-1" h="-1" measuredW="64" measuredH="23" zOrder="24" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Username</text>
      </controlProperties>
    </control>
    <control controlID="47" controlTypeID="com.balsamiq.mockups::Label" x="849" y="188" w="60" h="23" measuredW="60" measuredH="23" zOrder="25" locked="false" isInGroup="-1">
      <controlProperties>
        <text>Password</text>
      </controlProperties>
    </control>
    <control controlID="48" controlTypeID="com.balsamiq.mockups::Canvas" x="368" y="150" w="190" h="316" measuredW="100" measuredH="70" zOrder="26" locked="false" isInGroup="-1"/>
  </controls>
</mockup>


/*
Copyright 2015 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Package framer implements simple frame decoding techniques for an io.ReadCloser
package framer

import (
	"encoding/binary"
	"encoding/json"
	"io"
)

type lengthDelimitedFrameWriter struct {
	w io.Writer
	h [4]byte
}

func NewLengthDelimitedFrameWriter(w io.Writer) io.Writer {
	return &lengthDelimitedFrameWriter{w: w}
}

// Write writes a single frame to the nested writer, prepending it with the length in
// in bytes of data (as a 4 byte, bigendian uint32).
func (w *lengthDelimitedFrameWriter) Write(data []byte) (int, error) {
	binary.BigEndian.PutUint32(w.h[:], uint32(len(data)))
	n, err := w.w.Write(w.h[:])
	if err != nil {
		return 0, err
	}
	if n != len(w.h) {
		return 0, io.ErrShortWrite
	}
	return w.w.Write(data)
}

type lengthDelimitedFrameReader struct {
	r         io.ReadCloser
	remaining int
}

// NewLengthDelimitedFrameReader returns an io.Reader that will decode length-prefixed
// frames off of a stream.
//
// The protocol is:
//
//   stream: message ...
//   message: prefix body
//   prefix: 4 byte uint32 in BigEndian order, denotes length of body
//   body: bytes (0..prefix)
//
// If the buffer passed to Read is not long enough to contain an entire frame, io.ErrShortRead
// will be returned along with the number of bytes read.
func NewLengthDelimitedFrameReader(r io.ReadCloser) io.ReadCloser {
	return &lengthDelimitedFrameReader{r: r}
}

// Read attempts to read an entire frame into data. If that is not possible, io.ErrShortBuffer
// is returned and subsequent calls will attempt to read the last frame. A frame is complete when
// err is nil.
func (r *lengthDelimitedFrameReader) Read(data []byte) (int, error) {
	if r.remaining <= 0 {
		header := [4]byte{}
		n, err := io.ReadAtLeast(r.r, header[:4], 4)
		if err != nil {
			return 0, err
		}
		if n != 4 {
			return 0, io.ErrUnexpectedEOF
		}
		frameLength := int(binary.BigEndian.Uint32(header[:]))
		r.remaining = frameLength
	}

	expect := r.remaining
	max := expect
	if max > len(data) {
		max = len(data)
	}
	n, err := io.ReadAtLeast(r.r, data[:max], int(max))
	r.remaining -= n
	if err == io.ErrShortBuffer || r.remaining > 0 {
		return n, io.ErrShortBuffer
	}
	if err != nil {
		return n, err
	}
	if n != expect {
		return n, io.ErrUnexpectedEOF
	}

	return n, nil
}

func (r *lengthDelimitedFrameReader) Close() error {
	return r.r.Close()
}

type jsonFrameReader struct {
	r         io.ReadCloser
	decoder   *json.Decoder
	remaining []byte
}

// NewJSONFramedReader returns an io.Reader that will decode individual JSON objects off
// of a wire.
//
// The boundaries between each frame are valid JSON objects. A JSON parsing error will terminate
// the read.
func NewJSONFramedReader(r io.ReadCloser) io.ReadCloser {
	return &jsonFrameReader{
		r:       r,
		decoder: json.NewDecoder(r),
	}
}

// ReadFrame decodes the next JSON object in the stream, or returns an error. The returned
// byte slice will be modified the next time ReadFrame is invoked and should not be altered.
func (r *jsonFrameReader) Read(data []byte) (int, error) {
	// Return whatever remaining data exists from an in progress frame
	if n := len(r.remaining); n > 0 {
		if n <= len(data) {
			data = append(data[0:0], r.remaining...)
			r.remaining = nil
			return n, nil
		}

		n = len(data)
		data = append(data[0:0], r.remaining[:n]...)
		r.remaining = r.remaining[n:]
		return n, io.ErrShortBuffer
	}

	// RawMessage#Unmarshal appends to data - we reset the slice down to 0 and will either see
	// data written to data, or be larger than data and a different array.
	n := len(data)
	m := json.RawMessage(data[:0])
	if err := r.decoder.Decode(&m); err != nil {
		return 0, err
	}

	// If capacity of data is less than length of the message, decoder will allocate a new slice
	// and set m to it, which means we need to copy the partial result back into data and preserve
	// the remaining result for subsequent reads.
	if len(m) > n {
		data = append(data[0:0], m[:n]...)
		r.remaining = m[n:]
		return n, io.ErrShortBuffer
	}
	return len(m), nil
}

func (r *jsonFrameReader) Close() error {
	return r.r.Close()
}


# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

description=\
  Visualiza la información de los procesos maven en ejecución pulsando sobre los enlaces de la izquierda.<br/> \
  Suele ser bastante útil para identificar problemas.


//
// detail/descriptor_write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef AUTOBOOST_ASIO_DETAIL_DESCRIPTOR_WRITE_OP_HPP
#define AUTOBOOST_ASIO_DETAIL_DESCRIPTOR_WRITE_OP_HPP

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include <autoboost/asio/detail/config.hpp>

#if !defined(AUTOBOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)

#include <autoboost/asio/detail/addressof.hpp>
#include <autoboost/asio/detail/bind_handler.hpp>
#include <autoboost/asio/detail/buffer_sequence_adapter.hpp>
#include <autoboost/asio/detail/descriptor_ops.hpp>
#include <autoboost/asio/detail/fenced_block.hpp>
#include <autoboost/asio/detail/reactor_op.hpp>

#include <autoboost/asio/detail/push_options.hpp>

namespace autoboost {
namespace asio {
namespace detail {

template <typename ConstBufferSequence>
class descriptor_write_op_base : public reactor_op
{
public:
  descriptor_write_op_base(int descriptor,
      const ConstBufferSequence& buffers, func_type complete_func)
    : reactor_op(&descriptor_write_op_base::do_perform, complete_func),
      descriptor_(descriptor),
      buffers_(buffers)
  {
  }

  static bool do_perform(reactor_op* base)
  {
    descriptor_write_op_base* o(static_cast<descriptor_write_op_base*>(base));

    buffer_sequence_adapter<autoboost::asio::const_buffer,
        ConstBufferSequence> bufs(o->buffers_);

    return descriptor_ops::non_blocking_write(o->descriptor_,
        bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_);
  }

private:
  int descriptor_;
  ConstBufferSequence buffers_;
};

template <typename ConstBufferSequence, typename Handler>
class descriptor_write_op
  : public descriptor_write_op_base<ConstBufferSequence>
{
public:
  AUTOBOOST_ASIO_DEFINE_HANDLER_PTR(descriptor_write_op);

  descriptor_write_op(int descriptor,
      const ConstBufferSequence& buffers, Handler& handler)
    : descriptor_write_op_base<ConstBufferSequence>(
        descriptor, buffers, &descriptor_write_op::do_complete),
      handler_(AUTOBOOST_ASIO_MOVE_CAST(Handler)(handler))
  {
  }

  static void do_complete(io_service_impl* owner, operation* base,
      const autoboost::system::error_code& /*ec*/,
      std::size_t /*bytes_transferred*/)
  {
    // Take ownership of the handler object.
    descriptor_write_op* o(static_cast<descriptor_write_op*>(base));
    ptr p = { autoboost::asio::detail::addressof(o->handler_), o, o };

    AUTOBOOST_ASIO_HANDLER_COMPLETION((o));

    // Make a copy of the handler so that the memory can be deallocated before
    // the upcall is made. Even if we're not about to make an upcall, a
    // sub-object of the handler may be the true owner of the memory associated
    // with the handler. Consequently, a local copy of the handler is required
    // to ensure that any owning sub-object remains valid until after we have
    // deallocated the memory here.
    detail::binder2<Handler, autoboost::system::error_code, std::size_t>
      handler(o->handler_, o->ec_, o->bytes_transferred_);
    p.h = autoboost::asio::detail::addressof(handler.handler_);
    p.reset();

    // Make the upcall if required.
    if (owner)
    {
      fenced_block b(fenced_block::half);
      AUTOBOOST_ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
      autoboost_asio_handler_invoke_helpers::invoke(handler, handler.handler_);
      AUTOBOOST_ASIO_HANDLER_INVOCATION_END;
    }
  }

private:
  Handler handler_;
};

} // namespace detail
} // namespace asio
} // namespace autoboost

#include <autoboost/asio/detail/pop_options.hpp>

#endif // !defined(AUTOBOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)

#endif // AUTOBOOST_ASIO_DETAIL_DESCRIPTOR_WRITE_OP_HPP


start on started zookeeper-ZK_PORT
stop on stopping zookeeper-ZK_PORT

# Use a script instead of exec (using env stanza leaks KAFKA_HEAP_OPTS from zookeeper)
script
  sleep 2
  export KAFKA_HEAP_OPTS="-Xmx320m"
  exec /opt/kafka-KAFKAID/bin/kafka-server-start.sh /opt/kafka-KAFKAID/config/server.properties
end script


/* File : example.c */

int do_op(int a, int b, int (*op)(int,int)) {
  return (*op)(a,b);
}

int add(int a, int b) {
  return a+b;
}

int sub(int a, int b) {
  return a-b;
}

int mul(int a, int b) {
  return a*b;
}

int (*funcvar)(int,int) = add;


#include <stdio.h>

void fred()
{
    printf("test\n");
}

void main()
{
    fred();
}


###### The anointing of Juan Guaidó

# Business this week

![image](images/20190202_WWP003_0.jpg)

> Jan 31st 2019

A dam belonging to Vale, the world’s largest iron-ore producer, collapsed in Brazil, killing at least 84 people. About 276 are still missing. The company’s share price has fallen by 18% since the collapse; investors fear a torrent of compensation claims and regulatory fines. The firm said that it will decommission dams similar to the one that collapsed, a move which will reduce its annual output of iron ore by 10%. See article.

In America, the Federal Reserve ditched its guidance to investors suggesting that further rises in interest rates lie ahead. The American central bank pledged to be “patient”, citing low inflation and recent economic turbulence as reasons not to raise rates. It also said it would slow down its policy of shrinking its balance-sheet if needed.

America’s Justice Department accused Huawei, a Chinese technology company, of a series of misdeeds including theft of intellectual property and the obstruction of justice. Huawei is also accused of duping four banks into violating sanctions on Iran, on which basis Canadian police arrested Meng Wanzhou, its chief financial officer, in December. America formally requested her extradition this week. If the allegations against Huawei are proven, American firms could be banned from selling it their technology. See article.

Norwegian Air said that it would try to raise NKr3bn ($350m) in a rights issue. The troubled carrier bet the house on making a success of low-cost flights across the Atlantic Ocean. But it is now paying the price for expanding too fast; last year it lost NKr3.8bn. IAG, an airline group that owns British Airways, recently pulled out of takeover talks with Norwegian and sold its stake in the airline.

The euro zone’s economy failed to bounce back in the final three months of 2018, with growth remaining at 0.2% in both the third and fourth quarters. Italy fell into recession over the period. Meanwhile, Spain’s unemployment rate fell to 14.5% in the last quarter of 2018, its lowest rate in a decade. Although 3.3m people in the country are still looking for work, the unemployment rate has fallen steadily since its peak of nearly 27% in 2013. See article.

Boeing, the American aerospace giant, announced that annual revenues last year exceeded $100bn for the first time, helped by strong demand for its commercial aircraft. Last year the firm received 20% more orders for its civil jets than its European rival, Airbus.

BuzzFeed, a news website once known for “listicles”, announced another round of job losses. BuzzFeed’s founder and chief executive, Jonah Peretti, said the company would reduce its headcount by 15%, or by about 250 jobs, according to the Wall Street Journal. Verizon Media Group, which owns rival websites such as HuffPost, Yahoo, and AOL, also said it would sack 800 employees.

Denmark is to build a 70km fence along its German border to repel stray pigs. It will be constructed to stop the spread of African swine fever. The Danes, famed for their exports of bacon and other pork products, are worried about infected wild boar bringing the untreatable disease north, which could devastate livestock and hurt the country’s farming industry.

De Beers, the world’s largest producer of diamonds, said sales fell by a quarter at the start of this year. The mining giant is particularly being affected by slower economic growth in China, the world’s second-biggest consumer of the stones.

A government-appointed commission in Germany agreed that the country should phase out the use of coal by 2038. The body agreed that a total of at least €40bn ($46bn) should be provided in aid for coal-mining states affected by the move, which is less than the figure of around €60bn they had asked for. It is hoped that the new target will partly offset the extra carbon emissions caused by Germany’s abandonment of nuclear power, which its government announced in 2011.

![image](images/20190202_WWP004_0.jpg)

Royal Caribbean, a cruise line based in America, announced that revenues in the last three months of 2018 rose by 16% and profits by 9.6%, year on year. Bookings for cruise holidays were unexpectedly healthy over the winter. Last year the company expanded by acquiring Silversea Cruises, a luxury brand, and launching into service the Symphony of the Seas, the largest passenger ship in the world by gross tonnage.

--

 单词注释:

1.anoint[ә'nɒint]:vt. 涂油, 施以涂油礼 [医] 涂油膏

2.juan[hwɑ:n]:n. 胡安（男子名）

3.Jan[dʒæn]:n. 一月

4.vale[veil]:n. 谷, 溪谷, 告别 interj. 再见

5.producer[prә'dju:sә]:n. 生产者, 制作者, 制作人 [化] 发生器; (炉煤气)发生炉; 制气炉; 生产者

6.Brazil[brә'zil]:n. 巴西

7.investor[in'vestә]:n. 投资者 [经] 投资者

8.compensation[.kɒmpen'seiʃәn]:n. 补偿, 赔偿金, 工资 [医] 代偿(机能), 补偿

9.regulatory['regjulәtәri]:a. 受控制的, 统制的, 调整的 [经] 规则的

10.decommission[.di:kә'miʃәn]:vt. 使退役

11.pledge[pledʒ]:n. 诺言, 保证, 誓言, 抵押, 信物, 保人, 祝愿 vt. 许诺, 保证, 使发誓, 抵押, 典当, 举杯祝...健康

12.cite[sait]:vt. 引用, 引证, 表彰 [建] 引证, 指引

13.inflation[in'fleiʃәn]:n. 胀大, 夸张, 通货膨胀 [化] 充气吹胀; 膨胀

14.turbulence['tә:bjulәns]:n. 混乱, 动荡, 骚乱, 紊流 [化] 湍流; 紊流

15.huawei[]: 华为

16.sery[]:n. (Sery)人名；(俄)谢雷；(科特)塞里

17.misdeed['mis'di:d]:n. 罪行, 犯罪 [法] 不端行为, 犯罪, 恶性

18.obstruction[әb'strʌʃәn]:n. 障碍, 妨碍, 闭塞物 [医] 梗阻, 不通

19.dupe[dju:p]:n. 傻瓜, 易受骗的人 vt. 欺骗, 愚弄

20.sanction['sæŋkʃәn]:n. 核准, 制裁, 处罚, 约束力 vt. 制定制裁规则, 认可, 核准, 同意

21.Iran[i'rɑ:n]:n. 伊朗

22.meng[]:abbr. 工程硕士（Master of Engineering）

23.Wanzhou[]:万州

24.formally['fɒ:mәli]:adv. 正式地, 形式上

25.extradition[.ekstrә'diʃәn]:n. 引渡逃犯, 亡命者送还本国 [法] 引渡

26.allegation[.æli'geiʃәn]:n. 断言, 主张, 申辩 [法] 声明, 事实陈述, 断言

27.Norwegian[nɒ:'wi:dʒәn]:n. 挪威人, 挪威语 a. 挪威的, 挪威人的, 挪威语的

28.IAG[]:abbr. International Administrative Data Processing Geodesy 国际管理数据处理组

29.airway['єәwei]:n. 空中航线, 风道 [医] 导气管

30.takeover[]:n. 接管, 接收 [经] 接收

31.euro['juәrәu]:n. 欧元（欧盟的统一货币单位）

32.recession[ri'seʃәn]:n. 后退, 凹处, 衰退, 归还 [医] 退缩

33.boe[bəu]:abbr. back outlet eccentric 后偏心（轮）出口

34.aerospace['єәrәuspeis]:n. 航天空间, 航天技术

35.airbus['eәbʌs]:空中客车

36.BuzzFeed[]:[网络] 网路

37.listicles[]:[网络] 列表

38.founder['faundә]:n. 创立者, 建立者 vt. 使沉没, 使摔倒, 弄跛, 浸水, 破坏 vi. 沉没, 摔到, 变跛, 倒塌, 失败

39.jonah['dʒәunә]:n. 约拿(<<圣经>>中的先知), <<约拿书>>, 带来不幸的人

40.peretti[]:[网络] 配饰系列；经典无爪款；白勒泰

41.headcount[ˈhedkaʊnt]:n. 点人头数总人数, 职员总数

42.verizon[]:n. 威瑞森（全成威瑞森无线通讯, 是美国第一家提供320万像素照相手机配套销售的无线营运商）

43.yahoo[jә'hu:]:n. 人面兽心的人, 乡愚, 粗汉

44.aol[]:abbr. 美国境内提供线上加值网络服务的公司（American On Line）

45.Denmark['denmɑ:k]:n. 丹麦

46.repel[ri'pel]:vt. 逐退, 抵制, 使厌恶, 抗御 vi. 使厌恶, 相互排斥

47.stray[strei]:n. 走失的家畜, 浪子 a. 迷途的, 偶然的 vi. 迷路, 彷徨, 流浪

48.swine[swain]:n. 猪, 卑鄙的家伙

49.Dane[dein]:n. 丹麦人

50.famed[feimd]:a. 著名的, 闻名的

51.boar[bɒ:]:n. 公猪, 野猪

52.untreatable[ʌnt'ri:teɪbl]: 无法医治的

53.devastate['devәsteit]:vt. 毁坏 [法] 使荒废, 毁灭, 掠夺

54.de[di:]:[化] 非对映体过量 [医] 铥(69号元素铥的别名,1916年Eder离得的假想元素)

55.les[lei]:abbr. 发射脱离系统（Launch Escape System）

56.offset['ɒ:fset]:n. 抵消, 把...并列, 旁系, 支管, 用胶印法印 vt. 弥补, 抵消, 胶印 vi. 装支管 n. 偏移量 [计] 偏移量

57.emission[i'miʃәn]:n. 发射, 射出, 发行 [医] 发射, 遗精

58.abandonment[ә'bændәmәnt]:n. 放弃, 抛弃, 放纵 [经] 委付, 废弃, 放弃(采矿权)

59.Caribbean[.kæri'bi:әn]:n. 加勒比海 a. 加勒比海的, 加勒比人的

60.cruise[kru:z]:n. 巡航, 巡弋, 漫游 v. 巡航, 巡弋, 漫游

61.booking['bukiŋ]:n. 预约演出合同 [机] 书型模法

62.unexpectedly[]:adv. 想不到的, 突然的, 意外的, 出乎意料的

63.silversea[]:[网络] 银海；银海邮轮；银海游轮

64.tonnage['tʌnidʒ]:n. 吨位 [化] 吨位


[![codecov.io](https://codecov.io/github/derjust/spring-data-dynamodb/coverage.svg?branch=master)](https://codecov.io/github/derjust/spring-data-dynamodb?branch=master) [![Build Status](https://travis-ci.org/derjust/spring-data-dynamodb.svg?branch=master)](https://travis-ci.org/derjust/spring-data-dynamodb)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.derjust/spring-data-dynamodb/badge.svg)](https://search.maven.org/search?q=g:com.github.derjust)

# Spring  Data DynamoDB #

<img align="left" src="https://derjust.github.io/spring-data-dynamodb/banner/spring-data-dynamodb.png" />

The primary goal of the [Spring® Data](https://projects.spring.io/spring-data/) project is to make it easier to build Spring-powered applications that use data access technologies.

This module deals with enhanced support for a data access layer built on [AWS DynamoDB](https://aws.amazon.com/dynamodb/).

Technical infos can be found on the [project page](https://derjust.github.io/spring-data-dynamodb/).

## Supported Features ##

* Implementation of [CRUD methods for](https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.definition) DynamoDB Entities
* Dynamic query generation from [query method names](https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.query-methods.query-creation) ([Supported keywords and comparison operators](https://github.com/derjust/spring-data-dynamodb/wiki/Supported-Spring-Data-Comparison-Operators))
* [Projections](https://github.com/derjust/spring-data-dynamodb/wiki/Projections)
* Possibility to integrate [custom repository code](https://github.com/derjust/spring-data-dynamodb/wiki/Custom-repository-implementations)
* Easy Spring annotation based integration
* [REST support](https://github.com/derjust/spring-data-dynamodb-examples/blob/master/README-rest.md) via [spring-data-rest](https://projects.spring.io/spring-data-rest/)

## Demo application ##

For a demo of spring-data-dynamodb, using spring-data-rest to showcase DynamoDB repositories exposed with REST,
please see [spring-data-dynamodb-examples](https://github.com/derjust/spring-data-dynamodb-examples).

## Quick Start ##

Download the JAR though [Maven Central](http://mvnrepository.com/artifact/com.github.derjust/spring-data-dynamodb) ([`SNAPSHOT` builds](https://oss.sonatype.org/content/repositories/snapshots/com/github/derjust/spring-data-dynamodb/) are available via the [OSSRH snapshot repository](https://github.com/derjust/spring-data-dynamodb/wiki/Access-to-releases) ):

```xml
<dependency>
  <groupId>com.github.derjust</groupId>
  <artifactId>spring-data-dynamodb</artifactId>
  <version>5.1.0</version>
</dependency>
```

Setup DynamoDB configuration as well as enabling Spring-Data DynamoDB repository support via Annotation ([XML-based configuration](wiki/Quick-Start---XML-based-configuration))

Create a DynamoDB entity [User](https://github.com/derjust/spring-data-dynamodb-examples/blob/master/src/main/java/com/github/derjust/spring_data_dynamodb_examples/simple/User.java) for this table:

```java
@DynamoDBTable(tableName = "User")
public class User {

	private String id;
	private String firstName;
	private String lastName;

	public User() {
		// Default constructor is required by AWS DynamoDB SDK
	}

	public User(String firstName, String lastName) {
		this.firstName = firstName;
		this.lastName = lastName;
	}

	@DynamoDBHashKey
	@DynamoDBAutoGeneratedKey
	public String getId() {
		return id;
	}

	@DynamoDBAttribute
	public String getFirstName() {
		return firstName;
	}

	@DynamoDBAttribute
	public String getLastName() {
		return lastName;
	}

	//setter & hashCode & equals
}
```

Create a CRUD repository interface [UserRepository](https://github.com/derjust/spring-data-dynamodb-examples/blob/master/src/main/java/com/github/derjust/spring_data_dynamodb_examples/simple/UserRepository.java):

```java
@EnableScan
public interface UserRepository extends CrudRepository<User, String> {
  List<User> findByLastName(String lastName);
  List<User> findByFirstName(String firstName);
}
```

or for paging and sorting...

```java
public interface PagingUserRepository extends PagingAndSortingRepository<User, String> {
	Page<User> findByLastName(String lastName, Pageable pageable);
	Page<User> findByFirstName(String firstName, Pageable pageable);

	@EnableScan
	@EnableScanCount
	Page<User> findAll(Pageable pageable);
}
```

Create the configuration class [DynamoDBConfig](https://github.com/derjust/spring-data-dynamodb-examples/blob/master/src/test/java/com/github/derjust/spring_data_dynamodb_examples/simple/UserRepositoryIT.java#L61):
```java
@Configuration
@EnableDynamoDBRepositories(basePackageClasses = UserRepository.class)
public static class DynamoDBConfig {

	@Value("${amazon.aws.accesskey}")
	private String amazonAWSAccessKey;

	@Value("${amazon.aws.secretkey}")
	private String amazonAWSSecretKey;

	public AWSCredentialsProvider amazonAWSCredentialsProvider() {
		return new AWSStaticCredentialsProvider(amazonAWSCredentials());
	}

	@Bean
	public AWSCredentials amazonAWSCredentials() {
		return new BasicAWSCredentials(amazonAWSAccessKey, amazonAWSSecretKey);
	}

	@Bean
	public DynamoDBMapperConfig dynamoDBMapperConfig() {
		return DynamoDBMapperConfig.DEFAULT;
	}

	@Bean
	public DynamoDBMapper dynamoDBMapper(AmazonDynamoDB amazonDynamoDB, DynamoDBMapperConfig config) {
		return new DynamoDBMapper(amazonDynamoDB, config);
	}

	@Bean
	public AmazonDynamoDB amazonDynamoDB() {
		return AmazonDynamoDBClientBuilder.standard().withCredentials(amazonAWSCredentialsProvider())
				.withRegion(Regions.US_EAST_1).build();
	}
}
```

And finally write a test client [UserRepositoryIT](https://github.com/derjust/spring-data-dynamodb-examples/blob/master/src/test/java/com/github/derjust/spring_data_dynamodb_examples/simple/UserRepositoryIT.java) or start calling it from your existing Spring code.

The full source code is available at [spring-data-dynamodb-examples' simple example](https://github.com/derjust/spring-data-dynamodb-examples/blob/master/README-simple.md)

## More
More sample code can be found in the [spring-data-dynamodb-examples](https://github.com/derjust/spring-data-dynamodb-examples) project.

Advanced topics can be found in the [wiki](https://github.com/derjust/spring-data-dynamodb/wiki).

## Version & Spring Framework compatibility ##

The major and minor number of this library refers to the compatible Spring framework version. The build number is used as specified by SEMVER.

API changes will follow SEMVER and loosly the Spring Framework releases.

| `spring-data-dynamodb` version  | Spring Boot compatibility      |Spring Framework compatibility  | Spring Data compatibility |
| ------------------------------- | ------------------------------ | ------------------------------ | ------------------------- |
| 1.0.x                           |                                | >= 3.1 && < 4.2                |                           |
| 4.2.x                           | >= 1.3.0 && < 1.4.0            | >= 4.2 && < 4.3                | Gosling-SR1               |
| 4.3.x                           | >= 1.4.0 && < 2.0              | >= 4.3 && < 5.0                | Gosling-SR1               |
| 4.4.x                           | >= 1.4.0 && < 2.0              | >= 4.3 && < 5.0                | Hopper-SR2                |
| 4.5.x                           | >= 1.4.0 && < 2.0              | >= 4.3 && < 5.0                | Ingalls                   |
| 5.0.x                           | >= 2.0 && < 2.1                | >= 5.0 && < 5.1                | Kay-SR1                   |
| 5.1.x                           | >= 2.1                         | >= 5.1                         | Lovelace-SR1              |
`spring-data-dynamodb` depends directly on `spring-data` as also `spring-context`, `spring-data` and `spring-tx`.

`compile` and `runtime` dependencies are kept to a minimum to allow easy integartion, for example into
Spring-Boot projects.

## History
The code base has some history already in it - let's clarify it a bit:
* The code base was established under [github.com/michaellavelle/spring-data-dynamodb)](https://github.com/michaellavelle/spring-data-dynamodb)
* It was forked and further maintained under [github.com/derjust/spring-data-dynamodb)](https://github.com/derjust/spring-data-dynamodb)
    * Available in Maven Central under [`com.github.derjust:spring-data-dynamodb`](http://central.maven.org/maven2/com/github/derjust/spring-data-dynamodb/)

The Java package name/XSD namespace never changed from `org.socialsignin.spring.data.dynamodb`.
But the XSD is now also available at [`https://derjust.github.io/spring-data-dynamodb/spring-dynamodb-1.0.xsd`](https://derjust.github.io/spring-data-dynamodb/spring-dynamodb-1.0.xsd).


import React from 'react';

import recordEvent from 'platform/monitoring/record-event';

const recordAction = () => {
  recordEvent({
    event: 'account-navigation',
    'account-action': 'view-link',
    'account-section': 'vets-faqs',
  });
};

export class NoConnectedApps extends React.Component {
  componentDidMount() {
    this.header.focus();
  }

  noAccountsMessage() {
    return this.props.errors.length > 0
      ? 'Sorry — we can’t seem to find any connected accounts.'
      : 'You do not have any connected accounts.';
  }

  render() {
    return (

 {
              this.header = header;
            }}
          >
            {this.noAccountsMessage()}

Have questions about signing in to VA.gov?

              Get answers to frequently asked questions about how to sign in,
              common issues with verifying your identity, and your privacy and
              security on VA.gov.

              Go to VA.gov FAQs

    );
  }
}


# CVS $Revision: $ $Author: $ -- Tue Dec 15 01:48:08 2015 -- reformated by PCGen PrettyLST v6.06.00
SOURCELONG:Second Darkness, Chapter 5: A Memory of Darkness	SOURCESHORT:AP17	SOURCEWEB:http://paizo.com/pathfinder/adventurePath/secondDarkness/v5748btpy86j6	SOURCEDATE:2008-12

#Imported from rSRD 3.5 Epic Feats File
# Ability Name	Category of Ability	Type		Required Lvl	Multiple Requirements										Required Skill			Description																					Stackable?	Multiple?	Choose														Source Page
Spell Stowaway	CATEGORY:FEAT		TYPE:Epic	PRELEVEL:MIN=21	PREMULT:1,[PRECLASS:1,SPELLCASTER=12],[PREVARGTEQ:CasterLevel_Highest,12]	PRESKILL:1,Spellcraft=24	DESC:If another spellcaster within 300 feet of you uses the ability you selected, you also immediately gains the magic's effect.	STACK:NO	MULT:YES	CHOOSE:SPELLS|SPELLBOOK=Innate|SPELLTYPE=Arcane[KNOWN=YES]|SPELLTYPE=Divine[KNOWN=YES]	SOURCEPAGE:EpicFeats


defmodule DotTest do
  use ExUnit.Case
  require Dot

  # Expand at RunTime, used to avoid invalid macro calls preventing compilation
  # of the tests.
  #
  # Inspired by (read: clone of) Support.CompileHelpers.delay_compile in Ecto.
  defmacrop exprt(ast) do
    escaped = Macro.escape(ast)

    quote do
      Code.eval_quoted(unquote(escaped), [], __ENV__) |> elem(0)
    end
  end

  # @tag :pending
  test "empty graph" do
    assert %Graph{} ==
             exprt(
               Dot.graph do
               end
             )
  end

  @tag :pending
  test "graph with one node" do
    assert %Graph{nodes: [{:a, []}]} ==
             exprt(
               Dot.graph do
                 a
               end
             )
  end

  @tag :pending
  test "graph with one node with keywords" do
    assert %Graph{nodes: [{:a, [color: :green]}]} ==
             exprt(
               Dot.graph do
                 a(color: :green)
               end
             )
  end

  @tag :pending
  test "graph with one edge" do
    assert %Graph{edges: [{:a, :b, []}]} ==
             exprt(
               Dot.graph do
                 a -- b
               end
             )
  end

  @tag :pending
  test "graph with just attribute" do
    assert %Graph{attrs: [foo: 1]} ==
             exprt(
               Dot.graph do
                 graph(foo: 1)
               end
             )
  end

  @tag :pending
  test "graph with attributes" do
    assert %Graph{
             attrs: [bar: true, foo: 1, title: "Testing Attrs"],
             nodes: [{:a, [color: :green]}, {:b, [label: "Beta!"]}, {:c, []}],
             edges: [{:a, :b, [color: :blue]}, {:b, :c, []}]
           } ==
             exprt(
               Dot.graph do
                 graph(foo: 1)
                 graph(title: "Testing Attrs")
                 graph([])
                 a(color: :green)
                 c([])
                 b(label: "Beta!")
                 b -- c([])
                 a -- b(color: :blue)
                 graph(bar: true)
               end
             )
  end

  @tag :pending
  test "keywords stuck to graph without space" do
    assert_raise ArgumentError, fn ->
      exprt(
        Dot.graph do
          graph[[title: "Bad"]]
        end
      )
    end
  end

  @tag :pending
  test "keywords stuck to node without space" do
    assert_raise ArgumentError, fn ->
      exprt(
        Dot.graph do
          a[[label: "Alpha!"]]
        end
      )
    end
  end

  @tag :pending
  test "keywords stuck to edge without space" do
    assert_raise ArgumentError, fn ->
      exprt(
        Dot.graph do
          a -- b[[label: "Bad"]]
        end
      )
    end
  end

  @tag :pending
  test "invalid statement: int" do
    assert_raise ArgumentError, fn ->
      exprt(
        Dot.graph do
          a
          2
        end
      )
    end
  end

  @tag :pending
  test "invalid statement: list" do
    assert_raise ArgumentError, fn ->
      exprt(
        Dot.graph do
          [title: "Testing invalid"]
        end
      )
    end
  end

  @tag :pending
  test "invalid statement: qualified atom" do
    assert_raise ArgumentError, fn ->
      exprt(
        Dot.graph do
          Enum.map()
        end
      )
    end
  end

  @tag :pending
  test "invalid statement: graph with no keywords" do
    assert_raise ArgumentError, fn ->
      exprt(
        Dot.graph do
          Enum.map()
        end
      )
    end
  end

  @tag :pending
  test "two attribute lists" do
    assert_raise ArgumentError, fn ->
      exprt(
        Dot.graph do
          a([color: green][[label: "Alpha!"]])
        end
      )
    end
  end

  @tag :pending
  test "non-keyword attribute list" do
    assert_raise ArgumentError, fn ->
      exprt(
        Dot.graph do
          a(["Alpha!", color: green])
        end
      )
    end
  end

  @tag :pending
  test "int edge" do
    assert_raise ArgumentError, fn ->
      exprt(
        Dot.graph do
          1 -- b
        end
      )
    end

    assert_raise ArgumentError, fn ->
      exprt(
        Dot.graph do
          a -- 2
        end
      )
    end
  end
end


<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
declare(strict_types=1);

return [
    'config' => [
        'publishers' => [
            'inventory.counter.updated' => [
                'connections' => [
                    'amqp' => [
                        'name' => 'db',
                        'exchange' => 'magento-db'
                    ],
                ]
            ]
        ],
        'consumers' => [
            'inventoryQtyCounter' => [
                'connection' => 'db'
            ]
        ]
    ]
];


module.exports = require("regenerator-runtime");


//
//  NBProgressViewProtocol.h
//  Nebula
//
//  Created by chenwenhong on 15/10/13.
//  Copyright © 2015年 Alipay. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol NBProgressViewProtocol <NSObject>

@required
- (void)setProgress:(float)progress animated:(BOOL)animated;

- (void)startProgress;

- (void)completeProgress;

- (void)reset;

- (void)cancel;

@optional
- (void)setProgressTintColor:(nullable UIColor *)tintColor;

- (void)setTrackTintColor:(nullable UIColor *)trackTintColor;

@end


//========================================================================
// GLFW 3.2 POSIX - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2002-2006 Marcus Geelnard
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//    claim that you wrote the original software. If you use this software
//    in a product, an acknowledgment in the product documentation would
//    be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such, and must not
//    be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source
//    distribution.
//
//========================================================================

#ifndef _glfw3_posix_time_h_
#define _glfw3_posix_time_h_

#define _GLFW_PLATFORM_LIBRARY_TIME_STATE _GLFWtimePOSIX posix_time

#include <stdint.h>

// POSIX-specific global timer data
//
typedef struct _GLFWtimePOSIX
{
    GLFWbool    monotonic;
    uint64_t    frequency;

} _GLFWtimePOSIX;

void _glfwInitTimerPOSIX(void);

#endif // _glfw3_posix_time_h_


# Created by: Mikhail T. <michael@fun-box.ru>
# $FreeBSD$

PORTNAME=	DateTime-Event-Zodiac
PORTVERSION=	1.03
PORTREVISION=	1
CATEGORIES=	devel perl5
MASTER_SITES=	CPAN
PKGNAMEPREFIX=	p5-

MAINTAINER=	perl@FreeBSD.org
COMMENT=	Return zodiac for a given date

BUILD_DEPENDS=	${RUN_DEPENDS}
RUN_DEPENDS=	p5-DateTime>=0:devel/p5-DateTime \
		p5-DateTime-Astro>=0:devel/p5-DateTime-Astro
TEST_DEPENDS=	p5-Test-Pod>=0:devel/p5-Test-Pod \
		p5-Test-Pod-Coverage>=0:devel/p5-Test-Pod-Coverage

USES=		perl5
USE_PERL5=	configure

.include <bsd.port.mk>


<!DOCTYPE HTML>

        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Fonts · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        <meta name="author" content="chartjs">

    <link rel="stylesheet" href="../gitbook/style.css">

                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">

                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">

                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">

        <link rel="stylesheet" href="../style.css">

    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    <link rel="next" href="../configuration/" />

    <link rel="prev" href="colors.html" />

    <link rel="stylesheet" href="../gitbook/gitbook-plugin-chartjs/style.css">

    <input type="text" placeholder="Type to search" />

                    Chart.js

                    Getting Started

                    Installation

                    Integration

                    Usage

                    General

                    Responsive

                    Interactions

                    Events

                    Modes

                    Options

                    Colors

                    Fonts

                    Configuration

                    Animations

                    Layout

                    Legend

                    Title

                    Tooltip

                    Elements

                    Charts

                    Line

                    Bar

                    Radar

                    Doughnut & Pie

                    Polar Area

                    Bubble

                    Scatter

                    Area

                    Mixed

                    Axes

                    Cartesian

                    Category

                    Linear

                    Logarithmic

                    Time

                    Radial

                    Linear

                    Labelling

                    Styling

                    Developers

                    Chart.js API

                    Updating Charts

                    Plugins

                    New Charts

                    New Axes

                    Contributing

                    Additional Notes

                    Comparison Table

                    Popular Extensions

                    License

            Published with GitBook

        Fonts

Fonts

There are 4 special global settings that can change all of the fonts on the chart. These options are in Chart.defaults.global. The global font settings only apply when more specific options are not included in the config.

For example, in this chart the text will all be red except for the labels in the legend.

Chart.defaults.global.defaultFontColor = 'red';
let chart = new Chart(ctx, {
    type: 'line',
    data: data,
    options: {
        legend: {
            labels: {
                // This more specific font property overrides the global property
                fontColor: 'black'
            }
        }
    }
});

Name
Type
Default
Description

defaultFontColor
Color
'#666'
Default font color for all text.

defaultFontFamily
String
"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"
Default font family for all text.

defaultFontSize
Number
12
Default font size (in px) for text. Does not apply to radialLinear scale point labels.

defaultFontStyle
String
'normal'
Default font style. Does not apply to tooltip title or footer. Does not apply to chart title.

Non-Existant Fonts

If a font is specified for a chart that does exist on the system, the browser will not apply the font when it is set. If you notice odd fonts appearing in your charts, check that the font you are applying exists on your system. See issue 3318 for more details.

 results matching ""

No results matching ""


// +build !linux

package netlink

type GenlOp struct{}

type GenlMulticastGroup struct{}

type GenlFamily struct{}

func (h *Handle) GenlFamilyList() ([]*GenlFamily, error) {
	return nil, ErrNotImplemented
}

func GenlFamilyList() ([]*GenlFamily, error) {
	return nil, ErrNotImplemented
}

func (h *Handle) GenlFamilyGet(name string) (*GenlFamily, error) {
	return nil, ErrNotImplemented
}

func GenlFamilyGet(name string) (*GenlFamily, error) {
	return nil, ErrNotImplemented
}


/*
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "hdmi.h"

struct hdmi_i2c_adapter {
	struct i2c_adapter base;
	struct hdmi *hdmi;
	bool sw_done;
	wait_queue_head_t ddc_event;
};
#define to_hdmi_i2c_adapter(x) container_of(x, struct hdmi_i2c_adapter, base)

static void init_ddc(struct hdmi_i2c_adapter *hdmi_i2c)
{
	struct hdmi *hdmi = hdmi_i2c->hdmi;

	hdmi_write(hdmi, REG_HDMI_DDC_CTRL,
			HDMI_DDC_CTRL_SW_STATUS_RESET);
	hdmi_write(hdmi, REG_HDMI_DDC_CTRL,
			HDMI_DDC_CTRL_SOFT_RESET);

	hdmi_write(hdmi, REG_HDMI_DDC_SPEED,
			HDMI_DDC_SPEED_THRESHOLD(2) |
			HDMI_DDC_SPEED_PRESCALE(10));

	hdmi_write(hdmi, REG_HDMI_DDC_SETUP,
			HDMI_DDC_SETUP_TIMEOUT(0xff));

	/* enable reference timer for 27us */
	hdmi_write(hdmi, REG_HDMI_DDC_REF,
			HDMI_DDC_REF_REFTIMER_ENABLE |
			HDMI_DDC_REF_REFTIMER(27));
}

static int ddc_clear_irq(struct hdmi_i2c_adapter *hdmi_i2c)
{
	struct hdmi *hdmi = hdmi_i2c->hdmi;
	struct drm_device *dev = hdmi->dev;
	uint32_t retry = 0xffff;
	uint32_t ddc_int_ctrl;

	do {
		--retry;

		hdmi_write(hdmi, REG_HDMI_DDC_INT_CTRL,
				HDMI_DDC_INT_CTRL_SW_DONE_ACK |
				HDMI_DDC_INT_CTRL_SW_DONE_MASK);

		ddc_int_ctrl = hdmi_read(hdmi, REG_HDMI_DDC_INT_CTRL);

	} while ((ddc_int_ctrl & HDMI_DDC_INT_CTRL_SW_DONE_INT) && retry);

	if (!retry) {
		DRM_DEV_ERROR(dev->dev, "timeout waiting for DDC\n");
		return -ETIMEDOUT;
	}

	hdmi_i2c->sw_done = false;

	return 0;
}

#define MAX_TRANSACTIONS 4

static bool sw_done(struct hdmi_i2c_adapter *hdmi_i2c)
{
	struct hdmi *hdmi = hdmi_i2c->hdmi;

	if (!hdmi_i2c->sw_done) {
		uint32_t ddc_int_ctrl;

		ddc_int_ctrl = hdmi_read(hdmi, REG_HDMI_DDC_INT_CTRL);

		if ((ddc_int_ctrl & HDMI_DDC_INT_CTRL_SW_DONE_MASK) &&
				(ddc_int_ctrl & HDMI_DDC_INT_CTRL_SW_DONE_INT)) {
			hdmi_i2c->sw_done = true;
			hdmi_write(hdmi, REG_HDMI_DDC_INT_CTRL,
					HDMI_DDC_INT_CTRL_SW_DONE_ACK);
		}
	}

	return hdmi_i2c->sw_done;
}

static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
		struct i2c_msg *msgs, int num)
{
	struct hdmi_i2c_adapter *hdmi_i2c = to_hdmi_i2c_adapter(i2c);
	struct hdmi *hdmi = hdmi_i2c->hdmi;
	struct drm_device *dev = hdmi->dev;
	static const uint32_t nack[] = {
			HDMI_DDC_SW_STATUS_NACK0, HDMI_DDC_SW_STATUS_NACK1,
			HDMI_DDC_SW_STATUS_NACK2, HDMI_DDC_SW_STATUS_NACK3,
	};
	int indices[MAX_TRANSACTIONS];
	int ret, i, j, index = 0;
	uint32_t ddc_status, ddc_data, i2c_trans;

	num = min(num, MAX_TRANSACTIONS);

	WARN_ON(!(hdmi_read(hdmi, REG_HDMI_CTRL) & HDMI_CTRL_ENABLE));

	if (num == 0)
		return num;

	init_ddc(hdmi_i2c);

	ret = ddc_clear_irq(hdmi_i2c);
	if (ret)
		return ret;

	for (i = 0; i < num; i++) {
		struct i2c_msg *p = &msgs[i];
		uint32_t raw_addr = p->addr << 1;

		if (p->flags & I2C_M_RD)
			raw_addr |= 1;

		ddc_data = HDMI_DDC_DATA_DATA(raw_addr) |
				HDMI_DDC_DATA_DATA_RW(DDC_WRITE);

		if (i == 0) {
			ddc_data |= HDMI_DDC_DATA_INDEX(0) |
					HDMI_DDC_DATA_INDEX_WRITE;
		}

		hdmi_write(hdmi, REG_HDMI_DDC_DATA, ddc_data);
		index++;

		indices[i] = index;

		if (p->flags & I2C_M_RD) {
			index += p->len;
		} else {
			for (j = 0; j < p->len; j++) {
				ddc_data = HDMI_DDC_DATA_DATA(p->buf[j]) |
						HDMI_DDC_DATA_DATA_RW(DDC_WRITE);
				hdmi_write(hdmi, REG_HDMI_DDC_DATA, ddc_data);
				index++;
			}
		}

		i2c_trans = HDMI_I2C_TRANSACTION_REG_CNT(p->len) |
				HDMI_I2C_TRANSACTION_REG_RW(
						(p->flags & I2C_M_RD) ? DDC_READ : DDC_WRITE) |
				HDMI_I2C_TRANSACTION_REG_START;

		if (i == (num - 1))
			i2c_trans |= HDMI_I2C_TRANSACTION_REG_STOP;

		hdmi_write(hdmi, REG_HDMI_I2C_TRANSACTION(i), i2c_trans);
	}

	/* trigger the transfer: */
	hdmi_write(hdmi, REG_HDMI_DDC_CTRL,
			HDMI_DDC_CTRL_TRANSACTION_CNT(num - 1) |
			HDMI_DDC_CTRL_GO);

	ret = wait_event_timeout(hdmi_i2c->ddc_event, sw_done(hdmi_i2c), HZ/4);
	if (ret <= 0) {
		if (ret == 0)
			ret = -ETIMEDOUT;
		dev_warn(dev->dev, "DDC timeout: %d\n", ret);
		DBG("sw_status=%08x, hw_status=%08x, int_ctrl=%08x",
				hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS),
				hdmi_read(hdmi, REG_HDMI_DDC_HW_STATUS),
				hdmi_read(hdmi, REG_HDMI_DDC_INT_CTRL));
		return ret;
	}

	ddc_status = hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS);

	/* read back results of any read transactions: */
	for (i = 0; i < num; i++) {
		struct i2c_msg *p = &msgs[i];

		if (!(p->flags & I2C_M_RD))
			continue;

		/* check for NACK: */
		if (ddc_status & nack[i]) {
			DBG("ddc_status=%08x", ddc_status);
			break;
		}

		ddc_data = HDMI_DDC_DATA_DATA_RW(DDC_READ) |
				HDMI_DDC_DATA_INDEX(indices[i]) |
				HDMI_DDC_DATA_INDEX_WRITE;

		hdmi_write(hdmi, REG_HDMI_DDC_DATA, ddc_data);

		/* discard first byte: */
		hdmi_read(hdmi, REG_HDMI_DDC_DATA);

		for (j = 0; j < p->len; j++) {
			ddc_data = hdmi_read(hdmi, REG_HDMI_DDC_DATA);
			p->buf[j] = FIELD(ddc_data, HDMI_DDC_DATA_DATA);
		}
	}

	return i;
}

static u32 msm_hdmi_i2c_func(struct i2c_adapter *adapter)
{
	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
}

static const struct i2c_algorithm msm_hdmi_i2c_algorithm = {
	.master_xfer	= msm_hdmi_i2c_xfer,
	.functionality	= msm_hdmi_i2c_func,
};

void msm_hdmi_i2c_irq(struct i2c_adapter *i2c)
{
	struct hdmi_i2c_adapter *hdmi_i2c = to_hdmi_i2c_adapter(i2c);

	if (sw_done(hdmi_i2c))
		wake_up_all(&hdmi_i2c->ddc_event);
}

void msm_hdmi_i2c_destroy(struct i2c_adapter *i2c)
{
	struct hdmi_i2c_adapter *hdmi_i2c = to_hdmi_i2c_adapter(i2c);
	i2c_del_adapter(i2c);
	kfree(hdmi_i2c);
}

struct i2c_adapter *msm_hdmi_i2c_init(struct hdmi *hdmi)
{
	struct hdmi_i2c_adapter *hdmi_i2c;
	struct i2c_adapter *i2c = NULL;
	int ret;

	hdmi_i2c = kzalloc(sizeof(*hdmi_i2c), GFP_KERNEL);
	if (!hdmi_i2c) {
		ret = -ENOMEM;
		goto fail;
	}

	i2c = &hdmi_i2c->base;

	hdmi_i2c->hdmi = hdmi;
	init_waitqueue_head(&hdmi_i2c->ddc_event);

	i2c->owner = THIS_MODULE;
	i2c->class = I2C_CLASS_DDC;
	snprintf(i2c->name, sizeof(i2c->name), "msm hdmi i2c");
	i2c->dev.parent = &hdmi->pdev->dev;
	i2c->algo = &msm_hdmi_i2c_algorithm;

	ret = i2c_add_adapter(i2c);
	if (ret)
		goto fail;

	return i2c;

fail:
	if (i2c)
		msm_hdmi_i2c_destroy(i2c);
	return ERR_PTR(ret);
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Trackable.Models;

namespace Trackable.Repositories.Helpers
{
    /// <summary>
    /// Provides point comparison based on lat long
    /// </summary>
    public class PointComparer : IComparer<Point>
    {
        public int Compare(Point x, Point y)
        {
            if (x.Latitude < y.Latitude)
            {
                return -1;
            }

            if (x.Latitude == y.Latitude)
            {
                if (x.Longitude == y.Longitude)
                {
                    return 0;
                }

                if (x.Longitude < y.Longitude)
                {
                    return -1;
                }
            }

            return 1;
        }
    }

}