text:
import { DataProvider } from '../ojdataprovider';
import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base';
import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..';
export interface ojNBox<K, D> extends dvtBaseComponent<ojNBoxSettableProperties<K, D>> {
    animationOnDataChange: 'auto' | 'none';
    animationOnDisplay: 'auto' | 'none';
    as: string;
    cellContent: 'counts' | 'auto';
    cellMaximize: 'off' | 'on';
    cells: Promise<ojNBox.Cell[]> | null;
    columns: Promise<ojNBox.Column[]> | null;
    columnsTitle: string;
    countLabel: ((context: ojNBox.CountLabelContext) => (string | null));
    data: DataProvider<K, D> | null;
    groupAttributes: 'color' | 'indicatorColor' | 'indicatorIconColor' | 'indicatorIconPattern' | 'indicatorIconShape';
    groupBehavior: 'acrossCells' | 'none' | 'withinCell';
    hiddenCategories: string[];
    highlightMatch: 'any' | 'all';
    highlightedCategories: string[];
    hoverBehavior: 'dim' | 'none';
    labelTruncation: 'ifRequired' | 'on';
    maximizedColumn: string;
    maximizedRow: string;
    otherColor: string;
    otherThreshold: number;
    rows: Promise<ojNBox.Row[]> | null;
    rowsTitle: string;
    selection: K[];
    selectionMode: 'none' | 'single' | 'multiple';
    styleDefaults: {
        animationDuration: number;
        cellDefaults: {
            labelHalign: 'center' | 'end' | 'start';
            labelStyle: object;
            maximizedSvgStyle: object;
            minimizedSvgStyle: object;
            showCount: 'on' | 'off' | 'auto';
            svgStyle: object;
        };
        columnLabelStyle: object;
        columnsTitleStyle: object;
        hoverBehaviorDelay: number;
        nodeDefaults: {
            borderColor: string;
            borderWidth: number;
            color: string;
            iconDefaults: {
                borderColor: string;
                borderRadius: string;
                borderWidth: number;
                color: string;
                height: number;
                opacity: number;
                pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' |
                   'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none';
                shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star';
                source: string;
                width: number;
            };
            indicatorColor: string;
            indicatorIconDefaults: {
                borderColor: string;
                borderRadius: string;
                borderWidth: number;
                color: string;
                height: number;
                opacity: number;
                pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' |
                   'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none';
                shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star';
                source: string;
                width: number;
            };
            labelStyle: object;
            secondaryLabelStyle: object;
        };
        rowLabelStyle: object;
        rowsTitleStyle: object;
    };
    tooltip: {
        renderer: ((context: ojNBox.TooltipContext<K>) => ({
            insert: Element | string;
        } | {
            preventDefault: boolean;
        })) | null;
    };
    touchResponse: 'touchStart' | 'auto';
    translations: {
        componentName?: string;
        highlightedCount?: string;
        labelAdditionalData?: string;
        labelAndValue?: string;
        labelClearSelection?: string;
        labelCountWithTotal?: string;
        labelDataVisualization?: string;
        labelGroup?: string;
        labelInvalidData?: string;
        labelNoData?: string;
        labelOther?: string;
        labelSize?: string;
        stateCollapsed?: string;
        stateDrillable?: string;
        stateExpanded?: string;
        stateHidden?: string;
        stateIsolated?: string;
        stateMaximized?: string;
        stateMinimized?: string;
        stateSelected?: string;
        stateUnselected?: string;
        stateVisible?: string;
    };
    onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["animationOnDataChange"]>) => any) | null;
    onAnimationOnDisplayChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["animationOnDisplay"]>) => any) | null;
    onAsChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["as"]>) => any) | null;
    onCellContentChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["cellContent"]>) => any) | null;
    onCellMaximizeChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["cellMaximize"]>) => any) | null;
    onCellsChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["cells"]>) => any) | null;
    onColumnsChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["columns"]>) => any) | null;
    onColumnsTitleChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["columnsTitle"]>) => any) | null;
    onCountLabelChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["countLabel"]>) => any) | null;
    onDataChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["data"]>) => any) | null;
    onGroupAttributesChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["groupAttributes"]>) => any) | null;
    onGroupBehaviorChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["groupBehavior"]>) => any) | null;
    onHiddenCategoriesChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["hiddenCategories"]>) => any) | null;
    onHighlightMatchChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["highlightMatch"]>) => any) | null;
    onHighlightedCategoriesChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["highlightedCategories"]>) => any) | null;
    onHoverBehaviorChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["hoverBehavior"]>) => any) | null;
    onLabelTruncationChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["labelTruncation"]>) => any) | null;
    onMaximizedColumnChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["maximizedColumn"]>) => any) | null;
    onMaximizedRowChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["maximizedRow"]>) => any) | null;
    onOtherColorChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["otherColor"]>) => any) | null;
    onOtherThresholdChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["otherThreshold"]>) => any) | null;
    onRowsChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["rows"]>) => any) | null;
    onRowsTitleChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["rowsTitle"]>) => any) | null;
    onSelectionChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["selection"]>) => any) | null;
    onSelectionModeChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["selectionMode"]>) => any) | null;
    onStyleDefaultsChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["styleDefaults"]>) => any) | null;
    onTooltipChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["tooltip"]>) => any) | null;
    onTouchResponseChanged: ((event: JetElementCustomEvent<ojNBox<K, D>["touchResponse"]>) => any) | null;
    addEventListener<T extends keyof ojNBoxEventMap<K, D>>(type: T, listener: (this: HTMLElement, ev: ojNBoxEventMap<K, D>[T]) => any, useCapture?: boolean): void;
    addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
    getProperty<T extends keyof ojNBoxSettableProperties<K, D>>(property: T): ojNBox<K, D>[T];
    getProperty(property: string): any;
    setProperty<T extends keyof ojNBoxSettableProperties<K, D>>(property: T, value: ojNBoxSettableProperties<K, D>[T]): void;
    setProperty<T extends string>(property: T, value: JetSetPropertyType<T, ojNBoxSettableProperties<K, D>>): void;
    setProperties(properties: ojNBoxSettablePropertiesLenient<K, D>): void;
    getCell(rowValue: string, columnValue: string): object | null;
    getColumn(columnValue: string): object | null;
    getColumnCount(): number;
    getColumnsTitle(): string;
    getContextByNode(node: Element): object | null;
    getDialog(): object | null;
    getGroupBehavior(): string;
    getGroupNode(groupCategory: string): object | null;
    getRow(rowValue: string): object | null;
    getRowCount(): number;
    getRowsTitle(): string;
}
export interface ojNBoxEventMap<K, D> extends dvtBaseComponentEventMap<ojNBoxSettableProperties<K, D>> {
    'animationOnDataChangeChanged': JetElementCustomEvent<ojNBox<K, D>["animationOnDataChange"]>;
    'animationOnDisplayChanged': JetElementCustomEvent<ojNBox<K, D>["animationOnDisplay"]>;
    'asChanged': JetElementCustomEvent<ojNBox<K, D>["as"]>;
    'cellContentChanged': JetElementCustomEvent<ojNBox<K, D>["cellContent"]>;
    'cellMaximizeChanged': JetElementCustomEvent<ojNBox<K, D>["cellMaximize"]>;
    'cellsChanged': JetElementCustomEvent<ojNBox<K, D>["cells"]>;
    'columnsChanged': JetElementCustomEvent<ojNBox<K, D>["columns"]>;
    'columnsTitleChanged': JetElementCustomEvent<ojNBox<K, D>["columnsTitle"]>;
    'countLabelChanged': JetElementCustomEvent<ojNBox<K, D>["countLabel"]>;
    'dataChanged': JetElementCustomEvent<ojNBox<K, D>["data"]>;
    'groupAttributesChanged': JetElementCustomEvent<ojNBox<K, D>["groupAttributes"]>;
    'groupBehaviorChanged': JetElementCustomEvent<ojNBox<K, D>["groupBehavior"]>;
    'hiddenCategoriesChanged': JetElementCustomEvent<ojNBox<K, D>["hiddenCategories"]>;
    'highlightMatchChanged': JetElementCustomEvent<ojNBox<K, D>["highlightMatch"]>;
    'highlightedCategoriesChanged': JetElementCustomEvent<ojNBox<K, D>["highlightedCategories"]>;
    'hoverBehaviorChanged': JetElementCustomEvent<ojNBox<K, D>["hoverBehavior"]>;
    'labelTruncationChanged': JetElementCustomEvent<ojNBox<K, D>["labelTruncation"]>;
    'maximizedColumnChanged': JetElementCustomEvent<ojNBox<K, D>["maximizedColumn"]>;
    'maximizedRowChanged': JetElementCustomEvent<ojNBox<K, D>["maximizedRow"]>;
    'otherColorChanged': JetElementCustomEvent<ojNBox<K, D>["otherColor"]>;
    'otherThresholdChanged': JetElementCustomEvent<ojNBox<K, D>["otherThreshold"]>;
    'rowsChanged': JetElementCustomEvent<ojNBox<K, D>["rows"]>;
    'rowsTitleChanged': JetElementCustomEvent<ojNBox<K, D>["rowsTitle"]>;
    'selectionChanged': JetElementCustomEvent<ojNBox<K, D>["selection"]>;
    'selectionModeChanged': JetElementCustomEvent<ojNBox<K, D>["selectionMode"]>;
    'styleDefaultsChanged': JetElementCustomEvent<ojNBox<K, D>["styleDefaults"]>;
    'tooltipChanged': JetElementCustomEvent<ojNBox<K, D>["tooltip"]>;
    'touchResponseChanged': JetElementCustomEvent<ojNBox<K, D>["touchResponse"]>;
}
export interface ojNBoxSettableProperties<K, D> extends dvtBaseComponentSettableProperties {
    animationOnDataChange: 'auto' | 'none';
    animationOnDisplay: 'auto' | 'none';
    as: string;
    cellContent: 'counts' | 'auto';
    cellMaximize: 'off' | 'on';
    cells: ojNBox.Cell[] | Promise<ojNBox.Cell[]> | null;
    columns: ojNBox.Column[] | Promise<ojNBox.Column[]> | null;
    columnsTitle: string;
    countLabel: ((context: ojNBox.CountLabelContext) => (string | null));
    data: DataProvider<K, D> | null;
    groupAttributes: 'color' | 'indicatorColor' | 'indicatorIconColor' | 'indicatorIconPattern' | 'indicatorIconShape';
    groupBehavior: 'acrossCells' | 'none' | 'withinCell';
    hiddenCategories: string[];
    highlightMatch: 'any' | 'all';
    highlightedCategories: string[];
    hoverBehavior: 'dim' | 'none';
    labelTruncation: 'ifRequired' | 'on';
    maximizedColumn: string;
    maximizedRow: string;
    otherColor: string;
    otherThreshold: number;
    rows: ojNBox.Row[] | Promise<ojNBox.Row[]> | null;
    rowsTitle: string;
    selection: K[];
    selectionMode: 'none' | 'single' | 'multiple';
    styleDefaults: {
        animationDuration: number;
        cellDefaults: {
            labelHalign: 'center' | 'end' | 'start';
            labelStyle: object;
            maximizedSvgStyle: object;
            minimizedSvgStyle: object;
            showCount: 'on' | 'off' | 'auto';
            svgStyle: object;
        };
        columnLabelStyle: object;
        columnsTitleStyle: object;
        hoverBehaviorDelay: number;
        nodeDefaults: {
            borderColor: string;
            borderWidth: number;
            color: string;
            iconDefaults: {
                borderColor: string;
                borderRadius: string;
                borderWidth: number;
                color: string;
                height: number;
                opacity: number;
                pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' |
                   'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none';
                shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star';
                source: string;
                width: number;
            };
            indicatorColor: string;
            indicatorIconDefaults: {
                borderColor: string;
                borderRadius: string;
                borderWidth: number;
                color: string;
                height: number;
                opacity: number;
                pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' |
                   'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none';
                shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star';
                source: string;
                width: number;
            };
            labelStyle: object;
            secondaryLabelStyle: object;
        };
        rowLabelStyle: object;
        rowsTitleStyle: object;
    };
    tooltip: {
        renderer: ((context: ojNBox.TooltipContext<K>) => ({
            insert: Element | string;
        } | {
            preventDefault: boolean;
        })) | null;
    };
    touchResponse: 'touchStart' | 'auto';
    translations: {
        componentName?: string;
        highlightedCount?: string;
        labelAdditionalData?: string;
        labelAndValue?: string;
        labelClearSelection?: string;
        labelCountWithTotal?: string;
        labelDataVisualization?: string;
        labelGroup?: string;
        labelInvalidData?: string;
        labelNoData?: string;
        labelOther?: string;
        labelSize?: string;
        stateCollapsed?: string;
        stateDrillable?: string;
        stateExpanded?: string;
        stateHidden?: string;
        stateIsolated?: string;
        stateMaximized?: string;
        stateMinimized?: string;
        stateSelected?: string;
        stateUnselected?: string;
        stateVisible?: string;
    };
}
export interface ojNBoxSettablePropertiesLenient<K, D> extends Partial<ojNBoxSettableProperties<K, D>> {
    [key: string]: any;
}
export namespace ojNBox {
    // tslint:disable-next-line interface-over-type-literal
    type Cell = {
        label?: string;
        column: string;
        labelHalign?: string;
        labelStyle?: object;
        svgClassName?: string;
        svgStyle?: object;
        maximizedSvgStyle?: object;
        maximizedSvgClassName?: string;
        minimizedSvgStyle?: object;
        minimizedSvgClassName?: string;
        row: string;
        showCount?: 'on' | 'off' | 'auto' | string;
        shortDesc?: string;
    };
    // tslint:disable-next-line interface-over-type-literal
    type Column = {
        id: string;
        label?: string;
        labelStyle?: object;
    };
    // tslint:disable-next-line interface-over-type-literal
    type CountLabelContext = {
        row: string;
        column: string;
        nodeCount: number;
        totalNodeCount: number;
        highlightedNodeCount: number;
    };
    // tslint:disable-next-line interface-over-type-literal
    type Row = {
        id: string;
        label?: string;
        labelStyle?: object;
    };
    // tslint:disable-next-line interface-over-type-literal
    type TooltipContext<K> = {
        parentElement: Element;
        id: K;
        label: string;
        secondaryLabel: string;
        row: string;
        column: string;
        color: string;
        indicatorColor: string;
        componentElement: Element;
    };
}
export interface ojNBoxNode extends JetElement<ojNBoxNodeSettableProperties> {
    borderColor: string;
    borderWidth: number;
    categories: string[];
    color?: string;
    column: string;
    groupCategory?: string;
    icon?: {
        borderColor?: string;
        borderRadius?: string;
        borderWidth: number;
        color?: string;
        height?: number | null;
        opacity: number;
        pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'mallChecker' | 'smallCrosshatch' |
           'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle';
        shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string;
        source?: string;
        svgClassName: string;
        svgStyle?: object;
        width?: number | null;
    };
    indicatorColor?: string;
    indicatorIcon?: {
        borderColor?: string;
        borderRadius?: string;
        borderWidth: number;
        color?: string;
        height?: number | null;
        opacity: number;
        pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'smallChecker' | 'smallCrosshatch' |
           'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle';
        shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string;
        source?: string | null;
        svgClassName: string;
        svgStyle?: object | null;
        width?: number | null;
    };
    label: string;
    row: string;
    secondaryLabel: string;
    shortDesc: string;
    svgClassName: string;
    svgStyle: object | null;
    xPercentage?: number | null;
    yPercentage?: number | null;
    onBorderColorChanged: ((event: JetElementCustomEvent<ojNBoxNode["borderColor"]>) => any) | null;
    onBorderWidthChanged: ((event: JetElementCustomEvent<ojNBoxNode["borderWidth"]>) => any) | null;
    onCategoriesChanged: ((event: JetElementCustomEvent<ojNBoxNode["categories"]>) => any) | null;
    onColorChanged: ((event: JetElementCustomEvent<ojNBoxNode["color"]>) => any) | null;
    onColumnChanged: ((event: JetElementCustomEvent<ojNBoxNode["column"]>) => any) | null;
    onGroupCategoryChanged: ((event: JetElementCustomEvent<ojNBoxNode["groupCategory"]>) => any) | null;
    onIconChanged: ((event: JetElementCustomEvent<ojNBoxNode["icon"]>) => any) | null;
    onIndicatorColorChanged: ((event: JetElementCustomEvent<ojNBoxNode["indicatorColor"]>) => any) | null;
    onIndicatorIconChanged: ((event: JetElementCustomEvent<ojNBoxNode["indicatorIcon"]>) => any) | null;
    onLabelChanged: ((event: JetElementCustomEvent<ojNBoxNode["label"]>) => any) | null;
    onRowChanged: ((event: JetElementCustomEvent<ojNBoxNode["row"]>) => any) | null;
    onSecondaryLabelChanged: ((event: JetElementCustomEvent<ojNBoxNode["secondaryLabel"]>) => any) | null;
    onShortDescChanged: ((event: JetElementCustomEvent<ojNBoxNode["shortDesc"]>) => any) | null;
    onSvgClassNameChanged: ((event: JetElementCustomEvent<ojNBoxNode["svgClassName"]>) => any) | null;
    onSvgStyleChanged: ((event: JetElementCustomEvent<ojNBoxNode["svgStyle"]>) => any) | null;
    onXPercentageChanged: ((event: JetElementCustomEvent<ojNBoxNode["xPercentage"]>) => any) | null;
    onYPercentageChanged: ((event: JetElementCustomEvent<ojNBoxNode["yPercentage"]>) => any) | null;
    addEventListener<T extends keyof ojNBoxNodeEventMap>(type: T, listener: (this: HTMLElement, ev: ojNBoxNodeEventMap[T]) => any, useCapture?: boolean): void;
    addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
    getProperty<T extends keyof ojNBoxNodeSettableProperties>(property: T): ojNBoxNode[T];
    getProperty(property: string): any;
    setProperty<T extends keyof ojNBoxNodeSettableProperties>(property: T, value: ojNBoxNodeSettableProperties[T]): void;
    setProperty<T extends string>(property: T, value: JetSetPropertyType<T, ojNBoxNodeSettableProperties>): void;
    setProperties(properties: ojNBoxNodeSettablePropertiesLenient): void;
}
export interface ojNBoxNodeEventMap extends HTMLElementEventMap {
    'borderColorChanged': JetElementCustomEvent<ojNBoxNode["borderColor"]>;
    'borderWidthChanged': JetElementCustomEvent<ojNBoxNode["borderWidth"]>;
    'categoriesChanged': JetElementCustomEvent<ojNBoxNode["categories"]>;
    'colorChanged': JetElementCustomEvent<ojNBoxNode["color"]>;
    'columnChanged': JetElementCustomEvent<ojNBoxNode["column"]>;
    'groupCategoryChanged': JetElementCustomEvent<ojNBoxNode["groupCategory"]>;
    'iconChanged': JetElementCustomEvent<ojNBoxNode["icon"]>;
    'indicatorColorChanged': JetElementCustomEvent<ojNBoxNode["indicatorColor"]>;
    'indicatorIconChanged': JetElementCustomEvent<ojNBoxNode["indicatorIcon"]>;
    'labelChanged': JetElementCustomEvent<ojNBoxNode["label"]>;
    'rowChanged': JetElementCustomEvent<ojNBoxNode["row"]>;
    'secondaryLabelChanged': JetElementCustomEvent<ojNBoxNode["secondaryLabel"]>;
    'shortDescChanged': JetElementCustomEvent<ojNBoxNode["shortDesc"]>;
    'svgClassNameChanged': JetElementCustomEvent<ojNBoxNode["svgClassName"]>;
    'svgStyleChanged': JetElementCustomEvent<ojNBoxNode["svgStyle"]>;
    'xPercentageChanged': JetElementCustomEvent<ojNBoxNode["xPercentage"]>;
    'yPercentageChanged': JetElementCustomEvent<ojNBoxNode["yPercentage"]>;
}
export interface ojNBoxNodeSettableProperties extends JetSettableProperties {
    borderColor: string;
    borderWidth: number;
    categories: string[];
    color?: string;
    column: string;
    groupCategory?: string;
    icon?: {
        borderColor?: string;
        borderRadius?: string;
        borderWidth: number;
        color?: string;
        height?: number | null;
        opacity: number;
        pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'mallChecker' | 'smallCrosshatch' |
           'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle';
        shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string;
        source?: string;
        svgClassName: string;
        svgStyle?: object;
        width?: number | null;
    };
    indicatorColor?: string;
    indicatorIcon?: {
        borderColor?: string;
        borderRadius?: string;
        borderWidth: number;
        color?: string;
        height?: number | null;
        opacity: number;
        pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'smallChecker' | 'smallCrosshatch' |
           'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle';
        shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string;
        source?: string | null;
        svgClassName: string;
        svgStyle?: object | null;
        width?: number | null;
    };
    label: string;
    row: string;
    secondaryLabel: string;
    shortDesc: string;
    svgClassName: string;
    svgStyle: object | null;
    xPercentage?: number | null;
    yPercentage?: number | null;
}
export interface ojNBoxNodeSettablePropertiesLenient extends Partial<ojNBoxNodeSettableProperties> {
    [key: string]: any;
}


text:
package org.springframework.boot.actuate.endpoint.web;

import org.springframework.boot.actuate.endpoint.StatusEndpoint;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.endpoint.ReadOperation;
import org.springframework.boot.endpoint.web.WebEndpointExtension;
import org.springframework.boot.endpoint.web.WebEndpointResponse;

/**
 * {@link WebEndpointExtension} for the {@link StatusEndpoint}.
 *
 * @author Stephane Nicoll
 * @since 2.0.0
 */
@WebEndpointExtension(endpoint = StatusEndpoint.class)
public class StatusWebEndpointExtension {

	private final StatusEndpoint delegate;

	private final HealthStatusHttpMapper statusHttpMapper;

	public StatusWebEndpointExtension(StatusEndpoint delegate,
			HealthStatusHttpMapper statusHttpMapper) {
		this.delegate = delegate;
		this.statusHttpMapper = statusHttpMapper;
	}

	@ReadOperation
	public WebEndpointResponse<Health> getHealth() {
		Health health = this.delegate.health();
		Integer status = this.statusHttpMapper.mapStatus(health.getStatus());
		return new WebEndpointResponse<>(health, status);
	}

}

redpajama_set_name: RedPajamaGithub


text:
            <input name="auto_canal3" type="checkbox" id="auto_canal3"/>
            TRANSFERENCIA BANCARIA

    Banco M&M :

            <select name="selectBan3" id="selectBan3">
              <option selected="selected">Seleccione...</option>
              <option value="BOLIVARIANO">BOLIVARIANO</option>
              <option value="GUAYAQUIL">GUAYAQUIL</option>
              <option value="INTERNACIONAL">INTERNACIONAL</option>
              <option value="PICHINCHA">PICHINCHA</option>
              <option value="PRODUBANCO">PRODUBANCO</option>
            </select>

    Número de documento :

        <input name="inputVal31" type="text" id="inputVal31" style="text-transform: uppercase;" size="15" maxlength="30"/>

    Valor transferido :

        <input name="inputVal32" type="text" id="inputVal32"  size="15" maxlength="15"/>


text:
.. _bigipbasics:

BIG-IP Basics (optional)
------------------------

Just in case you're new to the F5 BIG-IP platform (or need a refresher) we've
included some links and videos below that will help get you started.

What is BIG-IP
^^^^^^^^^^^^^^

.. raw:: html

*Source: https://devcentral.f5.com/articles/lightboard-lessons-what-is-big-ip-26793*

BIG-IP Basic Nomenclature
^^^^^^^^^^^^^^^^^^^^^^^^^

.. raw:: html

*Source: https://devcentral.f5.com/articles/lightboard-lessons-big-ip-basic-nomenclature-26144*

F5 DevCentral BIG-IP Basics Articles
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

BIG-IP Basics Articles: https://devcentral.f5.com/articles?tag=devcentral+basics

Using F5 in Various Environments
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Public Cloud:

  - **AWS/Azure/GCP/etc.:** http://clouddocs.f5.com/cloud/public/v1/

- Private Cloud:

  - **OpenStack:** http://clouddocs.f5.com/cloud/openstack/

  - **VMware:** https://f5.com/solutions/technology-alliances/vmware

- Container Ecosystems:

  - **Cloud Foundry:** http://clouddocs.f5.com/containers/latest/cloudfoundry/

  - **Kubernetes:** http://clouddocs.f5.com/containers/latest/kubernetes

  - **Mesos Marathon:** http://clouddocs.f5.com/containers/latest/marathon

  - **RedHat OpenShift:** http://clouddocs.f5.com/containers/latest/openshift/

HA Proxy to BIG-IP Quick Start
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you're already familiar with HA Proxy, learning F5 BIG-IP is straightforward
once you learn the associated F5 terminology.

Here is a list of common HA Proxy configuration terminology and its F5 equivalent:

+---------------------+---------------------+
| **HA Proxy**        | **F5 BIG-IP**       |
+---------------------+---------------------+
| Frontend            | Virtual Server (VIP)|
+---------------------+---------------------+
| Backend             | Pool                |
+---------------------+---------------------+
| Server              | Member              |
+---------------------+---------------------+
| mode http           | HTTP Profile        |
+---------------------+---------------------+
| default_backend     | Default pool        |
+---------------------+---------------------+
| use_backend         | LTM policy          |
+---------------------+---------------------+
| check port          | Health monitor      |
+---------------------+---------------------+

NGINX to BIG-IP Quick Start
^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you are already familiar with NGINX, learning F5 BIG-IP will be
straightforward once you learn the F5 terminology.

NGINX administrators usually use multiple files and leverage the include
command in their config to break down the config and make it easier to
manage. F5 leverages *Profiles* which can be applied to a *Virtual Server*.

NGINX uses in-band (passive) health monitors which can be enabled on F5 through
the creation of an *inband monitor*. BIG-IP also supports the use of active
health monitors, which will poll the pool member periodically.  Both can be
used together for better monitoring of your services.

F5 BIG-IP supports control-plane and data-plane programmability with:

- Node.js through the use of iRulesLX, iControlLX and iAppsLX

- TCL through the use of iRules and iApp Templates

A lot of the manual configuration and scripting steps that are required with NGINX
are supported more easily through various config parameters and profiles in BIG-IP.
By leveraging the control-plane programmability features this class covers you can
achieve full automation of your services with the BIG-IP platform.

F5 BIG-IP is designed to be a full proxy by default.  In most cases there is no
need to tune TCP & HTTP buffering like you would on NGINX (i.e. using
``proxy_buffering``).  This is because the default settings have been optimized
and can adapt to most situations.

Here is a list of common NGINX configuration terminology and its F5 equivalent:

+----------------------------------+--------------------------------------------+
| **NGINX**                        | **F5 BIG-IP**                              |
+----------------------------------+--------------------------------------------+
| listen                           | Virtual Server Port (VIP)                  |
+----------------------------------+--------------------------------------------+
| upstream                         | Pool                                       |
+----------------------------------+--------------------------------------------+
| proxy_pass                       | Default Pool                               |
+----------------------------------+--------------------------------------------+
| server                           | Member                                     |
+----------------------------------+--------------------------------------------+
| ssl_certificate                  | SSL Profile Option                         |
+----------------------------------+--------------------------------------------+
| return                           | LTM HTTP Policy Option                     |
+----------------------------------+--------------------------------------------+
| proxy_set_header X Forwarded For | HTTP Profile Option Insert X-Forwarded-For |
+----------------------------------+--------------------------------------------+
| proxy_set_header                 | LTM HTTP Policy Option                     |
+----------------------------------+--------------------------------------------+
| add_header                       | LTM HTTP Policy Option                     |
+----------------------------------+--------------------------------------------+
| location & proxy_pass            | LTM HTTP Policy Option                     |
+----------------------------------+--------------------------------------------+
| Proxy Cache                      | Web Acceleration Policy                    |
+----------------------------------+--------------------------------------------+


text:
* Added `Reusability` for:
  * `java.math.BigDecimal`
  * `java.math.BigInteger`
  * `scala.math.BigDecimal`
  * `scala.math.BigInt`

* You can now `import Reusability.DecimalImplicitsWithoutTolerance._` if you'd like implicit `Reusability` instances for decimal types that use exact comparison

### Bug fixes

* Fix infinite loop in functional components with reuse + `Reusability.never` ([#1027](https://github.com/japgolly/scalajs-react/issues/1027))
* When using `cats.effect.IO` as event handlers, it runs as synchronously as possible until it runs into an async step.


text:
package org.nanocontainer.testmodel;

public class WilmaImpl implements Wilma {

    private boolean helloCalled;

    public boolean helloCalled() {
        return helloCalled;
    }

    public void hello() {
        helloCalled = true;
    }
}


text:
N=`cat ./reference/configs.conf | grep N= | cut -d= -f2`

#if [ -f ./reference/previous_bytes.* ]
#then
#	rm ./reference/previous_bytes.*
#fi

#if [ -f ./history/historicaldata.* ]
#then
#	rm ./history/historicaldata.*
#fi

for int in $(cat ./reference/configs.conf | grep interfaces= | cut -d= -f2 | sed 's/,/ /g')
do
	current_rx=`ifconfig $int | grep bytes | awk '{print $2}' | cut -d: -f2`
	current_tx=`ifconfig $int | grep bytes | awk '{print $6}' | cut -d: -f2`

	echo "RX:$current_rx" > ./reference/previous_bytes.$int
	echo "TX:$current_tx" >> ./reference/previous_bytes.$int

	> ./history/historicaldata.$int
	for i in $(seq 1 $N)
	do
		echo 0 >> ./history/historicaldata.$int
	done
done


text:
package org.knowm.xchange.examples.okex.v5.marketdata;

import java.io.IOException;
import org.knowm.xchange.Exchange;
import org.knowm.xchange.ExchangeFactory;
import org.knowm.xchange.ExchangeSpecification;
import org.knowm.xchange.currency.CurrencyPair;
import org.knowm.xchange.derivative.FuturesContract;
import org.knowm.xchange.dto.marketdata.Trades;
import org.knowm.xchange.okex.OkexExchange;
import org.knowm.xchange.service.marketdata.MarketDataService;

public class OkexTradesDemo {

  public static void main(String[] args) throws IOException {

    ExchangeSpecification exSpec = new ExchangeSpecification(OkexExchange.class);

    Exchange okexExchange = ExchangeFactory.INSTANCE.createExchange(exSpec);

    generic(okexExchange);
  }

  private static void generic(Exchange okexExchange) throws IOException {

    // Interested in the public market data feed (no authentication)

    MarketDataService marketDataService = okexExchange.getMarketDataService();
    FuturesContract contract = new FuturesContract(CurrencyPair.BTC_USDT, "210924");

    // Get the latest trades data for BTC_UST Sept 24th Contact
    Trades trades = marketDataService.getTrades(contract);

    System.out.println(trades);
    System.out.println("Trades(0): " + trades.getTrades().get(0).toString());
    System.out.println("Trades size: " + trades.getTrades().size());
  }
}


text:
<?php
/**
 * PhingConfigReader.php
 * @author Revin Roman
 * @license The MIT License (MIT)
 * @link https://github.com/cookyii/build
 */

namespace cookyii\build\config;

/**
 * Class PhingConfigReader
 * @package cookyii\build\config
 */
class PhingConfigReader extends AbstractConfigReader
{

    /**
     * @return array
     * @throws \Exception
     */
    public function read()
    {
        if (!file_exists($this->configFile)) {
            $this->log('<error>Config file not exists.</error>');

            return false;
        } else {
            $reader = new \Sabre\Xml\Reader();
            $reader->xml(file_get_contents($this->configFile));

            $xml = $reader->parse();

            $config = [];

            return $config;
        }
    }
}


text:
namespace blink {

// A subclass of DocumentMarker used to store information specific to grammar
// markers. Spelling and grammar markers are identical except that they mark
// either spelling or grammar errors, respectively, so nearly all functionality
// is delegated to a common base class, SpellCheckMarker.
class CORE_EXPORT GrammarMarker final : public SpellCheckMarker {
 public:
  GrammarMarker(unsigned start_offset,
                unsigned end_offset,
                const String& description);

 private:
  // DocumentMarker implementations
  MarkerType GetType() const final;

  DISALLOW_COPY_AND_ASSIGN(GrammarMarker);
};

}  // namespace blink

#endif


text:
package westerdals.eksamen.enterprise.frontend;

import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import westerdals.eksamen.enterprise.frontend.po.HomePageObject;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.concurrent.atomic.AtomicLong;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeTrue;

/**
 * Taken an adapted from https://github.com/arcuri82/testing_security_development_enterprise_systems
 */
public class WebTestBase {

    private static final AtomicLong counter = new AtomicLong(System.currentTimeMillis());

    protected static HomePageObject home;
    private static WebDriver driver;

    protected WebDriver getDriver() {
        return driver;
    }

    protected String getPageSource() {
        return driver.getPageSource();
    }

    private static boolean tryToSetGeckoIfExists(String property, Path path) {
        if (Files.exists(path)) {
            System.setProperty(property, path.toAbsolutePath().toString());
            return true;
        }
        return false;
    }

    private static void setupDriverExecutable(String executableName, String property) {
        String homeDir = System.getProperty("user.home");

        //first try Linux/Mac executable
        if (!tryToSetGeckoIfExists(property, Paths.get(homeDir, executableName))) {
            //then check if on Windows
            if (!tryToSetGeckoIfExists(property, Paths.get(homeDir, executableName + ".exe"))) {
                fail("Cannot locate the " + executableName + " in your home directory " + homeDir);
            }
        }
    }

    private static WebDriver getChromeDriver() {

        /*
            Need to have Chrome (eg version 53.x) and the Chrome Driver (eg 2.24),
            whose executable should be saved directly under your home directory

            see https://sites.google.com/a/chromium.org/chromedriver/getting-started
         */
        setupDriverExecutable("chromedriver", "webdriver.chrome.driver");

        return new ChromeDriver();
    }

    @BeforeClass
    public static void init() throws InterruptedException {

        driver = getChromeDriver();

        /*
            When the integration tests in this class are run, it might be
            that WildFly is not ready yet, although it was started. So
            we need to wait till it is ready.
         */
        for (int i = 0; i < 30; i++) {
            boolean ready = JBossUtil.isJBossUpAndRunning();
            if (!ready) {
                Thread.sleep(1_000); //check every second
                continue;
            } else {
                break;
            }
        }
    }

    protected static String getUniqueName() {
        return "Name:" + counter.incrementAndGet();
    }

    @Before
    public void startFromInitialPage() {

        assumeTrue(JBossUtil.isJBossUpAndRunning());

        home = new HomePageObject(getDriver());
        home.toStartingPage();

        assertTrue(home.isOnPage());

    }

    @AfterClass
    public static void tearDown() {
        driver.close();
    }

}


text:
package com.payneteasy.superfly.service.job;

import java.util.Map;

import org.quartz.JobExecutionContext;
import org.quartz.SchedulerException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.payneteasy.superfly.notification.AbstractNotification;
import com.payneteasy.superfly.notification.LogoutNotification;
import com.payneteasy.superfly.notification.NotificationException;
import com.payneteasy.superfly.notification.UsersChangedNotification;
import com.payneteasy.superfly.notification.strategy.NotificationSendStrategy;
import com.payneteasy.superfly.utils.SchedulerUtils;

public class TryToSendNotificationJob extends BaseJob {

    private static final Logger logger = LoggerFactory.getLogger(TryToSendNotificationJob.class);

    private String beanName;
    private AbstractNotification notification;
    private int retriesLeft;

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    public void setNotification(AbstractNotification notification) {
        this.notification = notification;
    }

    public void setRetriesLeft(int retriesLeft) {
        this.retriesLeft = retriesLeft;
    }

    @SuppressWarnings("unchecked")
    @Override
    protected void doExecute(JobExecutionContext context)
            throws SchedulerException {
        NotificationSendStrategy sendStrategy = getNotificationSendStrategy(context, beanName);
        try {
            if (notification instanceof LogoutNotification) {
                sendStrategy.send((LogoutNotification) notification);
            } else if (notification instanceof UsersChangedNotification) {
                sendStrategy.send((UsersChangedNotification) notification);
            } else {
                throw new IllegalArgumentException("Unknown notification type: " + notification.getClass());
            }
        } catch (NotificationException e) {
            if (retriesLeft > 0) {
                logger.warn("Error while trying to send a notification, retrying "
                        + retriesLeft + " more times: " + notification.toString(), e);
                Map<String, Object> dataMap = context.getJobDetail().getJobDataMap();
                dataMap.put("retriesLeft", retriesLeft - 1);
                SchedulerUtils.rescheduleJob(context, dataMap);
            } else {
                logger.error("Error while trying to send a notification, no more retries, dropping: " + notification.toString(), e);
            }
        }
    }

}


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

<title>ColumnFamilyOutputFormat (apache-cassandra API)</title>
<meta name="date" content="2015-08-28">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.apache.cassandra.hadoop

Class ColumnFamilyOutputFormat

java.lang.Object

org.apache.hadoop.mapreduce.OutputFormat<java.nio.ByteBuffer,java.util.List<Mutation>>

org.apache.cassandra.hadoop.ColumnFamilyOutputFormat

All Implemented Interfaces:

org.apache.hadoop.mapred.OutputFormat<java.nio.ByteBuffer,java.util.List<Mutation>>

Deprecated.

@Deprecated
public class ColumnFamilyOutputFormat
extends org.apache.hadoop.mapreduce.OutputFormat<java.nio.ByteBuffer,java.util.List<Mutation>>
implements org.apache.hadoop.mapred.OutputFormat<java.nio.ByteBuffer,java.util.List<Mutation>>

The ColumnFamilyOutputFormat acts as a Hadoop-specific
 OutputFormat that allows reduce tasks to store keys (and corresponding
 values) as Cassandra rows (and respective columns) in a given
 ColumnFamily.

 As is the case with the ColumnFamilyInputFormat, you need to set the
 Keyspace and ColumnFamily in your
 Hadoop job Configuration. The ConfigHelper class, through its
 ConfigHelper.setOutputColumnFamily(org.apache.hadoop.conf.Configuration, java.lang.String) method, is provided to make this
 simple.

 For the sake of performance, this class employs a lazy write-back caching
 mechanism, where its record writer batches mutations created based on the
 reduce's inputs (in a task-specific map), and periodically makes the changes
 official by sending a batch mutate request to Cassandra.

Field Summary

Fields

Modifier and Type
Field and Description

static java.lang.String
BATCH_THRESHOLD

Deprecated.

static java.lang.String
QUEUE_SIZE

Deprecated.

Constructor Summary

Constructors

Constructor and Description

ColumnFamilyOutputFormat()

Deprecated.

Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods

Modifier and Type
Method and Description

protected void
checkOutputSpecs(org.apache.hadoop.conf.Configuration conf)

Deprecated.

void
checkOutputSpecs(org.apache.hadoop.fs.FileSystem filesystem,
                org.apache.hadoop.mapred.JobConf job)

Deprecated.

void
checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context)

Deprecated.

Check for validity of the output-specification for the job.

static Cassandra.Client
createAuthenticatedClient(java.lang.String host,
                         int port,
                         org.apache.hadoop.conf.Configuration conf)

Deprecated.

Connects to the given server:port and returns a client based on the given socket that points to the configured
 keyspace, and is logged in with the configured credentials.

org.apache.hadoop.mapreduce.OutputCommitter
getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context)

Deprecated.

The OutputCommitter for this format does not write any data to the DFS.

org.apache.cassandra.hadoop.ColumnFamilyRecordWriter
getRecordWriter(org.apache.hadoop.fs.FileSystem filesystem,
               org.apache.hadoop.mapred.JobConf job,
               java.lang.String name,
               org.apache.hadoop.util.Progressable progress)

Deprecated.

org.apache.cassandra.hadoop.ColumnFamilyRecordWriter
getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)

Deprecated.

Get the RecordWriter for the given task.

static void
login(java.lang.String user,
     java.lang.String password,
     Cassandra.Client client)

Deprecated.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

BATCH_THRESHOLD

public static final java.lang.String BATCH_THRESHOLD

Deprecated.

See Also:

Constant Field Values

QUEUE_SIZE

public static final java.lang.String QUEUE_SIZE

Deprecated.

See Also:

Constant Field Values

Constructor Detail

ColumnFamilyOutputFormat

public ColumnFamilyOutputFormat()

Deprecated.

Method Detail

getOutputCommitter

public org.apache.hadoop.mapreduce.OutputCommitter getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                                               throws java.io.IOException,
                                                                      java.lang.InterruptedException

Deprecated.

The OutputCommitter for this format does not write any data to the DFS.

Specified by:

getOutputCommitter in class org.apache.hadoop.mapreduce.OutputFormat<java.nio.ByteBuffer,java.util.List<Mutation>>

Parameters:

context - the task context

Returns:

an output committer

Throws:

java.io.IOException

java.lang.InterruptedException

checkOutputSpecs

public void checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context)

Deprecated.

Check for validity of the output-specification for the job.

Specified by:

checkOutputSpecs in class org.apache.hadoop.mapreduce.OutputFormat<java.nio.ByteBuffer,java.util.List<Mutation>>

Parameters:

context - information about the job

checkOutputSpecs

protected void checkOutputSpecs(org.apache.hadoop.conf.Configuration conf)

Deprecated.

checkOutputSpecs

@Deprecated
public void checkOutputSpecs(org.apache.hadoop.fs.FileSystem filesystem,
                                         org.apache.hadoop.mapred.JobConf job)
                                  throws java.io.IOException

Deprecated.

Fills the deprecated OutputFormat interface for streaming.

Specified by:

checkOutputSpecs in interface org.apache.hadoop.mapred.OutputFormat<java.nio.ByteBuffer,java.util.List<Mutation>>

Throws:

java.io.IOException

createAuthenticatedClient

public static Cassandra.Client createAuthenticatedClient(java.lang.String host,
                                                         int port,
                                                         org.apache.hadoop.conf.Configuration conf)
                                                  throws java.lang.Exception

Deprecated.

Connects to the given server:port and returns a client based on the given socket that points to the configured
 keyspace, and is logged in with the configured credentials.

Parameters:

host - fully qualified host name to connect to

port - RPC port of the server

conf - a job configuration

Returns:

a cassandra client

Throws:

java.lang.Exception - set of thrown exceptions may be implementation defined,
                   depending on the used transport factory

login

public static void login(java.lang.String user,
                         java.lang.String password,
                         Cassandra.Client client)
                  throws java.lang.Exception

Deprecated.

Throws:

java.lang.Exception

getRecordWriter

@Deprecated
public org.apache.cassandra.hadoop.ColumnFamilyRecordWriter getRecordWriter(org.apache.hadoop.fs.FileSystem filesystem,
                                                                                org.apache.hadoop.mapred.JobConf job,
                                                                                java.lang.String name,
                                                                                org.apache.hadoop.util.Progressable progress)

Deprecated.

Fills the deprecated OutputFormat interface for streaming.

Specified by:

getRecordWriter in interface org.apache.hadoop.mapred.OutputFormat<java.nio.ByteBuffer,java.util.List<Mutation>>

getRecordWriter

public org.apache.cassandra.hadoop.ColumnFamilyRecordWriter getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                                                     throws java.lang.InterruptedException

Deprecated.

Get the RecordWriter for the given task.

Specified by:

getRecordWriter in class org.apache.hadoop.mapreduce.OutputFormat<java.nio.ByteBuffer,java.util.List<Mutation>>

Parameters:

context - the information about the current task.

Returns:

a RecordWriter to write the output for the job.

Throws:

java.lang.InterruptedException

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2015 The Apache Software Foundation


text:
package org.apache.shardingsphere.example.core.jpa.entity;

import org.apache.shardingsphere.example.core.api.entity.User;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "t_user")
public final class UserEntity extends User {

    private static final long serialVersionUID = -3708998745561667721L;

    @Id
    @Column(name = "user_id")
    @Override
    public int getUserId() {
        return super.getUserId();
    }

    @Column(name = "user_name")
    @Override
    public String getUserName() {
        return super.getUserName();
    }

    @Column(name = "user_name_plain")
    @Override
    public String getUserNamePlain() {
        return super.getUserNamePlain();
    }

    @Column(name = "pwd")
    @Override
    public String getPwd() {
        return super.getPwd();
    }

    @Column(name = "assisted_query_pwd")
    @Override
    public String getAssistedQueryPwd() {
        return super.getAssistedQueryPwd();
    }
}


text:
% SELECT.M          (universal SELECTion)
%
% This function performs universal selection. The function handles
% multiple populations and calls the low level selection function
% for the actual selection process.

%
% Syntax:  SelCh = select(SEL_F, Chrom, FitnV, GGAP, SUBPOP)
%
% Input parameters:
%    SEL_F     - Name of the selection function
%    Chrom     - Matrix containing the individuals (parents) of the current
%                population. Each row corresponds to one individual.
%    FitnV     - Column vector containing the fitness values of the
%                individuals in the population.
%    GGAP      - (optional) Rate of individuals to be selected
%                if omitted 1.0 is assumed
%    SUBPOP    - (optional) Number of subpopulations
%                if omitted 1 subpopulation is assumed
%
% Output parameters:
%    SelCh     - Matrix containing the selected individuals.

% Author:     Hartmut Pohlheim
% History:    10.03.94     file created

function SelCh = select(SEL_F, Chrom, FitnV, GGAP, SUBPOP);

% Check parameter consistency
   if nargin < 3, error('Not enough input parameter'); end

   % Identify the population size (Nind)
   [NindCh,Nvar] = size(Chrom);
   [NindF,VarF] = size(FitnV);
   if NindCh ~= NindF, error('Chrom and FitnV disagree'); end
   if VarF ~= 1, error('FitnV must be a column vector'); end

   if nargin < 5, SUBPOP = 1; end
   if nargin > 4,
      if isempty(SUBPOP), SUBPOP = 1;
      elseif isnan(SUBPOP), SUBPOP = 1;
      elseif length(SUBPOP) ~= 1, error('SUBPOP must be a scalar'); end
   end

   if (NindCh/SUBPOP) ~= fix(NindCh/SUBPOP), error('Chrom and SUBPOP disagree'); end
   Nind = NindCh/SUBPOP;  % Compute number of individuals per subpopulation

   if nargin < 4, GGAP = 1; end
   if nargin > 3,
      if isempty(GGAP), GGAP = 1;
      elseif isnan(GGAP), GGAP = 1;
      elseif length(GGAP) ~= 1, error('GGAP must be a scalar');
      elseif (GGAP < 0), error('GGAP must be a scalar bigger than 0'); end
   end

% Compute number of new individuals (to select)
   NSel=max(floor(Nind*GGAP+.5),2);

% Select individuals from population
   SelCh = [];
   for irun = 1:SUBPOP,
      FitnVSub = FitnV((irun-1)*Nind+1:irun*Nind);
      ChrIx=feval(SEL_F, FitnVSub, NSel)+(irun-1)*Nind;
      SelCh=[SelCh; Chrom(ChrIx,:)];
   end

% End of function


text:
<xml>

	<set name="GCC_THIN_ARCHIVE" value="1" if="iphone"/>
	<set name="GCC_THIN_ARCHIVE" value="1" if="emscripten"/>
	<set name="debug" value="debug" if ="fulldebug" />

	<set name="PLATFORM" value="android-9" if="android" unless="PLATFORM" />

	<include name="${HXCPP}/build-tool/BuildCommon.xml"/>

	<set name="HXCPP_M32" value="1" unless="HXCPP_M64" />

	<set name="iphonesim" value="1" if="ios" />
	<set name="iphoneos" value="1" if="ios" unless="simulator" />
	<set name="win_desktop" value="1" if="windows" unless="winrt"/>

	<set name="NATIVE_DEV" value="${haxelib:lime-build}" unless="NATIVE_DEV" />
	<!-- <error value="Error: You must clone 'openfl-native-dev' and 'haxelib dev' the directory before you can rebuild openfl-native" unless="NATIVE_DEV" /> -->

	<set name="has_window" value="1" if="LIME_SDL" />
	<set name="has_window" value="1" if="LIME_SDL2" />
	<set name="has_window" value="1" if="LIME_GLFW" />
	<set name="has_window" value="1" if="LIME_DIRECTFB" />
	<set name="sdl" value="1" if="LIME_SDL" />
	<set name="sdl2" value="1" if="LIME_SDL2" />
	<set name="glfw" value="1" if="LIME_GLFW" />
	<set name="directfb" value="1" if="LIME_DIRECTFB" />

	<set name="sdl" value="1" if="rpi" unless="has_window" />
	<set name="has_window" value="1" if="sdl" />

	<set name="sdl2" value="1" if="win_desktop" unless="has_window" />
	<set name="sdl2" value="1" if="macos" unless="has_window" />
	<set name="sdl2" value="1" if="linux" unless="has_window" />
	<set name="sdl" value="1" if="blackberry" unless="has_window" />
	<set name="sdl" value="1" if="emscripten" unless="has_window" />
	<!-- <set name="mac64" value="1" if="macos" unless="HXCPP_M32" />
	<set name="sdl2" value="1" if="mac64" unless="has_window" />
	<unset name="sdl" if="mac64" unless="has_window" /> -->
	<set name="has_window" value="1" if="sdl" />
	<set name="has_window" value="1" if="sdl2" />
	<set name="has_window" value="1" if="glfw" />
	<set name="has_window" value="1" if="directfb" />

	<set name="ogl" value="1" if="glfw"/>
	<set name="ogl" value="1" if="sdl"/>
	<set name="ogl" value="1" if="sdl2"/>
	<set name="ogl" value="1" if="gph"/>
	<set name="ogl" value="1" if="iphone"/>
	<set name="ogl" value="1" if="android"/>
	<set name="ogl" value="1" if="tizen"/>
	<set name="limeegl" value="1" if="rpi"/>
	<set name="limeegl" value="1" if="tizen"/>

	<set name="nocurl" value="1" if="winrt"/>
	<set name="nocurl" value="1" if="emscripten"/>
	<!-- <set name="nocurl" value="1" if="macos" unless="HXCPP_M32" /> -->
	<set name="nocurl" value="1" if="directfb" />

	<!-- <set name="LIME_FORCE_GLES1" value="1" if="iphone" /> -->

	<set name="sdl_image" value="1" if="emscripten" />

	<set name="ogl_shaders" value="1" unless="LIME_FORCE_GLES1" />

	<set name="openal" value="1" if="LIME_OPENAL" />
	<set name="openal" value="1" if="android" />
	<set name="openal" value="1" if="iphone" />
	<set name="openal" value="1" if="tizen" />
	<set name="has_sound" value="1" if="sdl" />
	<set name="has_sound" value="1" if="openal" />
	<set name="openal" value="1" if="sdl2" unless="has_sound" />
	<set name="noopenal" value="1" unless="openal" />
	<set name="has_sound" value="1" if="sdl2" />

	<set name="mobile" value="1" if="iphone"/>
	<set name="mobile" value="1" if="android"/>
	<set name="mobile" value="1" if="webos"/>
	<set name="mobile" value="1" if="blackberry"/>
	<set name="mobile" value="1" if="tizen"/>
	<set name="mobile" value="1" if="gph"/>

	<set name="ssl" value="1" unless="nossl"/>
	<set name="ssl_extra" value="_ssl" if="ssl"/>

	<files id="win_desktop">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I${NATIVE_DEV}/include"/>
		<compilerflag value="-I${NATIVE_DEV}/include/SDL12" if="sdl" />
		<compilerflag value="-I${NATIVE_DEV}/include/SDL2" if="sdl2" />
		<compilerflag value="-I${NATIVE_DEV}/include/openal" if="openal" />
		<compilerflag value="-Isrc/sound/openal"/>
		<file name="src/platform/windows/GDIFont.cpp"/>
		<file name="src/platform/windows/System.cpp" />
		<!-- Use SDL on windows too ? -->
		<!-- <file name="src/platform/windows/SimpleFrame.cpp" unless="sdl"/> -->
		<!-- <file name="src/backend/sdl/SDLSound.cpp" unless="sdl"/> -->
		<file name="src/common/empty/Sound.cpp" if="glfw" unless="openal" />
		<file name="src/sound/openal/OpenALSound.cpp" if="openal"/>
		<compilerflag value="-DAL_LIBTYPE_STATIC" if="openal"/>

	</files>

	<files id="winrt_shaders">
		<hlsl name="src\\platform\\winrt\\SimplePixelShader.hlsl" profile="ps_4_0" variable="gPixelShader" target="src\\platform\\winrt\\shaders\\SimplePixelShader.h"/>
		<hlsl name="src\\platform\\winrt\\SimpleVertexShader.hlsl" profile="vs_4_0" variable="gVertexShader" target="src\\platform\\winrt\\shaders\\SimpleVertexShader.h"/>
		<file name="src\\platform\\winrt/ShaderData.cpp" />
	</files>

	<files id="winrt">
		<compilerflag value="-Iinclude"/>
		<file name="src/platform/winrt/WinRTStage.cpp" />
		<file name="src/platform/winrt/DX11Context.cpp" />
		<file name="src/platform/winrt/DX11Font.cpp" />
		<file name="src/platform/winrt/System.cpp" />
		<file name="src/platform/winrt/MediaFoundation.cpp" />
		<file name="src/platform/winrt/Direct3DBase.cpp" />
		<file name="src/platform/winrt/URL.cpp" />
	</files>

	<files id="linux">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-Isrc/sound/openal" if="openal" />
		<compilerflag value="-I${NATIVE_DEV}/include" />
		<compilerflag value="-I${NATIVE_DEV}/include/openal" if="openal" />
		<compilerflag value="-DSDL_OGL" if="sdl"/>
		<file name="src/platform/linux/NativeFont.cpp"/>
		<file name="src/platform/linux/System.cpp"/>
		<file name="src/common/empty/URL.cpp" if="nocurl" />
		<file name="src/common/empty/Sound.cpp" if="noopenal" />
		<!-- <file name="src/common/empty/HardwareContext.cpp" unless="has_window" /> -->
		<file name="src/sound/openal/OpenALSound.cpp" if="openal" />

	</files>

	<files id="iphone">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I${NATIVE_DEV}/include"/>
		<compilerflag value="-Isrc/sound/openal"/>
		<compilerflag value="-DLIME_FORCE_GLES1" if="LIME_FORCE_GLES1"/>
		<file name="src/platform/ios/UIStageView.mm"/>
		<file name="src/platform/ios/UIDeviceHardware.mm"/>
		<!-- <file name="src/platform/ios/SurfaceIO.mm"/> -->
		<file name="src/sound/openal/OpenALSound.cpp" />
		<file name="src/platform/ios/Sound.mm"/>
		<file name="src/platform/ios/NativeFont.mm"/>
		<file name="src/platform/ios/System.mm"/>
		<file name="src/platform/cocoa/FileManager.mm"/>

	</files>

	<files id="android">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I${NATIVE_DEV}/include"/>
		<compilerflag value="-I${NATIVE_DEV}/include/openal" if="openal" />
		<compilerflag value="-Isrc/sound/openal"/>
		<file name="src/platform/android/AndroidCommon.cpp" />
		<file name="src/platform/android/AndroidSound.cpp" unless="openal"/>
		<file name="src/platform/android/AndroidFont.cpp"/>
		<file name="src/platform/android/AndroidFrame.cpp"/>
		<file name="src/platform/android/JNI.cpp"/>
		<file name="src/platform/android/System.cpp"/>
		<file name="src/sound/openal/OpenALSound.cpp" if="openal"/>
		<compilerflag value="-DAL_LIBTYPE_STATIC" if="openal"/>

	</files>

	<files id="emscripten">

		<compilerflag value="-Iinclude"/>
		<file name="src/platform/linux/NativeFont.cpp"/>
		<file name="src/platform/emscripten/System.cpp"/>

	</files>

	<set name="dynamic_sdl" value="1" if="webos"/>

	<files id="webos">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I${PalmPDK}/include/SDL" />
		<compilerflag value="-I${NATIVE_DEV}/include"/>
		<file name="src/platform/linux/NativeFont.cpp"/>
		<file name="src/platform/webos/System.cpp"/>

	</files>

	<files id="blackberry">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I${QNX_TARGET}/usr/include" />
		<compilerflag value="-I${NATIVE_DEV}/include"/>
		<file name="src/platform/linux/NativeFont.cpp"/>
		<file name="src/platform/blackberry/System.cpp"/>

	</files>

	<files id="tizen">

		<compilerflag value="-Iinclude"/>
		<!-- <compilerflag value="-I${QNX_TARGET}/usr/include" /> -->
		<compilerflag value="-I${TIZEN_PLATFORM}/usr/include/osp"/>
		<compilerflag value="-I${NATIVE_DEV}/include"/>
		<compilerflag value="-I${NATIVE_DEV}/include/openal" if="openal" />
		<compilerflag value="-Isrc/sound/openal"/>
		<compilerflag value="-D_APP_LOG" />
		<file name="src/platform/linux/NativeFont.cpp"/>
		<file name="src/platform/tizen/TizenApplication.cpp"/>
		<!-- <file name="src/platform/tizen/TizenUIApp.cpp"/>
		<file name="src/platform/tizen/TizenUIFrame.cpp"/> -->
		<file name="src/platform/tizen/TizenStage.cpp"/>
		<file name="src/platform/tizen/TizenFrame.cpp"/>
		<file name="src/platform/tizen/System.cpp" />
		<file name="src/sound/openal/OpenALSound.cpp" if="openal"/>

	</files>

	<files id="main">

		<compilerflag value="-Iinclude"/>
		<file name="src/Test.cpp"/>

	</files>

	<set name="THIRDPARTY_LIBS" value="${NATIVE_DEV}/lib/Mac${M64}/" if="macos"/>
	<set name="THIRDPARTY_LIBS" value="${NATIVE_DEV}/lib/Windows/" if="windows" unless="winrt"/>
	<set name="THIRDPARTY_LIBS" value="${NATIVE_DEV}/lib/WinRTx86/" if="winrt"/>
	<set name="THIRDPARTY_LIBS" value="${NATIVE_DEV}/lib/webOS/" if="webos" />
	<set name="THIRDPARTY_LIBS" value="${NATIVE_DEV}/lib/Linux${M64}/" if="linux"/>
	<set name="THIRDPARTY_LIBS" value="${NATIVE_DEV}/lib/RPi/" if="rpi"/>
	<set name="THIRDPARTY_LIBS" value="${NATIVE_DEV}/lib/Android/" if="android"/>
	<set name="THIRDPARTY_LIBS" value="${NATIVE_DEV}/lib/iPhone/" if="iphone"/>
	<set name="THIRDPARTY_LIBS" value="${NATIVE_DEV}/lib/BlackBerry/" if="blackberry"/>
	<set name="THIRDPARTY_LIBS" value="${NATIVE_DEV}/lib/Emscripten/" if="emscripten"/>
	<set name="THIRDPARTY_LIBS" value="${NATIVE_DEV}/lib/Tizen/" if="tizen"/>
	<set name="THIRDPARTY_LIBS" value="${GPH_ROOT}/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/lib/" if="gph"/>

	<set name="SLIBEXT" value=".lib" if="windows"/>
	<set name="SLIBEXT" value=".a" unless="windows"/>
	<set name="SLIBEXT" value=".so" if="webos"/>
	<set name="SLIBEXT" value=".a" if="emscripten"/>

	<files id="common">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I${PalmPDK}/include/SDL" if="webos" />
		<compilerflag value="-I${NATIVE_DEV}/include" unless="gph"/>
		<compilerflag value="-I${PalmPDK}/include/SDL" if="webos" />
		<compilerflag value="-I${NATIVE_DEV}/include/SDL12" if="sdl" unless="dynamic_sdl"/>
		<compilerflag value="-I${NATIVE_DEV}/include/SDL2" if="sdl2" />
		<compilerflag value="-I${GPH_ROOT}/gcc-4.2.4-glibc-2.7-eabi/arm-gph-linux-gnueabi/sys-root/usr/include" if="gph"/>
		<compilerflag value="-I${TIZEN_SDK}/platforms/tizen2.2/rootstraps/tizen-device-2.2.native/usr/include" if="tizen" />
		<compilerflag value="-I${TIZEN_SDK}/platforms/tizen2.2/rootstraps/tizen-device-2.2.native/usr/include/osp" if="tizen" />
		<compilerflag value="-I/opt/vc/include" if="rpi"/>
		<compilerflag value="-I/opt/vc/include/interface/vcos/pthreads/" if="rpi"/>
		<compilerflag value="-I${GPH_ROOT}/include/freetype2" if="gph"/>
		<compilerflag value="-I${GPH_ROOT}/DGE/include" if="gph"/>
		<compilerflag value="-I${QNX_TARGET}/usr/include" if="blackberry"/>
		<!-- <compilerflag value="-I${QNX_TARGET}/usr/include/GLES" if="blackberry"/> -->
		<compilerflag value="-I${QNX_TARGET}/usr/include/GLES2" if="blackberry"/>
		<compilerflag value="-DLIME_DIRECTFB" if="directfb"/>
		<compilerflag value="-DSDL_OGL" if="sdl"/>
		<compilerflag value="-DSDL_OGL" if="sdl2"/>
		<compilerflag value="-DGLFW_OGL" if="glfw"/>
		<compilerflag value="-DLIME_CURL_SSL" if="ssl" unless="nocurl"/>
		<compilerflag value="-DLIME_FORCE_GLES1" if="LIME_FORCE_GLES1"/>
		<compilerflag value="-Wno-conversion" if="linux"/>

		<!-- <file name="src/common/Surface.cpp"/> -->
		<file name="src/renderer/common/Surface.cpp"/>
		<file name="src/renderer/common/HardwareSurface.cpp"/>
		<file name="src/renderer/common/SimpleSurface.cpp"/>
		<file name="src/renderer/common/BitmapCache.cpp"/>
		<file name="src/common/Utils.cpp"/>
		<file name="src/common/Geom.cpp"/>
		<file name="src/common/Graphics.cpp"/>
		<file name="src/common/GraphicsData.cpp"/>
		<file name="src/common/Matrix.cpp"/>
		<file name="src/common/CachedExtent.cpp"/>
		<file name="src/common/TextField.cpp"/>
		<file name="src/common/Font.cpp"/>
		<file name="src/common/FreeType.cpp" />
		<file name="src/common/Tilesheet.cpp"/>
		<file name="src/common/Display.cpp"/>
		<file name="src/common/ColorTransform.cpp"/>
		<file name="src/common/Hardware.cpp" unless="directfb"/>
		<file name="src/common/Tessellate.cpp"/>
		<file name="src/common/Filters.cpp"/>
		<file name="src/common/ExternalInterface.cpp"/>
		<file name="src/common/Cursors.cpp"/>
		<file name="src/common/Input.cpp" unless="iphone" />
		<file name="src/common/SurfaceIO.cpp" unless="sdl_image" />
		<file name="src/common/ManagedStage.cpp" unless="winrt" />
		<file name="src/common/CURL.cpp" unless="nocurl"/>
		<file name="src/common/Lzma.cpp"/>
		<file name="src/common/Thread.cpp"/>
		<file name="src/common/Audio.cpp" if="openal"/>
		<file name="src/common/video/TheoraVideo.cpp" if="theora" />
		<file name="src/common/empty/Video.cpp" unless="theora" />

		<file name="src/common/XML/tinystr.cpp"/>
		<file name="src/common/XML/tinyxml.cpp"/>
		<file name="src/common/XML/tinyxmlerror.cpp"/>
		<file name="src/common/XML/tinyxmlparser.cpp"/>

		<file name="src/renderer/software/AlphaMask.cpp"/>
		<file name="src/renderer/software/BitmapFill.cpp"/>
		<file name="src/renderer/software/BitmapFillPerspective.cpp"/>
		<file name="src/renderer/software/GradientFill.cpp"/>
		<file name="src/renderer/software/LineRender.cpp"/>
		<file name="src/renderer/software/PointRenderer.cpp"/>
		<file name="src/renderer/software/PolygonRender.cpp"/>
		<file name="src/renderer/software/SoftwareRenderer.cpp"/>
		<file name="src/renderer/software/SolidFill.cpp"/>
		<file name="src/renderer/software/SolidRender.cpp"/>
		<file name="src/renderer/software/TileRenderer.cpp"/>
		<file name="src/renderer/software/TriangleRender.cpp"/>
	</files>

	<files id="opengl">
		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I${PalmPDK}/include/SDL" if="webos" />
		<compilerflag value="-I${NATIVE_DEV}/include" unless="gph"/>
		<compilerflag value="-I${PalmPDK}/include/SDL" if="webos" />
		<compilerflag value="-I${NATIVE_DEV}/include/SDL12" if="sdl" unless="dynamic_sdl"/>
		<compilerflag value="-I${NATIVE_DEV}/include/SDL2" if="sdl2" />
		<compilerflag value="-I/opt/vc/include" if="rpi"/>
		<compilerflag value="-I/opt/vc/include/interface/vcos/pthreads/" if="rpi"/>
		<compilerflag value="-I${QNX_TARGET}/usr/include" if="blackberry"/>
		<!-- <compilerflag value="-I${QNX_TARGET}/usr/include/GLES" if="blackberry"/> -->
		<compilerflag value="-I${QNX_TARGET}/usr/include/GLES2" if="blackberry"/>
		<compilerflag value="-I${TIZEN_SDK}/platforms/tizen2.2/rootstraps/tizen-device-2.2.native/usr/include" if="tizen" />
		<compilerflag value="-I${TIZEN_SDK}/platforms/tizen2.2/rootstraps/tizen-device-2.2.native/usr/include/osp" if="tizen" />
		<compilerflag value="-DLIME_DIRECTFB" if="directfb"/>
		<compilerflag value="-DSDL_OGL" if="sdl"/>
		<compilerflag value="-DSDL_OGL" if="sdl2"/>
		<compilerflag value="-DGLFW_OGL" if="glfw"/>
		<compilerflag value="-DLIME_CURL_SSL" if="ssl" unless="nocurl"/>
		<compilerflag value="-DLIME_FORCE_GLES1" if="LIME_FORCE_GLES1"/>
		<compilerflag value="-Wno-conversion" if="linux"/>

		<file name="src/renderer/opengl/OpenGLInit.cpp"/>
		<file name="src/renderer/opengl/OpenGLContext.cpp"/>
		<file name="src/renderer/opengl/OpenGL2Context.cpp"/>
		<file name="src/renderer/opengl/OpenGLTexture.cpp"/>
		<file name="src/renderer/opengl/OpenGLProgram.cpp"/>
		<file name="src/renderer/opengl/OpenGLShaders.cpp"/>
		<file name="src/renderer/opengl/OGLExport.cpp" unless="LIME_FORCE_GLES1"/>
		<file name="src/renderer/opengl/Egl.cpp" if="limeegl"/>
	</files>

	<files id="common_lzma">
		<compilerflag value="-D_7ZIP_ST" unless="win_desktop"/>

		<file name="src/common/lzma/LzFind.c" />
		<file name="src/common/lzma/LzmaDec.c" />
		<file name="src/common/lzma/LzmaEnc.c" />
		<file name="src/common/lzma/LzFindMt.c" if="win_desktop" />
		<file name="src/common/lzma/Threads.c" if="win_desktop" />
	</files>

	<set name="tool" value="exe" unless="iphone"/>
	<set name="tool" value="static_link" if="iphone"/>
	<set name="tool" value="static_link" if="emscripten"/>

	<set name="ARM_ARCH" value="-v7" if="HXCPP_ARMV7" />

	<set name="ndll-tool" value="dll" unless="iphone"/>
	<set name="ndll-tool" value="static_link" if="iphone"/>
	<set name="ndll-tool" value="static_link" if="emscripten"/>
	<set name="name_extra" value=".iphonesim" if="iphonesim"/>
	<set name="name_extra" value=".iphoneos${ARM_ARCH}" if="iphoneos"/>
	<set name="name_extra" value="-v7" if="android" />
	<set name="name_extra" value="" if="android" unless="HXCPP_ARMV7" />

	<set name="name_extra" value="-x86" if="simulator" unless="iphonesim" />
	<set name="ndll_name_extra" value="${name_extra}" unless="android" />

	<set name="debug_extra" value="-debug" if="fulldebug" />

	<!-- <section if="fulldebug" >
		<set name="name_extra" value=".debug"/>
		<set name="name_extra" value=".debug-x86" if="simulator" unless="iphonesim" />
		<set name="name_extra" value=".debug.iphoneos${IOS_ARCH}" if="iphoneos"/>
		<set name="name_extra" value=".debug.iphonesim" if="iphonesim"/>
	</section> -->

	<set name="no_thirdparty_extras" value="1" if="iphone"/>
	<set name="no_thirdparty_extras" value="1" if="emscripten"/>
	<set name="no_thirdparty_extras" value="1" if="gph"/>

	<set name="sdl_static" value="1" unless="mobile"/>
	<unset name="sdl_static" if="emscripten" />
	<unset name="sdl_static" unless="sdl" />
	<set name="sdl_static" value="1" if="blackberry"/>
	<unset name="sdl_static" if="dynamic_sdl"/>
	<unset name="sdl_static" if="winrt"/>
	<set name="no_thirdparty_extras" value="1" if="dynamic_sdl"/>

	<set name="sdl_dynamic_path" value="-L/opt/local/lib" if="macos" />
	<set name="sdl_dynamic_include1" value="-I/opt/local/include" if="macos" />
	<set name="sdl_dynamic_include2" value="-I/opt/local/include/SDL-hidden" if="macos" />
	<set name="sdl_dynamic_include1" value="-I${PalmPDK}/include/SDL" if="webos" />
	<set name="sdl_dynamic_include1" value="-I/usr/include/SDL" if="linux" />

	<files id="sdl">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I${PalmPDK}/include/SDL" if="webos" />
		<compilerflag value="-I${NATIVE_DEV}/include" if="sdl_static"/>
		<compilerflag value="-I${NATIVE_DEV}/include/SDL12" if="sdl_static"/>
		<compilerflag value="-I${NATIVE_DEV}/include" if="webos"/>
		<compilerflag value="${sdl_dynamic_include1}" if="dynamic_sdl"/>
		<compilerflag value="${sdl_dynamic_include2}" if="dynamic_sdl"/>
		<compilerflag value="-DDYNAMIC_SDL" if="dynamic_sdl" />
		<compilerflag value="-DLIME_MIXER" />
		<compilerflag value="-DSDL_IMAGE" if="sdl_image" />
		<file name="src/backend/sdl/SDLStage.cpp"/>
		<file name="src/backend/sdl/SDLSound.cpp" unless="openal"/>

	</files>

	<files id="sdl2">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I${NATIVE_DEV}/include"/>
		<compilerflag value="-I${NATIVE_DEV}/include/SDL2"/>
		<!-- <compilerflag value="-DLIME_MIXER" /> -->
		<file name="src/backend/sdl2/SDL2Stage.cpp"/>
		<!-- <file name="src/backend/sdl/SDLSound.cpp" unless="openal"/> -->
		<file name="src/common/empty/Sound.cpp" unless="openal" />

	</files>

	<files id="glfw">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I${NATIVE_DEV}/include"/>
		<file name="src/backend/glfw/GLFWStage.cpp"/>

	</files>

	<files id="directfb">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I/usr/include/directfb" />
		<compilerflag value="-I${NATIVE_DEV}/include"/>
		<compilerflag value="-DLIME_DIRECTFB"/>

		<file name="src/backend/directfb/DirectFBHardware.cpp"/>
		<file name="src/backend/directfb/DirectFBStage.cpp"/>

	</files>

	<files id="mac">

		<compilerflag value="-Iinclude"/>
		<compilerflag value="-I${NATIVE_DEV}/include" />
		<compilerflag value="-I${NATIVE_DEV}/include/SDL12" if="sdl" />
		<compilerflag value="-I${NATIVE_DEV}/include/SDL2" if="sdl2" />
		<compilerflag value="${sdl_dynamic_include2}" if="dynamic_sdl"/>
		<compilerflag value="-Isrc/sound/openal"/>
		<compilerflag value="-mmacosx-version-min=10.7" if="macos"/>
		<file name="src/platform/mac/NSFont.cpp"/>
		<file name="src/platform/mac/MacBoot.m" />
		<file name="src/common/empty/URL.cpp" if="nocurl" />
		<file name="src/common/empty/Sound.cpp" unless="has_sound" />
		<file name="src/common/empty/Stage.cpp" unless="has_window" />
		<file name="src/common/empty/HardwareContext.cpp" unless="has_window" />
		<file name="src/platform/mac/System.mm"/>
		<file name="src/platform/cocoa/FileManager.mm"/>
		<file name="src/sound/openal/OpenALSound.cpp" if="openal"/>

	</files>

	<set name="name_prefix" value="lib" if="iphone" />

	<target id="NDLL" output="${name_prefix}lime${debug_extra}${ndll_name_extra}" tool="linker" toolid="${ndll-tool}">

		<outdir name="../ndll/${BINDIR}" />
		<ext value=".ndll" unless="mobile"/>
		<ext value=".a" if="emscripten"/>
		<ext value=".ndll" if="gph"/>

		<flag value="-NODEFAULTLIB:LIBCMT" if="winrt"/>
		<flag value="-NODEFAULTLIB:LIBCMT" if="glfw"/>

		<files id="common"/>
		<files id="opengl" if="ogl"/>
		<files id="common_lzma"/>
		<files id="win_desktop" if="win_desktop"/>
		<files id="winrt_shaders" if="winrt"/>
		<files id="winrt" if="winrt"/>
		<files id="iphone" if="iphone"/>
		<files id="mac" if="macos"/>
		<files id="linux" if="linux"/>
		<files id="gph" if="gph"/>
		<files id="sdl" if="sdl"/>
		<files id="sdl2" if="sdl2"/>
		<files id="glfw" if="glfw"/>
		<files id="directfb" if="directfb" />
		<files id="android" if="android"/>
		<files id="webos" if="webos"/>
		<files id="blackberry" if="blackberry"/>
		<files id="emscripten" if="emscripten"/>
		<files id="tizen" if="tizen"/>

		<lib name="${THIRDPARTY_LIBS}libfreetype${name_extra}${SLIBEXT}" if="iphone"/>
		<lib name="${THIRDPARTY_LIBS}libfreetype${name_extra}${SLIBEXT}" unless="no_thirdparty_extras"/>
		<lib name="${THIRDPARTY_LIBS}libjpeg${name_extra}${SLIBEXT}" unless="no_thirdparty_extras"/>
		<lib name="${THIRDPARTY_LIBS}libpng${name_extra}${SLIBEXT}" unless="no_thirdparty_extras"/>
		<lib name="${THIRDPARTY_LIBS}libz${name_extra}${SLIBEXT}" if="windows"/>
		<lib name="${THIRDPARTY_LIBS}libz${name_extra}${SLIBEXT}" if="macos" unless="dynamic_sdl"/>
		<lib name="${THIRDPARTY_LIBS}libz${name_extra}${SLIBEXT}" if="linux" unless="dynamic_sdl"/>
		<lib name="${THIRDPARTY_LIBS}libz${name_extra}${SLIBEXT}" if="tizen" />

		<lib name="${THIRDPARTY_LIBS}libSDL_mixer${name_extra}${SLIBEXT}" if="sdl" unless="dynamic_sdl || emscripten" />
		<lib name="${THIRDPARTY_LIBS}libSDL_image${name_extra}${SLIBEXT}" if="sdl_image" unless="dynamic_sdl || emscripten" />
		<lib name="${THIRDPARTY_LIBS}libSDL${name_extra}${SLIBEXT}" if="sdl_static" unless="blackberry" />
		<lib name="${THIRDPARTY_LIBS}libSDL2${name_extra}${SLIBEXT}" if="sdl2" />
		<!-- <lib name="${THIRDPARTY_LIBS}libSDL2main${name_extra}${SLIBEXT}" if="windows" unless="sdl" /> -->
		<!-- <lib name="${THIRDPARTY_LIBS}libopenal${name_extra}${SLIBEXT}" if="android" unless="noopenal"/> -->
		<lib name="${THIRDPARTY_LIBS}libopenal${name_extra}${SLIBEXT}" if="linux" unless="noopenal"/>
		<lib name="${THIRDPARTY_LIBS}libvorbis${name_extra}${SLIBEXT}" if="sdl_static"/>
		<lib name="${THIRDPARTY_LIBS}libvorbis${name_extra}${SLIBEXT}" if="openal" unless="sdl_static" />
		<lib name="${THIRDPARTY_LIBS}libogg${name_extra}${SLIBEXT}" if="sdl_static"/>
		<lib name="${THIRDPARTY_LIBS}libogg${name_extra}${SLIBEXT}" if="openal" unless="sdl_static" />
		<lib name="${THIRDPARTY_LIBS}libtheora${name_extra}${SLIBEXT}" if="theora" unless="sdl_static" />
		<lib name="${THIRDPARTY_LIBS}libsmpeg${name_extra}${SLIBEXT}" if="sdl_static"/>
		<lib name="${THIRDPARTY_LIBS}libcurl${ssl_extra}${name_extra}${SLIBEXT}" if="sdl_static" unless="iphone"/>
		<lib name="${THIRDPARTY_LIBS}libcurl${ssl_extra}${name_extra}${SLIBEXT}" if="sdl2"/>
		<lib name="${THIRDPARTY_LIBS}libcurl${ssl_extra}${name_extra}${SLIBEXT}" if="glfw"/>
		<lib name="${THIRDPARTY_LIBS}libcurl${ssl_extra}${name_extra}${SLIBEXT}" if="android"/>
		<lib name="${THIRDPARTY_LIBS}libcurl${ssl_extra}${name_extra}${SLIBEXT}" if="tizen"/>
		<lib name="${THIRDPARTY_LIBS}libglfw3${name_extra}${SLIBEXT}" if="glfw"/>

		<lib name="-L${THIRDPARTY_LIBS}" if="tizen"/>
	  <lib name="-losp-uifw" if="tizen" />
	  <lib name="-losp-appfw" if="tizen" />
	  <lib name="-losp-image" if="tizen" />
	  <lib name="-losp-ime" if="tizen" />
	  <lib name="-losp-net" if="tizen" />
	  <lib name="-losp-content" if="tizen" />
	  <lib name="-losp-locations" if="tizen" />
	  <lib name="-losp-telephony" if="tizen" />
	  <lib name="-losp-uix" if="tizen" />
	  <lib name="-losp-media" if="tizen" />
	  <lib name="-losp-messaging" if="tizen" />
	  <lib name="-losp-web" if="tizen" />
	  <lib name="-losp-social" if="tizen" />
	  <lib name="-losp-wifi" if="tizen" />
	  <lib name="-losp-bluetooth" if="tizen" />
	  <lib name="-losp-nfc" if="tizen" />
	  <lib name="-losp-face" if="tizen" />
	  <lib name="-losp-secure-element" if="tizen" />
	  <lib name="-losp-speech-tts" if="tizen" />
	  <lib name="-losp-speech-stt" if="tizen" />
	  <lib name="-losp-shell" if="tizen" />
	  <lib name="-losp-shell-core" if="tizen" />
	  <lib name="-losp-vision" if="tizen" />
	  <lib name="-lxml2" if="tizen" />
	  <lib name="-lalut" if="tizen" />
	  <lib name="-lopenal" if="tizen" />
	  <lib name="-losp-compat" if="tizen" />
	  <lib name="-lrt" if="tizen" />

		<lib name="-L${THIRDPARTY_LIBS}" if="linux"/>
		<lib name="-lrt" if="linux" unless="noopenal" />
		<!-- <lib name="-lopenal" if="linux" unless="noopenal" /> -->

		<lib name="-L${THIRDPARTY_LIBS}" if="webos"/>
		<lib name="-L../ndll/BlackBerry" if="blackberry"/>

		<lib name="-lSDL" if="dynamic_sdl"/>
		<!-- <lib name="-lSDL_image" if="sdl_image" unless="sdl_static"/> -->
		<lib name="-lSDL_mixer" if="dynamic_sdl"/>
		<lib name="-lvorbis" if="dynamic_sdl" unless="webos"/>
		<lib name="-logg" if="dynamic_sdl" unless="webos"/>
		<lib name="-lsmpeg" if="dynamic_sdl" unless="webos"/>
		<!--<lib name="-lfreetype" if="dynamic_sdl" unless="webos"/>
		<lib name="${THIRDPARTY_LIBS}libfreetype.a" if="webos"/>-->
		<lib name="${THIRDPARTY_LIBS}libfreetype.a" if="dynamic_sdl"/>

		<lib name="-lcurl" if="dynamic_sdl" unless="nocurl"/>
		<lib name="-lpng" if="dynamic_sdl"/>
		<lib name="-ljpeg" if="dynamic_sdl"/>
		<lib name="-lz" if="dynamic_sdl"/>

		<flag value="${sdl_dynamic_path}" if="dynamic_sdl"/>

		<flag value="-mmacosx-version-min=10.7" if="macos"/>

		<vflag name="-framework" value="IOKit" if="macos"/>
		<vflag name="-framework" value="Foundation" if="macos"/>
		<!-- <vflag name="-framework" value="AVFoundation" if="macos"/> -->
		<vflag name="-framework" value="CoreAudio" if="macos"/>
		<vflag name="-framework" value="Carbon" if="macos"/>
		<vflag name="-framework" value="AudioToolbox" if="macos"/>
		<vflag name="-framework" value="AudioUnit" if="macos"/>
		<vflag name="-framework" value="ForceFeedback" if="macos"/>
		<vflag name="-framework" value="Cocoa" if="macos"/>
		<vflag name="-framework" value="OpenGL" if="macos"/>
		<vflag name="-framework" value="QuickTime" if="macos" unless="HXCPP_M64"/>
		<vflag name="-framework" value="AppKit" if="macos"/>
		<vflag name="-framework" value="OpenAL" if="macos" unless="noopenal"/>

		<lib name="-ldl" if="android"/>
		<lib name="-landroid" if="android"/>
		<lib name="-lGLESv1_CM" if="android" unless="ogl_shaders"/>
		<lib name="-lGLESv2" if="android"/>
		<lib name="-lz" if="android"/>
		<lib name="-L../ndll/Android" if="android" unless="noopenal"/>
		<lib name="-lopenal" if="android" unless="noopenal"/>

		<lib name="-lGLES_CM" if="webos" unless="ogl_shaders"/>
		<lib name="-lGLESv2" if="webos"/>
		<lib name="-lpdl" if="webos"/>

		<lib name="-lSDL${name_extra}" if="blackberry"/>

		<lib name="-lbps" if="blackberry"/>
		<lib name="-lscreen" if="blackberry"/>
		<lib name="-lEGL" if="blackberry"/>

		<!-- <lib name="-lGLESv1_CM" if="blackberry"/> -->
		<lib name="-lGLESv2" if="blackberry" />

		<lib name="-ldirectfb" if="directfb" />

		<lib name="/opt/vc/lib/libGLESv1_CM.so" if="rpi" unless="ogl_shaders"/>
		<lib name="/opt/vc/lib/libGLESv2.so" if="rpi"/>
		<lib name="/opt/vc/lib/libEGL.so" if="rpi"/>
		<lib name="/opt/vc/lib/libbcm_host.so" if="rpi"/>

		<lib name="-lm" if="blackberry"/>
		<lib name="-lsocket" if="blackberry"/>

		<lib name="gdi32.lib" if="win_desktop" />
		<lib name="opengl32.lib" if="win_desktop" />
		<lib name="${THIRDPARTY_LIBS}libOpenAL32${SLIBEXT}" if="windows" unless="noopenal"/>
		<!-- <lib name="${THIRDPARTY_LIBS}libOpenAL32_dynamic${SLIBEXT}" if="openal_link_dynamic"/> -->
		<lib name="user32.lib" if="win_desktop"/>
		<lib name="kernel32.lib" if="win_desktop" unless="sdl2"/>
		<lib name="advapi32.lib" if="win_desktop" unless="sdl2"/>
		<lib name="${THIRDPARTY_LIBS}dxguid.lib" if="win_desktop"/>
		<lib name="winmm.lib" if="win_desktop"/>
		<lib name="imm32.lib" if="win_desktop" />
		<lib name="ole32.lib" if="win_desktop" unless="noopenal"/>
		<lib name="oleaut32.lib" if="win_desktop" unless="noopenal" />
		<lib name="version.lib" if="win_desktop" />
		<lib name="ws2_32.lib" if="win_desktop" unless="sdl2"/>
		<lib name="wldap32.lib" if="win_desktop"/>
		<lib name="shell32.lib" if="win_desktop"/>
		<lib name="comdlg32.lib" if="win_desktop"/>
		<lib name="-ldl" if="linux"/>
		<lib name="-lGL" if="linux" unless="rpi"/>
		<lib name="-lpthread" if="linux"/>

		<lib name="D3D11.lib" if="winrt"/>

		<flag value="-L${GPH_ROOT}/DGE/lib/target" if="gph"/>
		<lib name="-ldge20" if="gph"/>
		<lib name="-ldgx20" if="gph"/>
		<lib name="-lopengles_lite" if="gph"/>
		<lib name="-lfreetype" if="gph"/>
		<lib name="-lopenal11" if="gph"/>
		<lib name="-lopenalut11" if="gph"/>
		<lib name="-lts" if="gph"/>
		<lib name="-lpthread" if="gph"/>
		<lib name="-lpng" if="gph"/>
		<lib name="-ljpeg" if="gph"/>
		<lib name="-lz" if="gph"/>

	</target>

	<target id="default">

		<target id="NDLL"/>

	</target>

</xml>


text:
package com.alibaba.nacos.naming.remote.udp;

import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.api.remote.PushCallBack;
import com.alibaba.nacos.sys.env.EnvUtil;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.mock.env.MockEnvironment;
import org.springframework.test.util.ReflectionTestUtils;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.when;

/**
 * {@link UdpConnector} unit tests.
 *
 * @author chenglu
 * @date 2021-09-15 19:52
 */
@RunWith(MockitoJUnitRunner.class)
public class UdpConnectorTest {

    @InjectMocks
    private UdpConnector udpConnector;

    @Mock
    private ConcurrentMap<String, AckEntry> ackMap;

    @Mock
    private ConcurrentMap<String, PushCallBack> callbackMap;

    @Mock
    private DatagramSocket udpSocket;

    @BeforeClass
    public static void setEnv() {
        EnvUtil.setEnvironment(new MockEnvironment());
    }

    @Before
    public void setUp() throws IOException, InterruptedException {
        ReflectionTestUtils.setField(udpConnector, "ackMap", ackMap);
        ReflectionTestUtils.setField(udpConnector, "callbackMap", callbackMap);
        DatagramSocket oldSocket = (DatagramSocket) ReflectionTestUtils.getField(udpConnector, "udpSocket");
        ReflectionTestUtils.setField(udpConnector, "udpSocket", udpSocket);
        doAnswer(invocationOnMock -> {
            TimeUnit.SECONDS.sleep(3);
            return null;
        }).when(udpSocket).receive(any(DatagramPacket.class));
        oldSocket.close();
        TimeUnit.SECONDS.sleep(1);
    }

    @After
    public void tearDown() {
        udpConnector.shutdown();
    }

    @Test
    public void testContainAck() {
        when(ackMap.containsKey(Mockito.anyString())).thenReturn(true);
        Assert.assertTrue(udpConnector.containAck("1111"));
    }

    @Test
    public void testSendData() throws NacosException, IOException {
        when(udpSocket.isClosed()).thenReturn(false);
        AckEntry ackEntry = new AckEntry("A", new DatagramPacket(new byte[2], 2));
        udpConnector.sendData(ackEntry);
        Mockito.verify(udpSocket).send(ackEntry.getOrigin());
    }

    @Test
    public void testSendDataWithCallback() throws IOException, InterruptedException {
        when(udpSocket.isClosed()).thenReturn(false);
        AckEntry ackEntry = new AckEntry("A", new DatagramPacket(new byte[2], 2));
        udpConnector.sendDataWithCallback(ackEntry, new PushCallBack() {
            @Override
            public long getTimeout() {
                return 0;
            }

            @Override
            public void onSuccess() {

            }

            @Override
            public void onFail(Throwable e) {
                Assert.fail(e.getMessage());
            }
        });
        Thread.sleep(100);
        Mockito.verify(udpSocket).send(ackEntry.getOrigin());
    }
}


text:
package com.terlici.dragndroplist;

import java.util.List;
import java.util.Map;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.SimpleAdapter;

public class DragNDropSimpleAdapter extends SimpleAdapter implements DragNDropAdapter {
	private int mPosition[];
	private int mHandler;
	private List<? extends Map<String, ?>> dataList;

	public DragNDropSimpleAdapter(Context context, List<? extends Map<String, ?>> data, int resource, String[] from,
			int[] to, int handler) {
		super(context, data, resource, from, to);

		mHandler = handler;
		dataList = data;
		setup(data.size());
	}

	private void setup(int size) {
		mPosition = new int[size];

		for (int i = 0; i < size; ++i)
			mPosition[i] = i;
	}

	@Override
	public View getDropDownView(int position, View view, ViewGroup group) {
		return super.getDropDownView(mPosition[position], view, group);
	}

	@Override
	public Object getItem(int position) {
		return super.getItem(mPosition[position]);
	}

	@Override
	public int getItemViewType(int position) {
		return super.getItemViewType(mPosition[position]);
	}

	@Override
	public long getItemId(int position) {
		return super.getItemId(mPosition[position]);
	}

	@Override
	public View getView(int position, View view, ViewGroup group) {
		return super.getView(mPosition[position], view, group);
	}

	@Override
	public boolean isEnabled(int position) {
		return super.isEnabled(mPosition[position]);
	}

	@Override
	public void onItemDrag(DragNDropListView parent, View view, int position, long id) {

	}

	@Override
	public void onItemDrop(DragNDropListView parent, View view, int startPosition, int endPosition, long id) {
		int position = mPosition[startPosition];

		if (startPosition < endPosition)
			for (int i = startPosition; i < endPosition; ++i)
				mPosition[i] = mPosition[i + 1];
		else if (endPosition < startPosition)
			for (int i = startPosition; i > endPosition; --i)
				mPosition[i] = mPosition[i - 1];

		mPosition[endPosition] = position;
	}

	@Override
	public int getCount() {
		return dataList.size();
	}

	@Override
	public void notifyDataSetChanged() {
		setup(dataList.size());
		super.notifyDataSetChanged();
	}

	@Override
	public int getDragHandler() {
		return mHandler;
	}
}


text:
import React from "react";
import { connect } from "react-redux";
import injectSheet from "react-jss";

import PopoverMenu from "../components/PopoverMenu";
import type { Workflow } from "../../datamodel";
import ExecutionLogs from "../components/ExecutionLogs";

type Props = {
  classes: any,
  workflow: Workflow
};

const Finished = ({ classes, workflow }: Props) => {
  return (

Finished executions

      <ExecutionLogs
        workflow={workflow}
        columns={["job", "context", "endTime", "status", "detail"]}
        request={(page, rowsPerPage, sort) =>
          `/api/executions/finished?stream=true&offset=${page * rowsPerPage}&limit=${rowsPerPage}&sort=${sort.column}&order=${sort.order}`}
        label="finished"
        defaultSort={{ column: "endTime", order: "desc" }}
      />

  );
};

const styles = {
  container: {
    padding: "1em",
    flex: "1",
    display: "flex",
    flexDirection: "column",
    position: "relative"
  },
  title: {
    fontSize: "1.2em",
    margin: "0 0 16px 0",
    color: "#607e96",
    fontWeight: "normal"
  },
  menu: {
    position: "absolute",
    top: "1em",
    right: "1em"
  }
};

const mapStateToProps = ({ workflow }) => ({ workflow });

export default connect(mapStateToProps)(
  injectSheet(styles)(Finished)
);


text:
package org.drools.compiler.integrationtests;

import java.util.Collection;
import java.util.concurrent.TimeUnit;

import org.drools.testcoverage.common.model.StockTick;
import org.drools.testcoverage.common.util.KieBaseTestConfiguration;
import org.drools.testcoverage.common.util.KieBaseUtil;
import org.drools.testcoverage.common.util.KieSessionTestConfiguration;
import org.drools.testcoverage.common.util.TestParametersUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.kie.api.KieBase;
import org.kie.api.definition.type.FactType;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.rule.EntryPoint;
import org.kie.api.runtime.rule.QueryResults;
import org.kie.api.time.SessionPseudoClock;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

@RunWith(Parameterized.class)
public class CepEspNegativeCloudTest {

    private final KieBaseTestConfiguration kieBaseTestConfiguration;

    public CepEspNegativeCloudTest(final KieBaseTestConfiguration kieBaseTestConfiguration) {
        this.kieBaseTestConfiguration = kieBaseTestConfiguration;
    }

    @Parameterized.Parameters(name = "KieBase type={0}")
    public static Collection<Object[]> getParameters() {
        return TestParametersUtil.getKieBaseCloudConfigurations(true);
    }

    @Test(timeout=10000)
    public void testCloudModeExpiration() throws InstantiationException, IllegalAccessException, InterruptedException {
        final String drl = "package org.drools.cloud\n" +
                     "import " + StockTick.class.getCanonicalName() + "\n" +
                     "declare Event\n" +
                     "        @role ( event )\n" +
                     "        name : String\n" +
                     "        value : Object\n" +
                     "end\n" +
                     "declare AnotherEvent\n" +
                     "        @role ( event )\n" +
                     "        message : String\n" +
                     "        type : String\n" +
                     "end\n" +
                     "declare StockTick\n" +
                     "        @role ( event )\n" +
                     "end\n" +
                     "rule \"two events\"\n" +
                     "    when\n" +
                     "        Event( value != null ) from entry-point X\n" +
                     "        StockTick( company != null ) from entry-point X\n" +
                     "    then\n" +
                     "end";

        final KieBase kbase = KieBaseUtil.getKieBaseFromKieModuleFromDrl("cep-esp-test", kieBaseTestConfiguration, drl);
        final KieSession ksession = kbase.newKieSession();
        try {
            final EntryPoint ep = ksession.getEntryPoint("X");

            ep.insert(new StockTick(1, "RHT", 10, 1000));
            int rulesFired = ksession.fireAllRules();
            assertEquals(0, rulesFired);

            final FactType event = kbase.getFactType("org.drools.cloud", "Event");
            final Object e1 = event.newInstance();
            event.set(e1, "name", "someKey");
            event.set(e1, "value", "someValue");

            ep.insert(e1);
            rulesFired = ksession.fireAllRules();
            assertEquals(1, rulesFired);

            // let some time be spent
            Thread.sleep(1000);

            // check both events are still in memory as we are running in CLOUD mode
            assertEquals(2, ep.getFactCount());
        } finally {
            ksession.dispose();
        }
    }

    @Test
    public void testThrowsWhenCreatingKieBaseUsingWindowsInCloudMode() {
        final String drl =
            "declare TestEvent\n" +
            "    @role( event )\n" +
            "    name : String\n" +
            "end\n" +
            "\n" +
            "rule R when\n" +
            "        TestEvent ( name == \"EventA\" ) over window:time( 1s ) from entry-point EventStream\n" +
            "    then\n" +
            "        // consequence\n" +
            "end\n";

        try {
            KieBaseUtil.getKieBaseFromKieModuleFromDrl("cep-esp-test", kieBaseTestConfiguration, drl);
            fail("Should throw a RuntimeException because the CLOUD kbase is trying to use features only available in STREAM mode");
        } catch (final Exception e) {
        }
    }

    @Test
    public void testTemporalQuery() {
        // BZ-967441
        final String drl =
                 "package org.drools.compiler.integrationtests;\n" +
                 "\n" +
                 "import " + CepEspTest.TestEvent.class.getCanonicalName() + ";\n" +
                 "\n" +
                 "declare TestEvent\n" +
                 "    @role( event )\n" +
                 "end\n" +
                 "\n" +
                 "query EventsBeforeNineSeconds\n" +
                 "   $event : TestEvent() from entry-point EStream\n" +
                 "   $result : TestEvent ( this after [0s, 9s] $event) from entry-point EventStream\n" +
                 "end\n";

        final KieBase kbase = KieBaseUtil.getKieBaseFromKieModuleFromDrl("cep-esp-test", kieBaseTestConfiguration, drl);
        final KieSession ksession = kbase.newKieSession(KieSessionTestConfiguration.STATEFUL_PSEUDO.getKieSessionConfiguration(), null);
        try {
            final SessionPseudoClock clock = ksession.getSessionClock();

            final EntryPoint ePoint = ksession.getEntryPoint("EStream");
            final EntryPoint entryPoint = ksession.getEntryPoint("EventStream");

            ePoint.insert(new CepEspTest.TestEvent("zero"));
            entryPoint.insert(new CepEspTest.TestEvent("one"));
            clock.advanceTime(10, TimeUnit.SECONDS);
            entryPoint.insert(new CepEspTest.TestEvent("two"));
            clock.advanceTime(10, TimeUnit.SECONDS);
            entryPoint.insert(new CepEspTest.TestEvent("three"));
            final QueryResults results = ksession.getQueryResults("EventsBeforeNineSeconds");
            assertEquals(1, results.size());
        } finally {
            ksession.dispose();
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="rc_notification_send">发来了</string>
    <string name="rc_notification_msg">条消息</string>
    <string name="rc_notification_contact">个联系人</string>
    <string name="rc_notification_ticker_text">您有了一条新消息</string>
</resources>


text:
/**
* Returns a uniformly distributed random point from anywhere within this Circle.
*
* @method Phaser.Circle#random
* @param {Phaser.Point|object} [out] - A Phaser.Point, or any object with public x/y properties, that the values will be set in.
*     If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an existing object.
* @return {Phaser.Point} An object containing the random point in its `x` and `y` properties.
*/
var Random = function (circle, out)
{
    if (out === undefined) { out = { x: 0, y: 0 }; }

    var t = 2 * Math.PI * Math.random();
    var u = Math.random() + Math.random();
    var r = (u > 1) ? 2 - u : u;
    var x = r * Math.cos(t);
    var y = r * Math.sin(t);

    out.x = circle.x + (x * circle.radius);
    out.y = circle.y + (y * circle.radius);

    return out;
};

module.exports = Random;