text:
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Binance.Net.Enums;
using Binance.Net.Objects.Models.Spot;
using Binance.Net.Objects.Models.Spot.Margin;
using Binance.Net.Objects.Models.Spot.SubAccountData;
using CryptoExchange.Net.Objects;

namespace Binance.Net.Interfaces.Clients.GeneralApi
{
    ///
    /// Binance Spot Subaccount endpoints
    ///
    public interface IBinanceClientGeneralApiSubAccount
    {
        ///
        /// Gets a list of sub accounts associated with this master account
        /// <para></para>
        ///
        /// <param name="email">Filter the list by email</param>
        /// <param name="page">The page of the results</param>
        /// <param name="limit">The max amount of results to return</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="isFreeze">Is freezed</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>List of sub accounts</returns>
        Task<WebCallResult<IEnumerable<BinanceSubAccount>>> GetSubAccountsAsync(string? email = null, int? page = null, int? limit = null, int? receiveWindow = null, bool? isFreeze = null, CancellationToken ct = default);

        ///
        /// Gets the transfer history of a sub account (from the master account)
        /// <para></para>
        ///
        /// <param name="fromEmail">Filter the history by from email</param>
        /// <param name="toEmail">Filter the history by to email</param>
        /// <param name="startTime">Filter the history by startTime</param>
        /// <param name="endTime">Filter the history by endTime</param>
        /// <param name="page">The page of the results</param>
        /// <param name="limit">The max amount of results to return</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>List of transfers</returns>
        Task<WebCallResult<IEnumerable<BinanceSubAccountTransfer>>> GetSubAccountTransferHistoryForMasterAsync(string? fromEmail = null, string? toEmail = null, DateTime? startTime = null, DateTime? endTime = null, int? page = null, int? limit = null, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Transfers an asset form/to a sub account. If fromEmail or toEmail is not send it is interpreted as from/to the master account. Transfer between futures accounts is not supported
        /// <para></para>
        ///
        /// <param name="fromEmail">From which account to transfer</param>
        /// <param name="fromAccountType">Account type to transfer from</param>
        /// <param name="toEmail">To which account to transfer</param>
        /// <param name="toAccountType">Account type to transfer to</param>
        /// <param name="asset">The asset to transfer</param>
        /// <param name="symbol">The sybol to transfer, only for isolated margin</param>
        /// <param name="quantity">The quantity to transfer</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>The result of the transfer</returns>
        Task<WebCallResult<BinanceTransaction>> TransferSubAccountAsync(TransferAccountType fromAccountType, TransferAccountType toAccountType, string asset, decimal quantity, string? fromEmail = null, string? toEmail = null, string? symbol = null, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets list of balances for a sub account
        /// <para></para>
        ///
        /// <param name="email">For which account to get the assets</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>List of balances</returns>
        Task<WebCallResult<IEnumerable<BinanceBalance>>> GetSubAccountAssetsAsync(string email, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets the deposit address for an asset to a sub account
        /// <para></para>
        ///
        /// <param name="email">The email of the account to deposit to</param>
        /// <param name="asset">The asset of the deposit</param>
        /// <param name="network">The coin network</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>The deposit address</returns>
        Task<WebCallResult<BinanceSubAccountDepositAddress>> GetSubAccountDepositAddressAsync(string email, string asset, string? network = null, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets the deposit history for a sub account
        /// <para></para>
        ///
        /// <param name="email">The email of the account to get history for</param>
        /// <param name="asset">Filter for an asset</param>
        /// <param name="startTime">Only return deposits placed later this</param>
        /// <param name="endTime">Only return deposits placed before this</param>
        /// <param name="limit">Max number of results</param>
        /// <param name="offset">Offset results by this</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>The deposit history</returns>
        Task<WebCallResult<IEnumerable<BinanceSubAccountDeposit>>> GetSubAccountDepositHistoryAsync(string email, string? asset = null, DateTime? startTime = null, DateTime? endTime = null, int? limit = null, int? offset = null, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Get Sub-account's Status on Margin/Futures(For Master Account)
        /// <para></para>
        ///
        /// <param name="email">Filter the list by email</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>List of sub accounts status</returns>
        Task<WebCallResult<IEnumerable<BinanceSubAccountStatus>>> GetSubAccountStatusAsync(string? email = null, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Enables margin for a sub account
        /// <para></para>
        ///
        /// <param name="email">The email of the account to enable margin for</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>Margin enable status</returns>
        Task<WebCallResult<BinanceSubAccountMarginEnabled>> EnableMarginForSubAccountAsync(string email, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets margin details for a sub account
        /// <para></para>
        ///
        /// <param name="email">The email of the account to get margin details for</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>Margin details</returns>
        Task<WebCallResult<BinanceSubAccountMarginDetails>> GetSubAccountMarginDetailsAsync(string email, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets margin summary for sub accounts
        /// <para></para>
        ///
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>Margin summary</returns>
        Task<WebCallResult<BinanceSubAccountsMarginSummary>> GetSubAccountsMarginSummaryAsync(int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Enables futures for a sub account
        /// <para></para>
        ///
        /// <param name="email">The sub account email to enable futures for</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>Futures status</returns>
        Task<WebCallResult<BinanceSubAccountFuturesEnabled>> EnableFuturesForSubAccountAsync(string email, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets futures details for a sub account
        /// <para></para>
        ///
        /// <param name="email">The email of the account to get future details for</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>Futures details</returns>
        Task<WebCallResult<BinanceSubAccountFuturesDetails>> GetSubAccountFuturesDetailsAsync(string email, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets futures details for a sub account
        /// <para></para>
        ///
        /// <param name="email">The email of the account to get future details for</param>
        /// <param name="futuresType">The account type to get future details for</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>Futures details</returns>
        Task<WebCallResult<BinanceSubAccountFuturesDetailsV2>> GetSubAccountFuturesDetailsAsync(FuturesAccountType futuresType, string email, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets futures summary for sub accounts
        /// <para></para>
        ///
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>Futures summary</returns>
        Task<WebCallResult<BinanceSubAccountsFuturesSummary>> GetSubAccountsFuturesSummaryAsync(int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets futures position risk for a sub account
        /// <para></para>
        ///
        /// <param name="email">Email of the sub account</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>Position risk</returns>
        Task<WebCallResult<IEnumerable<BinanceSubAccountFuturesPositionRisk>>> GetSubAccountsFuturesPositionRiskAsync(string email, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets futures position risk for a sub account
        /// <para></para>
        ///
        /// <param name="email">Email of the sub account</param>
        /// <param name="futuresType">The account type to get future details for</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>Position risk</returns>
        Task<WebCallResult<BinanceSubAccountFuturesPositionRiskV2>> GetSubAccountsFuturesPositionRiskAsync(FuturesAccountType futuresType, string email, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Transfers from or to a futures sub account
        /// <para></para>
        ///
        /// <param name="email">Email of the sub account</param>
        /// <param name="asset">The asset to transfer</param>
        /// <param name="quantity">The quantity to transfer</param>
        /// <param name="type">The type of the transfer</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>The result of the transfer</returns>
        Task<WebCallResult<BinanceSubAccountTransaction>> TransferSubAccountFuturesAsync(string email, string asset, decimal quantity, SubAccountFuturesTransferType type, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Transfers from or to a margin sub account
        /// <para></para>
        ///
        /// <param name="email">Email of the sub account</param>
        /// <param name="asset">The asset to transfer</param>
        /// <param name="quantity">The quantity to transfer</param>
        /// <param name="type">The type of the transfer</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>The result of the transfer</returns>
        Task<WebCallResult<BinanceSubAccountTransaction>> TransferSubAccountMarginAsync(string email, string asset, decimal quantity, SubAccountMarginTransferType type, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Transfers to another sub account of the same master
        /// <para></para>
        ///
        /// <param name="email">Email of the sub account</param>
        /// <param name="asset">The asset to transfer</param>
        /// <param name="quantity">The quantity to transfer</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>The result of the transfer</returns>
        Task<WebCallResult<BinanceSubAccountTransaction>> TransferSubAccountToSubAccountAsync(string email, string asset, decimal quantity, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Transfers to master account
        /// <para></para>
        ///
        /// <param name="asset">The asset to transfer</param>
        /// <param name="quantity">The quantity to transfer</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>The result of the transfer</returns>
        Task<WebCallResult<BinanceSubAccountTransaction>> TransferSubAccountToMasterAsync(string asset, decimal quantity, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets the transfer history of a sub account (from the sub account)
        /// <para></para>
        ///
        /// <param name="asset">The asset</param>
        /// <param name="type">Filter by type of transfer</param>
        /// <param name="startTime">Only return transfers later than this</param>
        /// <param name="endTime">Only return transfers before this</param>
        /// <param name="limit">Max number of results</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>Transfer history</returns>
        Task<WebCallResult<IEnumerable<BinanceSubAccountTransferSubAccount>>> GetSubAccountTransferHistoryForSubAccountAsync(string? asset = null, SubAccountTransferSubAccountType? type = null, DateTime? startTime = null, DateTime? endTime = null, int? limit = null, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Get BTC valued asset summary of subaccounts.
        /// <para></para>
        ///
        /// <param name="email">Email of the sub account</param>
        /// <param name="page">The page</param>
        /// <param name="limit">The page size</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>Btc asset values</returns>
        Task<WebCallResult<BinanceSubAccountSpotAssetsSummary>> GetSubAccountBtcValuesAsync(string? email = null, int? page = null, int? limit = null, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Create a virtual sub account
        /// <para></para>
        ///
        /// <param name="subAccountString">String based with which a subaccount email will be generated. Should not contain special characters</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns></returns>
        Task<WebCallResult<BinanceSubAccountEmail>> CreateVirtualSubAccountAsync(string subAccountString, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Enable or disable blvt
        /// <para></para>
        ///
        /// <param name="email">Email of the sub account</param>
        /// <param name="enable">Enable or disable (only true for now)</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns></returns>
        Task<WebCallResult<BinanceSubAccountBlvt>> EnableBlvtForSubAccountAsync(string email, bool enable, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Gets a list of universal transfers
        /// <para></para>
        ///
        /// <param name="fromEmail">Filter the list by from email (fromEmail and toEmail cannot be present at same time)</param>
        /// <param name="toEmail">Filter the list by to email (fromEmail and toEmail cannot be present at same time)</param>
        /// <param name="startTime">Filter by start time</param>
        /// <param name="endTime">Filter by end time</param>
        /// <param name="page">The page of the results</param>
        /// <param name="limit">The max amount of results to return (Default 500, max 500)</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns>List of universal transfers</returns>
        Task<WebCallResult<IEnumerable<BinanceSubAccountUniversalTransferTransaction>>> GetUniversalTransferHistoryAsync(string? fromEmail = null, string? toEmail = null, DateTime? startTime = null, DateTime? endTime = null, int? page = null, int? limit = null, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Toggle IP restriction for an API key
        /// <para></para>
        ///
        /// <param name="apiKey">The api key</param>
        /// <param name="enable">Enable or disable</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns></returns>
        Task<WebCallResult<BinanceIpRestriction>> ToggleIpRestrictionForApiKeyAsync(string apiKey, bool enable, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Add IP addresses to the ip whitelist for an API key
        /// <para></para>
        ///
        /// <param name="apiKey">The api key</param>
        /// <param name="ipAddresses">Addresses to whitelist</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns></returns>
        Task<WebCallResult<BinanceIpRestriction>> AddIpToWhitelistForApiKeyAsync(string apiKey, IEnumerable<string> ipAddresses, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Remove IP addresses from the ip whitelist for an API key
        /// <para></para>
        ///
        /// <param name="apiKey">The api key</param>
        /// <param name="ipAddresses">Addresses to remove from whitelist</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns></returns>
        Task<WebCallResult<BinanceIpRestriction>> RemoveIpFromWhitelistForApiKeyAsync(string apiKey, IEnumerable<string> ipAddresses, int? receiveWindow = null, CancellationToken ct = default);

        ///
        /// Get the current whitelisted ip addresses for an API key
        /// <para></para>
        ///
        /// <param name="apiKey">The api key</param>
        /// <param name="receiveWindow">The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request</param>
        /// <param name="ct">Cancellation token</param>
        /// <returns></returns>
        Task<WebCallResult<BinanceIpRestriction>> GetIpWhitelistForApiKeyAsync(string apiKey, int? receiveWindow = null, CancellationToken ct = default);
    }
}


text:
@interface UserForgetResponse : BaseResponse

@end

redpajama_set_name: RedPajamaGithub


text:
#ifndef STRUCTS_H
#define STRUCTS_H

typedef struct __scrotoptions scrotoptions;

#endif


text:
namespace Velyo.AspNet.Markdown.Markdown {

    public partial class ViewSwitcher {
    }
}


text:
cask 'skim' do
  version '1.4.23'
  sha256 '2ce05367ab872c824e9b230bcd467ea12036630b208fac067f4ccaa72f02d935'

  url "https://downloads.sourceforge.net/skim-app/Skim/Skim-#{version}/Skim-#{version}.dmg"
  appcast 'http://skim-app.sourceforge.net/skim.xml',
          checkpoint: '4ca16b706108ad36df7a2c0a5435128cd235370f29518ca8f35b76b58918c393'
  name 'Skim'
  homepage 'http://skim-app.sourceforge.net/'

  app 'Skim.app'
  binary "#{appdir}/Skim.app/Contents/SharedSupport/displayline"
  binary "#{appdir}/Skim.app/Contents/SharedSupport/skimnotes"
  binary "#{appdir}/Skim.app/Contents/SharedSupport/skimpdf"

  zap delete: '~/Library/Preferences/net.sourceforge.skim-app.skim.plist'
end


text:
using namespace Windows::ApplicationModel::Core;

namespace april
{
	ref class WinP8_AppLauncher : public IFrameworkViewSource
	{
	public:
		virtual IFrameworkView^ CreateView();

	};

}

#endif
#endif


text:
The `:last-child` CSS [pseudo-class][0] represents any element that is the last child element of its parent.

### Syntax

    element:last-child { _style properties_ }

### Example

### HTML Content

This item is not limed.

Also not this one.

This item is! :)

### CSS Content

    li:last-child {
        background-color: lime;
    }

[0]: https://developer.mozilla.org/en/docs/CSS/Pseudo-classes "Pseudo-classes"


text:
require 'trashman/cli'

describe TrashMan::CLI do
  describe ".prune" do
    it "provides help" do
      expect {
        TrashMan::CLI.start(["help"])
      }.to output(/prune/).to_stdout
    end
  end
end


text:
//------------------------------------------------------------------------------
// <auto-generated>
//    This code was generated from a template.
//
//    Manual changes to this file may cause unexpected behavior in your application.
//    Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Data.EntityClient;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Runtime.Serialization;

[assembly: EdmSchemaAttribute()]

namespace EntityFramework_Subroutine
{
    #region Contexts

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class CustomerContainer : ObjectContext
    {
        #region Constructors

        /// <summary>
        /// Initializes a new CustomerContainer object using the connection string found in the 'CustomerContainer' section of the application configuration file.
        /// </summary>
        public CustomerContainer() : base("name=CustomerContainer", "CustomerContainer")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }

        /// <summary>
        /// Initialize a new CustomerContainer object.
        /// </summary>
        public CustomerContainer(string connectionString) : base(connectionString, "CustomerContainer")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }

        /// <summary>
        /// Initialize a new CustomerContainer object.
        /// </summary>
        public CustomerContainer(EntityConnection connection) : base(connection, "CustomerContainer")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }

        #endregion

        #region Partial Methods

        partial void OnContextCreated();

        #endregion

        #region ObjectSet Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<CUSTOMER> CUSTOMERS
        {
            get
            {
                if ((_CUSTOMERS == null))
                {
                    _CUSTOMERS = base.CreateObjectSet<CUSTOMER>("CUSTOMERS");
                }
                return _CUSTOMERS;
            }
        }
        private ObjectSet<CUSTOMER> _CUSTOMERS;

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<CUSTOMER_MV> CUSTOMERS_MV
        {
            get
            {
                if ((_CUSTOMERS_MV == null))
                {
                    _CUSTOMERS_MV = base.CreateObjectSet<CUSTOMER_MV>("CUSTOMERS_MV");
                }
                return _CUSTOMERS_MV;
            }
        }
        private ObjectSet<CUSTOMER_MV> _CUSTOMERS_MV;

        #endregion
        #region AddTo Methods

        /// <summary>
        /// Deprecated Method for adding a new object to the CUSTOMERS EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
        /// </summary>
        public void AddToCUSTOMERS(CUSTOMER cUSTOMER)
        {
            base.AddObject("CUSTOMERS", cUSTOMER);
        }

        /// <summary>
        /// Deprecated Method for adding a new object to the CUSTOMERS_MV EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
        /// </summary>
        public void AddToCUSTOMERS_MV(CUSTOMER_MV cUSTOMER_MV)
        {
            base.AddObject("CUSTOMERS_MV", cUSTOMER_MV);
        }

        #endregion
        #region Function Imports

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        /// <param name="cMD">No Metadata Documentation available.</param>
        /// <param name="oPTIONS">No Metadata Documentation available.</param>
        /// <param name="rESULT">No Metadata Documentation available.</param>
        /// <param name="xSD_DATA">No Metadata Documentation available.</param>
        /// <param name="eRRMSG">No Metadata Documentation available.</param>
        /// <param name="eRRNUM">No Metadata Documentation available.</param>
        public int GetXmlSubroutine(global::System.String cMD, global::System.String oPTIONS, ObjectParameter rESULT, ObjectParameter xSD_DATA, ObjectParameter eRRMSG, ObjectParameter eRRNUM)
        {
            ObjectParameter cMDParameter;
            if (cMD != null)
            {
                cMDParameter = new ObjectParameter("CMD", cMD);
            }
            else
            {
                cMDParameter = new ObjectParameter("CMD", typeof(global::System.String));
            }

            ObjectParameter oPTIONSParameter;
            if (oPTIONS != null)
            {
                oPTIONSParameter = new ObjectParameter("OPTIONS", oPTIONS);
            }
            else
            {
                oPTIONSParameter = new ObjectParameter("OPTIONS", typeof(global::System.String));
            }

            return base.ExecuteFunction("GetXmlSubroutine", cMDParameter, oPTIONSParameter, rESULT, xSD_DATA, eRRMSG, eRRNUM);
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectResult<CUSTOMER> GetCustomer()
        {
            return base.ExecuteFunction<CUSTOMER>("GetCustomer");
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        /// <param name="mergeOption"></param>
        public ObjectResult<CUSTOMER> GetCustomer(MergeOption mergeOption)
        {
            return base.ExecuteFunction<CUSTOMER>("GetCustomer", mergeOption);
        }

        #endregion
    }

    #endregion

    #region Entities

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="Customer", Name="CUSTOMER")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class CUSTOMER : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new CUSTOMER object.
        /// </summary>
        /// <param name="cUSTID">Initial value of the CUSTID property.</param>
        public static CUSTOMER CreateCUSTOMER(global::System.Int32 cUSTID)
        {
            CUSTOMER cUSTOMER = new CUSTOMER();
            cUSTOMER.CUSTID = cUSTID;
            return cUSTOMER;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 CUSTID
        {
            get
            {
                return _CUSTID;
            }
            set
            {
                if (_CUSTID != value)
                {
                    OnCUSTIDChanging(value);
                    ReportPropertyChanging("CUSTID");
                    _CUSTID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CUSTID");
                    OnCUSTIDChanged();
                }
            }
        }
        private global::System.Int32 _CUSTID;
        partial void OnCUSTIDChanging(global::System.Int32 value);
        partial void OnCUSTIDChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String PHONE
        {
            get
            {
                return _PHONE;
            }
            set
            {
                OnPHONEChanging(value);
                ReportPropertyChanging("PHONE");
                _PHONE = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("PHONE");
                OnPHONEChanged();
            }
        }
        private global::System.String _PHONE;
        partial void OnPHONEChanging(global::System.String value);
        partial void OnPHONEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String ZIP
        {
            get
            {
                return _ZIP;
            }
            set
            {
                OnZIPChanging(value);
                ReportPropertyChanging("ZIP");
                _ZIP = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ZIP");
                OnZIPChanged();
            }
        }
        private global::System.String _ZIP;
        partial void OnZIPChanging(global::System.String value);
        partial void OnZIPChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String STATENAME
        {
            get
            {
                return _STATENAME;
            }
            set
            {
                OnSTATENAMEChanging(value);
                ReportPropertyChanging("STATENAME");
                _STATENAME = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("STATENAME");
                OnSTATENAMEChanged();
            }
        }
        private global::System.String _STATENAME;
        partial void OnSTATENAMEChanging(global::System.String value);
        partial void OnSTATENAMEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String STATE
        {
            get
            {
                return _STATE;
            }
            set
            {
                OnSTATEChanging(value);
                ReportPropertyChanging("STATE");
                _STATE = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("STATE");
                OnSTATEChanged();
            }
        }
        private global::System.String _STATE;
        partial void OnSTATEChanging(global::System.String value);
        partial void OnSTATEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String CITY
        {
            get
            {
                return _CITY;
            }
            set
            {
                OnCITYChanging(value);
                ReportPropertyChanging("CITY");
                _CITY = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("CITY");
                OnCITYChanged();
            }
        }
        private global::System.String _CITY;
        partial void OnCITYChanging(global::System.String value);
        partial void OnCITYChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String FULLADDR
        {
            get
            {
                return _FULLADDR;
            }
            set
            {
                OnFULLADDRChanging(value);
                ReportPropertyChanging("FULLADDR");
                _FULLADDR = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("FULLADDR");
                OnFULLADDRChanged();
            }
        }
        private global::System.String _FULLADDR;
        partial void OnFULLADDRChanging(global::System.String value);
        partial void OnFULLADDRChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String ADDR2
        {
            get
            {
                return _ADDR2;
            }
            set
            {
                OnADDR2Changing(value);
                ReportPropertyChanging("ADDR2");
                _ADDR2 = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ADDR2");
                OnADDR2Changed();
            }
        }
        private global::System.String _ADDR2;
        partial void OnADDR2Changing(global::System.String value);
        partial void OnADDR2Changed();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String ADDR1
        {
            get
            {
                return _ADDR1;
            }
            set
            {
                OnADDR1Changing(value);
                ReportPropertyChanging("ADDR1");
                _ADDR1 = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ADDR1");
                OnADDR1Changed();
            }
        }
        private global::System.String _ADDR1;
        partial void OnADDR1Changing(global::System.String value);
        partial void OnADDR1Changed();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String COMPANY
        {
            get
            {
                return _COMPANY;
            }
            set
            {
                OnCOMPANYChanging(value);
                ReportPropertyChanging("COMPANY");
                _COMPANY = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("COMPANY");
                OnCOMPANYChanged();
            }
        }
        private global::System.String _COMPANY;
        partial void OnCOMPANYChanging(global::System.String value);
        partial void OnCOMPANYChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String FULLNAME
        {
            get
            {
                return _FULLNAME;
            }
            set
            {
                OnFULLNAMEChanging(value);
                ReportPropertyChanging("FULLNAME");
                _FULLNAME = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("FULLNAME");
                OnFULLNAMEChanged();
            }
        }
        private global::System.String _FULLNAME;
        partial void OnFULLNAMEChanging(global::System.String value);
        partial void OnFULLNAMEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String LNAME
        {
            get
            {
                return _LNAME;
            }
            set
            {
                OnLNAMEChanging(value);
                ReportPropertyChanging("LNAME");
                _LNAME = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("LNAME");
                OnLNAMEChanged();
            }
        }
        private global::System.String _LNAME;
        partial void OnLNAMEChanging(global::System.String value);
        partial void OnLNAMEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String FNAME
        {
            get
            {
                return _FNAME;
            }
            set
            {
                OnFNAMEChanging(value);
                ReportPropertyChanging("FNAME");
                _FNAME = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("FNAME");
                OnFNAMEChanged();
            }
        }
        private global::System.String _FNAME;
        partial void OnFNAMEChanging(global::System.String value);
        partial void OnFNAMEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String SAL
        {
            get
            {
                return _SAL;
            }
            set
            {
                OnSALChanging(value);
                ReportPropertyChanging("SAL");
                _SAL = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("SAL");
                OnSALChanged();
            }
        }
        private global::System.String _SAL;
        partial void OnSALChanging(global::System.String value);
        partial void OnSALChanged();

        #endregion

    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="Customer", Name="CUSTOMER_MV")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class CUSTOMER_MV : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new CUSTOMER_MV object.
        /// </summary>
        /// <param name="cUSTID">Initial value of the CUSTID property.</param>
        /// <param name="fNAME">Initial value of the FNAME property.</param>
        /// <param name="lNAME">Initial value of the LNAME property.</param>
        public static CUSTOMER_MV CreateCUSTOMER_MV(global::System.Int32 cUSTID, global::System.String fNAME, global::System.String lNAME)
        {
            CUSTOMER_MV cUSTOMER_MV = new CUSTOMER_MV();
            cUSTOMER_MV.CUSTID = cUSTID;
            cUSTOMER_MV.FNAME = fNAME;
            cUSTOMER_MV.LNAME = lNAME;
            return cUSTOMER_MV;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 CUSTID
        {
            get
            {
                return _CUSTID;
            }
            set
            {
                if (_CUSTID != value)
                {
                    OnCUSTIDChanging(value);
                    ReportPropertyChanging("CUSTID");
                    _CUSTID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CUSTID");
                    OnCUSTIDChanged();
                }
            }
        }
        private global::System.Int32 _CUSTID;
        partial void OnCUSTIDChanging(global::System.Int32 value);
        partial void OnCUSTIDChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String FNAME
        {
            get
            {
                return _FNAME;
            }
            set
            {
                OnFNAMEChanging(value);
                ReportPropertyChanging("FNAME");
                _FNAME = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("FNAME");
                OnFNAMEChanged();
            }
        }
        private global::System.String _FNAME;
        partial void OnFNAMEChanging(global::System.String value);
        partial void OnFNAMEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String LNAME
        {
            get
            {
                return _LNAME;
            }
            set
            {
                OnLNAMEChanging(value);
                ReportPropertyChanging("LNAME");
                _LNAME = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("LNAME");
                OnLNAMEChanged();
            }
        }
        private global::System.String _LNAME;
        partial void OnLNAMEChanging(global::System.String value);
        partial void OnLNAMEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> SVC_PAID_DATE
        {
            get
            {
                return _SVC_PAID_DATE;
            }
            set
            {
                OnSVC_PAID_DATEChanging(value);
                ReportPropertyChanging("SVC_PAID_DATE");
                _SVC_PAID_DATE = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SVC_PAID_DATE");
                OnSVC_PAID_DATEChanged();
            }
        }
        private Nullable<global::System.DateTime> _SVC_PAID_DATE;
        partial void OnSVC_PAID_DATEChanging(Nullable<global::System.DateTime> value);
        partial void OnSVC_PAID_DATEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> SVC_PRICE
        {
            get
            {
                return _SVC_PRICE;
            }
            set
            {
                OnSVC_PRICEChanging(value);
                ReportPropertyChanging("SVC_PRICE");
                _SVC_PRICE = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SVC_PRICE");
                OnSVC_PRICEChanged();
            }
        }
        private Nullable<global::System.Int32> _SVC_PRICE;
        partial void OnSVC_PRICEChanging(Nullable<global::System.Int32> value);
        partial void OnSVC_PRICEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> SVC_END
        {
            get
            {
                return _SVC_END;
            }
            set
            {
                OnSVC_ENDChanging(value);
                ReportPropertyChanging("SVC_END");
                _SVC_END = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SVC_END");
                OnSVC_ENDChanged();
            }
        }
        private Nullable<global::System.DateTime> _SVC_END;
        partial void OnSVC_ENDChanging(Nullable<global::System.DateTime> value);
        partial void OnSVC_ENDChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> SVC_START
        {
            get
            {
                return _SVC_START;
            }
            set
            {
                OnSVC_STARTChanging(value);
                ReportPropertyChanging("SVC_START");
                _SVC_START = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SVC_START");
                OnSVC_STARTChanged();
            }
        }
        private Nullable<global::System.DateTime> _SVC_START;
        partial void OnSVC_STARTChanging(Nullable<global::System.DateTime> value);
        partial void OnSVC_STARTChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> DISCOUNT
        {
            get
            {
                return _DISCOUNT;
            }
            set
            {
                OnDISCOUNTChanging(value);
                ReportPropertyChanging("DISCOUNT");
                _DISCOUNT = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DISCOUNT");
                OnDISCOUNTChanged();
            }
        }
        private Nullable<global::System.Decimal> _DISCOUNT;
        partial void OnDISCOUNTChanging(Nullable<global::System.Decimal> value);
        partial void OnDISCOUNTChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> PRICE
        {
            get
            {
                return _PRICE;
            }
            set
            {
                OnPRICEChanging(value);
                ReportPropertyChanging("PRICE");
                _PRICE = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("PRICE");
                OnPRICEChanged();
            }
        }
        private Nullable<global::System.Int32> _PRICE;
        partial void OnPRICEChanging(Nullable<global::System.Int32> value);
        partial void OnPRICEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> LIST_PRICE
        {
            get
            {
                return _LIST_PRICE;
            }
            set
            {
                OnLIST_PRICEChanging(value);
                ReportPropertyChanging("LIST_PRICE");
                _LIST_PRICE = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LIST_PRICE");
                OnLIST_PRICEChanged();
            }
        }
        private Nullable<global::System.Int32> _LIST_PRICE;
        partial void OnLIST_PRICEChanging(Nullable<global::System.Int32> value);
        partial void OnLIST_PRICEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> PAID_DATE
        {
            get
            {
                return _PAID_DATE;
            }
            set
            {
                OnPAID_DATEChanging(value);
                ReportPropertyChanging("PAID_DATE");
                _PAID_DATE = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("PAID_DATE");
                OnPAID_DATEChanged();
            }
        }
        private Nullable<global::System.DateTime> _PAID_DATE;
        partial void OnPAID_DATEChanging(Nullable<global::System.DateTime> value);
        partial void OnPAID_DATEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> BUY_DATE
        {
            get
            {
                return _BUY_DATE;
            }
            set
            {
                OnBUY_DATEChanging(value);
                ReportPropertyChanging("BUY_DATE");
                _BUY_DATE = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("BUY_DATE");
                OnBUY_DATEChanged();
            }
        }
        private Nullable<global::System.DateTime> _BUY_DATE;
        partial void OnBUY_DATEChanging(Nullable<global::System.DateTime> value);
        partial void OnBUY_DATEChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String SER_NUM
        {
            get
            {
                return _SER_NUM;
            }
            set
            {
                OnSER_NUMChanging(value);
                ReportPropertyChanging("SER_NUM");
                _SER_NUM = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("SER_NUM");
                OnSER_NUMChanged();
            }
        }
        private global::System.String _SER_NUM;
        partial void OnSER_NUMChanging(global::System.String value);
        partial void OnSER_NUMChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String DESCRIPTION
        {
            get
            {
                return _DESCRIPTION;
            }
            set
            {
                OnDESCRIPTIONChanging(value);
                ReportPropertyChanging("DESCRIPTION");
                _DESCRIPTION = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("DESCRIPTION");
                OnDESCRIPTIONChanged();
            }
        }
        private global::System.String _DESCRIPTION;
        partial void OnDESCRIPTIONChanging(global::System.String value);
        partial void OnDESCRIPTIONChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String PRODID
        {
            get
            {
                return _PRODID;
            }
            set
            {
                OnPRODIDChanging(value);
                ReportPropertyChanging("PRODID");
                _PRODID = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("PRODID");
                OnPRODIDChanged();
            }
        }
        private global::System.String _PRODID;
        partial void OnPRODIDChanging(global::System.String value);
        partial void OnPRODIDChanged();

        #endregion

    }

    #endregion

}


text:
# Using EKS As A Kubernetes Cluster In AWS

# What You'll Learn

> Amazon Elastic Container Service for Kubernetes

> Multi-AZ

> Kubernetes conformant

> Managed control plane

> Secure


text:
/**
 *
 */
package com.vaadin.server;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.DateFormatSymbols;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.logging.Logger;

import com.vaadin.shared.ui.ui.UIState.LocaleData;
import com.vaadin.shared.ui.ui.UIState.LocaleServiceState;
import com.vaadin.ui.UI;

/**
 * Server side service which handles locale and the transmission of locale date
 * to the client side LocaleService.
 *
 * @since 7.1
 * @author Vaadin Ltd
 */
public class LocaleService implements Serializable {

    private final UI ui;

    private final LocaleServiceState state;

    /**
     * Creates a LocaleService bound to the given UI
     *
     * @since 7.1
     * @param ui
     *            The UI which owns the LocaleService
     */
    public LocaleService(UI ui, LocaleServiceState state) {
        this.ui = ui;
        this.state = state;
    }

    /**
     * Retrieves the UI this service is bound to
     *
     * @since 7.1
     * @return the UI for this service
     */
    public UI getUI() {
        return ui;
    }

    /**
     * Adds a locale to be sent to the client (browser) for date and time entry
     * etc. All locale specific information is derived from server-side
     * {@link Locale} instances and sent to the client when needed, eliminating
     * the need to use the {@link Locale} class and all the framework behind it
     * on the client.
     *
     * @param locale
     *            The locale which is required on the client side
     */
    public void addLocale(Locale locale) {
        for (LocaleData data : getState(false).localeData) {
            if (data.name.equals(locale.toString())) {
                // Already there
                return;
            }
        }

        getState(true).localeData.add(createLocaleData(locale));
    }

    /**
     * Returns the state for this service
     * <p>
     * The state is transmitted inside the UI state rather than as an individual
     * entity.
     * </p>
     *
     * @since 7.1
     * @param markAsDirty
     *            true to mark the state as dirty
     * @return a LocaleServiceState object that can be read in any case and
     *         modified if markAsDirty is true
     */
    private LocaleServiceState getState(boolean markAsDirty) {
        if (markAsDirty) {
            getUI().markAsDirty();
        }

        return state;
    }

    /**
     * Creates a LocaleData instance for transportation to the client
     *
     * @since 7.1
     * @param locale
     *            The locale for which to create a LocaleData object
     * @return A LocaleData object with information about the given locale
     */
    protected LocaleData createLocaleData(Locale locale) {
        LocaleData localeData = new LocaleData();
        localeData.name = locale.toString();

        Calendar c = Calendar.getInstance(locale);
        c.set(2015, 0, 1);
        SimpleDateFormat shortMonthFormat = new SimpleDateFormat("MMM", locale);
        SimpleDateFormat longMonthFormat = new SimpleDateFormat("MMMM", locale);

        int monthsInYear = c.getMaximum(Calendar.MONTH) + 1;
        localeData.shortMonthNames = new String[monthsInYear];
        localeData.monthNames = new String[monthsInYear];
        for (int month = 0; month < monthsInYear; month++) {
            c.set(Calendar.MONTH, month);
            String shortMonth = shortMonthFormat.format(c.getTime());
            String longMonth = longMonthFormat.format(c.getTime());
            localeData.shortMonthNames[month] = shortMonth;
            localeData.monthNames[month] = longMonth;
        }

        final DateFormatSymbols dfs = new DateFormatSymbols(locale);

        // Client expects 0 based indexing, DateFormatSymbols use 1 based
        localeData.shortDayNames = new String[7];
        localeData.dayNames = new String[7];
        String[] sDayNames = dfs.getShortWeekdays();
        String[] lDayNames = dfs.getWeekdays();
        for (int i = 0; i < 7; i++) {
            localeData.shortDayNames[i] = sDayNames[i + 1];
            localeData.dayNames[i] = lDayNames[i + 1];
        }

        /*
         * First day of week (0 = sunday, 1 = monday)
         */
        final java.util.Calendar cal = new GregorianCalendar(locale);
        localeData.firstDayOfWeek = cal.getFirstDayOfWeek() - 1;

        /*
         * Date formatting (MM/DD/YYYY etc.)
         */
        DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT,
                locale);
        DateFormat timeFormat = DateFormat.getTimeInstance(DateFormat.SHORT,
                locale);
        if (!(dateFormat instanceof SimpleDateFormat)) {
            getLogger().warning("Unable to get default date pattern for locale "
                    + locale.toString());
            dateFormat = new SimpleDateFormat();
        }
        if (!(timeFormat instanceof SimpleDateFormat)) {
            getLogger().warning("Unable to get default time pattern for locale "
                    + locale.toString());
            timeFormat = new SimpleDateFormat();
        }
        final String datePattern = ((SimpleDateFormat) dateFormat).toPattern();
        final String timePattern = ((SimpleDateFormat) timeFormat).toPattern();

        localeData.dateFormat = datePattern.trim();

        final boolean twelve_hour_clock = timePattern.indexOf("a") > -1;
        // TODO there are other possibilities as well, like 'h' in french
        // (ignore them, too complicated)
        final String hour_min_delimiter = timePattern.indexOf(".") > -1 ? "."
                : ":";

        localeData.twelveHourClock = twelve_hour_clock;
        localeData.hourMinuteDelimiter = hour_min_delimiter;
        if (twelve_hour_clock) {
            final String[] ampm = dfs.getAmPmStrings();
            localeData.am = ampm[0];
            localeData.pm = ampm[1];
        }

        return localeData;
    }

    private static Logger getLogger() {
        return Logger.getLogger(LocaleService.class.getName());
    }

}


text:
package com.example.dawidperdek.kolkoikrzyzyk;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class MainActivity extends Activity {
    User gracz;
    Cpu komp;
    Button p1, p2, p3, p4, p5, p6, p7, p8, p9;
    String[] plansza;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        plansza = new String[9];
        for (int i = 0; i < 9; i++)
            plansza[i] = "";

        komp = new Cpu();
        gracz = new User();
        p1 = (Button) findViewById(R.id.button1);
        p2 = (Button) findViewById(R.id.button2);
        p3 = (Button) findViewById(R.id.button3);
        p4 = (Button) findViewById(R.id.button4);
        p5 = (Button) findViewById(R.id.button5);
        p6 = (Button) findViewById(R.id.button6);
        p7 = (Button) findViewById(R.id.button7);
        p8 = (Button) findViewById(R.id.button8);
        p9 = (Button) findViewById(R.id.button9);
    }

    public void planszaRuch(View view) {
        if (czyKoniec() || gracz.zwyciestwo || komp.zwyciestwo)
            return;
        boolean odp = false;
        Button klikniety, komputera;
        int indeks = -1;
        Log.d("xyz",Integer.toString(view.getId()));
        switch (view.getId()) {
            case R.id.button1:
                klikniety = (Button) findViewById(R.id.button1);
                indeks = 1;
                break;
            case R.id.button2:
                klikniety = (Button) findViewById(R.id.button2);
                indeks = 2;
                break;
            case R.id.button3:
                klikniety = (Button) findViewById(R.id.button3);
                indeks = 3;
                break;
            case R.id.button4:
                klikniety = (Button) findViewById(R.id.button4);
                indeks = 4;
                break;
            case R.id.button5:
                klikniety = (Button) findViewById(R.id.button5);
                indeks = 5;
                break;
            case R.id.button6:
                klikniety = (Button) findViewById(R.id.button6);
                indeks = 6;
                break;
            case R.id.button7:
                klikniety = (Button) findViewById(R.id.button7);
                indeks = 7;
                break;
            case R.id.button8:
                klikniety = (Button) findViewById(R.id.button8);
                indeks = 8;
                break;
            case R.id.button9:
                klikniety = (Button) findViewById(R.id.button9);
                indeks = 9;
                break;
            default:
                klikniety = null;
                break;
        }

        if (klikniety.getText().length() < 1) {
            klikniety.setText("X");
            plansza[indeks-1] = "X";
            odp = true;
        }
        else {
            Toast.makeText(this,"Pole zajęte!",Toast.LENGTH_SHORT).show();
            return;
        }
        gracz.sprawdz(plansza);
        if (odp && !gracz.zwyciestwo) {
            int ruch = komp.ruch(plansza);
//            if (ruch == -1) {
//                if (!gracz.zwyciestwo && !komp.zwyciestwo)
//                    Toast.makeText(this, "Remis!", Toast.LENGTH_SHORT).show();
//                else if (gracz.zwyciestwo)
//                    Toast.makeText(this, "Wygrałeś!", Toast.LENGTH_SHORT).show();
//                else if (komp.zwyciestwo)
//                    Toast.makeText(this, "Przegrałeś!", Toast.LENGTH_SHORT).show();
//            }
//            else {
                plansza[ruch] = "O";
                switch (ruch) {
                    case 0:
                        komputera = (Button) findViewById(R.id.button1);
                        break;
                    case 1:
                        komputera= (Button) findViewById(R.id.button2);
                        break;
                    case 2:
                        komputera = (Button) findViewById(R.id.button3);
                        break;
                    case 3:
                        komputera = (Button) findViewById(R.id.button4);
                        break;
                    case 4:
                        komputera = (Button) findViewById(R.id.button5);
                        break;
                    case 5:
                        komputera = (Button) findViewById(R.id.button6);
                        break;
                    case 6:
                        komputera = (Button) findViewById(R.id.button7);
                        break;
                    case 7:
                        komputera = (Button) findViewById(R.id.button8);
                        break;
                    case 8:
                        komputera = (Button) findViewById(R.id.button9);
                        break;
                    default:
                        komputera = null;
                        break;
                }
                komputera.setText("O");
            }
//        }
        komp.sprawdz(plansza);
        if (czyKoniec() || gracz.zwyciestwo || komp.zwyciestwo) {
            if (!gracz.zwyciestwo && !komp.zwyciestwo)
                Toast.makeText(this, "Remis!", Toast.LENGTH_SHORT).show();
            else if (gracz.zwyciestwo)
                Toast.makeText(this, "Wygrałeś!", Toast.LENGTH_SHORT).show();
            else if (komp.zwyciestwo)
                Toast.makeText(this, "Przegrałeś!", Toast.LENGTH_SHORT).show();
        }
    }

    public boolean czyKoniec() {
        for (int i = 0; i < 9; i++)
            if (plansza[i].length() < 1)
                return false;
        return true;
    }

    public void reset(View view) {
        for (int i = 0; i < 9; i++)
            plansza[i] = "";
        komp.zwyciestwo = false;
        gracz.zwyciestwo = false;
        p1 = (Button) findViewById(R.id.button1);
        p2 = (Button) findViewById(R.id.button2);
        p3 = (Button) findViewById(R.id.button3);
        p4 = (Button) findViewById(R.id.button4);
        p5 = (Button) findViewById(R.id.button5);
        p6 = (Button) findViewById(R.id.button6);
        p7 = (Button) findViewById(R.id.button7);
        p8 = (Button) findViewById(R.id.button8);
        p9 = (Button) findViewById(R.id.button9);
        p1.setText("");
        p2.setText("");
        p3.setText("");
        p4.setText("");
        p5.setText("");
        p6.setText("");
        p7.setText("");
        p8.setText("");
        p9.setText("");
    }
}


text:
#ifndef RELATION_H
#define RELATION_H
#include "types.h"

relation relation_create(int ndim, double betaprob, double betamag,
			 double *nig, domain *doms, int t);
int relation_getdim(relation r);
void relation_getbeta(relation r, double *b1, double *b2);
void relation_setbeta(relation r, double b1, double b2);
domain * relation_getdoms(relation r);
void relation_addedges(relation r, datael weight, int *absclasses);
void relation_removeedges(relation r, datael weight, int *absclasses);
datael relation_edgeweight(relation r, int *absclasses);
void relation_updatelikelihood(relation r);
double relation_likelihood(relation r);
int relation_getmissing(relation r);
void relation_setmissing(relation r, int val);
int relation_getdtype(relation r);
void relation_setdtype(relation r, int val);
void relation_printcounts(relation r);
void relation_copy(relation rs, relation rt);
void relation_free(relation r);
void relation_hypupdate(relation r, double temp,
	int (*proposal_choose) (double, double, double), int *changeflag ) ;

double relation_getbetaprop(relation r);
double relation_getbetamag(relation r);
double relation_getnig(relation r, int i);

#endif /* RELATION_H*/


text:
#ifndef WebUserMediaClientMock_h
#define WebUserMediaClientMock_h

#if ENABLE(MEDIA_STREAM)

#include "WebTask.h"
#include "WebUserMediaClient.h"
#include "webkit/support/test_media_stream_client.h"
#include <public/WebCommon.h>
#include <public/WebString.h>
#include <public/WebURL.h>
#include <wtf/PassOwnPtr.h>

class WebUserMediaClientMock : public WebKit::WebUserMediaClient {
public:
    static PassOwnPtr<WebUserMediaClientMock> create();
    ~WebUserMediaClientMock() { }

    virtual void requestUserMedia(const WebKit::WebUserMediaRequest&, const WebKit::WebVector<WebKit::WebMediaStreamSource>&, const WebKit::WebVector<WebKit::WebMediaStreamSource>&) OVERRIDE;
    virtual void cancelUserMediaRequest(const WebKit::WebUserMediaRequest&);

    // Task related methods
    WebTestRunner::WebTaskList* taskList() { return &m_taskList; }

private:
    WebUserMediaClientMock() { }

    WebTestRunner::WebTaskList m_taskList;
};

#endif // ENABLE(MEDIA_STREAM)

#endif // WebUserMediaClientMock_h


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Arctostaphylos uva-ursi subsp. longipilosa Packer & Denford

### Remarks
null


text:
/**
 * @module ngeo.WFSDescribeFeatureType
 */
import googAsserts from 'goog/asserts.js';
import * as olBase from 'ol/index.js';
import olFormatXML from 'ol/format/XML.js';
import * as olXml from 'ol/xml.js';

/**
 * @classdesc
 * Format for reading WFS DescribeFeatureType data.
 *
 * @constructor
 * @extends {ol.format.XML}
 * @api
 */
class WFSDescribeFeatureType extends olFormatXML {
  constructor(){
    super()
  }

  /**
   * Read a WFS DescribeFeatureType document.
   *
   * @function
   * @param {Document|Node|string} source The XML source.
   * @return {Object} An object representing the WFS DescribeFeatureType.
   * @api
   */
  //read() {}

  /**
   * @inheritDoc
   */
  readFromDocument(doc) {
    for (let n = doc.firstChild; n; n = n.nextSibling) {
      if (n.nodeType == Node.ELEMENT_NODE) {
        return this.readFromNode(n);
      }
    }
    return null;
  }

  /**
   * @inheritDoc
   */
  readFromNode(node) {
    let result = {};
    result = olXml.pushParseAndPop(
      result,
      WFSDescribeFeatureType.PARSERS_,
      node,
      []
    );
    return result;
  }

}

/**
 * @private
 * @param {Node} node Node.
 * @param {Array.<*>} objectStack Object stack.
 * @return {!Object.<string, string>} Attributes.
 */
WFSDescribeFeatureType.readElement_ = function(node, objectStack) {
  const attributes = {};
  for (let i = 0, len = node.attributes.length; i < len; i++) {
    const attribute = node.attributes.item(i);
    attributes[attribute.name] = attribute.value;
  }
  if (objectStack.length === 1) {
    // remove namespace from type
    attributes['type'] = attributes['type'].split(':').pop();
  }
  return attributes;
};

/**
 * @private
 * @param {Node} node Node.
 * @param {Array.<*>} objectStack Object stack.
 * @return {!Object.<string, string>} Object.
 */
WFSDescribeFeatureType.readComplexType_ = function(node, objectStack) {
  const name = node.getAttribute('name');
  const object = olXml.pushParseAndPop(
    {'name': name},
    WFSDescribeFeatureType.COMPLEX_TYPE_PARSERS_,
    node, objectStack
  );
  // flatten
  object['complexContent'] =
    object['complexContent']['extension']['sequence']['element'];
  return object;
};

/**
 * @private
 * @param {Node} node Node.
 * @param {Array.<*>} objectStack Object stack.
 * @return {!Object.<string, string>} Object.
 */
WFSDescribeFeatureType.readComplexContent_ = function(
  node, objectStack
) {
  return olXml.pushParseAndPop(
    {},
    WFSDescribeFeatureType.COMPLEX_CONTENT_PARSERS_,
    node,
    objectStack
  );
};

/**
 * @private
 * @param {Node} node Node.
 * @param {Array.<*>} objectStack Object stack.
 * @return {!Object.<string, string>} Object.
 */
WFSDescribeFeatureType.readExtension_ = function(node, objectStack) {
  return olXml.pushParseAndPop(
    {},
    WFSDescribeFeatureType.EXTENSION_PARSERS_,
    node,
    objectStack
  );
};

/**
 * @private
 * @param {Node} node Node.
 * @param {Array.<*>} objectStack Object stack.
 * @return {!Object.<string, string>} Object.
 */
WFSDescribeFeatureType.readSequence_ = function(node, objectStack) {
  return olXml.pushParseAndPop(
    {},
    WFSDescribeFeatureType.SEQUENCE_PARSERS_,
    node,
    objectStack
  );
};

/**
 * @const
 * @private
 * @type {Array.<string>}
 */
WFSDescribeFeatureType.NAMESPACE_URIS_ = [
  null,
  'http://www.w3.org/2001/XMLSchema'
];

/**
 * @const
 * @type {!Object.<string, !Object.<string, !ol.XmlParser>>}
 * @private
 */
WFSDescribeFeatureType.PARSERS_ = googAsserts.assert(olXml.makeStructureNS(
  WFSDescribeFeatureType.NAMESPACE_URIS_, {
    'element': olXml.makeObjectPropertyPusher(
      WFSDescribeFeatureType.readElement_
    ),
    'complexType': olXml.makeObjectPropertyPusher(
      WFSDescribeFeatureType.readComplexType_
    )
  }));

/**
 * @const
 * @type {!Object.<string, !Object.<string, !ol.XmlParser>>}
 * @private
 */
WFSDescribeFeatureType.COMPLEX_TYPE_PARSERS_ = googAsserts.assert(olXml.makeStructureNS(
  WFSDescribeFeatureType.NAMESPACE_URIS_, {
    'complexContent': olXml.makeObjectPropertySetter(
      WFSDescribeFeatureType.readComplexContent_
    )
  }));

/**
 * @const
 * @type {!Object.<string, !Object.<string, !ol.XmlParser>>}
 * @private
 */
WFSDescribeFeatureType.COMPLEX_CONTENT_PARSERS_ = googAsserts.assert(olXml.makeStructureNS(
  WFSDescribeFeatureType.NAMESPACE_URIS_, {
    'extension': olXml.makeObjectPropertySetter(
      WFSDescribeFeatureType.readExtension_
    )
  }));

/**
 * @const
 * @type {!Object.<string, !Object.<string, !ol.XmlParser>>}
 * @private
 */
WFSDescribeFeatureType.EXTENSION_PARSERS_ = googAsserts.assert(olXml.makeStructureNS(
  WFSDescribeFeatureType.NAMESPACE_URIS_, {
    'sequence': olXml.makeObjectPropertySetter(
      WFSDescribeFeatureType.readSequence_
    )
  }));

/**
 * @const
 * @type {!Object.<string, !Object.<string, !ol.XmlParser>>}
 * @private
 */
WFSDescribeFeatureType.SEQUENCE_PARSERS_ = googAsserts.assert(olXml.makeStructureNS(
  WFSDescribeFeatureType.NAMESPACE_URIS_, {
    'element': olXml.makeObjectPropertyPusher(
      WFSDescribeFeatureType.readElement_
    )
  }));

export default WFSDescribeFeatureType;


text:
#include "../include/moFileReader.h"
#include <iostream>
#include <cstdlib>

MO_BEGIN_NAMESPACE

unsigned long moFileReader::SwapBytes(unsigned long in)
{
    unsigned long b0 = (in >> 0) & 0xff;
    unsigned long b1 = (in >> 8) & 0xff;
    unsigned long b2 = (in >> 16) & 0xff;
    unsigned long b3 = (in >> 24) & 0xff;

    return (b0 << 24) | (b1 << 16) | (b2 << 8) | b3;
}

const std::string& moFileReader::GetErrorDescription() const
{
    return m_error;
}

void moFileReader::ClearTable()
{
    m_lookup.clear();
}

unsigned int moFileReader::GetNumStrings() const
{
    return m_lookup.size();
}

std::string moFileReader::Lookup( const char* id ) const
{
    if ( m_lookup.size() <= 0) return id;
    moLookupList::const_iterator iterator = m_lookup.find(id);

    if ( iterator == m_lookup.end() )
    {
        return id;
    }
    return iterator->second;
}

moFileReader::eErrorCode moFileReader::ParseData(std::string data)
{
    // Creating a file-description.
    moFileInfo moInfo;

    // Reference to the List inside moInfo.
    moFileInfo::moTranslationPairList& TransPairInfo = moInfo.m_translationPairInformation;

    // Opening the file.
    std::stringstream stream(data);

    // Read in all the 4 bytes of fire-magic, offsets and stuff...
    stream.read((char*)&moInfo.m_magicNumber, 4);
    stream.read((char*)&moInfo.m_fileVersion, 4);
    stream.read((char*)&moInfo.m_numStrings, 4);
    stream.read((char*)&moInfo.m_offsetOriginal, 4);
    stream.read((char*)&moInfo.m_offsetTranslation, 4);
    stream.read((char*)&moInfo.m_sizeHashtable, 4);
    stream.read((char*)&moInfo.m_offsetHashtable, 4);

    if ( stream.bad() )
    {
        m_error = "Stream bad during reading. The .mo-file seems to be invalid or has bad descriptions!";
        printf("%s", m_error.c_str());
        return moFileReader::EC_FILEINVALID;
    }

    // Checking the Magic Number
    if ( MagicNumber != moInfo.m_magicNumber )
    {
        if ( MagicReversed != moInfo.m_magicNumber )
        {
            m_error = "The Magic Number does not match in all cases!";
            printf("%s", m_error.c_str());
            return moFileReader::EC_MAGICNUMBER_NOMATCH;
        }
        else
        {
            moInfo.m_reversed = true;
            m_error = "Magic Number is reversed. We do not support this yet!";
            return moFileReader::EC_MAGICNUMBER_REVERSED;
        }
    }

    // Now we search all Length & Offsets of the original strings
    for ( int i = 0; i < moInfo.m_numStrings; i++ )
    {
        moTranslationPairInformation _str;
        stream.read((char*)&_str.m_orLength, 4);
        stream.read((char*)&_str.m_orOffset, 4);
        if ( stream.bad() )
        {
            m_error = "Stream bad during reading. The .mo-file seems to be invalid or has bad descriptions!";
            printf("%s", m_error.c_str());
            return moFileReader::EC_FILEINVALID;
        }

        TransPairInfo.push_back(_str);
    }

    // Get all Lengths & Offsets of the translated strings
    // Be aware: The Descriptors already exist in our list, so we just mod. refs from the deque.
    for ( int i = 0; i < moInfo.m_numStrings; i++ )
    {
        moTranslationPairInformation& _str = TransPairInfo[i];
        stream.read((char*)&_str.m_trLength, 4);
        stream.read((char*)&_str.m_trOffset, 4);
        if ( stream.bad() )
        {
            m_error = "Stream bad during reading. The .mo-file seems to be invalid or has bad descriptions!";
            printf("%s", m_error.c_str());
            return moFileReader::EC_FILEINVALID;
        }
    }

    // Normally you would read the hash-table here, but we don't use it. :)

    // Now to the interesting part, we read the strings-pairs now
    for ( int i = 0; i < moInfo.m_numStrings; i++)
    {
        // We need a length of +1 to catch the trailing \0.
        int orLength = TransPairInfo[i].m_orLength+1;
        int trLength = TransPairInfo[i].m_trLength+1;

        int orOffset = TransPairInfo[i].m_orOffset;
        int trOffset = TransPairInfo[i].m_trOffset;

        // Original
        char* original  = new char[orLength];
        memset(original, 0, sizeof(char)*orLength);

        stream.seekg(orOffset);
        stream.read(original, orLength);

        if ( stream.bad() )
        {
            m_error = "Stream bad during reading. The .mo-file seems to be invalid or has bad descriptions!";
            printf("%s", m_error.c_str());
            return moFileReader::EC_FILEINVALID;
        }

        // Translation
        char* translation = new char[trLength];
        memset(translation, 0, sizeof(char)*trLength);

        stream.seekg(trOffset);
        stream.read(translation, trLength);

        if ( stream.bad() )
        {
            m_error = "Stream bad during reading. The .mo-file seems to be invalid or has bad descriptions!";
            printf("%s", m_error.c_str());
            return moFileReader::EC_FILEINVALID;
        }

        // Store it in the map.
        m_lookup[std::string(original)] = std::string(translation);

        // Cleanup...
        delete original;
        delete translation;
    }

    // Done :)
    return moFileReader::EC_SUCCESS;
}

moFileReader::eErrorCode moFileReader::ReadFile( const char* filename )
{
    // Creating a file-description.
    moFileInfo moInfo;

    // Reference to the List inside moInfo.
    moFileInfo::moTranslationPairList& TransPairInfo = moInfo.m_translationPairInformation;

    // Opening the file.
    std::ifstream stream( filename, std::ios_base::binary | std::ios_base::in );
    if ( !stream.is_open() )
    {
        m_error = std::string("Cannot open File ") + std::string(filename);
        return moFileReader::EC_FILENOTFOUND;
    }

    // Read in all the 4 bytes of fire-magic, offsets and stuff...
    stream.read((char*)&moInfo.m_magicNumber, 4);
    stream.read((char*)&moInfo.m_fileVersion, 4);
    stream.read((char*)&moInfo.m_numStrings, 4);
    stream.read((char*)&moInfo.m_offsetOriginal, 4);
    stream.read((char*)&moInfo.m_offsetTranslation, 4);
    stream.read((char*)&moInfo.m_sizeHashtable, 4);
    stream.read((char*)&moInfo.m_offsetHashtable, 4);

    if ( stream.bad() )
    {
        stream.close();
        m_error = "Stream bad during reading. The .mo-file seems to be invalid or has bad descriptions!";
        return moFileReader::EC_FILEINVALID;
    }

    // Checking the Magic Number
    if ( MagicNumber != moInfo.m_magicNumber )
    {
        if ( MagicReversed != moInfo.m_magicNumber )
        {
            m_error = "The Magic Number does not match in all cases!";
            return moFileReader::EC_MAGICNUMBER_NOMATCH;
        }
        else
        {
            moInfo.m_reversed = true;
            m_error = "Magic Number is reversed. We do not support this yet!";
            return moFileReader::EC_MAGICNUMBER_REVERSED;
        }
    }

    // Now we search all Length & Offsets of the original strings
    for ( int i = 0; i < moInfo.m_numStrings; i++ )
    {
        moTranslationPairInformation _str;
        stream.read((char*)&_str.m_orLength, 4);
        stream.read((char*)&_str.m_orOffset, 4);
        if ( stream.bad() )
        {
            stream.close();
            m_error = "Stream bad during reading. The .mo-file seems to be invalid or has bad descriptions!";
            return moFileReader::EC_FILEINVALID;
        }

        TransPairInfo.push_back(_str);
    }

    // Get all Lengths & Offsets of the translated strings
    // Be aware: The Descriptors already exist in our list, so we just mod. refs from the deque.
    for ( int i = 0; i < moInfo.m_numStrings; i++ )
    {
        moTranslationPairInformation& _str = TransPairInfo[i];
        stream.read((char*)&_str.m_trLength, 4);
        stream.read((char*)&_str.m_trOffset, 4);
        if ( stream.bad() )
        {
            stream.close();
            m_error = "Stream bad during reading. The .mo-file seems to be invalid or has bad descriptions!";
            return moFileReader::EC_FILEINVALID;
        }
    }

    // Normally you would read the hash-table here, but we don't use it. :)

    // Now to the interesting part, we read the strings-pairs now
    for ( int i = 0; i < moInfo.m_numStrings; i++)
    {
        // We need a length of +1 to catch the trailing \0.
        int orLength = TransPairInfo[i].m_orLength+1;
        int trLength = TransPairInfo[i].m_trLength+1;

        int orOffset = TransPairInfo[i].m_orOffset;
        int trOffset = TransPairInfo[i].m_trOffset;

        // Original
        char* original  = new char[orLength];
        memset(original, 0, sizeof(char)*orLength);

        stream.seekg(orOffset);
        stream.read(original, orLength);

        if ( stream.bad() )
        {
            m_error = "Stream bad during reading. The .mo-file seems to be invalid or has bad descriptions!";
            return moFileReader::EC_FILEINVALID;
        }

        // Translation
        char* translation = new char[trLength];
        memset(translation, 0, sizeof(char)*trLength);

        stream.seekg(trOffset);
        stream.read(translation, trLength);

        if ( stream.bad() )
        {
            m_error = "Stream bad during reading. The .mo-file seems to be invalid or has bad descriptions!";
            return moFileReader::EC_FILEINVALID;
        }

        // Store it in the map.
        m_lookup[std::string(original)] = std::string(translation);

        // Cleanup...
        delete original;
        delete translation;
    }

    // Done :)
    stream.close();
    return moFileReader::EC_SUCCESS;
}

moFileReader::eErrorCode moFileReader::ExportAsHTML(std::string infile, std::string filename, std::string css )
{
    // Read the file
    moFileReader reader;
    moFileReader::eErrorCode r = reader.ReadFile(infile.c_str()) ;
    if ( r != moFileReader::EC_SUCCESS )
    {
        return r;
    }
    if ( reader.m_lookup.empty() )
    {
        return moFileReader::EC_TABLEEMPTY;
    }

    // Beautify Output
    std::string fname;
    unsigned int pos = infile.find_last_of(moPATHSEP);
    if ( pos != std::string::npos )
    {
        fname = infile.substr( pos+1, infile.length() );
    }
    else
    {
        fname = infile;
    }

    // if there is no filename given, we set it to the .mo + html, e.g. test.mo.html
    std::string htmlfile(filename);
    if (htmlfile.empty())
    {
        htmlfile = infile + std::string(".html");
    }

    // Ok, now prepare output.
    std::ofstream stream(htmlfile.c_str());
    if ( stream.is_open() )
    {
        stream << "<!DOCTYPE HTML PUBLIC \"- //W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" << std::endl;
        stream << "" << std::endl;
        stream << "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">" << std::endl;
        stream << "<title>Dump of " << fname << "</title>" << std::endl;
        stream << "" << std::endl;
        stream << "" <<std::endl;
        stream << "
" << fname << "
" << std::endl;
        stream << "
Project Info	" << std::endl;

        std::stringstream parsee;
        parsee << reader.Lookup("");

        while ( !parsee.eof() )
        {
            char buffer[1024];
            parsee.getline(buffer, 1024);
            std::string name;
            std::string value;

            reader.GetPoEditorString( buffer, name, value );
            if ( !(name.empty() || value.empty()) )
            {
                stream << "
" << name << "	" <<  value << "
" << std::endl;
            }
        }
        stream << "
" << std::endl;
        stream << "
" << std::endl;

        // Now output the content
        stream << "
Content	" << std::endl;
        for ( moLookupList::const_iterator it = reader.m_lookup.begin();
             it != reader.m_lookup.end(); it++)
        {
            if ( it->first != "" ) // Skip the empty msgid, its the table we handled above.
            {
                stream << "
" << it->first << "	" <<  it->second << "
" << std::endl;
            }
        }
        stream << "

" << std::endl;

        stream << "" << std::endl;
        stream << "
File generated by moFileReaderSDK
" << std::endl;
        stream << "" << std::endl;
        stream.close();
    }
    else
    {
        return moFileReader::EC_FILENOTFOUND;
    }

    return moFileReader::EC_SUCCESS;
}

// Removes spaces from front and end.
void moFileReader::Trim(std::string& in)
{
    while ( in[0] == ' ' )
    {
        in = in.substr(1, in.length() );
    }
    while( in[in.length()] == ' ' )
    {
        in = in.substr(0, in.length() - 1 );
    }
}

// Extracts a value-pair from the po-edit-information
bool moFileReader::GetPoEditorString(const char* buffer, std::string& name, std::string& value)
{
    std::string line(buffer);
    size_t first = line.find_first_of(":");

    if ( first != std::string::npos )
    {
        name   = line.substr( 0, first );
        value  = line.substr( first + 1, line.length() );

        // Replace <> with () for Html-Conformity.
        MakeHtmlConform(value);
        MakeHtmlConform(name);

        // Remove spaces from front and end.
        Trim(value);
        Trim(name);

        return true;
    }
    return false;
}

// Replaces < with ( to satisfy html-rules.
void moFileReader::MakeHtmlConform(std::string& inout)
{
    std::string temp = inout;
    for ( unsigned int i = 0; i < temp.length(); i++)
    {
        if ( temp[i] == '>')
        {
            inout.replace(i, 1, ")");
        }
        if ( temp[i] == '<' )
        {
            inout.replace(i, 1, "(");
        }
    }
}

moFileReaderSingleton& moFileReaderSingleton::GetInstance()
{
    static moFileReaderSingleton theoneandonly;
    return theoneandonly;
}

moFileReaderSingleton::moFileReaderSingleton(const moFileReaderSingleton& )
{
}

moFileReaderSingleton::moFileReaderSingleton()
{
}

moFileReaderSingleton& moFileReaderSingleton::operator=(const moFileReaderSingleton&)
{
    return *this;
}

MO_END_NAMESPACE


text:
package org.apache.accumulo.core.util;

import static org.junit.Assert.assertEquals;

import java.util.AbstractMap.SimpleImmutableEntry;
import java.util.Map.Entry;

import org.junit.Test;

public class PairTest {

  /**
   * Test method for {@link org.apache.accumulo.core.util.Pair#equals(java.lang.Object)}.
   */
  @Test
  public void testEqualsObject() {
    Pair<Integer,String> pair = new Pair<>(25, "twenty-five");
    Pair<Integer,String> pair2 = new Pair<>(25, "twenty-five");
    assertEquals(pair, pair2);
  }

  /**
   * Test method for {@link org.apache.accumulo.core.util.Pair#getFirst()}.
   */
  @Test
  public void testGetFirst() {
    Pair<Integer,String> pair = new Pair<>(25, "twenty-five");
    assertEquals((Integer) 25, pair.getFirst());
  }

  /**
   * Test method for {@link org.apache.accumulo.core.util.Pair#getSecond()}.
   */
  @Test
  public void testGetSecond() {
    Pair<Integer,String> pair = new Pair<>(25, "twenty-five");
    assertEquals("twenty-five", pair.getSecond());
  }

  /**
   * Test method for {@link org.apache.accumulo.core.util.Pair#toString()}.
   */
  @Test
  public void testToString() {
    Pair<Integer,String> pair = new Pair<>(25, "twenty-five");
    assertEquals("(25,twenty-five)", pair.toString());
  }

  /**
   * Test method for {@link org.apache.accumulo.core.util.Pair#toString(java.lang.String, java.lang.String, java.lang.String)}.
   */
  @Test
  public void testToStringStringStringString() {
    Pair<Integer,String> pair = new Pair<>(25, "twenty-five");
    assertEquals("---25~~~twenty-five+++", pair.toString("---", "~~~", "+++"));
  }

  /**
   * Test method for {@link org.apache.accumulo.core.util.Pair#toMapEntry()}.
   */
  @Test
  public void testToMapEntry() {
    Pair<Integer,String> pair = new Pair<>(10, "IO");

    Entry<Integer,String> entry = pair.toMapEntry();
    assertEquals(pair.getFirst(), entry.getKey());
    assertEquals(pair.getSecond(), entry.getValue());
  }

  /**
   * Test method for {@link org.apache.accumulo.core.util.Pair#swap()}.
   */
  @Test
  public void testSwap() {
    Pair<Integer,String> pair = new Pair<>(25, "twenty-five");
    assertEquals(pair, pair.swap().swap());
    Pair<String,Integer> pair2 = new Pair<>("twenty-five", 25);
    assertEquals(pair, pair2.swap());
    assertEquals(pair2, pair.swap());
  }

  /**
   * Test method for {@link org.apache.accumulo.core.util.Pair#fromEntry(java.util.Map.Entry)}.
   */
  @Test
  public void testFromEntry() {
    Entry<Integer,String> entry = new SimpleImmutableEntry<>(10, "IO");

    Pair<Integer,String> pair0 = Pair.fromEntry(entry);
    assertEquals(entry.getKey(), pair0.getFirst());
    assertEquals(entry.getValue(), pair0.getSecond());

    Pair<Object,Object> pair = Pair.<Object,Object,Integer,String> fromEntry(entry);
    assertEquals(entry.getKey(), pair.getFirst());
    assertEquals(entry.getValue(), pair.getSecond());

    Pair<Number,CharSequence> pair2 = Pair.<Number,CharSequence,Integer,String> fromEntry(entry);
    assertEquals(entry.getKey(), pair2.getFirst());
    assertEquals(entry.getValue(), pair2.getSecond());
  }

}


text:
//
//  ImageViewController.h
//  DropMe
//
//  Created by Soheil Azarpour on 6/25/13.
//  Copyright (c) 2013 Razeware LLC. All rights reserved.
//

@import UIKit;
#import "BaseViewController.h"

/*
 * The purpose of this class is to generate let user pick
 * a photo or a video from device photo library, or take a picture
 * or record a video with device camera and share it via AirDrop.
 */

@interface ImageViewController : BaseViewController

@end


text:
import os
import string
import re

def visit(arg, dir, files):
    global f
    dir = string.replace(dir, '\\','/')
    if 'svn' in dir : return          #skip svn folder
    if '.svn' in dir : return         #skip svn folder
    if 'bak' in dir : return          #skip bak folder
    if 'tmp' in dir : return          #skip tmp folder

    headers = []
    sources = []

    for file in files:
        if file.endswith('.cpp'):
            sources.append(dir+'/'+file)
        if file.endswith('.c'):
            sources.append(dir+'/'+file)

    f.write('#####################\n')
    f.write('# %s\n\n' % dir)
    f.write('include_directories( %s )\n\n' % dir)

    if sources:
       f.write('set( SOURCES ${SOURCES} ' +
            string.join(sources, ' \n           ') )
       f.write(')\n\n')

f = file('source_file.txt', 'wt')
os.path.walk('../source', visit, None)
f.close()


text:
A media management application for collecting and maintaining media in online course environments. This application supports the IIIF standard for image management, and seamlessly integrates with other applications such as Mirador and LTI-compliant learning management systems like Canvas and edX.

[![Build Status](https://travis-ci.org/Harvard-ATG/media_management_lti.svg)](https://travis-ci.org/Harvard-ATG/media_management_lti)

![alt text](https://github.com/Harvard-ATG/media_management_lti/blob/master/docs/IMM_HAM2.gif "IIIF Demo")

### Quickstart

**Prerequisites:**

The following components are required for running this LTI tool:

1. [media_management_api](https://github.com/Harvard-ATG/media_management_api): API backend for storing and managing data
2. [loris](https://github.com/harvard-atg/loris): Image server for delivering images from an S3 bucket
3. An AWS S3 bucket that the API can write to and Loris can read from.

To proceed with this quickstart, ensure that you have [docker](https://www.docker.com/) installed and that those components are configured appropriately.

**Configure LTI django application:**

- Setup the secure settings:

```
$ cp media_management_lti/settings/secure.py.example media_management_lti/settings/secure.py
```

- Generate API credentials on the [media_management_api](https://github.com/Harvard-ATG/media_management_api)  admin interface
- Update `media_management_lti/settings/secure.py` with the client_id and client_secret that were generated. These API credentials are used to obtain API tokens for end-users.

**Install TLS certificates to [support HTTPS on localhost](https://blog.filippo.io/mkcert-valid-https-certificates-for-localhost/)**
- Install the [mkcert tool](https://github.com/FiloSottile/mkcert). E.g, `$ brew install mkcert` on MacOS.
- Run `$ mkcert -install` and `$ mkcert localhost 127.0.0.1`. A TLS certificate and key pair will be generated. See output for the location of the pair on your filesystem.
- Update the `runsslserver` command in ./docker-compose.yml with the paths to the TLS certificate and key. Alternatively, as expected by ./docker-compose.yml, rename the certificate to `cert.pem` and the key to `key.pem`, and ensure they are in project root, i.e. ./cert.pem and ./key.pem.

**Start docker services:**

```
$ docker-compose up
$ docker-compose exec web python manage.py migrate
$ docker-compose exec web python manage.py createsuperuser
$ open http://localhost:8080
```

Note that the _web_ service talks to the [media_management_api](https://github.com/Harvard-ATG/media_management_api)
_web_ service on the same network.

**Build javascript (e.g. angularjs):**

The final step is to build the [angularjs](https://angularjs.org/) client code stored in the `app/` directory.

In order to do this, it's necessary to use [gulp](https://gulpjs.com/), a NodeJS build tool, and run the `gulp build`
command in the `app/` directory. Rather than installing a gulp locally, the commands below build a docker container
expressly for that purpose and then execute the necessary command(s).

```
$ cd app
$ docker build -t gulp .
$ docker run --rm -v `pwd`:/code gulp npm install
$ docker run --rm -v `pwd`:/code gulp gulp build
$ docker run --rm -v `pwd`:/code gulp gulp watch
```

Notes:

- The `--rm` flag is used to remove the container after the command is executed since the result of the command is saved
to the volume that was mounted (e.g. current directory).
- The `-v` flag mounts the app directory so that the build is saved outside of the container.

**Other tasks:**

- Access the database: `docker-compose exec db psql -U media_management_lti`
- Run unit tests: `bash run-tests.sh`