text:
/*! powerbi-client v2.9.0 | (c) 2016 Microsoft Corporation MIT */
declare module "util" {
    import { HttpPostMessage } from 'http-post-message';
    /**
     * Raises a custom event with event data on the specified HTML element.
     *
     * @export
     * @param {HTMLElement} element
     * @param {string} eventName
     * @param {*} eventData
     */
    export function raiseCustomEvent(element: HTMLElement, eventName: string, eventData: any): void;
    /**
     * Finds the index of the first value in an array that matches the specified predicate.
     *
     * @export
     * @template T
     * @param {(x: T) => boolean} predicate
     * @param {T[]} xs
     * @returns {number}
     */
    export function findIndex<T>(predicate: (x: T) => boolean, xs: T[]): number;
    /**
     * Finds the first value in an array that matches the specified predicate.
     *
     * @export
     * @template T
     * @param {(x: T) => boolean} predicate
     * @param {T[]} xs
     * @returns {T}
     */
    export function find<T>(predicate: (x: T) => boolean, xs: T[]): T;
    export function remove<T>(predicate: (x: T) => boolean, xs: T[]): void;
    /**
     * Copies the values of all enumerable properties from one or more source objects to a target object, and returns the target object.
     *
     * @export
     * @param {any} args
     * @returns
     */
    export function assign(...args: any[]): any;
    /**
     * Generates a random 7 character string.
     *
     * @export
     * @returns {string}
     */
    export function createRandomString(): string;
    /**
     * Generates a 20 charachter uuid.
     *
     * @export
     * @returns {string}
     */
    export function generateUUID(): string;
    /**
     * Adds a parameter to the given url
     *
     * @export
     * @param {string} url
     * @param {string} paramName
     * @param {string} value
     * @returns {string}
     */
    export function addParamToUrl(url: string, paramName: string, value: string): string;
    /**
     * Checks if the report is saved.
     *
     * @export
     * @param {HttpPostMessage} hpm
     * @param {string} uid
     * @param {Window} contentWindow
     * @returns {Promise<boolean>}
     */
    export function isSavedInternal(hpm: HttpPostMessage, uid: string, contentWindow: Window): Promise<boolean>;
    /**
     * Checks if the embed url is for RDL report.
     *
     * @export
      * @param {string} embedUrl
      * @returns {boolean}
     */
    export function isRDLEmbed(embedUrl: string): boolean;
}
declare module "config" {
    const config: {
        version: string;
        type: string;
    };
    export default config;
}
declare module "defaults" {
    import * as models from 'powerbi-models';
    export abstract class Defaults {
        static defaultSettings: models.ISettings;
        static defaultQnaSettings: models.IQnaSettings;
    }
}
declare module "embed" {
    import * as service from "service";
    import * as models from 'powerbi-models';
    global  {
        interface Document {
            mozCancelFullScreen: Function;
            msExitFullscreen: Function;
        }
        interface HTMLIFrameElement {
            mozRequestFullScreen: Function;
            msRequestFullscreen: Function;
        }
    }
    /**
     * Prepare configuration for Power BI embed components.
     *
     * @export
     * @interface IBootstrapEmbedConfiguration
     */
    export interface IBootstrapEmbedConfiguration {
        hostname?: string;
        embedUrl?: string;
        settings?: ISettings;
        uniqueId?: string;
        type?: string;
        groupId?: string;
        bootstrapped?: boolean;
    }
    /**
     * Base Configuration settings for Power BI embed components
     *
     * @export
     * @interface IEmbedConfigurationBase
     * @extends IBootstrapEmbedConfiguration
     */
    export interface IEmbedConfigurationBase extends IBootstrapEmbedConfiguration {
        accessToken?: string;
        tokenType?: models.TokenType;
    }
    /**
     * Configuration settings for Power BI embed components
     *
     * @export
     * @interface IEmbedConfiguration
     */
    export interface IEmbedConfiguration extends IEmbedConfigurationBase {
        id?: string;
        settings?: IEmbedSettings;
        pageName?: string;
        filters?: models.IFilter[];
        pageView?: models.PageView;
        datasetId?: string;
        permissions?: models.Permissions;
        viewMode?: models.ViewMode;
        action?: string;
        dashboardId?: string;
        height?: number;
        width?: number;
        theme?: models.IReportTheme;
    }
    export interface IVisualEmbedConfiguration extends IEmbedConfiguration {
        visualName: string;
    }
    /**
     * Configuration settings for Power BI QNA embed component
     *
     * @export
     * @interface IEmbedConfiguration
     */
    export interface IQnaEmbedConfiguration extends IEmbedConfigurationBase {
        datasetIds: string[];
        question?: string;
        viewMode?: models.QnaMode;
    }
    export interface ILocaleSettings {
        language?: string;
        formatLocale?: string;
    }
    export interface ISettings {
        localeSettings?: ILocaleSettings;
    }
    export interface IEmbedSettings extends models.ISettings, ISettings {
    }
    export interface IQnaSettings extends models.IQnaSettings, ISettings {
    }
    export interface IInternalEventHandler<T> {
        test(event: service.IEvent<T>): boolean;
        handle(event: service.ICustomEvent<T>): void;
    }
    /**
     * Base class for all Power BI embed components
     *
     * @export
     * @abstract
     * @class Embed
     */
    export abstract class Embed {
        static allowedEvents: string[];
        static accessTokenAttribute: string;
        static embedUrlAttribute: string;
        static nameAttribute: string;
        static typeAttribute: string;
        static defaultEmbedHostName: string;
        static type: string;
        static maxFrontLoadTimes: number;
        allowedEvents: any[];
        /**
         * Gets or sets the event handler registered for this embed component.
         *
         * @type {IInternalEventHandler<any>[]}
         */
        eventHandlers: IInternalEventHandler<any>[];
        /**
         * Gets or sets the Power BI embed service.
         *
         * @type {service.Service}
         */
        service: service.Service;
        /**
         * Gets or sets the HTML element that contains the Power BI embed component.
         *
         * @type {HTMLElement}
         */
        element: HTMLElement;
        /**
         * Gets or sets the HTML iframe element that renders the Power BI embed component.
         *
         * @type {HTMLIFrameElement}
         */
        iframe: HTMLIFrameElement;
        /**
         * Gets or sets the configuration settings for the Power BI embed component.
         *
         * @type {IEmbedConfigurationBase}
         */
        config: IEmbedConfigurationBase;
        /**
         * Gets or sets the bootstrap configuration for the Power BI embed component received by powerbi.bootstrap().
         *
         * @type {IBootstrapEmbedConfiguration}
         */
        bootstrapConfig: IBootstrapEmbedConfiguration;
        /**
         * Gets or sets the configuration settings for creating report.
         *
         * @type {models.IReportCreateConfiguration}
         */
        createConfig: models.IReportCreateConfiguration;
        /**
         * Url used in the load request.
         */
        loadPath: string;
        /**
         * Url used in the load request.
         */
        phasedLoadPath: string;
        /**
         * Type of embed
         */
        embeType: string;
        /**
         * Handler function for the 'ready' event
         */
        frontLoadHandler: () => any;
        /**
         * Creates an instance of Embed.
         *
         * Note: there is circular reference between embeds and the service, because
         * the service has a list of all embeds on the host page, and each embed has a reference to the service that created it.
         *
         * @param {service.Service} service
         * @param {HTMLElement} element
         * @param {IEmbedConfigurationBase} config
         */
        constructor(service: service.Service, element: HTMLElement, config: IEmbedConfigurationBase, iframe?: HTMLIFrameElement, phasedRender?: boolean, isBootstrap?: boolean);
        /**
         * Sends createReport configuration data.
         *
         * ```javascript
         * createReport({
         *   datasetId: '5dac7a4a-4452-46b3-99f6-a25915e0fe55',
         *   accessToken: 'eyJ0eXA ... TaE2rTSbmg',
         * ```
         *
         * @param {models.IReportCreateConfiguration} config
         * @returns {Promise<void>}
         */
        createReport(config: models.IReportCreateConfiguration): Promise<void>;
        /**
         * Saves Report.
         *
         * @returns {Promise<void>}
         */
        save(): Promise<void>;
        /**
         * SaveAs Report.
         *
         * @returns {Promise<void>}
         */
        saveAs(saveAsParameters: models.ISaveAsParameters): Promise<void>;
        /**
         * Sends load configuration data.
         *
         * ```javascript
         * report.load({
         *   type: 'report',
         *   id: '5dac7a4a-4452-46b3-99f6-a25915e0fe55',
         *   accessToken: 'eyJ0eXA ... TaE2rTSbmg',
         *   settings: {
         *     navContentPaneEnabled: false
         *   },
         *   pageName: "DefaultPage",
         *   filters: [
         *     {
         *        ...  DefaultReportFilter ...
         *     }
         *   ]
         * })
         *   .catch(error => { ... });
         * ```
         *
         * @param {models.ILoadConfiguration} config
         * @param {boolean} phasedRender
         * @returns {Promise<void>}
         */
        load(config: IEmbedConfigurationBase, phasedRender?: boolean): Promise<void>;
        /**
         * Removes one or more event handlers from the list of handlers.
         * If a reference to the existing handle function is specified, remove the specific handler.
         * If the handler is not specified, remove all handlers for the event name specified.
         *
         * ```javascript
         * report.off('pageChanged')
         *
         * or
         *
         * const logHandler = function (event) {
         *    console.log(event);
         * };
         *
         * report.off('pageChanged', logHandler);
         * ```
         *
         * @template T
         * @param {string} eventName
         * @param {service.IEventHandler<T>} [handler]
         */
        off<T>(eventName: string, handler?: service.IEventHandler<T>): void;
        /**
         * Adds an event handler for a specific event.
         *
         * ```javascript
         * report.on('pageChanged', (event) => {
         *   console.log('PageChanged: ', event.page.name);
         * });
         * ```
         *
         * @template T
         * @param {string} eventName
         * @param {service.IEventHandler<T>} handler
         */
        on<T>(eventName: string, handler: service.IEventHandler<T>): void;
        /**
         * Reloads embed using existing configuration.
         * E.g. For reports this effectively clears all filters and makes the first page active which simulates resetting a report back to loaded state.
         *
         * ```javascript
         * report.reload();
         * ```
         */
        reload(): Promise<void>;
        /**
         * Set accessToken.
         *
         * @returns {Promise<void>}
         */
        setAccessToken(accessToken: string): Promise<void>;
        /**
         * Gets an access token from the first available location: config, attribute, global.
         *
         * @private
         * @param {string} globalAccessToken
         * @returns {string}
         */
        private getAccessToken(globalAccessToken);
        /**
         * Populate config for create and load
         *
         * @param {IEmbedConfiguration}
         * @returns {void}
         */
        populateConfig(config: IBootstrapEmbedConfiguration, isBootstrap: boolean): void;
        /**
         * Adds locale parameters to embedUrl
         *
         * @private
         * @param {IEmbedConfiguration} config
         */
        private addLocaleToEmbedUrl(config);
        /**
         * Gets an embed url from the first available location: options, attribute.
         *
         * @private
         * @returns {string}
         */
        private getEmbedUrl(isBootstrap);
        private getDefaultEmbedUrl(hostname);
        /**
         * Gets a unique ID from the first available location: options, attribute.
         * If neither is provided generate a unique string.
         *
         * @private
         * @returns {string}
         */
        private getUniqueId();
        /**
         * Gets the group ID from the first available location: options, embeddedUrl.
         *
         * @private
         * @returns {string}
         */
        private getGroupId();
        /**
         * Gets the report ID from the first available location: options, attribute.
         *
         * @abstract
         * @returns {string}
         */
        abstract getId(): string;
        /**
         * Raise a config changed event.
         *
         * @returns {void}
         */
        abstract configChanged(isBootstrap: boolean): void;
        /**
         * Gets default embed endpoint for each entity.
         * For example: report embed endpoint is reportEmbed.
         * This will help creating a default embed URL such as: https://app.powerbi.com/reportEmbed
         *
         * @returns {string} endpoint.
         */
        abstract getDefaultEmbedUrlEndpoint(): string;
        /**
         * Requests the browser to render the component's iframe in fullscreen mode.
         */
        fullscreen(): void;
        /**
         * Requests the browser to exit fullscreen mode.
         */
        exitFullscreen(): void;
        /**
         * Returns true if the iframe is rendered in fullscreen mode,
         * otherwise returns false.
         *
         * @private
         * @param {HTMLIFrameElement} iframe
         * @returns {boolean}
         */
        private isFullscreen(iframe);
        /**
         * Validate load and create configuration.
         */
        abstract validate(config: IEmbedConfigurationBase): models.IError[];
        /**
         * Sets Iframe for embed
         */
        private setIframe(isLoad, phasedRender?, isBootstrap?);
        /**
         * Sets Iframe's title
         */
        setComponentTitle(title: string): void;
        /**
         * Sets element's tabindex attribute
         */
        setComponentTabIndex(tabIndex?: number): void;
        /**
         * Removes element's tabindex attribute
         */
        removeComponentTabIndex(tabIndex?: number): void;
        /**
         * Adds the ability to get groupId from url.
         * By extracting the ID we can ensure that the ID is always explicitly provided as part of the load configuration.
         *
         * @static
         * @param {string} url
         * @returns {string}
         */
        static findGroupIdFromEmbedUrl(url: string): string;
        /**
         * Sends the config for front load calls, after 'ready' message is received from the iframe
         */
        private frontLoadSendConfig(config);
    }
}
declare module "errors" {
    export let APINotSupportedForRDLError: string;
}
declare module "ifilterable" {
    import * as models from 'powerbi-models';
    /**
     * Decorates embed components that support filters
     * Examples include reports and pages
     *
     * @export
     * @interface IFilterable
     */
    export interface IFilterable {
        /**
         * Gets the filters currently applied to the object.
         *
         * @returns {(Promise<models.IFilter[]>)}
         */
        getFilters(): Promise<models.IFilter[]>;
        /**
         * Replaces all filters on the current object with the specified filter values.
         *
         * @param {(models.IFilter[])} filters
         * @returns {Promise<void>}
         */
        setFilters(filters: models.IFilter[]): Promise<void>;
        /**
         * Removes all filters from the current object.
         *
         * @returns {Promise<void>}
         */
        removeFilters(): Promise<void>;
    }
}
declare module "visualDescriptor" {
    import * as models from 'powerbi-models';
    import { IFilterable } from "ifilterable";
    import { IPageNode } from "page";
    /**
     * A Visual node within a report hierarchy
     *
     * @export
     * @interface IVisualNode
     */
    export interface IVisualNode {
        name: string;
        title: string;
        type: string;
        layout: models.IVisualLayout;
        page: IPageNode;
    }
    /**
     * A Power BI visual within a page
     *
     * @export
     * @class VisualDescriptor
     * @implements {IVisualNode}
     */
    export class VisualDescriptor implements IVisualNode, IFilterable {
        /**
         * The visual name
         *
         * @type {string}
         */
        name: string;
        /**
         * The visual title
         *
         * @type {string}
         */
        title: string;
        /**
         * The visual type
         *
         * @type {string}
         */
        type: string;
        /**
         * The visual layout: position, size and visiblity.
         *
         * @type {string}
         */
        layout: models.IVisualLayout;
        /**
         * The parent Power BI page that contains this visual
         *
         * @type {IPageNode}
         */
        page: IPageNode;
        constructor(page: IPageNode, name: string, title: string, type: string, layout: models.IVisualLayout);
        /**
         * Gets all visual level filters of the current visual.
         *
         * ```javascript
         * visual.getFilters()
         *  .then(filters => { ... });
         * ```
         *
         * @returns {(Promise<models.IFilter[]>)}
         */
        getFilters(): Promise<models.IFilter[]>;
        /**
         * Removes all filters from the current visual.
         *
         * ```javascript
         * visual.removeFilters();
         * ```
         *
         * @returns {Promise<void>}
         */
        removeFilters(): Promise<void>;
        /**
         * Sets the filters on the current visual to 'filters'.
         *
         * ```javascript
         * visual.setFilters(filters);
         *   .catch(errors => { ... });
         * ```
         *
         * @param {(models.IFilter[])} filters
         * @returns {Promise<void>}
         */
        setFilters(filters: models.IFilter[]): Promise<void>;
        /**
         * Exports Visual data.
         * Can export up to 30K rows.
         * @param rows: Optional. Default value is 30K, maximum value is 30K as well.
         * @param exportDataType: Optional. Default is models.ExportDataType.Summarized.
         * ```javascript
         * visual.exportData()
         *  .then(data => { ... });
         * ```
         *
         * @returns {(Promise<models.ExportDataType>)}
         */
        exportData(exportDataType?: models.ExportDataType, rows?: number): Promise<models.ExportDataType>;
        /**
         * Set slicer state.
         * Works only for visuals of type slicer.
         * @param state: A new state which contains the slicer filters.
         * ```javascript
         * visual.setSlicerState()
         *  .then(() => { ... });
         * ```
         */
        setSlicerState(state: models.ISlicerState): Promise<void>;
        /**
         * Get slicer state.
         * Works only for visuals of type slicer.
         *
         * ```javascript
         * visual.getSlicerState()
         *  .then(state => { ... });
         * ```
         *
         * @returns {(Promise<models.ISlicerState>)}
         */
        getSlicerState(): Promise<models.ISlicerState>;
        /**
         * Clone existing visual to a new instance.
         *
         * @returns {(Promise<models.ICloneVisualResponse>)}
         */
        clone(request?: models.ICloneVisualRequest): Promise<models.ICloneVisualResponse>;
        /**
         * Sort a visual by dataField and direction.
         *
         * @param request: Sort by visual request.
         *
         * ```javascript
         * visual.sortBy(request)
         *  .then(() => { ... });
         * ```
         */
        sortBy(request: models.ISortByVisualRequest): Promise<void>;
    }
}
declare module "page" {
    import { IFilterable } from "ifilterable";
    import { IReportNode } from "report";
    import { VisualDescriptor } from "visualDescriptor";
    import * as models from 'powerbi-models';
    /**
     * A Page node within a report hierarchy
     *
     * @export
     * @interface IPageNode
     */
    export interface IPageNode {
        report: IReportNode;
        name: string;
    }
    /**
     * A Power BI report page
     *
     * @export
     * @class Page
     * @implements {IPageNode}
     * @implements {IFilterable}
     */
    export class Page implements IPageNode, IFilterable {
        /**
         * The parent Power BI report that this page is a member of
         *
         * @type {IReportNode}
         */
        report: IReportNode;
        /**
         * The report page name
         *
         * @type {string}
         */
        name: string;
        /**
         * The user defined display name of the report page, which is undefined if the page is created manually
         *
         * @type {string}
         */
        displayName: string;
        /**
         * Is this page is the active page
         *
         * @type {boolean}
         */
        isActive: boolean;
        /**
         * The visibility of the page.
         * 0 - Always Visible
         * 1 - Hidden in View Mode
         *
         * @type {models.SectionVisibility}
         */
        visibility: models.SectionVisibility;
        /**
         * Page size as saved in the report.
         * @type {models.ICustomPageSize}
         */
        defaultSize: models.ICustomPageSize;
        /**
         * Page display options as saved in the report.
         * @type {models.ICustomPageSize}
         */
        defaultDisplayOption: models.DisplayOption;
        /**
         * Creates an instance of a Power BI report page.
         *
         * @param {IReportNode} report
         * @param {string} name
         * @param {string} [displayName]
         * @param {boolean} [isActivePage]
         * @param {models.SectionVisibility} [visibility]
         */
        constructor(report: IReportNode, name: string, displayName?: string, isActivePage?: boolean, visibility?: models.SectionVisibility, defaultSize?: models.ICustomPageSize, defaultDisplayOption?: models.DisplayOption);
        /**
         * Gets all page level filters within the report.
         *
         * ```javascript
         * page.getFilters()
         *  .then(filters => { ... });
         * ```
         *
         * @returns {(Promise<models.IFilter[]>)}
         */
        getFilters(): Promise<models.IFilter[]>;
        /**
         * Removes all filters from this page of the report.
         *
         * ```javascript
         * page.removeFilters();
         * ```
         *
         * @returns {Promise<void>}
         */
        removeFilters(): Promise<void>;
        /**
         * Makes the current page the active page of the report.
         *
         * ```javascripot
         * page.setActive();
         * ```
         *
         * @returns {Promise<void>}
         */
        setActive(): Promise<void>;
        /**
         * Sets all filters on the current page.
         *
         * ```javascript
         * page.setFilters(filters);
         *   .catch(errors => { ... });
         * ```
         *
         * @param {(models.IFilter[])} filters
         * @returns {Promise<void>}
         */
        setFilters(filters: models.IFilter[]): Promise<void>;
        /**
         * Gets all the visuals on the page.
         *
         * ```javascript
         * page.getVisuals()
         *   .then(visuals => { ... });
         * ```
         *
         * @returns {Promise<VisualDescriptor[]>}
         */
        getVisuals(): Promise<VisualDescriptor[]>;
        /**
         * Checks if page has layout.
         *
         * ```javascript
         * page.hasLayout(layoutType)
         *  .then(hasLayout: boolean => { ... });
         * ```
         *
         * @returns {(Promise<boolean>)}
         */
        hasLayout(layoutType: any): Promise<boolean>;
    }
}
declare module "report" {
    import * as service from "service";
    import * as embed from "embed";
    import * as models from 'powerbi-models';
    import { IFilterable } from "ifilterable";
    import { Page } from "page";
    import { IReportLoadConfiguration } from 'powerbi-models';
    import { BookmarksManager } from "bookmarksManager";
    /**
     * A Report node within a report hierarchy
     *
     * @export
     * @interface IReportNode
     */
    export interface IReportNode {
        iframe: HTMLIFrameElement;
        service: service.IService;
        config: embed.IEmbedConfiguration;
    }
    /**
     * The Power BI Report embed component
     *
     * @export
     * @class Report
     * @extends {embed.Embed}
     * @implements {IReportNode}
     * @implements {IFilterable}
     */
    export class Report extends embed.Embed implements IReportNode, IFilterable {
        static allowedEvents: string[];
        static reportIdAttribute: string;
        static filterPaneEnabledAttribute: string;
        static navContentPaneEnabledAttribute: string;
        static typeAttribute: string;
        static type: string;
        bookmarksManager: BookmarksManager;
        /**
         * Creates an instance of a Power BI Report.
         *
         * @param {service.Service} service
         * @param {HTMLElement} element
         * @param {embed.IEmbedConfiguration} config
         */
        constructor(service: service.Service, element: HTMLElement, baseConfig: embed.IEmbedConfigurationBase, phasedRender?: boolean, isBootstrap?: boolean, iframe?: HTMLIFrameElement);
        /**
         * Adds backwards compatibility for the previous load configuration, which used the reportId query parameter to specify the report ID
         * (e.g. http://embedded.powerbi.com/appTokenReportEmbed?reportId=854846ed-2106-4dc2-bc58-eb77533bf2f1).
         *
         * By extracting the ID we can ensure that the ID is always explicitly provided as part of the load configuration.
         *
         * @static
         * @param {string} url
         * @returns {string}
         */
        static findIdFromEmbedUrl(url: string): string;
        /**
         * Render a preloaded report, using phased embedding API
         *
         * ```javascript
         * // Load report
         * var report = powerbi.load(element, config);
         *
         * ...
         *
         * // Render report
         * report.render()
         * ```
         *
         * @returns {Promise<void>}
         */
        render(config?: IReportLoadConfiguration): Promise<void>;
        /**
         * Gets filters that are applied at the report level.
         *
         * ```javascript
         * // Get filters applied at report level
         * report.getFilters()
         *   .then(filters => {
         *     ...
         *   });
         * ```
         *
         * @returns {Promise<models.IFilter[]>}
         */
        getFilters(): Promise<models.IFilter[]>;
        /**
         * Gets the report ID from the first available location: options, attribute, embed url.
         *
         * @returns {string}
         */
        getId(): string;
        /**
         * Gets the list of pages within the report.
         *
         * ```javascript
         * report.getPages()
         *  .then(pages => {
         *      ...
         *  });
         * ```
         *
         * @returns {Promise<Page[]>}
         */
        getPages(): Promise<Page[]>;
        /**
         * Creates an instance of a Page.
         *
         * Normally you would get Page objects by calling `report.getPages()`, but in the case
         * that the page name is known and you want to perform an action on a page without having to retrieve it
         * you can create it directly.
         *
         * Note: Because you are creating the page manually there is no guarantee that the page actually exists in the report, and subsequent requests could fail.
         *
         * ```javascript
         * const page = report.page('ReportSection1');
         * page.setActive();
         * ```
         *
         * @param {string} name
         * @param {string} [displayName]
         * @param {boolean} [isActive]
         * @returns {Page}
         */
        page(name: string, displayName?: string, isActive?: boolean, visibility?: models.SectionVisibility): Page;
        /**
         * Prints the active page of the report by invoking `window.print()` on the embed iframe component.
         */
        print(): Promise<void>;
        /**
         * Removes all filters at the report level.
         *
         * ```javascript
         * report.removeFilters();
         * ```
         *
         * @returns {Promise<void>}
         */
        removeFilters(): Promise<void>;
        /**
         * Sets the active page of the report.
         *
         * ```javascript
         * report.setPage("page2")
         *  .catch(error => { ... });
         * ```
         *
         * @param {string} pageName
         * @returns {Promise<void>}
         */
        setPage(pageName: string): Promise<void>;
        /**
         * Sets filters at the report level.
         *
         * ```javascript
         * const filters: [
         *    ...
         * ];
         *
         * report.setFilters(filters)
         *  .catch(errors => {
         *    ...
         *  });
         * ```
         *
         * @param {(models.IFilter[])} filters
         * @returns {Promise<void>}
         */
        setFilters(filters: models.IFilter[]): Promise<void>;
        /**
         * Updates visibility settings for the filter pane and the page navigation pane.
         *
         * ```javascript
         * const newSettings = {
         *   navContentPaneEnabled: true,
         *   filterPaneEnabled: false
         * };
         *
         * report.updateSettings(newSettings)
         *   .catch(error => { ... });
         * ```
         *
         * @param {models.ISettings} settings
         * @returns {Promise<void>}
         */
        updateSettings(settings: models.ISettings): Promise<void>;
        /**
         * Validate load configuration.
         */
        validate(config: embed.IEmbedConfigurationBase): models.IError[];
        /**
         * Handle config changes.
         *
         * @returns {void}
         */
        configChanged(isBootstrap: boolean): void;
        getDefaultEmbedUrlEndpoint(): string;
        /**
         * Switch Report view mode.
         *
         * @returns {Promise<void>}
         */
        switchMode(viewMode: models.ViewMode | string): Promise<void>;
        /**
        * Refreshes data sources for the report.
        *
        * ```javascript
        * report.refresh();
        * ```
        */
        refresh(): Promise<void>;
        /**
         * checks if the report is saved.
         *
         * ```javascript
         * report.isSaved()
         * ```
         *
         * @returns {Promise<boolean>}
         */
        isSaved(): Promise<boolean>;
        /**
         * Apply a theme to the report
         *
         * ```javascript
         * report.applyTheme(theme);
         * ```
         */
        applyTheme(theme: models.IReportTheme): Promise<void>;
        /**
        * Reset and apply the default theme of the report
        *
        * ```javascript
        * report.resetTheme();
        * ```
        */
        resetTheme(): Promise<void>;
        private applyThemeInternal(theme);
        private viewModeToString(viewMode);
        private isMobileSettings(settings);
    }
}
declare module "create" {
    import * as service from "service";
    import * as models from 'powerbi-models';
    import * as embed from "embed";
    export class Create extends embed.Embed {
        constructor(service: service.Service, element: HTMLElement, config: embed.IEmbedConfiguration, phasedRender?: boolean, isBootstrap?: boolean);
        /**
         * Gets the dataset ID from the first available location: createConfig or embed url.
         *
         * @returns {string}
         */
        getId(): string;
        /**
         * Validate create report configuration.
         */
        validate(config: embed.IEmbedConfigurationBase): models.IError[];
        /**
         * Handle config changes.
         *
         * @returns {void}
         */
        configChanged(isBootstrap: boolean): void;
        getDefaultEmbedUrlEndpoint(): string;
        /**
         * checks if the report is saved.
         *
         * ```javascript
         * report.isSaved()
         * ```
         *
         * @returns {Promise<boolean>}
         */
        isSaved(): Promise<boolean>;
        /**
         * Adds the ability to get datasetId from url.
         * (e.g. http://embedded.powerbi.com/appTokenReportEmbed?datasetId=854846ed-2106-4dc2-bc58-eb77533bf2f1).
         *
         * By extracting the ID we can ensure that the ID is always explicitly provided as part of the create configuration.
         *
         * @static
         * @param {string} url
         * @returns {string}
         */
        static findIdFromEmbedUrl(url: string): string;
    }
}
declare module "dashboard" {
    import * as service from "service";
    import * as embed from "embed";
    import * as models from 'powerbi-models';
    /**
     * A Dashboard node within a dashboard hierarchy
     *
     * @export
     * @interface IDashboardNode
     */
    export interface IDashboardNode {
        iframe: HTMLIFrameElement;
        service: service.IService;
        config: embed.IEmbedConfigurationBase;
    }
    /**
     * A Power BI Dashboard embed component
     *
     * @export
     * @class Dashboard
     * @extends {embed.Embed}
     * @implements {IDashboardNode}
     * @implements {IFilterable}
     */
    export class Dashboard extends embed.Embed implements IDashboardNode {
        static allowedEvents: string[];
        static dashboardIdAttribute: string;
        static typeAttribute: string;
        static type: string;
        /**
         * Creates an instance of a Power BI Dashboard.
         *
         * @param {service.Service} service
         * @param {HTMLElement} element
         */
        constructor(service: service.Service, element: HTMLElement, config: embed.IEmbedConfigurationBase, phasedRender?: boolean, isBootstrap?: boolean);
        /**
         * This adds backwards compatibility for older config which used the dashboardId query param to specify dashboard id.
         * E.g. https://powerbi-df.analysis-df.windows.net/dashboardEmbedHost?dashboardId=e9363c62-edb6-4eac-92d3-2199c5ca2a9e
         *
         * By extracting the id we can ensure id is always explicitly provided as part of the load configuration.
         *
         * @static
         * @param {string} url
         * @returns {string}
         */
        static findIdFromEmbedUrl(url: string): string;
        /**
         * Get dashboard id from first available location: options, attribute, embed url.
         *
         * @returns {string}
         */
        getId(): string;
        /**
         * Validate load configuration.
         */
        validate(baseConfig: embed.IEmbedConfigurationBase): models.IError[];
        /**
         * Handle config changes.
         *
         * @returns {void}
         */
        configChanged(isBootstrap: boolean): void;
        getDefaultEmbedUrlEndpoint(): string;
        /**
         * Validate that pageView has a legal value: if page view is defined it must have one of the values defined in models.PageView
         */
        private ValidatePageView(pageView);
    }
}
declare module "tile" {
    import * as service from "service";
    import * as models from 'powerbi-models';
    import * as embed from "embed";
    /**
     * The Power BI tile embed component
     *
     * @export
     * @class Tile
     * @extends {Embed}
     */
    export class Tile extends embed.Embed {
        static type: string;
        static allowedEvents: string[];
        constructor(service: service.Service, element: HTMLElement, baseConfig: embed.IEmbedConfigurationBase, phasedRender?: boolean, isBootstrap?: boolean);
        /**
         * The ID of the tile
         *
         * @returns {string}
         */
        getId(): string;
        /**
         * Validate load configuration.
         */
        validate(config: embed.IEmbedConfigurationBase): models.IError[];
        /**
         * Handle config changes.
         *
         * @returns {void}
         */
        configChanged(isBootstrap: boolean): void;
        getDefaultEmbedUrlEndpoint(): string;
        /**
         * Adds the ability to get tileId from url.
         * By extracting the ID we can ensure that the ID is always explicitly provided as part of the load configuration.
         *
         * @static
         * @param {string} url
         * @returns {string}
         */
        static findIdFromEmbedUrl(url: string): string;
    }
}
declare module "qna" {
    import * as service from "service";
    import * as models from 'powerbi-models';
    import * as embed from "embed";
    /**
     * The Power BI Qna embed component
     *
     * @export
     * @class Qna
     * @extends {Embed}
     */
    export class Qna extends embed.Embed {
        static type: string;
        static allowedEvents: string[];
        constructor(service: service.Service, element: HTMLElement, config: embed.IEmbedConfigurationBase, phasedRender?: boolean, isBootstrap?: boolean);
        /**
         * The ID of the Qna embed component
         *
         * @returns {string}
         */
        getId(): string;
        /**
         * Change the question of the Q&A embed component
         *
         * @param question - question which will render Q&A data
         * @returns {string}
         */
        setQuestion(question: string): Promise<void>;
        /**
         * Handle config changes.
         *
         * @returns {void}
         */
        configChanged(isBootstrap: boolean): void;
        getDefaultEmbedUrlEndpoint(): string;
        /**
         * Validate load configuration.
         */
        validate(config: embed.IEmbedConfigurationBase): models.IError[];
    }
}
declare module "visual" {
    import * as service from "service";
    import * as embed from "embed";
    import * as models from 'powerbi-models';
    import { Report } from "report";
    import { Page } from "page";
    /**
     * The Power BI Visual embed component
     *
     * @export
     * @class Visual
     */
    export class Visual extends Report {
        static type: string;
        static GetPagesNotSupportedError: string;
        static SetPageNotSupportedError: string;
        /**
         * Creates an instance of a Power BI Single Visual.
         *
         * @param {service.Service} service
         * @param {HTMLElement} element
         * @param {embed.IEmbedConfiguration} config
         */
        constructor(service: service.Service, element: HTMLElement, baseConfig: embed.IEmbedConfigurationBase, phasedRender?: boolean, isBootstrap?: boolean, iframe?: HTMLIFrameElement);
        load(baseConfig: embed.IEmbedConfigurationBase, phasedRender?: boolean): Promise<void>;
        /**
         * Gets the list of pages within the report - not supported in visual embed.
         *
         * @returns {Promise<Page[]>}
         */
        getPages(): Promise<Page[]>;
        /**
         * Sets the active page of the report - not supported in visual embed.
         *
         * @param {string} pageName
         * @returns {Promise<void>}
         */
        setPage(pageName: string): Promise<void>;
        /**
         * Gets filters that are applied to the filter level.
         * Default filter level is visual level.
         *
         * ```javascript
         * visual.getFilters(filtersLevel)
         *   .then(filters => {
         *     ...
         *   });
         * ```
         *
         * @returns {Promise<models.IFilter[]>}
         */
        getFilters(filtersLevel?: models.FiltersLevel): Promise<models.IFilter[]>;
        /**
         * Sets filters at the filter level.
         * Default filter level is visual level.
         *
         * ```javascript
         * const filters: [
         *    ...
         * ];
         *
         * visual.setFilters(filters, filtersLevel)
         *  .catch(errors => {
         *    ...
         *  });
         * ```
         *
         * @param {(models.IFilter[])} filters
         * @returns {Promise<void>}
         */
        setFilters(filters: models.IFilter[], filtersLevel?: models.FiltersLevel): Promise<void>;
        /**
         * Removes all filters from the current filter level.
         * Default filter level is visual level.
         *
         * ```javascript
         * visual.removeFilters(filtersLevel);
         * ```
         *
         * @returns {Promise<void>}
         */
        removeFilters(filtersLevel?: models.FiltersLevel): Promise<void>;
        private getFiltersLevelUrl(filtersLevel);
    }
}
declare module "service" {
    import * as embed from "embed";
    import * as wpmp from 'window-post-message-proxy';
    import * as hpm from 'http-post-message';
    import * as router from 'powerbi-router';
    export interface IEvent<T> {
        type: string;
        id: string;
        name: string;
        value: T;
    }
    export interface ICustomEvent<T> extends CustomEvent {
        detail: T;
    }
    export interface IEventHandler<T> {
        (event: ICustomEvent<T>): any;
    }
    export interface IHpmFactory {
        (wpmp: wpmp.WindowPostMessageProxy, targetWindow?: Window, version?: string, type?: string, origin?: string): hpm.HttpPostMessage;
    }
    export interface IWpmpFactory {
        (name?: string, logMessages?: boolean, eventSourceOverrideWindow?: Window): wpmp.WindowPostMessageProxy;
    }
    export interface IRouterFactory {
        (wpmp: wpmp.WindowPostMessageProxy): router.Router;
    }
    export interface IPowerBiElement extends HTMLElement {
        powerBiEmbed: embed.Embed;
    }
    export interface IDebugOptions {
        logMessages?: boolean;
        wpmpName?: string;
    }
    export interface IServiceConfiguration extends IDebugOptions {
        autoEmbedOnContentLoaded?: boolean;
        onError?: (error: any) => any;
        version?: string;
        type?: string;
    }
    export interface IService {
        hpm: hpm.HttpPostMessage;
    }
    /**
     * The Power BI Service embed component, which is the entry point to embed all other Power BI components into your application
     *
     * @export
     * @class Service
     * @implements {IService}
     */
    export class Service implements IService {
        /**
         * A list of components that this service can embed
         */
        private static components;
        /**
         * The default configuration for the service
         */
        private static defaultConfig;
        /**
         * Gets or sets the access token as the global fallback token to use when a local token is not provided for a report or tile.
         *
         * @type {string}
         */
        accessToken: string;
        /**The Configuration object for the service*/
        private config;
        /** A list of Dashboard, Report and Tile components that have been embedded using this service instance. */
        private embeds;
        /** TODO: Look for way to make hpm private without sacraficing ease of maitenance. This should be private but in embed needs to call methods. */
        hpm: hpm.HttpPostMessage;
        /** TODO: Look for way to make wpmp private.  This is only public to allow stopping the wpmp in tests */
        wpmp: wpmp.WindowPostMessageProxy;
        private router;
        private uniqueSessionId;
        /**
         * Creates an instance of a Power BI Service.
         *
         * @param {IHpmFactory} hpmFactory The http post message factory used in the postMessage communication layer
         * @param {IWpmpFactory} wpmpFactory The window post message factory used in the postMessage communication layer
         * @param {IRouterFactory} routerFactory The router factory used in the postMessage communication layer
         * @param {IServiceConfiguration} [config={}]
         */
        constructor(hpmFactory: IHpmFactory, wpmpFactory: IWpmpFactory, routerFactory: IRouterFactory, config?: IServiceConfiguration);
        /**
         * Creates new report
         * @param {HTMLElement} element
         * @param {embed.IEmbedConfiguration} [config={}]
         * @returns {embed.Embed}
         */
        createReport(element: HTMLElement, config: embed.IEmbedConfiguration): embed.Embed;
        /**
         * TODO: Add a description here
         *
         * @param {HTMLElement} [container]
         * @param {embed.IEmbedConfiguration} [config=undefined]
         * @returns {embed.Embed[]}
         */
        init(container?: HTMLElement, config?: embed.IEmbedConfiguration): embed.Embed[];
        /**
         * Given a configuration based on an HTML element,
         * if the component has already been created and attached to the element, reuses the component instance and existing iframe,
         * otherwise creates a new component instance.
         *
         * @param {HTMLElement} element
         * @param {embed.IEmbedConfigurationBase} [config={}]
         * @returns {embed.Embed}
         */
        embed(element: HTMLElement, config?: embed.IEmbedConfigurationBase): embed.Embed;
        /**
         * Given a configuration based on an HTML element,
         * if the component has already been created and attached to the element, reuses the component instance and existing iframe,
         * otherwise creates a new component instance.
         * This is used for the phased embedding API, once element is loaded successfully, one can call 'render' on it.
         *
         * @param {HTMLElement} element
         * @param {embed.IEmbedConfigurationBase} [config={}]
         * @returns {embed.Embed}
         */
        load(element: HTMLElement, config?: embed.IEmbedConfigurationBase): embed.Embed;
        /**
         * Given an HTML element and entityType, creates a new component instance, and bootstrap the iframe for embedding.
         *
         * @param {HTMLElement} element
         * @param {embed.IBootstrapEmbedConfiguration} config: a bootstrap config which is an embed config without access token.
         */
        bootstrap(element: HTMLElement, config: embed.IBootstrapEmbedConfiguration): embed.Embed;
        embedInternal(element: HTMLElement, config?: embed.IEmbedConfigurationBase, phasedRender?: boolean, isBootstrap?: boolean): embed.Embed;
        getNumberOfComponents(): number;
        getSdkSessionId(): string;
        /**
         * Given a configuration based on a Power BI element, saves the component instance that reference the element for later lookup.
         *
         * @private
         * @param {IPowerBiElement} element
         * @param {embed.IEmbedConfigurationBase} config
         * @returns {embed.Embed}
         */
        private embedNew(element, config, phasedRender?, isBootstrap?);
        /**
         * Given an element that already contains an embed component, load with a new configuration.
         *
         * @private
         * @param {IPowerBiElement} element
         * @param {embed.IEmbedConfigurationBase} config
         * @returns {embed.Embed}
         */
        private embedExisting(element, config, phasedRender?);
        /**
         * Adds an event handler for DOMContentLoaded, which searches the DOM for elements that have the 'powerbi-embed-url' attribute,
         * and automatically attempts to embed a powerbi component based on information from other powerbi-* attributes.
         *
         * Note: Only runs if `config.autoEmbedOnContentLoaded` is true when the service is created.
         * This handler is typically useful only for applications that are rendered on the server so that all required data is available when the handler is called.
         */
        enableAutoEmbed(): void;
        /**
         * Returns an instance of the component associated with the element.
         *
         * @param {HTMLElement} element
         * @returns {(Report | Tile)}
         */
        get(element: HTMLElement): embed.Embed;
        /**
         * Finds an embed instance by the name or unique ID that is provided.
         *
         * @param {string} uniqueId
         * @returns {(Report | Tile)}
         */
        find(uniqueId: string): embed.Embed;
        addOrOverwriteEmbed(component: embed.Embed, element: HTMLElement): void;
        /**
         * Given an HTML element that has a component embedded within it, removes the component from the list of embedded components, removes the association between the element and the component, and removes the iframe.
         *
         * @param {HTMLElement} element
         * @returns {void}
         */
        reset(element: HTMLElement): void;
        /**
         * handles tile events
         *
         * @param {IEvent<any>} event
         */
        handleTileEvents(event: IEvent<any>): void;
        /**
         * Given an event object, finds the embed component with the matching type and ID, and invokes its handleEvent method with the event object.
         *
         * @private
         * @param {IEvent<any>} event
         */
        private handleEvent(event);
        /**
         * API for warm starting powerbi embedded endpoints.
         * Use this API to preload Power BI Embedded in the background.
         *
         * @public
         * @param {embed.IEmbedConfigurationBase} [config={}]
         * @param {HTMLElement} [element=undefined]
         */
        preload(config: embed.IEmbedConfigurationBase, element?: HTMLElement): HTMLIFrameElement;
    }
}
declare module "bookmarksManager" {
    import * as service from "service";
    import * as embed from "embed";
    import * as models from 'powerbi-models';
    /**
     * Report bookmarks management APIs.
     *
     * @export
     * @interface IBookmarksManager
     */
    export interface IBookmarksManager {
        getBookmarks(): Promise<models.IReportBookmark[]>;
        apply(bookmarkName: string): Promise<void>;
        play(playMode: models.BookmarksPlayMode): Promise<void>;
        capture(): Promise<models.IReportBookmark>;
        applyState(state: string): Promise<void>;
    }
    /**
     * Manages report bookmarks.
     *
     * @export
     * @class BookmarksManager
     * @implements {IBookmarksManager}
     */
    export class BookmarksManager implements IBookmarksManager {
        private service;
        private config;
        private iframe;
        constructor(service: service.Service, config: embed.IEmbedConfigurationBase, iframe?: HTMLIFrameElement);
        /**
         * Gets bookmarks that are defined in the report.
         *
         * ```javascript
         * // Gets bookmarks that are defined in the report
         * bookmarksManager.getBookmarks()
         *   .then(bookmarks => {
         *     ...
         *   });
         * ```
         *
         * @returns {Promise<models.IReportBookmark[]>}
         */
        getBookmarks(): Promise<models.IReportBookmark[]>;
        /**
         * Apply bookmark By name.
         *
         * ```javascript
         * bookmarksManager.apply(bookmarkName)
         * ```
         *
         * @returns {Promise<void>}
         */
        apply(bookmarkName: string): Promise<void>;
        /**
         * Play bookmarks: Enter or Exit bookmarks presentation mode.
         *
         * ```javascript
         * // Enter presentation mode.
         * bookmarksManager.play(true)
         * ```
         *
         * @returns {Promise<void>}
         */
        play(playMode: models.BookmarksPlayMode): Promise<void>;
        /**
         * Capture bookmark from current state.
         *
         * ```javascript
         * bookmarksManager.capture()
         * ```
         *
         * @returns {Promise<models.IReportBookmark>}
         */
        capture(): Promise<models.IReportBookmark>;
        /**
         * Apply bookmark state.
         *
         * ```javascript
         * bookmarksManager.applyState(bookmarkName)
         * ```
         *
         * @returns {Promise<void>}
         */
        applyState(state: string): Promise<void>;
    }
}
declare module "factories" {
    /**
     * TODO: Need to find better place for these factory functions or refactor how we handle dependency injection
     */
    import { IHpmFactory, IWpmpFactory, IRouterFactory } from "service";
    export { IHpmFactory, IWpmpFactory, IRouterFactory };
    export const hpmFactory: IHpmFactory;
    export const wpmpFactory: IWpmpFactory;
    export const routerFactory: IRouterFactory;
}
declare module "powerbi-client" {
    import * as service from "service";
    import * as factories from "factories";
    import * as models from 'powerbi-models';
    import { IFilterable } from "ifilterable";
    export { IFilterable, service, factories, models };
    export { Report } from "report";
    export { Dashboard } from "dashboard";
    export { Tile } from "tile";
    export { IEmbedConfiguration, Embed, ILocaleSettings, IEmbedSettings } from "embed";
    export { Page } from "page";
    export { Qna } from "qna";
    export { Visual } from "visual";
    export { VisualDescriptor } from "visualDescriptor";
    global  {
        interface Window {
            powerbi: service.Service;
        }
    }
}


text:
#region License

#endregion

namespace ObjectGL.Api.Context.Subsets
{
    public interface IContextRasterizerBindings
    {
        IBinding<PolygonMode> PolygonModeFront { get; set; }
        IBinding<PolygonMode> PolygonModeBack { get; set; }
        IBinding<CullFaceMode> CullFace { get; set; }
        IBinding<FrontFaceDirection> FrontFace { get; set; }
        IBinding<bool> CullFaceEnable { get; set; }
        IBinding<bool> ScissorEnable { get; set; }
        IBinding<bool> MultisampleEnable { get; set; }
        IBinding<bool> LineSmoothEnable { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 9/30/2017
 * Time: 6:42 PM
 */

class Setting_gamegift_model extends  MY_Model
{
    public function set_table_name($table)
    {
        $this->_table = $table;
    }

    public  function check_gamegift($game_id){
        $this->_database->select('id');
        $this->_database->from('setting_gamegift_');
        $this->_database->where('game_id',$game_id );
        $query = $this->_database->get();

        if($query->result() != null)
            return true;
        else
            return false;
    }

    public function save_gamegift($game_id,$game_first_val,$game_second_val){
        $data = array(
            'game_id'=>$game_id,
            'first_val'=>$game_first_val,
            'second_val'=>$game_second_val,
        );
        $this->_database->insert(data);
        $this->_database->into('setting_gamegift_');
    }
    public function delete_all_gamegift_by_id($gameid)
    {
        $this->_database->from('setting_gamegift_');
        $this->_database->where('game_id',$gameid );
        $this->_database->delete_by();
//        $query = $this->_database->get();
    }

}


text:
package org.pentaho.di.ui.spoon;

import org.pentaho.di.repository.RepositoryDirectoryInterface;
import org.pentaho.xul.swt.tab.TabItem;

public class TabMapEntry
{
	public enum ObjectType { TRANSFORMATION_GRAPH, JOB_GRAPH, SLAVE_SERVER, BROWSER, };

    private TabItem tabItem;

    private String filename;

    private String objectName;

    private RepositoryDirectoryInterface repositoryDirectory;

    private String versionLabel;

    private TabItemInterface object;

    private ObjectType objectType;

    private boolean showingLocation;

    /**
     * @param tabName
     * @param objectName
     * @param objectType
     * @param object
     */
    public TabMapEntry(TabItem tabItem, String filename, String objectName, RepositoryDirectoryInterface repositoryDirectory, String versionLabel, TabItemInterface object, ObjectType objectType)
    {
        this.tabItem = tabItem;
        this.filename = filename;
        this.objectName = objectName;
        this.repositoryDirectory = repositoryDirectory;
        this.versionLabel = versionLabel;
        this.object = object;
        this.objectType = objectType;
    }

    public boolean equals(Object obj) {
    	TabMapEntry entry = (TabMapEntry) obj;

    	boolean sameType = objectType.equals(entry.objectType);
    	boolean sameName = objectName!=null && entry.objectName!=null && objectName.equals(entry.objectName);
    	boolean sameFile = (filename==null && entry.filename==null) || (filename!=null && filename.equals(entry.filename));
    	boolean sameVersion = (versionLabel==null && entry.versionLabel==null) || (versionLabel!=null && versionLabel.equals(entry.versionLabel)) ;
    	boolean sameDirectory = (repositoryDirectory==null && entry.repositoryDirectory==null) ||
    		(repositoryDirectory!=null && entry.repositoryDirectory!=null && repositoryDirectory.getPath().equals(entry.repositoryDirectory.getPath()) );

    	return  sameType && sameName && sameVersion && sameFile && sameDirectory;
    }

    /**
     * @return the objectName
     */
    public String getObjectName()
    {
        return objectName;
    }

    /**
     * @param objectName the objectName to set
     */
    public void setObjectName(String objectName)
    {
        this.objectName = objectName;
    }

    public String getVersionLabel() {
		return versionLabel;
	}

    public void setVersionLabel(String versionLabel) {
		this.versionLabel = versionLabel;
	}

    /**
     * @return the object
     */
    public TabItemInterface getObject()
    {
        return object;
    }

    /**
     * @param object the object to set
     */
    public void setObject(TabItemInterface object)
    {
        this.object = object;
    }

    /**
     * @return the tabItem
     */
    public TabItem getTabItem()
    {
        return tabItem;
    }

    /**
     * @param tabItem the tabItem to set
     */
    public void setTabItem(TabItem tabItem)
    {
        this.tabItem = tabItem;
    }

    /**
     * @return the objectType
     */
    public ObjectType getObjectType()
    {
        return objectType;
    }

    /**
     * @param objectType the objectType to set
     */
    public void setObjectType(ObjectType objectType)
    {
        this.objectType = objectType;
    }

	/**
	 * @return the filename
	 */
	public String getFilename() {
		return filename;
	}

	/**
	 * @param filename the filename to set
	 */
	public void setFilename(String filename) {
		this.filename = filename;
	}

	/**
	 * @return the repositoryDirectory
	 */
	public RepositoryDirectoryInterface getRepositoryDirectory() {
		return repositoryDirectory;
	}

	/**
	 * @param repositoryDirectory the repositoryDirectory to set
	 */
	public void setRepositoryDirectory(RepositoryDirectoryInterface repositoryDirectory) {
		this.repositoryDirectory = repositoryDirectory;
	}

	/**
	 * @return the showingLocation
	 */
	public boolean isShowingLocation() {
		return showingLocation;
	}

	/**
	 * @param showingLocation the showingLocation to set
	 */
	public void setShowingLocation(boolean showingLocation) {
		this.showingLocation = showingLocation;
	}

}


text:
class AddDefaultValueToBookmarksViewcount < ActiveRecord::Migration[5.1]
  def up
    change_column_default :bookmarks, :view_count, 0
  end

  def down
    change_column_default :bookmarks, :view_count, nil
  end
end


text:
class SelectizeInput < SimpleForm::Inputs::CollectionSelectInput
end


text:
extern crate cgmath;
#[macro_use]
extern crate conrod;
extern crate piston_window;
extern crate rand;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;

type Rendered = Vec<([cgmath::Vector2<f64>; 2], color::Color)>;

// Pixel present a point in the window and window's size
#[derive(Clone, Copy, Serialize, Deserialize)]
pub struct Pixel {
    pub w: u32,
    pub h: u32,
}
impl Pixel {
    pub fn new(w: u32, h: u32) -> Pixel {
        Pixel { w, h }
    }
}

// Return a random number between a and b
fn rnd((a, b): (f64, f64)) -> f64 {
    let (a, b) = (f64::min(a, b), f64::max(a, b));
    // `random::<f64>()` return a number between 0 and 1
    rand::random::<f64>() * (b - a) + a
}

mod color;
mod conrod_helper;
mod control;
mod game;
mod menu;

use crate::conrod_helper::ConrodUI;
use crate::control::{EventHandler, Flow, State};
use crate::game::GameConfig;
use crate::menu::*;
use piston_window::*;
use std::fs::File;
use std::io::prelude::*;

fn main() {
    // Wayland backend contains some bugs, prefer x11
    std::env::set_var("WINIT_UNIX_BACKEND", "x11");

    // Try to read config file, fallback to the default config otherwise
    let config: GameConfig = File::open("resources/config.json")
        .ok()
        .and_then(|mut f| {
            let mut s = String::new();
            f.read_to_string(&mut s)
                .ok()
                .and_then(|_| serde_json::from_str(&s).ok())
        })
        .unwrap_or_default();

    let size = config.screen_size;

    let mut window: PistonWindow = WindowSettings::new(config.title.clone(), [size.w, size.h])
        .exit_on_esc(true)
        .build()
        .expect("Cannot create window.");
    window.set_ups(config.ups);
    window.set_max_fps(config.max_fps);

    let mut ui = conrod::UiBuilder::new([f64::from(size.w), f64::from(size.h)])
        .theme(conrod_helper::theme())
        .build();
    ui.fonts.insert_from_file("resources/Ubuntu-R.ttf").unwrap();

    let mut start_menu: ConrodUI<StartMenu> = ConrodUI::new(size, &mut window, &mut ui);
    let mut play_again_menu: ConrodUI<PlayAgainMenu> = ConrodUI::new(size, &mut window, &mut ui);
    let mut state = State::StartMenu;

    let mut game = game::Game::new(config.clone(), &window);

    while let Some(event) = window.next() {
        let flow = match state {
            State::StartMenu => start_menu.handle_event(event, &mut window, &mut ui),
            State::Playing => game.handle_event(event, &mut window, &mut ()),
            State::PlayAgainMenu => play_again_menu.handle_event(event, &mut window, &mut ui),
        };

        if let Some(flow) = flow {
            use crate::Flow::*;
            match flow {
                StartGame => state = State::Playing,
                LoseGame => state = State::PlayAgainMenu,
                PlayAgain => {
                    state = State::Playing;
                    game = game::Game::new(config.clone(), &window);
                }
            }
        }
    }
}


text:
New Payment

        <form class="form-horizontal" data-ng-submit="create()" novalidate>

            Add a payment you made for the share.

            If a payment is not related to others, it won't change anyone's debt/credit.

            You recieve the amount others owe you as a credit.

            <fieldset class="create-payment">

                Name

                  <input type="text" data-ng-model="name" id="name" class="form-control name" placeholder="Name" required>

                    Amount

                        €
                        <input type="number" min="0" step="5.00" placeholder="0.00" data-number-to-fixed="2" data-number-stepfactor="100" class="form-control currency" data-ng-model="amount" id="amount" ng-change="recalc()" required />

Split amount

                    Split equally

                      <input type="checkbox" aria-label="Split equally" data-ng-model="equal" ng-change="checkEqual()">

                    {{u.displayName}}
                    €

                      <input type="number" step="5.00" data-number-to-fixed="2" data-number-stepfactor="100" placeholder="0.00" value="0" class="form-control currency  split" data-ng-model="u.amount"  ng-change="recalc()" ng-disabled="equal || u._id == authentication.user._id"/>

                  <p class="help-block" ng-show="remainingAmount < 0">You broke Maths!
Please check the splitting amounts!

                    <input type="submit" class="btn btn-default" ng-disabled="remainingAmount < 0">

            </fieldset>
        </form>


text:
package com.copilot.helper;

import java.util.concurrent.Callable;

/**
 * Created by Akash on 2017-06-10.
 */

/**
 * Request Callback
 */
public interface VolleyCallback {
    void onSuccessResponse(String response);
}


text:
package com.google.android.libraries.mediaframework.layeredvideo;

import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.FrameLayout;

import com.google.android.libraries.mediaframework.exoplayerextensions.ExoplayerWrapper;
import com.google.android.libraries.mediaframework.exoplayerextensions.Video;

import java.util.ArrayList;
import java.util.List;

/**
 * A video player which includes subtitle support and a customizable UI for playback control.
 *
 * <p>NOTE: If you want to get a video player up and running with minimal effort, just instantiate
 * this class and call play();
 */
public class SimpleVideoPlayer {

  /**
   * The {@link Activity} that contains this video player.
   */
  private final Activity activity;

  /**
   * The underlying {@link LayerManager} which is used to assemble the player.
   */
  private final LayerManager layerManager;

  /**
   * The customizable view for playback control. It handles pause/play, fullscreen, seeking,
   * title, and action buttons.
   */
  private final PlaybackControlLayer playbackControlLayer;

  /**
   * Displays subtitles at bottom center of video player.
   */
  private final SubtitleLayer subtitleLayer;

  /**
   * Renders the video.
   */
  private final VideoSurfaceLayer videoSurfaceLayer;

  /**
   * @param activity The activity that will contain the video player.
   * @param container The {@link FrameLayout} which will contain the video player.
   * @param video The video that should be played.
   * @param videoTitle The title of the video (displayed on the left of the top chrome).
   * @param autoplay Whether the video should start playing immediately.
   */
  public SimpleVideoPlayer(Activity activity,
                           FrameLayout container,
                           Video video,
                           String videoTitle,
                           boolean autoplay) {
    this(activity, container, video, videoTitle, autoplay, 0, null);
  }

  /**
   * @param activity The activity that will contain the video player.
   * @param container The {@link FrameLayout} which will contain the video player.
   * @param video The video that should be played.
   * @param videoTitle The title of the video (displayed on the left of the top chrome).
   * @param autoplay Whether the video should start playing immediately.
   * @param fullscreenCallback The callback which gets triggered when the player enters or leaves
   *                           fullscreen mode.
   */
  public SimpleVideoPlayer(Activity activity,
                           FrameLayout container,
                           Video video,
                           String videoTitle,
                           boolean autoplay,
                           int startPostitionMs,
                           PlaybackControlLayer.FullscreenCallback fullscreenCallback) {
    this.activity = activity;

    playbackControlLayer = new PlaybackControlLayer(videoTitle, fullscreenCallback);
    subtitleLayer = new SubtitleLayer();
    videoSurfaceLayer = new VideoSurfaceLayer(autoplay);

    List<Layer> layers = new ArrayList<Layer>();
    layers.add(videoSurfaceLayer);
    layers.add(playbackControlLayer);
    layers.add(subtitleLayer);

    layerManager = new LayerManager(activity,
        container,
        video,
        layers);

    layerManager.getExoplayerWrapper().setTextListener(subtitleLayer);

    if (startPostitionMs > 0) {
      layerManager.getExoplayerWrapper().seekTo(startPostitionMs);
    }
  }

  /**
   * Creates a button to put in the top right of the video player.
   *
   * @param icon The image of the action (ex. trash can).
   * @param contentDescription The text description this action. This is used in case the
   *                           action buttons do not fit in the video player. If so, an overflow
   *                           button will appear and, when clicked, it will display a list of the
   *                           content descriptions for each action.
   * @param onClickListener The handler for when the action is triggered.
   */
  public void addActionButton(Drawable icon,
                              String contentDescription,
                              View.OnClickListener onClickListener) {
    playbackControlLayer.addActionButton(activity, icon, contentDescription, onClickListener);
  }

  /**
   * Set a listener which reacts to state changes, video size changes, and errors.
   * @param listener Listens to playback events.
   */
  public void addPlaybackListener(ExoplayerWrapper.PlaybackListener listener) {
    layerManager.getExoplayerWrapper().addListener(listener);
  }

  /**
   * Hides the seek bar thumb and prevents the user from seeking to different time points in the
   * video.
   */
  public void disableSeeking() {
    playbackControlLayer.disableSeeking();
  }

  /**
   * Makes the seek bar thumb visible and allows the user to seek to different time points in the
   * video.
   */
  public void enableSeeking() {
    playbackControlLayer.enableSeeking();
  }

  /**
   * Returns the current playback position in milliseconds.
   */
  public int getCurrentPosition() {
    return layerManager.getControl().getCurrentPosition();
  }

  /**
   * Returns the duration of the track in milliseconds or
   * {@link com.google.android.exoplayer.ExoPlayer#UNKNOWN_TIME} if the duration is unknown.
   */
  public int getDuration() {
    return layerManager.getControl().getDuration();
  }

  /**
   * Fades the playback control layer out and then removes it from the {@link LayerManager}'s
   * container.
   */
  public void hide() {
    playbackControlLayer.hide();
    subtitleLayer.setVisibility(View.GONE);
  }

  /**
   * Hides the top chrome (which displays the logo, title, and action buttons).
   */
  public void hideTopChrome() {
    playbackControlLayer.hideTopChrome();
  }

  /**
   * Returns whether the player is currently in fullscreen mode.
   */
  public boolean isFullscreen() {
    return playbackControlLayer.isFullscreen();
  }

  /**
   * Make the player enter or leave fullscreen mode.
   * @param shouldBeFullscreen If true, the player is put into fullscreen mode. If false, the player
   *                           leaves fullscreen mode.
   */
  public void setFullscreen(boolean shouldBeFullscreen) {
    playbackControlLayer.setFullscreen(shouldBeFullscreen);
  }

  /**
   * When mutliple surface layers are used (ex. in the case of ad playback), one layer must be
   * overlaid on top of another. This method sends this player's surface layer to the background
   * so that other surface layers can be overlaid on top of it.
   */
  public void moveSurfaceToBackground() {
    videoSurfaceLayer.moveSurfaceToBackground();
  }

  /**
   * When mutliple surface layers are used (ex. in the case of ad playback), one layer must be
   * overlaid on top of another. This method sends this player's surface layer to the foreground
   * so that it is overlaid on top of all layers which are in the background.
   */
  public void moveSurfaceToForeground() {
    videoSurfaceLayer.moveSurfaceToForeground();
  }

  /**
   * Pause video playback.
   */
  public void pause() {
    // Set the autoplay for the video surface layer in case the surface hasn't been created yet.
    // This way, when the surface is created, it won't start playing.
    videoSurfaceLayer.setAutoplay(false);

    layerManager.getControl().pause();
  }

  /**
   * Resume video playback.
   */
  public void play() {
    // Set the autoplay for the video surface layer in case the surface hasn't been created yet.
    // This way, when the surface is created, it will automatically start playing.
    videoSurfaceLayer.setAutoplay(true);

    layerManager.getControl().start();
  }

  /**
   * Sets the color of the top chrome, bottom chrome, and background.
   * @param color a color derived from the @{link Color} class
   *              (ex. {@link android.graphics.Color#RED}).
   */
  public void setChromeColor(int color) {
    playbackControlLayer.setChromeColor(color);
  }

  /**
   * Set the callback which will be called when the player enters and leaves fullscreen mode.
   * @param fullscreenCallback The callback should hide other views in the activity when the player
   *                           enters fullscreen mode and show other views when the player leaves
   *                           fullscreen mode.
   */
  public void setFullscreenCallback(PlaybackControlLayer.FullscreenCallback fullscreenCallback) {
    playbackControlLayer.setFullscreenCallback(fullscreenCallback);
  }

  /**
   * Set the logo with appears in the left of the top chrome.
   * @param logo The drawable which will be the logo.
   */
  public void setLogoImage(Drawable logo) {
    playbackControlLayer.setLogoImageView(logo);
  }

  /**
   * Sets the color of the buttons and seek bar.
   * @param color a color derived from the @{link Color} class
   *              (ex. {@link android.graphics.Color#RED}).
   */
  public void setPlaybackControlColor(int color) {
    playbackControlLayer.setControlColor(color);
  }

  /**
   * Sets the color of the seekbar.
   * @param color a color derived from the @{link Color} class
   *              (ex. {@link android.graphics.Color#RED}).
   */
  public void setSeekbarColor(int color) {
    playbackControlLayer.setSeekbarColor(color);
  }

  /**
   * Sets the color of the text views
   * @param color a color derived from the @{link Color} class
   *              (ex. {@link android.graphics.Color#RED}).
   */
  public void setTextColor(int color) {
    playbackControlLayer.setTextColor(color);
  }

  /**
   * Set the title of the video in the left of the top chrome (to the right of the logo).
   * @param title The video title. If it is too long, it will be ellipsized.
   */
  public void setVideoTitle (String title) {
    playbackControlLayer.setVideoTitle(title);
  }

  /**
   * Returns whether the player should be playing (based on whether the user has
   * tapped pause or play). This can be used by other classes to look at the playback control
   * layer's play/pause state and force the player to play or pause accordingly.
   */
  public boolean shouldBePlaying() {
    return playbackControlLayer.shouldBePlaying();
  }

  /**
   * Add the playback control layer back to the container. It will disappear when the user taps
   * the screen.
   */
  public void show() {
    playbackControlLayer.show();
    subtitleLayer.setVisibility(View.VISIBLE);
  }

  /**
   * Shows the top chrome (which displays the logo, title, and action buttons).
   */
  public void showTopChrome() {
    playbackControlLayer.showTopChrome();
  }

  /**
   * When you are finished using this {@link SimpleVideoPlayer}, make sure to call this method.
   */
  public void release() {
    videoSurfaceLayer.release();
    layerManager.release();
  }

}


text:
 #ifdef aliyun_api_drds_2015_04_13_EXPORTS
 #define ALIYUN_API_DRDS_2015_04_13_DLL_EXPORT_IMPORT __declspec(dllexport)
 #else
 #define ALIYUN_API_DRDS_2015_04_13_DLL_EXPORT_IMPORT
 #endif
#else
#define ALIYUN_API_DRDS_2015_04_13_DLL_EXPORT_IMPORT
#endif
namespace aliyun {
struct DrdsErrorInfo {
  std::string request_id;
  std::string code;
  std::string message;
  std::string host_id;
};
class ALIYUN_API_DRDS_2015_04_13_DLL_EXPORT_IMPORT Drds {
public:
  static Drds* CreateDrdsClient(std::string endpoint, std::string appid, std::string secret);
  ~Drds();
private:
  Drds(std::string host, std::string appid, std::string secret);
public:
  void SetUseTls(bool use_tls = true) {  if(support_tls_) use_tls_ = use_tls;  }
  bool GetUseTls() {  return use_tls_;  }
  bool GetSupportTls() {  return support_tls_;  }
  void SetProxyHost(std::string proxy_host) {
    if(this->proxy_host_) {
      free(this->proxy_host_);
    }
    this->proxy_host_ = strdup(proxy_host.c_str());
  }
  std::string GetProxyHost() {  return this->proxy_host_;  }
  void SetRegionId(std::string region_id) {
    if(this->region_id_) {
      free(this->region_id_);
    }
    this->region_id_ = strdup(region_id.c_str());
  }
  std::string GetRegionId() {  return this->region_id_;  }
  int AlterTable(const DrdsAlterTableRequestType& req,
          DrdsAlterTableResponseType* resp,
          DrdsErrorInfo* error_info);

  int CancelDDLTask(const DrdsCancelDDLTaskRequestType& req,
          DrdsCancelDDLTaskResponseType* resp,
          DrdsErrorInfo* error_info);

  int CreateDrdsDB(const DrdsCreateDrdsDBRequestType& req,
          DrdsCreateDrdsDBResponseType* resp,
          DrdsErrorInfo* error_info);

  int CreateDrdsInstance(const DrdsCreateDrdsInstanceRequestType& req,
          DrdsCreateDrdsInstanceResponseType* resp,
          DrdsErrorInfo* error_info);

  int CreateIndex(const DrdsCreateIndexRequestType& req,
          DrdsCreateIndexResponseType* resp,
          DrdsErrorInfo* error_info);

  int CreateTable(const DrdsCreateTableRequestType& req,
          DrdsCreateTableResponseType* resp,
          DrdsErrorInfo* error_info);

  int DeleteDrdsDB(const DrdsDeleteDrdsDBRequestType& req,
          DrdsDeleteDrdsDBResponseType* resp,
          DrdsErrorInfo* error_info);

  int DescribeCreateDrdsInstanceStatus(const DrdsDescribeCreateDrdsInstanceStatusRequestType& req,
          DrdsDescribeCreateDrdsInstanceStatusResponseType* resp,
          DrdsErrorInfo* error_info);

  int DescribeDDLTask(const DrdsDescribeDDLTaskRequestType& req,
          DrdsDescribeDDLTaskResponseType* resp,
          DrdsErrorInfo* error_info);

  int DescribeDrdsDB(const DrdsDescribeDrdsDBRequestType& req,
          DrdsDescribeDrdsDBResponseType* resp,
          DrdsErrorInfo* error_info);

  int DescribeDrdsDBIpWhiteList(const DrdsDescribeDrdsDBIpWhiteListRequestType& req,
          DrdsDescribeDrdsDBIpWhiteListResponseType* resp,
          DrdsErrorInfo* error_info);

  int DescribeDrdsDBs(const DrdsDescribeDrdsDBsRequestType& req,
          DrdsDescribeDrdsDBsResponseType* resp,
          DrdsErrorInfo* error_info);

  int DescribeDrdsInstance(const DrdsDescribeDrdsInstanceRequestType& req,
          DrdsDescribeDrdsInstanceResponseType* resp,
          DrdsErrorInfo* error_info);

  int DescribeDrdsInstances(const DrdsDescribeDrdsInstancesRequestType& req,
          DrdsDescribeDrdsInstancesResponseType* resp,
          DrdsErrorInfo* error_info);

  int DropIndexes(const DrdsDropIndexesRequestType& req,
          DrdsDropIndexesResponseType* resp,
          DrdsErrorInfo* error_info);

  int DropTables(const DrdsDropTablesRequestType& req,
          DrdsDropTablesResponseType* resp,
          DrdsErrorInfo* error_info);

  int ListUnCompleteTasks(const DrdsListUnCompleteTasksRequestType& req,
          DrdsListUnCompleteTasksResponseType* resp,
          DrdsErrorInfo* error_info);

  int ModifyDrdsDBPasswd(const DrdsModifyDrdsDBPasswdRequestType& req,
          DrdsModifyDrdsDBPasswdResponseType* resp,
          DrdsErrorInfo* error_info);

  int ModifyDrdsInstanceDescription(const DrdsModifyDrdsInstanceDescriptionRequestType& req,
          DrdsModifyDrdsInstanceDescriptionResponseType* resp,
          DrdsErrorInfo* error_info);

  int ModifyDrdsIpWhiteList(const DrdsModifyDrdsIpWhiteListRequestType& req,
          DrdsModifyDrdsIpWhiteListResponseType* resp,
          DrdsErrorInfo* error_info);

  int RemoveDrdsInstance(const DrdsRemoveDrdsInstanceRequestType& req,
          DrdsRemoveDrdsInstanceResponseType* resp,
          DrdsErrorInfo* error_info);

private:
  char* appid_;
  char* secret_;
  char* version_;
  char* host_;
  char* proxy_host_;
  bool support_tls_;
  bool use_tls_;
  char* region_id_;
};  //end class
} // end namespace
#endif


text:
import pytest
import os

@pytest.fixture(scope="module")
def test_data_folder(request):
    """
    This fixture returns path to the folder with the shared test resources
    """
    return str(os.path.join(request.fspath.dirname, "test_data"))

def pytest_addoption(parser):
    """
    Adds the program option 'delegate-dir' to pytest
    """
    parser.addoption("--delegate-dir",
                     action="append",
                     help="Directory of the armnn tflite delegate library",
                     required=True)

def pytest_generate_tests(metafunc):
    """
    Makes the program option 'delegate-dir' available to all tests as a function fixture
    """
    if "delegate_dir" in metafunc.fixturenames:
        metafunc.parametrize("delegate_dir", metafunc.config.getoption("delegate_dir"))


text:
@interface SYGifViewController ()

@end

@implementation SYGifViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    __weak typeof(self)weakSelf = self;
    NSString *url =  [[NSBundle mainBundle] pathForResource:@"demo-big.gif" ofType:nil];
    NSData *data = [NSData dataWithContentsOfFile:url];
    self.tableView.sy_header = [SYGifHeaderFooter headerWithData:data orientation:SYRefreshViewOrientationTop isBig:YES height:150 callBack:^{
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [weakSelf.tableView.sy_header endRefreshing];
            NSLog(@"刷新结束");
        });
    }];
    [self.tableView.sy_header beginRefreshing];

}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 30;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
    }
    cell.textLabel.text = [NSString stringWithFormat:@"title===%zd",indexPath.row];
    return cell;
}

@end


text:
"""
Set-up for ini documentation list of dicts

In the ini_doc list, only use 'yes' or 'no' for the required field,
as this is used in the code to check if all required settings are set.
"""

from spynl.main.exceptions import SpynlException

ini_description = '''
These are the settings that can be added to the ini file under the heading
[app:main]. This table only lists settings specific to Spynl. Pyramid settings
and Pyramid Mail configuration should also be put in [app:main], but are not
listed here.  Spynl will not start if one of the required settings is not
present in the ini file.

If a value shows '****', it means the actual value is obfuscated for security.

The pyramid asbool function returns the boolean value True if the case-lowered
value of string input s is any of t, true, y, on, or 1, otherwise return the
boolean value False. If s is the value None, return False. If s is already one
of the boolean values True or False, return it.

N.B. It is not possible to add comments after the setting in the ini file,
comments should be on their own line.
'''

ini_doc = [
    {
        'name': 'spynl.date_systemtz',
        'plugin': '',
        'required': 'no',
        'default': 'UTC',
        'info': 'Timezone that is used if no time zone is explicitly '
        'given and also no time zone is found in or to be '
        'used from the user object.',
    },
    {
        'name': 'spynl.date_format',
        'plugin': '',
        'required': 'no',
        'default': '%Y-%m-%dT%H:%M:%S%z',
        'info': 'Format for dates.',
    },
    {
        'name': 'spynl.languages',
        'plugin': '',
        'required': 'no',
        'default': 'en',
        'info': 'A csv string describing the languages supported by the '
        'application (other than english). Spynl has no dialect '
        'support, so only two-letter language codes should be '
        'provided. The first language is considered to be the '
        'preferred language. This setting can affect which '
        'langauge Spynl picks for a request and also how the task '
        '<spynl dev.translate> works.',
    },
    {
        'name': 'spynl.domain',
        'plugin': '',
        'required': 'no',
        'default': 'localhost',
        'info': 'Used for setting the cookie-domain, and for a default '
        'no-reply emailaddress.',
    },
    {
        'name': 'spynl.tld_origin_whitelist',
        'plugin': '',
        'required': 'no',
        'default': '',
        'info': 'Comma-separated whitelist for allowed origins. '
        'It is expected to hold only the top-level domains, '
        ' e.g. "google.com".',
    },
    {
        'name': 'spynl.dev_origin_whitelist',
        'plugin': '',
        'required': 'no',
        'default': '',
        'info': 'Comma separated whitelist for allowed origins which is '
        'usable for a development context. It is expected to hold'
        ' either complete domains or mere protocols, e.g. '
        '"chrome-extension://"..',
    },
    {
        'name': 'spynl.pretty',
        'plugin': '',
        'required': 'no',
        'default': 'false',
        'info': 'Pretty printing for development. Is read with Pyramid '
        'asbool function.',
    },
    {
        'name': 'spynl.session',
        'plugin': '',
        'required': 'no',
        'default': 'Pyramid',
        'info': 'Sets the name of the session class to use. Spynl will '
        'look this class up under settings[<name>]. '
        'The class should conform to the interface '
        'pyramid.interfaces.ISession. The value "Pyramid" or '
        'omitting this setting will result in the use of the '
        'Session class from beaker.session',
    },
    {
        'name': 'spynl.ops.environment',
        'plugin': '',
        'required': 'no',
        'default': '',
        'info': 'The environment Spynl is running in. This is quite '
        'useful for things like error log aggregation.',
    },
    {
        'name': 'spynl.ops.function',
        'plugin': '',
        'required': 'no',
        'default': '',
        'info': 'The function this Spynl node is performing. This '
        'can be useful for error log aggregation if you '
        ' employ more than one Spynl applications.',
    },
    {
        'name': 'spynl.ops.jenkins_url',
        'plugin': '',
        'required': 'no',
        'default': '',
        'info': 'The URL of your Jenkins server.',
    },
    {
        'name': 'spynl.ops.dev_url',
        'plugin': '',
        'required': 'no',
        'default': '',
        'info': 'The URL where your development app can be '
        'accessed. Needed to run smoke tests after deploys.',
    },
    {
        'name': 'spynl.ops.dev_domain',
        'plugin': '',
        'required': 'no',
        'default': '',
        'info': 'The top level domain on which your development app '
        'resides. This is used to get the cookie domain '
        'correct.',
    },
    {
        'name': 'spynl.ops.ecr.dev_tasks',
        'plugin': '',
        'required': 'no',
        'default': 'dev',
        'info': 'The tasks supported in your development AWS ECR.',
    },
    {
        'name': 'spynl.ops.ecr.dev_url',
        'plugin': '',
        'required': 'no',
        'default': '',
        'info': 'The URL of your AWS ECR used for development. Include '
        'AWS profile name like this: profile@ecr-url.',
    },
    {
        'name': 'spynl.ops.ecr.prod_url',
        'plugin': '',
        'required': 'no',
        'default': '',
        'info': 'The URL of your AWS ECR used for production. Include '
        'AWS profile name like this: profile@ecr-url.',
    },
    {
        'name': 'spynl.sentry.key',
        'plugin': '',
        'required': 'no',
        'hidden': True,
        'default': '',
        'info': 'The key used to connect to Sentry. Leave empty if '
        'you are not using Sentry.',
    },
    {
        'name': 'spynl.sentry.project',
        'plugin': '',
        'required': 'no',
        'default': '',
        'info': 'The project identifier Spynl reports to in Sentry.',
    },
    {
        'name': 'spynl.newrelic.key',
        'plugin': '',
        'required': 'no',
        'hidden': True,
        'default': '',
        'info': 'The key used to connect to NewRelic. Leave empty if '
        'you are not usig NewRelic.',
    },
    {
        'name': 'spynl.documentation_folder',
        'plugin': '',
        'required': 'no',
        'default': 'spynl_swagger',
        'info': 'The folder all documentation files will be written into.',
    },
]

def get_ini_doc_setting(name):
    """
    Returns the documentation entry of a specific setting or None

    Because ini_doc is a list, this function is needed to get the documentation
    of a specific setting.
    """
    for setting in ini_doc:
        if setting['name'] == name:
            return setting

    return None

def check_required_settings(config):
    """check whether all required ini settings are set"""
    for setting in ini_doc:
        if (
            setting['required'] == 'yes'
            and setting['name'] not in config.registry.settings
        ):
            msg = 'Please set {} in the Pyramid ini file'.format(setting['name'])
            raise SpynlException(msg)
        # setting['required'] can only be yes or no (no accidental true's)
        if setting['required'] not in ('no', 'yes'):
            msg = (
                'The value for required in ini_doc can only be yes or no, '
                'please change this for setting: {}'.format(setting['name'])
            )
            raise SpynlException(msg)


text:
/**
 * Layout class for {@link Ext.form.field.Text} fields. Handles sizing the input field.
 * @private
 */
Ext.define('Ext.layout.component.field.Text', {
    extend: 'Ext.layout.component.field.Field',
    alias: 'layout.textfield',
    requires: ['Ext.util.TextMetrics'],

    type: 'textfield',

    canGrowWidth: true,

    beginLayoutCycle: function(ownerContext) {
        this.callParent(arguments);

        // Clear height, in case a previous layout cycle stretched it.
        if (ownerContext.heightModel.shrinkWrap) {
            ownerContext.inputContext.el.setStyle('height', '');
        }
    },

    measureContentWidth: function (ownerContext) {
        var me = this,
            owner = me.owner,
            width = me.callParent(arguments),
            inputContext = ownerContext.inputContext,
            inputEl, value, calcWidth, max, min;

        if (owner.grow && me.canGrowWidth && !ownerContext.state.growHandled) {
            inputEl = owner.inputEl;

            // Find the width that contains the whole text value
            value = Ext.util.Format.htmlEncode(inputEl.dom.value || (owner.hasFocus ? '' : owner.emptyText) || '');
            value += owner.growAppend;
            calcWidth = inputEl.getTextWidth(value) + inputContext.getFrameInfo().width;

            max = owner.growMax;
            min = Math.min(max, width);
            max = Math.max(owner.growMin, max, min);

            // Constrain
            calcWidth = Ext.Number.constrain(calcWidth, owner.growMin, max);
            inputContext.setWidth(calcWidth);
            ownerContext.state.growHandled = true;

            // Now that we've set the inputContext, we need to recalculate the width
            inputContext.domBlock(me, 'width');
            width = NaN;
        }
        return width;
    },

    publishInnerHeight: function(ownerContext, height) {
        ownerContext.inputContext.setHeight(height - this.measureLabelErrorHeight(ownerContext));
    },

    beginLayoutFixed: function(ownerContext, width, suffix) {
        var me = this,
            ieInputWidthAdjustment = me.ieInputWidthAdjustment;

        if (ieInputWidthAdjustment) {
            me.adjustIEInputPadding(ownerContext);
            if(suffix === 'px') {
                width -= ieInputWidthAdjustment;
            }
        }

        me.callParent(arguments);
    },

    adjustIEInputPadding: function(ownerContext) {
        // adjust for IE 6/7 strict content-box model
        this.owner.bodyEl.setStyle('padding-right', this.ieInputWidthAdjustment + 'px');
    }
});


text: mod_wsgi-express start-server /cairis/cairis/bin/cairis.wsgi --user www-data --group www-data


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use pendalf89\filemanager\widgets\FileInput;

/**
 * @var yii\web\View $this
 * @var amnah\yii2\user\Module $module
 * @var amnah\yii2\user\models\User $user
 * @var amnah\yii2\user\models\Profile $profile
 * @var amnah\yii2\user\models\Role $role
 * @var yii\widgets\ActiveForm $form
 */

if(isset($user->attributes['img'])){
    $items = json_decode($user->attributes['img']);
}

?>

    <?php $form = ActiveForm::begin([
        'enableAjaxValidation' => true,
    ]); ?>

    <?= $form->field($user, 'title')->textInput(['maxlength' => 255]) ?>

    <?= $form->field($user, 'post_status')->dropDownList([0=>'Скрыт',1=>'опубликован'])?>

    <?= $form->field($user, 'desc')->textarea() ?>

    <?php /*echo $form->field($user, 'imageFiles[]')->fileInput(['multiple' => true, 'accept' => 'image/*'])->label('')*/ ?>

Магниты

                        Добавить вариант

                        Переместить

Ссылка на картинку

 <input type="text" class="form-control" name="Prize[img][{{row-count-placeholder}}][image]" />

                        Удалить

                    <?php if(isset($items)): foreach ($items as $index=>$sl):?>

                            Переместить

                                    <?php
                                    echo FileInput::widget([
                                        'name' => 'Prize[img]['.$index.'][image]',
                                        'value' => $sl->image,
                                        'buttonTag' => 'button',
                                        'buttonName' => 'Обзор',
                                        'buttonOptions' => ['class' => 'btn btn-default'],
                                        'options' => ['class' => 'form-control'],
                                        // Widget template
                                        'template' => '
Ссылка на картинку

{input}{button}
',
                                        // Optional, if set, only this image can be selected by user
                                        'thumb' => 'original',
                                        // Optional, if set, in container will be inserted selected image
                                        'imageContainer' => '.img',
                                        // Default to FileInput::DATA_IDL. This data will be inserted in input field
                                        'pasteData' => FileInput::DATA_URL,
                                        // JavaScript function, which will be called before insert file data to input.
                                        // Argument data contains file data.
                                        // data example: [alt: "Ведьма с кошкой", description: "123", url: "/uploads/2014/12/vedma-100x100.jpeg", id: "45"]
                                        'callbackBeforeInsert' => 'function(e, data) {
                                        console.log( data );
                                    }',
                                    ]);
                                    ?>

                            Удалить

                    <?php endforeach; endif; ?>

    <?= $form->field($user, 'price')->textInput(['maxlength' => 255]) ?>
    <?= $form->field($user, 'price_delivery')->textInput(['maxlength' => 255]) ?>

        <?= Html::submitButton($user->isNewRecord ? Yii::t('user', 'Create') : Yii::t('user', 'Update'), ['class' => $user->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

    <?php ActiveForm::end(); ?>


text:
namespace BehaviorEngine
{
    public enum NodeState { Inactive, Successful, Active, Failure, Error };
}


text:
<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Views
 */

/**
 * @var Yoast_Form $yform
 */

if ( ! defined( 'WPSEO_VERSION' ) ) {
	header( 'Status: 403 Forbidden' );
	header( 'HTTP/1.1 403 Forbidden' );
	exit();
}

/* translators: %1$s expands to Yoast SEO */
$submit_button_value = sprintf( __( 'Export your %1$s settings', 'wordpress-seo' ), 'Yoast SEO' );

$wpseo_export_phrase = sprintf(
	/* translators: %1$s expands to Yoast SEO */
	__( 'Export your %1$s settings here, to import them again later or to import them on another site.', 'wordpress-seo' ),
	'Yoast SEO'
);
?>

<?php echo esc_html( $wpseo_export_phrase ); ?>

<form
	action="<?php echo esc_url( admin_url( 'admin.php?page=wpseo_tools&tool=import-export#top#wpseo-export' ) ); ?>"
	method="post"
	accept-charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>">
	<?php wp_nonce_field( WPSEO_Export::NONCE_ACTION, WPSEO_Export::NONCE_NAME ); ?>
	<button type="submit" class="button button-primary" id="export-button"><?php echo esc_html( $submit_button_value ); ?></button>
</form>