text:
declare module "awayjs-stagegl/lib/aglsl/AGALTokenizer" {
	import ByteArray = require("awayjs-core/lib/utils/ByteArray");
	import Description = require("awayjs-stagegl/lib/aglsl/Description");
	class AGALTokenizer {
	    constructor();
	    decribeAGALByteArray(bytes: ByteArray): Description;
	    readReg(s: any, mh: any, desc: any, bytes: any): void;
	}
	export = AGALTokenizer;

}

declare module "awayjs-stagegl/lib/aglsl/AGLSLParser" {
	import Description = require("awayjs-stagegl/lib/aglsl/Description");
	class AGLSLParser {
	    parse(desc: Description): string;
	    regtostring(regtype: number, regnum: number, desc: Description, tag: any): string;
	    sourcetostring(s: any, subline: any, dwm: any, isscalar: any, desc: any, tag: any): string;
	}
	export = AGLSLParser;

}

declare module "awayjs-stagegl/lib/aglsl/Description" {
	import Header = require("awayjs-stagegl/lib/aglsl/Header");
	import Token = require("awayjs-stagegl/lib/aglsl/Token");
	class Description {
	    regread: any[];
	    regwrite: any[];
	    hasindirect: boolean;
	    writedepth: boolean;
	    hasmatrix: boolean;
	    samplers: any[];
	    tokens: Token[];
	    header: Header;
	    constructor();
	}
	export = Description;

}

declare module "awayjs-stagegl/lib/aglsl/Destination" {
	class Destination {
	    mask: number;
	    regnum: number;
	    regtype: number;
	    dim: number;
	    constructor();
	}
	export = Destination;

}

declare module "awayjs-stagegl/lib/aglsl/Header" {
	class Header {
	    progid: number;
	    version: number;
	    type: string;
	    constructor();
	}
	export = Header;

}

declare module "awayjs-stagegl/lib/aglsl/Mapping" {
	import OpLUT = require("awayjs-stagegl/lib/aglsl/OpLUT");
	class Mapping {
	    static agal2glsllut: Array<OpLUT>;
	    constructor(include?: OpLUT);
	}
	export = Mapping;

}

declare module "awayjs-stagegl/lib/aglsl/OpLUT" {
	class OpLUT {
	    s: string;
	    flags: number;
	    dest: boolean;
	    a: boolean;
	    b: boolean;
	    matrixwidth: number;
	    matrixheight: number;
	    ndwm: boolean;
	    scalar: boolean;
	    dm: boolean;
	    lod: boolean;
	    constructor(s: string, flags: number, dest: boolean, a: boolean, b: boolean, matrixwidth: number, matrixheight: number, ndwm: boolean, scaler: boolean, dm: boolean, lod: boolean);
	}
	export = OpLUT;

}

declare module "awayjs-stagegl/lib/aglsl/Sampler" {
	class Sampler {
	    lodbias: number;
	    dim: number;
	    readmode: number;
	    special: number;
	    wrap: number;
	    mipmap: number;
	    filter: number;
	    constructor();
	}
	export = Sampler;

}

declare module "awayjs-stagegl/lib/aglsl/Token" {
	import Destination = require("awayjs-stagegl/lib/aglsl/Destination");
	class Token {
	    dest: Destination;
	    opcode: number;
	    a: Destination;
	    b: Destination;
	    constructor();
	}
	export = Token;

}

declare module "awayjs-stagegl/lib/aglsl/assembler/AGALMiniAssembler" {
	import Part = require("awayjs-stagegl/lib/aglsl/assembler/Part");
	class AGALMiniAssembler {
	    r: Object;
	    cur: Part;
	    constructor();
	    assemble(source: string, ext_part?: any, ext_version?: any): Object;
	    private processLine(line, linenr);
	    emitHeader(pr: Part): void;
	    emitOpcode(pr: Part, opcode: any): void;
	    emitZeroDword(pr: Part): void;
	    emitZeroQword(pr: any): void;
	    emitDest(pr: any, token: any, opdest: any): boolean;
	    stringToMask(s: string): number;
	    stringToSwizzle(s: any): number;
	    emitSampler(pr: Part, token: any, opsrc: any, opts: any): boolean;
	    emitSource(pr: any, token: any, opsrc: any): boolean;
	    addHeader(partname: any, version: any): void;
	}
	export = AGALMiniAssembler;

}

declare module "awayjs-stagegl/lib/aglsl/assembler/FS" {
	class FS {
	    format: string;
	    size: number;
	}
	export = FS;

}

declare module "awayjs-stagegl/lib/aglsl/assembler/Flags" {
	class Flags {
	    simple: boolean;
	    horizontal: boolean;
	    fragonly: boolean;
	    matrix: boolean;
	}
	export = Flags;

}

declare module "awayjs-stagegl/lib/aglsl/assembler/Opcode" {
	import Flags = require("awayjs-stagegl/lib/aglsl/assembler/Flags");
	import FS = require("awayjs-stagegl/lib/aglsl/assembler/FS");
	/**
	 *
	 */
	class Opcode {
	    dest: string;
	    a: FS;
	    b: FS;
	    opcode: number;
	    flags: Flags;
	    constructor(dest: string, aformat: string, asize: number, bformat: string, bsize: number, opcode: number, simple: boolean, horizontal: boolean, fragonly: boolean, matrix: boolean);
	}
	export = Opcode;

}

declare module "awayjs-stagegl/lib/aglsl/assembler/OpcodeMap" {
	class OpcodeMap {
	    private static _map;
	    static map: Object[];
	    constructor();
	}
	export = OpcodeMap;

}

declare module "awayjs-stagegl/lib/aglsl/assembler/Part" {
	import ByteArray = require("awayjs-core/lib/utils/ByteArray");
	class Part {
	    name: string;
	    version: number;
	    data: ByteArray;
	    constructor(name?: string, version?: number);
	}
	export = Part;

}

declare module "awayjs-stagegl/lib/aglsl/assembler/RegMap" {
	class RegMap {
	    private static _map;
	    static map: any[];
	    constructor();
	}
	export = RegMap;

}

declare module "awayjs-stagegl/lib/aglsl/assembler/Sampler" {
	class Sampler {
	    shift: number;
	    mask: number;
	    value: number;
	    constructor(shift: number, mask: number, value: number);
	}
	export = Sampler;

}

declare module "awayjs-stagegl/lib/aglsl/assembler/SamplerMap" {
	class SamplerMap {
	    private static _map;
	    static map: Object[];
	    constructor();
	}
	export = SamplerMap;

}

declare module "awayjs-stagegl/lib/base/ContextGLBlendFactor" {
	class ContextGLBlendFactor {
	    static DESTINATION_ALPHA: string;
	    static DESTINATION_COLOR: string;
	    static ONE: string;
	    static ONE_MINUS_DESTINATION_ALPHA: string;
	    static ONE_MINUS_DESTINATION_COLOR: string;
	    static ONE_MINUS_SOURCE_ALPHA: string;
	    static ONE_MINUS_SOURCE_COLOR: string;
	    static SOURCE_ALPHA: string;
	    static SOURCE_COLOR: string;
	    static ZERO: string;
	}
	export = ContextGLBlendFactor;

}

declare module "awayjs-stagegl/lib/base/ContextGLClearMask" {
	class ContextGLClearMask {
	    static COLOR: number;
	    static DEPTH: number;
	    static STENCIL: number;
	    static ALL: number;
	}
	export = ContextGLClearMask;

}

declare module "awayjs-stagegl/lib/base/ContextGLCompareMode" {
	class ContextGLCompareMode {
	    static ALWAYS: string;
	    static EQUAL: string;
	    static GREATER: string;
	    static GREATER_EQUAL: string;
	    static LESS: string;
	    static LESS_EQUAL: string;
	    static NEVER: string;
	    static NOT_EQUAL: string;
	}
	export = ContextGLCompareMode;

}

declare module "awayjs-stagegl/lib/base/ContextGLMipFilter" {
	class ContextGLMipFilter {
	    static MIPLINEAR: string;
	    static MIPNEAREST: string;
	    static MIPNONE: string;
	}
	export = ContextGLMipFilter;

}

declare module "awayjs-stagegl/lib/base/ContextGLProfile" {
	class ContextGLProfile {
	    static BASELINE: string;
	    static BASELINE_CONSTRAINED: string;
	    static BASELINE_EXTENDED: string;
	}
	export = ContextGLProfile;

}

declare module "awayjs-stagegl/lib/base/ContextGLProgramType" {
	class ContextGLProgramType {
	    static FRAGMENT: string;
	    static VERTEX: string;
	}
	export = ContextGLProgramType;

}

declare module "awayjs-stagegl/lib/base/ContextGLStencilAction" {
	class ContextGLStencilAction {
	    static DECREMENT_SATURATE: string;
	    static DECREMENT_WRAP: string;
	    static INCREMENT_SATURATE: string;
	    static INCREMENT_WRAP: string;
	    static INVERT: string;
	    static KEEP: string;
	    static SET: string;
	    static ZERO: string;
	}
	export = ContextGLStencilAction;

}

declare module "awayjs-stagegl/lib/base/ContextGLTextureFilter" {
	class ContextGLTextureFilter {
	    static LINEAR: string;
	    static NEAREST: string;
	}
	export = ContextGLTextureFilter;

}

declare module "awayjs-stagegl/lib/base/ContextGLTextureFormat" {
	class ContextGLTextureFormat {
	    static BGRA: string;
	    static BGRA_PACKED: string;
	    static BGR_PACKED: string;
	    static COMPRESSED: string;
	    static COMPRESSED_ALPHA: string;
	}
	export = ContextGLTextureFormat;

}

declare module "awayjs-stagegl/lib/base/ContextGLTriangleFace" {
	class ContextGLTriangleFace {
	    static BACK: string;
	    static FRONT: string;
	    static FRONT_AND_BACK: string;
	    static NONE: string;
	}
	export = ContextGLTriangleFace;

}

declare module "awayjs-stagegl/lib/base/ContextGLVertexBufferFormat" {
	class ContextGLVertexBufferFormat {
	    static BYTES_4: string;
	    static FLOAT_1: string;
	    static FLOAT_2: string;
	    static FLOAT_3: string;
	    static FLOAT_4: string;
	}
	export = ContextGLVertexBufferFormat;

}

declare module "awayjs-stagegl/lib/base/ContextGLWrapMode" {
	class ContextGLWrapMode {
	    static CLAMP: string;
	    static REPEAT: string;
	}
	export = ContextGLWrapMode;

}

declare module "awayjs-stagegl/lib/base/ContextMode" {
	class ContextMode {
	    static AUTO: string;
	    static WEBGL: string;
	    static FLASH: string;
	    static NATIVE: string;
	}
	export = ContextMode;

}

declare module "awayjs-stagegl/lib/base/ContextStage3D" {
	import BitmapData = require("awayjs-core/lib/data/BitmapData");
	import Matrix3D = require("awayjs-core/lib/geom/Matrix3D");
	import Rectangle = require("awayjs-core/lib/geom/Rectangle");
	import Sampler = require("awayjs-stagegl/lib/aglsl/Sampler");
	import CubeTextureFlash = require("awayjs-stagegl/lib/base/CubeTextureFlash");
	import IContextGL = require("awayjs-stagegl/lib/base/IContextGL");
	import IndexBufferFlash = require("awayjs-stagegl/lib/base/IndexBufferFlash");
	import ProgramFlash = require("awayjs-stagegl/lib/base/ProgramFlash");
	import TextureFlash = require("awayjs-stagegl/lib/base/TextureFlash");
	import ResourceBaseFlash = require("awayjs-stagegl/lib/base/ResourceBaseFlash");
	import VertexBufferFlash = require("awayjs-stagegl/lib/base/VertexBufferFlash");
	class ContextStage3D implements IContextGL {
	    static contexts: Object;
	    static maxvertexconstants: number;
	    static maxfragconstants: number;
	    static maxtemp: number;
	    static maxstreams: number;
	    static maxtextures: number;
	    static defaultsampler: Sampler;
	    _iDriverInfo: any;
	    private _container;
	    private _width;
	    private _height;
	    private _cmdStream;
	    private _errorCheckingEnabled;
	    private _resources;
	    private _oldCanvas;
	    private _oldParent;
	    static debug: boolean;
	    static logStream: boolean;
	    _iCallback: (context: IContextGL) => void;
	    container: HTMLElement;
	    driverInfo: any;
	    errorCheckingEnabled: boolean;
	    constructor(container: HTMLCanvasElement, callback: (context: IContextGL) => void, include?: Sampler);
	    _iAddResource(resource: ResourceBaseFlash): void;
	    _iRemoveResource(resource: ResourceBaseFlash): void;
	    createTexture(width: number, height: number, format: string, optimizeForRenderToTexture: boolean, streamingLevels?: number): TextureFlash;
	    createCubeTexture(size: number, format: string, optimizeForRenderToTexture: boolean, streamingLevels?: number): CubeTextureFlash;
	    setTextureAt(sampler: number, texture: ResourceBaseFlash): void;
	    setSamplerStateAt(sampler: number, wrap: string, filter: string, mipfilter: string): void;
	    setStencilActions(triangleFace?: string, compareMode?: string, actionOnBothPass?: string, actionOnDepthFail?: string, actionOnDepthPassStencilFail?: string, coordinateSystem?: string): void;
	    setStencilReferenceValue(referenceValue: number, readMask?: number, writeMask?: number): void;
	    setCulling(triangleFaceToCull: string, coordinateSystem?: string): void;
	    drawTriangles(indexBuffer: IndexBufferFlash, firstIndex?: number, numTriangles?: number): void;
	    setProgramConstantsFromMatrix(programType: string, firstRegister: number, matrix: Matrix3D, transposedMatrix?: boolean): void;
	    setProgramConstantsFromArray(programType: string, firstRegister: number, data: number[], numRegisters?: number): void;
	    setProgram(program: ProgramFlash): void;
	    present(): void;
	    clear(red?: number, green?: number, blue?: number, alpha?: number, depth?: number, stencil?: number, mask?: number): void;
	    createProgram(): ProgramFlash;
	    createVertexBuffer(numVertices: number, data32PerVertex: number): VertexBufferFlash;
	    createIndexBuffer(numIndices: number): IndexBufferFlash;
	    configureBackBuffer(width: number, height: number, antiAlias: number, enableDepthAndStencil?: boolean): void;
	    drawToBitmapData(destination: BitmapData): void;
	    setVertexBufferAt(index: number, buffer: VertexBufferFlash, bufferOffset?: number, format?: string): void;
	    setColorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
	    setBlendFactors(sourceFactor: string, destinationFactor: string): void;
	    setRenderToTexture(target: ResourceBaseFlash, enableDepthAndStencil?: boolean, antiAlias?: number, surfaceSelector?: number): void;
	    setRenderToBackBuffer(): void;
	    setScissorRectangle(rectangle: Rectangle): void;
	    setDepthTest(depthMask: boolean, passCompareMode: string): void;
	    dispose(): void;
	    addStream(stream: string): void;
	    execute(): number;
	}
	export = ContextStage3D;

}

declare module "awayjs-stagegl/lib/base/ContextWebGL" {
	import BitmapData = require("awayjs-core/lib/data/BitmapData");
	import Matrix3D = require("awayjs-core/lib/geom/Matrix3D");
	import Rectangle = require("awayjs-core/lib/geom/Rectangle");
	import CubeTextureWebGL = require("awayjs-stagegl/lib/base/CubeTextureWebGL");
	import IContextGL = require("awayjs-stagegl/lib/base/IContextGL");
	import IndexBufferWebGL = require("awayjs-stagegl/lib/base/IndexBufferWebGL");
	import ProgramWebGL = require("awayjs-stagegl/lib/base/ProgramWebGL");
	import TextureBaseWebGL = require("awayjs-stagegl/lib/base/TextureBaseWebGL");
	import TextureWebGL = require("awayjs-stagegl/lib/base/TextureWebGL");
	import VertexBufferWebGL = require("awayjs-stagegl/lib/base/VertexBufferWebGL");
	class ContextWebGL implements IContextGL {
	    private _blendFactorDictionary;
	    private _compareModeDictionary;
	    private _stencilActionDictionary;
	    private _textureIndexDictionary;
	    private _textureTypeDictionary;
	    private _wrapDictionary;
	    private _filterDictionary;
	    private _mipmapFilterDictionary;
	    private _uniformLocationNameDictionary;
	    private _vertexBufferDimensionDictionary;
	    private _container;
	    private _width;
	    private _height;
	    private _drawing;
	    private _blendEnabled;
	    private _blendSourceFactor;
	    private _blendDestinationFactor;
	    private _standardDerivatives;
	    private _indexBufferList;
	    private _vertexBufferList;
	    private _textureList;
	    private _programList;
	    private _samplerStates;
	    static MAX_SAMPLERS: number;
	    _gl: WebGLRenderingContext;
	    _currentProgram: ProgramWebGL;
	    private _activeTexture;
	    private _stencilCompareMode;
	    private _stencilCompareModeBack;
	    private _stencilCompareModeFront;
	    private _stencilReferenceValue;
	    private _stencilReadMask;
	    private _separateStencil;
	    container: HTMLElement;
	    standardDerivatives: boolean;
	    constructor(canvas: HTMLCanvasElement);
	    gl(): WebGLRenderingContext;
	    clear(red?: number, green?: number, blue?: number, alpha?: number, depth?: number, stencil?: number, mask?: number): void;
	    configureBackBuffer(width: number, height: number, antiAlias: number, enableDepthAndStencil?: boolean): void;
	    createCubeTexture(size: number, format: string, optimizeForRenderToTexture: boolean, streamingLevels?: number): CubeTextureWebGL;
	    createIndexBuffer(numIndices: number): IndexBufferWebGL;
	    createProgram(): ProgramWebGL;
	    createTexture(width: number, height: number, format: string, optimizeForRenderToTexture: boolean, streamingLevels?: number): TextureWebGL;
	    createVertexBuffer(numVertices: number, data32PerVertex: number): VertexBufferWebGL;
	    dispose(): void;
	    drawToBitmapData(destination: BitmapData): void;
	    drawTriangles(indexBuffer: IndexBufferWebGL, firstIndex?: number, numTriangles?: number): void;
	    present(): void;
	    setBlendFactors(sourceFactor: string, destinationFactor: string): void;
	    setColorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
	    setCulling(triangleFaceToCull: string, coordinateSystem?: string): void;
	    setDepthTest(depthMask: boolean, passCompareMode: string): void;
	    setStencilActions(triangleFace?: string, compareMode?: string, actionOnBothPass?: string, actionOnDepthFail?: string, actionOnDepthPassStencilFail?: string, coordinateSystem?: string): void;
	    setStencilReferenceValue(referenceValue: number, readMask: number, writeMask: number): void;
	    setProgram(program: ProgramWebGL): void;
	    setProgramConstantsFromMatrix(programType: string, firstRegister: number, matrix: Matrix3D, transposedMatrix?: boolean): void;
	    static modulo: number;
	    setProgramConstantsFromArray(programType: string, firstRegister: number, data: number[], numRegisters?: number): void;
	    setScissorRectangle(rectangle: Rectangle): void;
	    setTextureAt(sampler: number, texture: TextureBaseWebGL): void;
	    setSamplerStateAt(sampler: number, wrap: string, filter: string, mipfilter: string): void;
	    setVertexBufferAt(index: number, buffer: VertexBufferWebGL, bufferOffset?: number, format?: string): void;
	    setRenderToTexture(target: TextureBaseWebGL, enableDepthAndStencil?: boolean, antiAlias?: number, surfaceSelector?: number): void;
	    setRenderToBackBuffer(): void;
	    private updateBlendStatus();
	    private translateTriangleFace(triangleFace, coordinateSystem);
	}
	export = ContextWebGL;

}

declare module "awayjs-stagegl/lib/base/CubeTextureFlash" {
	import BitmapData = require("awayjs-core/lib/data/BitmapData");
	import ByteArray = require("awayjs-core/lib/utils/ByteArray");
	import ContextStage3D = require("awayjs-stagegl/lib/base/ContextStage3D");
	import ICubeTexture = require("awayjs-stagegl/lib/base/ICubeTexture");
	import ResourceBaseFlash = require("awayjs-stagegl/lib/base/ResourceBaseFlash");
	class CubeTextureFlash extends ResourceBaseFlash implements ICubeTexture {
	    private _context;
	    private _size;
	    size: number;
	    constructor(context: ContextStage3D, size: number, format: string, forRTT: boolean, streaming?: boolean);
	    dispose(): void;
	    uploadFromData(bitmapData: BitmapData, side: number, miplevel?: number): any;
	    uploadFromData(image: HTMLImageElement, side: number, miplevel?: number): any;
	    uploadCompressedTextureFromByteArray(data: ByteArray, byteArrayOffset: number, async?: boolean): void;
	}
	export = CubeTextureFlash;

}

declare module "awayjs-stagegl/lib/base/CubeTextureWebGL" {
	import BitmapData = require("awayjs-core/lib/data/BitmapData");
	import ByteArray = require("awayjs-core/lib/utils/ByteArray");
	import ICubeTexture = require("awayjs-stagegl/lib/base/ICubeTexture");
	import TextureBaseWebGL = require("awayjs-stagegl/lib/base/TextureBaseWebGL");
	class CubeTextureWebGL extends TextureBaseWebGL implements ICubeTexture {
	    private _textureSelectorDictionary;
	    textureType: string;
	    private _texture;
	    private _size;
	    constructor(gl: WebGLRenderingContext, size: number);
	    dispose(): void;
	    uploadFromData(bitmapData: BitmapData, side: number, miplevel?: number): any;
	    uploadFromData(image: HTMLImageElement, side: number, miplevel?: number): any;
	    uploadCompressedTextureFromByteArray(data: ByteArray, byteArrayOffset: number, async?: boolean): void;
	    size: number;
	    glTexture: WebGLTexture;
	}
	export = CubeTextureWebGL;

}

declare module "awayjs-stagegl/lib/base/IContextGL" {
	import BitmapData = require("awayjs-core/lib/data/BitmapData");
	import Matrix3D = require("awayjs-core/lib/geom/Matrix3D");
	import Rectangle = require("awayjs-core/lib/geom/Rectangle");
	import ICubeTexture = require("awayjs-stagegl/lib/base/ICubeTexture");
	import IIndexBuffer = require("awayjs-stagegl/lib/base/IIndexBuffer");
	import IProgram = require("awayjs-stagegl/lib/base/IProgram");
	import ITexture = require("awayjs-stagegl/lib/base/ITexture");
	import ITextureBase = require("awayjs-stagegl/lib/base/ITextureBase");
	import IVertexBuffer = require("awayjs-stagegl/lib/base/IVertexBuffer");
	interface IContextGL {
	    container: HTMLElement;
	    clear(red?: number, green?: number, blue?: number, alpha?: number, depth?: number, stencil?: number, mask?: number): any;
	    configureBackBuffer(width: number, height: number, antiAlias: number, enableDepthAndStencil?: boolean): any;
	    createCubeTexture(size: number, format: string, optimizeForRenderToTexture: boolean, streamingLevels?: number): ICubeTexture;
	    createIndexBuffer(numIndices: number): IIndexBuffer;
	    createProgram(): IProgram;
	    createTexture(width: number, height: number, format: string, optimizeForRenderToTexture: boolean, streamingLevels?: number): ITexture;
	    createVertexBuffer(numVertices: number, data32PerVertex: number): IVertexBuffer;
	    dispose(): any;
	    drawToBitmapData(destination: BitmapData): any;
	    drawTriangles(indexBuffer: IIndexBuffer, firstIndex?: number, numTriangles?: number): any;
	    present(): any;
	    setBlendFactors(sourceFactor: string, destinationFactor: string): any;
	    setColorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): any;
	    setStencilActions(triangleFace?: string, compareMode?: string, actionOnBothPass?: string, actionOnDepthFail?: string, actionOnDepthPassStencilFail?: string, coordinateSystem?: string): any;
	    setStencilReferenceValue(referenceValue: number, readMask?: number, writeMask?: number): any;
	    setCulling(triangleFaceToCull: string, coordinateSystem?: string): any;
	    setDepthTest(depthMask: boolean, passCompareMode: string): any;
	    setProgram(program: IProgram): any;
	    setProgramConstantsFromMatrix(programType: string, firstRegister: number, matrix: Matrix3D, transposedMatrix?: boolean): any;
	    setProgramConstantsFromArray(programType: string, firstRegister: number, data: number[], numRegisters?: number): any;
	    setSamplerStateAt(sampler: number, wrap: string, filter: string, mipfilter: string): any;
	    setScissorRectangle(rectangle: Rectangle): any;
	    setTextureAt(sampler: number, texture: ITextureBase): any;
	    setVertexBufferAt(index: number, buffer: IVertexBuffer, bufferOffset?: number, format?: string): any;
	    setRenderToTexture(target: ITextureBase, enableDepthAndStencil?: boolean, antiAlias?: number, surfaceSelector?: number): any;
	    setRenderToBackBuffer(): any;
	}
	export = IContextGL;

}

declare module "awayjs-stagegl/lib/base/ICubeTexture" {
	import BitmapData = require("awayjs-core/lib/data/BitmapData");
	import ByteArray = require("awayjs-core/lib/utils/ByteArray");
	import ITextureBase = require("awayjs-stagegl/lib/base/ITextureBase");
	interface ICubeTexture extends ITextureBase {
	    size: number;
	    uploadFromData(bitmapData: BitmapData, side: number, miplevel?: number): any;
	    uploadFromData(image: HTMLImageElement, side: number, miplevel?: number): any;
	    uploadCompressedTextureFromByteArray(data: ByteArray, byteArrayOffset: number, async: boolean): any;
	}
	export = ICubeTexture;

}

declare module "awayjs-stagegl/lib/base/IIndexBuffer" {
	interface IIndexBuffer {
	    numIndices: number;
	    uploadFromArray(data: number[], startOffset: number, count: number): any;
	    dispose(): any;
	}
	export = IIndexBuffer;

}

declare module "awayjs-stagegl/lib/base/IProgram" {
	import ByteArray = require("awayjs-core/lib/utils/ByteArray");
	interface IProgram {
	    upload(vertexProgram: ByteArray, fragmentProgram: ByteArray): any;
	    dispose(): any;
	}
	export = IProgram;

}

declare module "awayjs-stagegl/lib/base/ITexture" {
	import BitmapData = require("awayjs-core/lib/data/BitmapData");
	import ITextureBase = require("awayjs-stagegl/lib/base/ITextureBase");
	interface ITexture extends ITextureBase {
	    width: number;
	    height: number;
	    uploadFromData(bitmapData: BitmapData, miplevel?: number): any;
	    uploadFromData(image: HTMLImageElement, miplevel?: number): any;
	}
	export = ITexture;

}

declare module "awayjs-stagegl/lib/base/ITextureBase" {
	interface ITextureBase {
	    dispose(): any;
	}
	export = ITextureBase;

}

declare module "awayjs-stagegl/lib/base/IVertexBuffer" {
	interface IVertexBuffer {
	    numVertices: number;
	    data32PerVertex: number;
	    uploadFromArray(data: number[], startVertex: number, numVertices: number): any;
	    dispose(): any;
	}
	export = IVertexBuffer;

}

declare module "awayjs-stagegl/lib/base/IndexBufferFlash" {
	import ContextStage3D = require("awayjs-stagegl/lib/base/ContextStage3D");
	import IIndexBuffer = require("awayjs-stagegl/lib/base/IIndexBuffer");
	import ResourceBaseFlash = require("awayjs-stagegl/lib/base/ResourceBaseFlash");
	class IndexBufferFlash extends ResourceBaseFlash implements IIndexBuffer {
	    private _context;
	    private _numIndices;
	    constructor(context: ContextStage3D, numIndices: number);
	    uploadFromArray(data: number[], startOffset: number, count: number): void;
	    dispose(): void;
	    numIndices: number;
	}
	export = IndexBufferFlash;

}

declare module "awayjs-stagegl/lib/base/IndexBufferWebGL" {
	import IIndexBuffer = require("awayjs-stagegl/lib/base/IIndexBuffer");
	class IndexBufferWebGL implements IIndexBuffer {
	    private _gl;
	    private _numIndices;
	    private _buffer;
	    constructor(gl: WebGLRenderingContext, numIndices: number);
	    uploadFromArray(data: number[], startOffset: number, count: number): void;
	    dispose(): void;
	    numIndices: number;
	    glBuffer: WebGLBuffer;
	}
	export = IndexBufferWebGL;

}

declare module "awayjs-stagegl/lib/base/OpCodes" {
	class OpCodes {
	    static trueValue: number;
	    static falseValue: number;
	    static intMask: number;
	    static drawTriangles: number;
	    static setProgramConstant: number;
	    static setProgram: number;
	    static present: number;
	    static clear: number;
	    static initProgram: number;
	    static initVertexBuffer: number;
	    static initIndexBuffer: number;
	    static configureBackBuffer: number;
	    static uploadArrayIndexBuffer: number;
	    static uploadArrayVertexBuffer: number;
	    static uploadAGALBytesProgram: number;
	    static setVertexBufferAt: number;
	    static uploadBytesIndexBuffer: number;
	    static uploadBytesVertexBuffer: number;
	    static setColorMask: number;
	    static setDepthTest: number;
	    static disposeProgram: number;
	    static disposeContext: number;
	    static disposeVertexBuffer: number;
	    static disposeIndexBuffer: number;
	    static initTexture: number;
	    static setTextureAt: number;
	    static uploadBytesTexture: number;
	    static disposeTexture: number;
	    static setCulling: number;
	    static setScissorRect: number;
	    static clearScissorRect: number;
	    static setBlendFactors: number;
	    static setRenderToTexture: number;
	    static clearTextureAt: number;
	    static clearVertexBufferAt: number;
	    static setStencilActions: number;
	    static setStencilReferenceValue: number;
	    static initCubeTexture: number;
	    static disposeCubeTexture: number;
	    static uploadBytesCubeTexture: number;
	    static clearRenderToTexture: number;
	    static enableErrorChecking: number;
	}
	export = OpCodes;

}

declare module "awayjs-stagegl/lib/base/ProgramFlash" {
	import ByteArray = require("awayjs-core/lib/utils/ByteArray");
	import ContextStage3D = require("awayjs-stagegl/lib/base/ContextStage3D");
	import IProgram = require("awayjs-stagegl/lib/base/IProgram");
	import ResourceBaseFlash = require("awayjs-stagegl/lib/base/ResourceBaseFlash");
	class ProgramFlash extends ResourceBaseFlash implements IProgram {
	    private _context;
	    constructor(context: ContextStage3D);
	    upload(vertexProgram: ByteArray, fragmentProgram: ByteArray): void;
	    dispose(): void;
	}
	export = ProgramFlash;

}

declare module "awayjs-stagegl/lib/base/ProgramWebGL" {
	import ByteArray = require("awayjs-core/lib/utils/ByteArray");
	import IProgram = require("awayjs-stagegl/lib/base/IProgram");
	class ProgramWebGL implements IProgram {
	    private static _tokenizer;
	    private static _aglslParser;
	    private _gl;
	    private _program;
	    private _vertexShader;
	    private _fragmentShader;
	    constructor(gl: WebGLRenderingContext);
	    upload(vertexProgram: ByteArray, fragmentProgram: ByteArray): void;
	    dispose(): void;
	    focusProgram(): void;
	    glProgram: WebGLProgram;
	}
	export = ProgramWebGL;

}

declare module "awayjs-stagegl/lib/base/ResourceBaseFlash" {
	class ResourceBaseFlash {
	    _pId: number;
	    id: number;
	    dispose(): void;
	}
	export = ResourceBaseFlash;

}

declare module "awayjs-stagegl/lib/base/SamplerState" {
	class SamplerState {
	    type: number;
	    wrap: number;
	    filter: number;
	    mipfilter: number;
	}
	export = SamplerState;

}

declare module "awayjs-stagegl/lib/base/Stage" {
	import Rectangle = require("awayjs-core/lib/geom/Rectangle");
	import EventDispatcher = require("awayjs-core/lib/events/EventDispatcher");
	import CubeTextureBase = require("awayjs-core/lib/textures/CubeTextureBase");
	import RenderTexture = require("awayjs-core/lib/textures/RenderTexture");
	import Texture2DBase = require("awayjs-core/lib/textures/Texture2DBase");
	import TextureBase = require("awayjs-core/lib/textures/TextureBase");
	import IContextGL = require("awayjs-stagegl/lib/base/IContextGL");
	import IIndexBuffer = require("awayjs-stagegl/lib/base/IIndexBuffer");
	import ITextureBase = require("awayjs-stagegl/lib/base/ITextureBase");
	import IndexData = require("awayjs-stagegl/lib/pool/IndexData");
	import ProgramData = require("awayjs-stagegl/lib/pool/ProgramData");
	import VertexData = require("awayjs-stagegl/lib/pool/VertexData");
	import StageManager = require("awayjs-stagegl/lib/managers/StageManager");
	/**
	 * Stage provides a proxy class to handle the creation and attachment of the Context
	 * (and in turn the back buffer) it uses. Stage should never be created directly,
	 * but requested through StageManager.
	 *
	 * @see away.managers.StageManager
	 *
	 */
	class Stage extends EventDispatcher {
	    private _programData;
	    private _texturePool;
	    private _programDataPool;
	    private _context;
	    private _container;
	    private _width;
	    private _height;
	    private _x;
	    private _y;
	    private _stageIndex;
	    private _usesSoftwareRendering;
	    private _profile;
	    private _stageManager;
	    private _antiAlias;
	    private _enableDepthAndStencil;
	    private _contextRequested;
	    private _renderTarget;
	    private _renderSurfaceSelector;
	    private _scissorRect;
	    private _color;
	    private _backBufferDirty;
	    private _viewPort;
	    private _enterFrame;
	    private _exitFrame;
	    private _viewportUpdated;
	    private _viewportDirty;
	    private _bufferClear;
	    private _initialised;
	    constructor(container: HTMLCanvasElement, stageIndex: number, stageManager: StageManager, forceSoftware?: boolean, profile?: string);
	    getProgramData(vertexString: string, fragmentString: string): ProgramData;
	    setRenderTarget(target: TextureBase, enableDepthAndStencil?: boolean, surfaceSelector?: number): void;
	    getRenderTexture(textureProxy: RenderTexture): ITextureBase;
	    /**
	     * Assigns an attribute stream
	     *
	     * @param index The attribute stream index for the vertex shader
	     * @param buffer
	     * @param offset
	     * @param stride
	     * @param format
	     */
	    activateBuffer(index: number, buffer: VertexData, offset: number, format: string): void;
	    disposeVertexData(buffer: VertexData): void;
	    activateRenderTexture(index: number, textureProxy: RenderTexture): void;
	    activateTexture(index: number, textureProxy: Texture2DBase, repeat: boolean, smooth: boolean, mipmap: boolean): void;
	    activateCubeTexture(index: number, textureProxy: CubeTextureBase, smooth: boolean, mipmap: boolean): void;
	    /**
	     * Retrieves the VertexBuffer object that contains triangle indices.
	     * @param context The ContextWeb for which we request the buffer
	     * @return The VertexBuffer object that contains triangle indices.
	     */
	    getIndexBuffer(buffer: IndexData): IIndexBuffer;
	    disposeIndexData(buffer: IndexData): void;
	    /**
	     * Requests a Context object to attach to the managed gl canvas.
	     */
	    requestContext(forceSoftware?: boolean, profile?: string, mode?: string): void;
	    /**
	     * The width of the gl canvas
	     */
	    width: number;
	    /**
	     * The height of the gl canvas
	     */
	    height: number;
	    /**
	     * The x position of the gl canvas
	     */
	    x: number;
	    /**
	     * The y position of the gl canvas
	     */
	    y: number;
	    visible: boolean;
	    container: HTMLElement;
	    /**
	     * The Context object associated with the given stage object.
	     */
	    context: IContextGL;
	    private notifyViewportUpdated();
	    private notifyEnterFrame();
	    private notifyExitFrame();
	    profile: string;
	    /**
	     * Disposes the Stage object, freeing the Context attached to the Stage.
	     */
	    dispose(): void;
	    /**
	     * Configures the back buffer associated with the Stage object.
	     * @param backBufferWidth The width of the backbuffer.
	     * @param backBufferHeight The height of the backbuffer.
	     * @param antiAlias The amount of anti-aliasing to use.
	     * @param enableDepthAndStencil Indicates whether the back buffer contains a depth and stencil buffer.
	     */
	    configureBackBuffer(backBufferWidth: number, backBufferHeight: number, antiAlias: number, enableDepthAndStencil: boolean): void;
	    enableDepthAndStencil: boolean;
	    renderTarget: TextureBase;
	    renderSurfaceSelector: number;
	    clear(): void;
	    /**
	     * Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. Special case for enterframe and exitframe events - will switch StageProxy into automatic render mode.
	     * You can register event listeners on all nodes in the display list for a specific type of event, phase, and priority.
	     *
	     * @param type The type of event.
	     * @param listener The listener function that processes the event.
	     * @param useCapture Determines whether the listener works in the capture phase or the target and bubbling phases. If useCapture is set to true, the listener processes the event only during the capture phase and not in the target or bubbling phase. If useCapture is false, the listener processes the event only during the target or bubbling phase. To listen for the event in all three phases, call addEventListener twice, once with useCapture set to true, then again with useCapture set to false.
	     * @param priority The priority level of the event listener. The priority is designated by a signed 32-bit integer. The higher the number, the higher the priority. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. The default priority is 0.
	     * @param useWeakReference Determines whether the reference to the listener is strong or weak. A strong reference (the default) prevents your listener from being garbage-collected. A weak reference does not.
	     */
	    addEventListener(type: string, listener: Function): void;
	    /**
	     * Removes a listener from the EventDispatcher object. Special case for enterframe and exitframe events - will switch StageProxy out of automatic render mode.
	     * If there is no matching listener registered with the EventDispatcher object, a call to this method has no effect.
	     *
	     * @param type The type of event.
	     * @param listener The listener object to remove.
	     * @param useCapture Specifies whether the listener was registered for the capture phase or the target and bubbling phases. If the listener was registered for both the capture phase and the target and bubbling phases, two calls to removeEventListener() are required to remove both, one call with useCapture() set to true, and another call with useCapture() set to false.
	     */
	    removeEventListener(type: string, listener: Function): void;
	    scissorRect: Rectangle;
	    /**
	     * The index of the Stage which is managed by this instance of StageProxy.
	     */
	    stageIndex: number;
	    /**
	     * Indicates whether the Stage managed by this proxy is running in software mode.
	     * Remember to wait for the CONTEXT_CREATED event before checking this property,
	     * as only then will it be guaranteed to be accurate.
	     */
	    usesSoftwareRendering: boolean;
	    /**
	     * The antiAliasing of the Stage.
	     */
	    antiAlias: number;
	    /**
	     * A viewPort rectangle equivalent of the Stage size and position.
	     */
	    viewPort: Rectangle;
	    /**
	     * The background color of the Stage.
	     */
	    color: number;
	    /**
	     * The freshly cleared state of the backbuffer before any rendering
	     */
	    bufferClear: boolean;
	    registerProgram(programData: ProgramData): void;
	    unRegisterProgram(programData: ProgramData): void;
	    /**
	     * Frees the Context associated with this StageProxy.
	     */
	    private freeContext();
	    /**
	     * The Enter_Frame handler for processing the proxy.ENTER_FRAME and proxy.EXIT_FRAME event handlers.
	     * Typically the proxy.ENTER_FRAME listener would render the layers for this Stage instance.
	     */
	    private onEnterFrame(event);
	    recoverFromDisposal(): boolean;
	    private _callback(context);
	    private _setSamplerState(index, repeat, smooth, mipmap);
	}
	export = Stage;

}

declare module "awayjs-stagegl/lib/base/TextureBaseWebGL" {
	class TextureBaseWebGL {
	    textureType: string;
	    _gl: WebGLRenderingContext;
	    constructor(gl: WebGLRenderingContext);
	    dispose(): void;
	    glTexture: WebGLTexture;
	}
	export = TextureBaseWebGL;

}

declare module "awayjs-stagegl/lib/base/TextureFlash" {
	import BitmapData = require("awayjs-core/lib/data/BitmapData");
	import ContextStage3D = require("awayjs-stagegl/lib/base/ContextStage3D");
	import ITexture = require("awayjs-stagegl/lib/base/ITexture");
	import ResourceBaseFlash = require("awayjs-stagegl/lib/base/ResourceBaseFlash");
	class TextureFlash extends ResourceBaseFlash implements ITexture {
	    private _context;
	    private _width;
	    private _height;
	    width: number;
	    height: number;
	    constructor(context: ContextStage3D, width: number, height: number, format: string, forRTT: boolean, streaming?: boolean);
	    dispose(): void;
	    uploadFromData(bitmapData: BitmapData, miplevel?: number): any;
	    uploadFromData(image: HTMLImageElement, miplevel?: number): any;
	}
	export = TextureFlash;

}

declare module "awayjs-stagegl/lib/base/TextureWebGL" {
	import BitmapData = require("awayjs-core/lib/data/BitmapData");
	import ByteArray = require("awayjs-core/lib/utils/ByteArray");
	import ITexture = require("awayjs-stagegl/lib/base/ITexture");
	import TextureBaseWebGL = require("awayjs-stagegl/lib/base/TextureBaseWebGL");
	class TextureWebGL extends TextureBaseWebGL implements ITexture {
	    textureType: string;
	    private _width;
	    private _height;
	    private _frameBuffer;
	    private _glTexture;
	    constructor(gl: WebGLRenderingContext, width: number, height: number);
	    dispose(): void;
	    width: number;
	    height: number;
	    frameBuffer: WebGLFramebuffer;
	    uploadFromData(bitmapData: BitmapData, miplevel?: number): any;
	    uploadFromData(image: HTMLImageElement, miplevel?: number): any;
	    uploadCompressedTextureFromByteArray(data: ByteArray, byteArrayOffset: number, async?: boolean): void;
	    glTexture: WebGLTexture;
	    generateMipmaps(): void;
	}
	export = TextureWebGL;

}

declare module "awayjs-stagegl/lib/base/VertexBufferFlash" {
	import ContextStage3D = require("awayjs-stagegl/lib/base/ContextStage3D");
	import IVertexBuffer = require("awayjs-stagegl/lib/base/IVertexBuffer");
	import ResourceBaseFlash = require("awayjs-stagegl/lib/base/ResourceBaseFlash");
	class VertexBufferFlash extends ResourceBaseFlash implements IVertexBuffer {
	    private _context;
	    private _numVertices;
	    private _data32PerVertex;
	    constructor(context: ContextStage3D, numVertices: number, data32PerVertex: number);
	    uploadFromArray(data: number[], startVertex: number, numVertices: number): void;
	    numVertices: number;
	    data32PerVertex: number;
	    dispose(): void;
	}
	export = VertexBufferFlash;

}

declare module "awayjs-stagegl/lib/base/VertexBufferWebGL" {
	import IVertexBuffer = require("awayjs-stagegl/lib/base/IVertexBuffer");
	class VertexBufferWebGL implements IVertexBuffer {
	    private _gl;
	    private _numVertices;
	    private _data32PerVertex;
	    private _buffer;
	    constructor(gl: WebGLRenderingContext, numVertices: number, data32PerVertex: number);
	    uploadFromArray(vertices: number[], startVertex: number, numVertices: number): void;
	    numVertices: number;
	    data32PerVertex: number;
	    glBuffer: WebGLBuffer;
	    dispose(): void;
	}
	export = VertexBufferWebGL;

}

declare module "awayjs-stagegl/lib/events/StageEvent" {
	import Event = require("awayjs-core/lib/events/Event");
	class StageEvent extends Event {
	    static CONTEXT_CREATED: string;
	    static CONTEXT_DISPOSED: string;
	    static CONTEXT_RECREATED: string;
	    static VIEWPORT_UPDATED: string;
	    constructor(type: string);
	}
	export = StageEvent;

}

declare module "awayjs-stagegl/lib/managers/StageManager" {
	import EventDispatcher = require("awayjs-core/lib/events/EventDispatcher");
	import Stage = require("awayjs-stagegl/lib/base/Stage");
	/**
	 * The StageManager class provides a multiton object that handles management for Stage objects.
	 *
	 * @see away.base.Stage
	 */
	class StageManager extends EventDispatcher {
	    private static STAGE_MAX_QUANTITY;
	    private _stages;
	    private static _instance;
	    private static _numStages;
	    private _onContextCreatedDelegate;
	    /**
	     * Creates a new StageManager class.
	     * @param stage The Stage object that contains the Stage objects to be managed.
	     * @private
	     */
	    constructor();
	    /**
	     * Gets a StageManager instance for the given Stage object.
	     * @param stage The Stage object that contains the Stage objects to be managed.
	     * @return The StageManager instance for the given Stage object.
	     */
	    static getInstance(): StageManager;
	    /**
	     * Requests the Stage for the given index.
	     *
	     * @param index The index of the requested Stage.
	     * @param forceSoftware Whether to force software mode even if hardware acceleration is available.
	     * @param profile The compatibility profile, an enumeration of ContextProfile
	     * @return The Stage for the given index.
	     */
	    getStageAt(index: number, forceSoftware?: boolean, profile?: string, mode?: string): Stage;
	    /**
	     * Removes a Stage from the manager.
	     * @param stage
	     * @private
	     */
	    iRemoveStage(stage: Stage): void;
	    /**
	     * Get the next available stage. An error is thrown if there are no StageProxies available
	     * @param forceSoftware Whether to force software mode even if hardware acceleration is available.
	     * @param profile The compatibility profile, an enumeration of ContextProfile
	     * @return The allocated stage
	     */
	    getFreeStage(forceSoftware?: boolean, profile?: string, mode?: string): Stage;
	    /**
	     * Checks if a new stage can be created and managed by the class.
	     * @return true if there is one slot free for a new stage
	     */
	    hasFreeStage: boolean;
	    /**
	     * Returns the amount of stage objects that can be created and managed by the class
	     * @return the amount of free slots
	     */
	    numSlotsFree: number;
	    /**
	     * Returns the amount of Stage objects currently managed by the class.
	     * @return the amount of slots used
	     */
	    numSlotsUsed: number;
	    /**
	     * The maximum amount of Stage objects that can be managed by the class
	     */
	    numSlotsTotal: number;
	    private onContextCreated(event);
	}
	export = StageManager;

}

declare module "awayjs-stagegl/lib/pool/IndexData" {
	import IContextGL = require("awayjs-stagegl/lib/base/IContextGL");
	import IIndexBuffer = require("awayjs-stagegl/lib/base/IIndexBuffer");
	/**
	 *
	 */
	class IndexData {
	    private static LIMIT_VERTS;
	    private static LIMIT_INDICES;
	    private _dataDirty;
	    invalid: Array<boolean>;
	    contexts: Array<IContextGL>;
	    buffers: Array<IIndexBuffer>;
	    data: Array<number>;
	    indexMappings: Array<number>;
	    originalIndices: Array<number>;
	    offset: number;
	    level: number;
	    constructor(level: number);
	    updateData(offset: number, indices: Array<number>, numVertices: number): void;
	    invalidateData(): void;
	    dispose(): void;
	    /**
	     * @private
	     */
	    private disposeBuffers();
	    /**
	     * @private
	     */
	    private invalidateBuffers();
	    /**
	     *
	     * @param data
	     * @private
	     */
	    private setData(data);
	}
	export = IndexData;

}

declare module "awayjs-stagegl/lib/pool/IndexDataPool" {
	import SubGeometryBase = require("awayjs-core/lib/data/SubGeometryBase");
	import IndexData = require("awayjs-stagegl/lib/pool/IndexData");
	/**
	 *
	 */
	class IndexDataPool {
	    private static _pool;
	    constructor();
	    static getItem(subGeometry: SubGeometryBase, level: number, indexOffset: number): IndexData;
	    static disposeItem(id: number, level: number): void;
	    disposeData(id: number): void;
	}
	export = IndexDataPool;

}

declare module "awayjs-stagegl/lib/pool/ProgramData" {
	import ProgramDataPool = require("awayjs-stagegl/lib/pool/ProgramDataPool");
	import IProgram = require("awayjs-stagegl/lib/base/IProgram");
	import Stage = require("awayjs-stagegl/lib/base/Stage");
	/**
	 *
	 * @class away.pool.ProgramDataBase
	 */
	class ProgramData {
	    static PROGRAMDATA_ID_COUNT: number;
	    private _pool;
	    vertexString: string;
	    fragmentString: string;
	    stage: Stage;
	    usages: number;
	    program: IProgram;
	    id: number;
	    constructor(pool: ProgramDataPool, context: Stage, vertexString: string, fragmentString: string);
	    /**
	     *
	     */
	    dispose(): void;
	}
	export = ProgramData;

}

declare module "awayjs-stagegl/lib/pool/ProgramDataPool" {
	import Stage = require("awayjs-stagegl/lib/base/Stage");
	import ProgramData = require("awayjs-stagegl/lib/pool/ProgramData");
	/**
	 * @class away.pool.ProgramDataPool
	 */
	class ProgramDataPool {
	    private _pool;
	    private _stage;
	    /**
	     * //TODO
	     *
	     * @param textureDataClass
	     */
	    constructor(stage: Stage);
	    /**
	     * //TODO
	     *
	     * @param materialOwner
	     * @returns ITexture
	     */
	    getItem(vertexString: string, fragmentString: string): ProgramData;
	    /**
	     * //TODO
	     *
	     * @param materialOwner
	     */
	    disposeItem(key: string): void;
	}
	export = ProgramDataPool;

}

declare module "awayjs-stagegl/lib/pool/TextureData" {
	import ITextureData = require("awayjs-core/lib/pool/ITextureData");
	import TextureBase = require("awayjs-core/lib/textures/TextureBase");
	import TextureDataPool = require("awayjs-stagegl/lib/pool/TextureDataPool");
	import ITextureBase = require("awayjs-stagegl/lib/base/ITextureBase");
	/**
	 *
	 * @class away.pool.TextureDataBase
	 */
	class TextureData implements ITextureData {
	    private _pool;
	    texture: ITextureBase;
	    textureProxy: TextureBase;
	    mipmap: boolean;
	    invalid: boolean;
	    constructor(pool: TextureDataPool, textureProxy: TextureBase, mipmap: boolean);
	    /**
	     *
	     */
	    dispose(): void;
	    /**
	     *
	     */
	    invalidate(): void;
	}
	export = TextureData;

}

declare module "awayjs-stagegl/lib/pool/TextureDataPool" {
	import TextureBase = require("awayjs-core/lib/textures/TextureBase");
	import TextureData = require("awayjs-stagegl/lib/pool/TextureData");
	/**
	 * @class away.pool.TextureDataPool
	 */
	class TextureDataPool {
	    private _pool;
	    /**
	     * //TODO
	     *
	     * @param textureDataClass
	     */
	    constructor();
	    /**
	     * //TODO
	     *
	     * @param materialOwner
	     * @returns ITexture
	     */
	    getItem(textureProxy: TextureBase, mipmap: boolean): TextureData;
	    /**
	     * //TODO
	     *
	     * @param materialOwner
	     */
	    disposeItem(textureProxy: TextureBase): void;
	}
	export = TextureDataPool;

}

declare module "awayjs-stagegl/lib/pool/VertexData" {
	import SubGeometryBase = require("awayjs-core/lib/data/SubGeometryBase");
	import IContextGL = require("awayjs-stagegl/lib/base/IContextGL");
	import IVertexBuffer = require("awayjs-stagegl/lib/base/IVertexBuffer");
	/**
	 *
	 */
	class VertexData {
	    private _onVerticesUpdatedDelegate;
	    private _subGeometry;
	    private _dataType;
	    private _dataDirty;
	    invalid: Array<boolean>;
	    buffers: Array<IVertexBuffer>;
	    contexts: Array<IContextGL>;
	    data: Array<number>;
	    dataPerVertex: number;
	    constructor(subGeometry: SubGeometryBase, dataType: string);
	    updateData(originalIndices?: Array<number>, indexMappings?: Array<number>): void;
	    dispose(): void;
	    /**
	     * @private
	     */
	    private disposeBuffers();
	    /**
	     * @private
	     */
	    private invalidateBuffers();
	    /**
	     *
	     * @param data
	     * @param dataPerVertex
	     * @private
	     */
	    private setData(data);
	    /**
	     * //TODO
	     *
	     * @param event
	     * @private
	     */
	    private _onVerticesUpdated(event);
	}
	export = VertexData;

}

declare module "awayjs-stagegl/lib/pool/VertexDataPool" {
	import SubGeometryBase = require("awayjs-core/lib/data/SubGeometryBase");
	import IndexData = require("awayjs-stagegl/lib/pool/IndexData");
	import VertexData = require("awayjs-stagegl/lib/pool/VertexData");
	/**
	 *
	 */
	class VertexDataPool {
	    private static _pool;
	    constructor();
	    static getItem(subGeometry: SubGeometryBase, indexData: IndexData, dataType: string): VertexData;
	    static disposeItem(subGeometry: SubGeometryBase, level: number, dataType: string): void;
	    disposeData(subGeometry: SubGeometryBase): void;
	}
	export = VertexDataPool;

}


text:
Q: How to set fsolve maximum iteration count in Matlab? i have a problem with fsolve. I need to set MaxFunEvals, but it doesn't work now. When I call fsolve by this:
[X,fval]= fsolve(@(Q) fkinf(L1,L2,L3,L4,P,Q), [0 0 0 0 0 0 0 0 0]);

i get a message:
Warning: Trust-region-dogleg algorithm of FSOLVE cannot handle non-square
systems; using Levenberg-Marquardt algorithm instead.
  In fsolve at 285
  In fkin at 11

and after a minute or so
Solver stopped prematurely.

fsolve stopped because it exceeded the function evaluation limit,
options.MaxFunEvals = 1800 (the default value).

This message persist if I try to change it before calling fsolve by:
optimoptions('fsolve','MaxFunEvals',100)

or
optimoptions('fsolve','MaxFunEvals',100,'Algorithm', 'levenberg-marquardt')

I get a good result, but the computing time is too long. What am I doing wrong?
Thank you

redpajama_set_name: RedPajamaStackExchange


Uncover the range of exceptional initiatives currently bringing the Gospel to life for and with Catholic educators from congregations including the Good Samaritans, Sisters of St Joseph, Salesians, Marists, Christian Bothers and Edmund Rice Education Australia, Jesuits and more.
Jim D'Orsa is Senior Lecturer at the Broken Bay Institute NSW, and is a Research Associate of the Melbourne University of Divinity.
Therese D'Orsa is Conjoint Professor at the Broken Bay Institute NSW, and the University of Newcastle, Research Associate of the Melbourne University of Divinity, and an honorary fellow of Australian Catholic University.


text:
'Blueprint for a Safer and More Just America,' Principle 1: Stop Criminalizing Poverty
Sarah Lustbader and Vaidya Gullapalli Apr 09, 2019
This week, the Daily Appeal will be delving into the Justice Collaborative's "Blueprint for a Safer and More Justice America." We will focus each day on one of the core principles and highlight examples of promising practices from across the country that help further its goals.
"For all the energy behind reform" of the criminal legal system, "no presidential candidate has articulated a big, comprehensive vision for transformational change," Emily Bazelon wrote in a New York Times op-ed last week. "There's a consensus that the system is broken, but no agreement on how to fix it." She pointed to various sources for ideas about how to fix it, including a "comprehensive new blueprint for reform" issued by the Justice Collaborative.
The Justice Collaborative's "Blueprint For A Safer And More Just America" is an effort to transform the criminal legal landscape by applying common sense, human dignity, and fairness across the system. Today we look at the first principle of the blueprint:
Stop making poverty into a crime.
No person in America should be locked up because they are too poor. But right now we have homeless people arrested for sleeping outside; parents who can't afford to purchase their release from jail; and people who cycle in and out of jail because they can't afford to pay old fines even as new ones pile on. Worse yet, we have corporations making billions of dollars on the backs of our poorest communities. From bail bondsmen to private probation companies, people are getting rich off suffering and incarceration. Even cities and counties fill their coffers from the fines and fees that are imposed upon people who are struggling just to survive. We need a criminal justice system that puts people over profit, and that helps to make vulnerable people more stable, not less stable.
End money bail and drastically reduce the pretrial jail population in America.
End all fees associated with any diversion, treatment, or community supervision program. All costs should be borne by the government.
End all court fees, public defender fees, and other costs that ask poor people to subsidize the criminal justice system.
Stop imposing incarceration due to an inability to pay fines or fees.
Make phone calls free for all people who are incarcerated in jails and prisons in America.
Prohibit the criminalization of behavior that stems from extreme poverty, including sitting or sleeping in parks or on sidewalks and benches.
Bail: "Ending cash bail should be at the top of every candidate's criminal justice agenda. So should getting rid of fines and fees that help fund local governments but trap people in cycles of debt," writes Bazelon. Ferguson, Missouri, "became a symbol of the criminalization of poverty for routinely sending black defendants to jail for failing to pay minor traffic fines." But last November, a reformer district attorney was elected. On his first day in office, Wesley Bell "announced one of the most progressive bail policies in the country—pretrial release, without bail, for misdemeanors and some felonies, unless the prosecutor thinks there is a direct threat to public safety." He also pledged not to seek to revoke probation for unpaid fines and fees. "As an overriding principle, I do not believe in prosecuting poverty," he told a local paper. [Emily Bazelon / New York Times]
Child support: Bell went beyond the bail reform and adopted less popular but equally crucial stances, including a policy that his office "will not criminally prosecute the failure to pay child support." Bell pointed out that the criminalization of nonpayment can make it even harder for parents under a child support order to make payments. "When you have two people applying for a job who are similarly situated, and one has a felony conviction even if it's just for child support, we'd be lying if we said that didn't hurt people's chances of being successful at getting a job," he told the St. Louis Post-Dispatch. Nor does it help custodial parents. "They don't want the noncustodial parent to go to jail. They just want the support," he said. [Christine Byers / St. Louis Post-Dispatch]
Protections for homeless people: For 20 years in Miami, the Pottinger Agreement, "a landmark legal decree" established "protections for Miami's homeless population from undue police harassment," wrote Joey Flechas for the Miami Herald. It prevented Miami police from arresting homeless people "for loitering and other 'life-sustaining' activities, including sleeping on the sidewalk and urinating in public." But this year, U.S. District Judge Federico Moreno decided that court oversight and specific protections were no longer needed because of increased social services, and tossed the agreement. [Joey Flechas / Miami Herald] There is no reason other cities can't do both: increase social services and prevent homeless people from police harassment.
Access to public transit: In New York City, as broken windows policing strategies are increasingly discredited, many people have opposed aggressive arrests of turnstile jumpers in New York subways, which they say largely punish poor people and people of color. In 2017, Manhattan District Attorney Cyrus Vance Jr. said he would no longer prosecute most fare evasion charges, though racial disparities persist. [Anna Flagg and Ashley Nerbovig / Marshall Project] And last year, the NYPD announced that cops will no longer arrest people for fare evasion, even if they have summons warrants on their record. Instead, they will issue summonses to appear in court at a later date. [Rocco Parascandola / New York Daily News] Those summonses, however, still carry fines and the potential to give a person a criminal record. A better model would be Washington D.C., which last year passed a measure "decriminalizing Metro fare evasion, paving the way for fare-jumping to become a civil offense" punishable by a $50 fine, the Washington Post reported. Best of all would be making public transit affordable for all.
Driver's licenses: In an effort to help thousands of people regain driver's licenses, the district attorney of Durham, North Carolina, is clearing thousands of traffic cases and working with other officials to clear thousands of fines and fees. Right now, more than 1.2 million North Carolinians' licenses are revoked for various nondriving reasons, such as an inability to pay court fines and fines. The revocations can lead to significant hardships by hindering access to housing and employment. [Daniel Nichanian / The Appeal: Political Report] See also Last week, the Virginia legislature passed a bill to stop the suspensions of driver's licenses over unpaid fines and fees.
Phone calls from jail: Last year, New York's City became the first major city in the country to allow people in its jails to use the phones for free. Until the new law passed, both the city and a private contractor charged steep fees for every minute of talking by phone to friends, family, and attorneys. This nets $8 million a year, $5 million of which goes to the city. The law came as the billion-dollar prison phone industry drew increased scrutiny. "Unfortunately, the city has been profiting from some of our most vulnerable New Yorkers for years, and that is going to stop," said Corey Johnson, the City Council speaker and sponsor of the bill. "Families and friends of incarcerated individuals should not have to choose between hearing from their loved ones and paying their bills." [Erin Durkin / New York Daily News] Connecticut may soon be the first state in the nation to follow New York City. In addition to making phone calls free, a pending bill stipulates that if Connecticut implements video conferencing for prisoners in the future, those communications will be free of charge, too. The bill also promises that Connecticut will not limit in-person visitation. (The Prison Policy Initiative estimates that 74 percent of U.S. correctional facilities have reduced or eliminated in-person visitation since implementing video conferencing.) [Rachel M. Cohen / The Intercept]

redpajama_set_name: RedPajamaCommonCrawl


When people ask me why I blog, my first answer is always the sense of community. There is a whole network of women who blog and I truly enjoy meeting them. It is great to actually sit down face to face when most of the time social media is the only place we connect.
The purpose of our brunch was for an upcoming feature on Global Garbs, a blog dedicated to showcasing fashion around the world. Philadelphia will be highlighted in a post... stay tuned!!
I love this dress by Eliza J! I was drawn to the bold pattern and pop of color. It comes in different hues, but blue is always a go to color for me. I ordered a petite because I'm only 5' 3" and didn't want to get it hemmed. With a wedge shoe, the length was perfect.
Blogger Brunch at Terrain Garden and Giveaway!


text:
App review by Ana Beltran, Common Sense Education | Updated June 2021
FabuLingua - Learn Spanish
Charming stories create an immersive Spanish experience for kids
Learning rating
Not yet reviewed Write a review
Privacy rating
Not yet rated Expert evaluation by Common Sense
Subjects & Skills
English Language Arts, World Languages, Creativity
Price: Free to try
Platforms: Android, iPad, iPhone, iPod Touch, Mac Apps
See how we rate and review
Pros: In addition to introducing and reinforcing Spanish, some stories touch upon key themes such as friendship, overcoming fears, taking risks, and embracing differences.
Cons: In order for kids to enjoy the games, they need to be able to read independently. Non-readers or early readers may need the help of an adult to play the games.
Bottom Line: Interactivity and a developmentally intentional design allow kids to engage in a fun language learning experience that continues to challenge them as they grow and learn.
How Can I Teach with This Tool?
Is It Good for Learning?
Teachers can use FabuLingua – Learn Spanish to introduce and promote Spanish language in their classroom. The experience will reinforce Spanish speaking and listening skills, vocabulary, spelling, and early reading skills. The friendly and easygoing approach to learning a new language is ideal for kids who need a bit of encouragement or who are having difficulty making meaning with a grammar/translation-based approach. Teachers can also recommend this app to families as a fun and educational experience to do at home to promote Spanish language. Games and Read By Myself levels, however, are designed for kids with a stronger literacy foundation. Engaging in these levels requires a significant developmental jump from merely listening and speaking. For example, the game in which kids practice assigning articles to nouns requires the ability to read independently and somewhat quickly. These levels are appropriate for kids who already have a phonological foundation, understand the concept of spelling, and can read on their own. Teachers planning to use the app with non-readers or early readers should monitor for frustration within the more challenging levels and help kids manage expectations.
With these caveats in mind, teachers can use it as a resource for independent centers or even for whole-class instruction. Go through one of the stories together, repeating the text as a class. When students are using the recording feature, be aware that they'll need a relatively quiet space. To build on the app, pull out some of the vocabulary and use it in different contexts; for instance, kids could create a small family tree and use some of the words they've learned. Or they can label a nature setting with different animals. You can also reinforce pronunciation by creating sentences of your own that use key vocabulary, and have students practice having conversations.
FabuLingua – Learn Spanish is an app that offers a collection of interactive stories and games to help kids learn Spanish. Upon launch, teachers are asked a series of questions about the kids who'll be enjoying the app, including name, age, and how much Spanish they currently know. A detailed tutorial shows kids how to play and gives them an opportunity to practice tap and drag motions to navigate the experience. The home screen illustrates a magical landscape and characters. Each character has five levels that are progressively more challenging and designed to help kids learn and practice Spanish.
Each level is unlocked sequentially. Magical Translations introduces kids to a unique and colorful story. The app reads the Spanish story aloud and highlights each word so that kids can follow along. It also provides an English translation to help them understand the story. Teachers can turn on English translations and adjust the reading speed to meet kids' needs. Kids can interact with stories by tapping the illustrations to animate objects or hear vocabulary words. The next level, Copy Cat, offers another opportunity to hear the same story while encouraging kids to record themselves as they repeat what they hear. It plays the recording back so that they can see how close they are to matching the narrator's pronunciation. The Games level offers four different options: a game that reinforces vocabulary through matching, a game that allows kids to assign articles to nouns, a scrambled letter game that reinforces vocabulary and spelling, and a scrambled syllable game that promotes early reading skills by emphasizing syllables. The Spanish Only level allows kids to experience the same story without translations. In the final level, Read by Myself, kids become the narrator and read the story aloud while recording themselves. As kids experience the different levels, they earn stickers. These motivating rewards are added to the Magic Sticker Book where they can be used for open play and to illustrate and narrate their own story. The app is free, and kids can try all five levels for one of the stories. In-app subscription is necessary to access all 15 stories.
FabuLingua – Learn Spanish is a great option for teachers looking for a Spanish-immersion platform that goes beyond out-of-context vocabulary. The explicit tutorial and intuitive design encourage independence. The predictable process builds familiarity so that kids can focus their attention on content rather than on learning new steps or following new directions. Accessibility to all the components of the app depends on age, phonological awareness, and reading ability. Magical Translation, Copy Cat, and Spanish Only levels, where kids listen to stories, repeat, and try to make meaning with the support of illustrations, animation, and translation, are developmentally appropriate and inviting for a range of ages, including preschoolers since engagement relies heavily on listening and speaking. The recording feature is fun and can help kids monitor how closely their pronunciation matches the narrator.
Unlike some other apps, it grounds vocabulary in cute stories with characters who become familiar. This helps give kids context and anchors their learning. It's also great that it's designed to grow with kids and continue challenging them as they learn; there's enough to explore that kids won't likely lose interest. Some of the stories also touch upon important themes, such as friendship, overcoming fears, and embracing differences, offering learning opportunities beyond Spanish language. Stickers earned for completing aspects of each level keep kids motivated and can later be used for activities that promote imagination and creativity, like open-ended play and story-telling. Because the reporting feature is really meant for at-home use and caregivers, it doesn't lend itself well to classroom use. But if you can monitor and assess kids another way, this app is a fun way to get little kids learning Spanish.
The five-tiered experience includes a collection of charming interactive Spanish stories and incorporates listening, repeating, reading, and a variety of games designed to develop Spanish language.
Five developmentally intentional learning levels are unlocked sequentially and gently encourage kids to practice listening, speaking, making meaning, spelling, and reading in Spanish.
A detailed tutorial shows kids how to play and use tap and drag motions to navigate the app. Verbal and written directions support kids throughout the experience.
Common Sense reviewer
Ana Beltran Other
No one has reviewed this tool yet. Be the first to share your thoughts.
This tool has not yet been rated by our privacy team. Learn more about our privacy ratings
Explore Our Favorite Tools
Digital Library and Reading Apps and Websites
Rev up reading with tools to analyze, assess, and discuss texts.
Games for Building Decision-Making Skills
Give students the opportunity to make and learn from decisions both good and bad.
Top Tech for Digital Annotation
Mark up media to give students a digital voice.
Grades K–12
Get weekly updates on the latest digital tools and teaching strategies.


text:
Q: C++ Tokenize a string with spaces and quotes I would like to write something in C++ that tokenize a string. For the sake of clarity, consider the following string:
add string "this is a string with spaces!"

This must be split as follows:
add
string
this is a string with spaces!

Is there a quick and standard-library-based approach?

A: No library is needed. An iteration can do the task ( if it is as simple as you describe).
string str = "add string \"this is a string with space!\"";

for( size_t i=0; i<str.length(); i++){

    char c = str[i];
    if( c == ' ' ){
        cout << endl;
    }else if(c == '\"' ){
        i++;
        while( str[i] != '\"' ){ cout << str[i]; i++; }
    }else{
        cout << c;
    }
}

that outputs
add
string
this is a string with space!

A: I wonder why this simple and C++ style solution is not presented here.
It's based on fact that if we first split string by \", then each even chunk is "inside" quotes, and each odd chunk should be additionally splitted by whitespaces.
No possibility for out_of_range or anything else.
unsigned counter = 0;
std::string segment;
std::stringstream stream_input(input);
while(std::getline(stream_input, segment, '\"'))
{
    ++counter;
    if (counter % 2 == 0)
    {
        if (!segment.empty())
            std::cout << segment << std::endl;
    }
    else
    {
        std::stringstream stream_segment(segment);
        while(std::getline(stream_segment, segment, ' '))
            if (!segment.empty())
                std::cout << segment << std::endl;
    }
}

A: Here is a complete function for it. Modify it according to need, it adds parts of string to a vector strings(qargs).
void split_in_args(std::vector<std::string>& qargs, std::string command){
        int len = command.length();
        bool qot = false, sqot = false;
        int arglen;
        for(int i = 0; i < len; i++) {
                int start = i;
                if(command[i] == '\"') {
                        qot = true;
                }
                else if(command[i] == '\'') sqot = true;

                if(qot) {
                        i++;
                        start++;
                        while(i<len && command[i] != '\"')
                                i++;
                        if(i<len)
                                qot = false;
                        arglen = i-start;
                        i++;
                }
                else if(sqot) {
                        i++;
                        start++;
                        while(i<len && command[i] != '\'')
                                i++;
                        if(i<len)
                                sqot = false;
                        arglen = i-start;
                        i++;
                }
                else{
                        while(i<len && command[i]!=' ')
                                i++;
                        arglen = i-start;
                }
                qargs.push_back(command.substr(start, arglen));
        }
        for(int i=0;i<qargs.size();i++){
                std::cout<<qargs[i]<<std::endl;
        }
        std::cout<<qargs.size();
        if(qot || sqot) std::cout<<"One of the quotes is open\n";
}

A: The Boost library has a tokenizer class that can accept an escaped_list_separator.  The combination of these look like they might provide what you are looking for.
Here are links to the boost documentation, current as of this post and almost certainly an old version by the time you read this.
https://www.boost.org/doc/libs/1_73_0/libs/tokenizer/doc/tokenizer.htm
https://www.boost.org/doc/libs/1_73_0/libs/tokenizer/doc/escaped_list_separator.htm
This example is stolen from the boost documentation.  Forgive me for not creating my own example.
// simple_example_2.cpp
#include<iostream>
#include<boost/tokenizer.hpp>
#include<string>

int main(){
   using namespace std;
   using namespace boost;
   string s = "Field 1,\"putting quotes around fields, allows commas\",Field 3";
   tokenizer<escaped_list_separator<char> > tok(s);
   for(tokenizer<escaped_list_separator<char> >::iterator beg=tok.begin(); beg!=tok.end();++beg){
       cout << *beg << "\n";
   }
}

A: I would define a class Token to read a single token from a stream.
Then using your code becomes very trivial.
#include <iostream>
#include <string>

int main()
{
    // Simply read the tokens from the stream.
    Token   t;
    while(std::cin >> t)
    {
        std::cout << "Got: " << t << "\n";
    }
}

Stream objects like this are very easy to write:
class Token
{
    // Just something to store the value in.
    std::string     value;

    // Then define the input and output operators.
    friend std::ostream& operator<<(std::ostream& str, Token const& output)
    {
        return str << output.value;
    }

    // Input is slightly harder than output.
    // but not that difficult to get correct.
    friend std::istream& operator>>(std::istream& str, Token& input)
    {
        std::string tmp;
        if (str >> tmp)
        {
            if (tmp[0] != '"')
            {
                // We read a word that did not start with
                // a quote mark. So we are done. Simply put
                // it in the destination.
                input.value = std::move(tmp);
            }
            else if (tmp.front() == '"' && tmp.back() == '"')
            {
                // we read a word with both open and close
                // braces so just nock these off.
                input.value = tmp.substr(1, tmp.size() - 2);
            }
            else
            {
                // We read a word that has but has a quote at the
                // start. So need to get all the characters upt
                // closing quote then add this to value.
                std::string tail;
                if (std::getline(str, tail, '"'))
                {
                    // Everything worked
                    // update the input
                    input.value = tmp.substr(1) + tail;
                }
            }
        }
        return str;
    }
};

A: I guess there is no straight forward approach with standard library. Indirectly following algo will work:

a) search for '\"' with string::find('\"') . If anything found search for next '\"' using string::find('\'',prevIndex), If found use string::substr(). Discard that part from the original string.

b) Now Serach for ' ' character in the same way.

NOTE: you have to iterate through the whole string.

A: Here is my solution, it's equivalent to python's shlex, shlex_join() is the inverse of shlex_split():
#include <cctype>
#include <iomanip>
#include <iostream>
#include <string>
#include <sstream>
#include <utility>
#include <vector>

// Splits the given string using POSIX shell-like syntax.
std::vector<std::string> shlex_split(const std::string& s)
{
  std::vector<std::string> result;

  std::string token;
  char quote{};
  bool escape{false};

  for (char c : s)
  {
    if (escape)
    {
      escape = false;
      if (quote && c != '\\' && c != quote)
        token += '\\';
      token += c;
    }
    else if (c == '\\')
    {
      escape = true;
    }
    else if (!quote && (c == '\'' || c == '\"'))
    {
      quote = c;
    }
    else if (quote && c == quote)
    {
      quote = '\0';
      if (token.empty())
        result.emplace_back();
    }
    else if (!isspace(c) || quote)
    {
      token += c;
    }
    else if (!token.empty())
    {
      result.push_back(std::move(token));
      token.clear();
    }
  }

  if (!token.empty())
  {
    result.push_back(std::move(token));
    token.clear();
  }

  return result;
}

// Concatenates the given token list into a string. This function is the
// inverse of shlex_split().
std::string shlex_join(const std::vector<std::string>& tokens)
{
  auto it = tokens.begin();
  if (it == tokens.end())
    return {};

  std::ostringstream oss;
  while (true)
  {
    if (it->empty() || it->find_first_of(R"( "\)") != std::string::npos)
      oss << std::quoted(*it);
    else
      oss << *it;

    if (++it != tokens.end())
      oss << ' ';
    else
      break;
  }
  return oss.str();
}

void test(const std::string& s, const char* expected = nullptr)
{
  if (!expected)
    expected = s.c_str();
  if (auto r = shlex_join(shlex_split(s)); r != expected)
    std::cerr << '[' << s << "] -> [" << r << "], expected [" << expected << "]\n";
}

int main()
{
  test("");
  test(" ", "");
  test("a");
  test(" a ", "a");
  test("a   b", "a b");
  test(R"(a \s b)", "a s b");
  test(R"("a a" b)");
  test(R"('a a' b)", R"("a a" b)");
  test(R"(a \" b)", R"(a "\"" b)");
  test(R"(a \\ b)", R"(a "\\" b)");

  test(R"("a \" a" b)");
  test(R"('a \' a' b)", R"("a ' a" b)");
  test(R"("a \\ a" b)");
  test(R"('a \\ a' b)", R"("a \\ a" b)");
  test(R"('a \s a' b)", R"("a \\s a" b)");
  test(R"("a \s a" b)", R"("a \\s a" b)");
  test(R"('a \" a' b)", R"("a \\\" a" b)");
  test(R"("a \' a" b)", R"("a \\' a" b)");

  test(R"("" a)");
  test(R"('' a)", R"("" a)");
  test(R"(a "")");
  test(R"(a '')", R"(a "")");
}

A: There is a standard-library-based approach in C++14 or later. But it is not quick.
#include <iomanip> // quoted
#include <iostream>
#include <sstream> // stringstream
#include <string>

using namespace std;

int main(int argc, char **argv) {
    string str = "add string \"this is a string with spaces!\"";
    stringstream ss(str);
    string word;
    while (ss >> quoted(word)) {
        cout << word << endl;
    }
    return 0;
}


text:
Q: How to do Eclipse's "export jar" from the command line In my workflow for creating a jar to distribute my code, I currently:

*

*right-click on my project in Eclipse

*select "Export"

*select "JAR file"

*uncheck the top-level files like .classpath, .project

*check only "export generated class files"

*click "finish"

This ensures the .class files are up-to-date and creates the jar. I would like to do this same thing from the command line, but most documentation for creating jars seems to be just jarring up files that already exist, without the phase of creating the .class files. How can I do this from the command line?

A: To manually create a jar file, you can use the "jar" utility.
A jar file is basically an archive file (in fact, you can use any zip tool to extract the jar contents).  To create a jar file, you specify the "c" option and all the .class files that you compiled and that you want included.  The jar command-line mimics the tar command.  So, for example, to add your class files whose root folder is com, you type:
  jar cf test.jar com

Optionally, you can add manifest data in the form of a manifest file to specify a default executable and other information.
However, a simpler way to build a jar file is to just use ant.
Checkout this tutorial from the ant website, which gives an example of a typical ant build file:
http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html


text:
Dr Norman Morrison began his career as a research chemist then became a teacher of Chemistry, Science and Information Technology. He took a break from teaching to work for Y2Ki, an information service on the Year 2000 problem in Computing. This led to the teaching of Computing and the experience of preparing students for examinations set by both the AQA and OCR boards. He is now spending the early part of his retirement editing the site.
Dr Douglas Morrison began his career as a research medical physicist, developing medical applications of ultrasound. He then joined the Scottish Home and Health Department, as a scientific advisor to the Chief Scientist. In 1997 he set up Y2Ki, an information service on the Year 2000 problem. He is now an information architect, promoting more widespread use of DITA and founder of Mardi, an international charity to help university students and alumni work together to make the world a better place.
Of course, the site depends on student contributions (the quality of which has exceeded our expectations), and we are more than happy to acknowledge the help of others on the Acknowledgements page.


I will be participating in two presentations at this week's North American Saxophone Alliance Biennial Conference which is being held on the campus of Arizona State University. This Friday at 2:00 PM, Peter Sommer and I will be discussing my electroacoustic works for jazz saxophone. Also, Sunday, March 18 at 11:00 AM, there will be a panel discussion on the upcoming International Saxophone Symposium and Competition (which I was selected to compose a work for the competition's final round).


AVOS, the company behind the relaunch of the link-library site Delicious, has announced that it has acquired Trunk.ly in order to beef up the renewed service. We wrote about Trunk.ly earlier this year, when we saw it as a great contender for anyone looking to replace Delicious.
Trunk.ly saves links more aggressively than Delicious, with an automated aggregation that can collect every link that you share on Twitter or Like on Facebook and LinkedIn, collating them in one place.
Trunk.ly has ceased accepting new sign-ups and will continue to operate for another two months to give users time to migrate their links. Trunk.ly has effectively ceased developing its own product, moving its efforts over to Delicious development.
While this is bad news for anyone heavily invested in Trunk.ly's service, it is great news for Delicious. Hopefully enough of the DNA of Trunk.ly will be integrated into the new site for current users to be comfortable moving over.


PolyCase is a manufacturer of polymer-based lead-free ammunition components.
In this video PolyCase Inceptor ARX 9mm ammunition is tested against a cinder block. The test firearms include a Smith & Wesson M&P and a CZ EVO. Read more PolyCase Inceptor ARX Reviews.
A ballistic gel and denim penetration test of PolyCase Inceptor ARX 9mm and 380 ACP ammunition. The 9mm test pistol is a Sig P938. The .380 ACP test pistol is a Taurus TCP.


The International Break doesn't stop the community providing fantastic podcast material for Fantasy Premier League managers.
It's a milestone podcast for the Always Cheating FPL Podcast.
FML FPL are focusing on defensive investment.
FPL Herald delivers a forfeit for one boss.
Just Offside are celebrating a birthday.
Just Offside #GW12 Part 1 – Now online!
FF Surgery entertain us to ease the boredom of the break.
There's plenty of contests on Sportito during the International Break – a Daily Fantasy Football Site where you can win cash prizes. If you sign up here, using sign-up bonus code HOLLY5, you'll get £5 credit. What do you have to lose?
Remember to check out my guide to the Festive Fixture Schedule and Form Vs Fixture Charts for Gameweek 12.


text:
Wed, 07 Oct, 2020 - 09:06
Greece's far-right Golden Dawn party guilty of operating as crime organisation
Anti-Golden Dawn protesters (AP Photo/Yorgos Karahalis)
A Greek court has ruled that the far-right Golden Dawn party was operating as a criminal organisation, delivering a landmark verdict in a marathon five-year trial.
The court delivered guilty verdicts against several of the party's former legislators for participating in a criminal organisation, and deemed others guilty of leading a criminal organisation.
Security tight was tight at the Athens courthouse with more than 15,000 people gathered for an anti-fascist rally outside.
The 68 defendants in the trial included 18 former legislators from the party that was founded in the 1980s as a neo-Nazi organization and rose to become Greece's third largest party in parliament during the country's decade-long financial crisis.
The court has been assessing four cases rolled into one: the fatal stabbing of Greek rap singer Pavlos Fyssas, attacks on migrant fishermen, attacks on left-wing activists, and whether Golden Dawn was operating as a criminal organisation.
The presiding judge of the three-member panel began reading the verdicts by delivering a guilty verdict against Giorgos Roupakias for the murder of Fyssas.
That prompted applause inside the courtroom and among the crowd outside. Roupakias had been accused of being a party supporter who delivered the fatal stab wounds.
goldendawnplace: international


text:
APCO Names Pamela Passman as Chair of Corporate, New York Managing Director
by Bulldog Reporter | Sep 16, 2021
APCO Worldwide North America President Kelly Williamson announced the appointment of Pamela Passman as chair of corporate and managing director of its New York office. Passman brings decades of experience working with global business leaders to advance their corporate strategies through innovative partnerships with government, civil society and business partners.
"Pamela has a deep understanding of the pressures facing companies today and extensive experience helping them better adapt while building their corporate reputation," Williamson said. "There has never been as interesting and challenging time for corporate brands. As our clients continue to navigate internal, competitive, societal, regulatory and reputational pressures, we are helping companies pursue their own transformation and authentically engage to deliver a lasting societal impact. Our New York office is at the center of driving this type of work globally, and Passman is well positioned to further grow our brand and advisory services in New York and the region."
During her 15-year career with Microsoft, Passman served in various executive positions, leading regulatory affairs, global government relations, philanthropic programs and cross-company corporate citizenship efforts—including during a period of intense regulatory, media and investor scrutiny. She was the founder and leader of innovative organizations that developed and marketed data-driven risk management solutions for companies and their global value chains. She also practiced law at Covington & Burling in Washington, D.C., and Nagashima Ohno & Tsunematsu in Tokyo.
"I was a long-term client of APCO and I have a profound appreciation for the talented people here who bring an understanding of the geopolitical and cultural dynamics in which companies operate with a creative campaign approach to managing issues and building brands," Passman said. "I look forward to working across our corporate teams as we help our clients engage with key stakeholders and advance their business and societal impact."
Passman joined APCO in 2020 as a member of its International Advisory Council (IAC), which includes more than 150 recognized global leaders, including policy experts, business and industry leaders, former elected politicians, academics, renowned journalists, diplomats and nonprofit pioneers. Earlier this year, she played a critical role in launching APCO Impact—an integrated approach to helping companies positively address the most challenging issues of our time, including climate and sustainability, racial and gender equity and social justice, and embed environment, social and governance into their business strategies.
"Pamela has been inside the C-suite and boardrooms, representing corporate priorities in some of the most challenging markets around the world," APCO Founder and Executive Chairman Margery Kraus said. "We are excited to have Pamela expand her role at APCO to help our clients look around corners to meet the heightened expectations of governments, employees, investors and customers."
Passman will lead and collaborate with a strong bench of corporate experts and leaders in APCO's New York office and other locations, including James Robinson, global lead for Geo-Commerce based in New York; Julie Jack, ESG lead for APCO Impact based in New York; Howard Pulchin, global creative director based in New York; Tina Kaiser, corporate communications senior director based in New York; Caroline Starke, corporate communications senior director based in New York; Kelly Stepno, managing director, Chicago; Courtney Crowder, managing director, Raleigh; Licy M. Do Canto, managing director, Washington, D.C.; and Jason Meyer, Washington, D.C. lead for corporate communications.
For more than 37 years, APCO has been a trusted advisor and partner to private, public and non-profit clients as they try to identify and manage new and emerging issues, challenges and opportunities around the world. Established by Kraus as a single-person operation in 1984, APCO has grown to a global advisory and advocacy communications consultancy with offices in more than 30 markets and experience working in more than 80 markets globally, providing in-depth advice, perceptive guidance and creative approaches for its clients.
About APCO Worldwide
APCO Worldwide is an advisory and advocacy communications consultancy helping leading public and private sector organizations be catalysts for progress by navigating the challenges of today, acting with agility, anticipating social risk and building organizational reputations, relationships and solutions to succeed. APCO is an independent and majority women-owned business. For more information, please visit www.apcoworldwide.com.


text:
Reports any instance of for,
while and do statements whose
bodies are guaranteed to execute at most once. Normally, this is an indication of a bug.

redpajama_set_name: RedPajamaGithub


The popularity and versatility of votive candle holders have got generated a full fledged selection of different kinds, shapes, sizes and styles of votive candles that charm to a much larger target audience and fulfill different needs, pursuits and tastes. Now, you don't only see the average apparent votive candle holders, however you can also find custom personalised votive candle holders, frosted holders, colored versions, customized and etched in many different sizes as well as types from stemmed holders, stake glass slots, crystal holders, hurricane owners, chandelier holders and many more.
Nemiri - : twice a day monthly large pill organizer set. Once a day monthly pill planner organizer with removable lid for easy loading large compartment pill box stores medications for an entire month plus a compartment for extra pills blue 3 3 out of 5 stars 15 $. Twice a day monthly pill organizer set am and pm. Description 2 per day monthly pill planner is a great way to organize your medication when you have to take your medication twice a day now you can have all your pills ready to go for an entire month! features: two extra compartments for storage of additional or occasional medications large legible print. Twice a day monthly pill planner set item 310 2x. Twice a day monthly pill planner we've taken one of our most popular pill organizers, the monthly pill planner, and made it into a twice a day monthly pill planner now you can have all your pills ready to go for an entire month! 31 am and 31 pm numbered compartments corresponding to the days of the month. Hannah coupons products. Twice a day monthly pill planner we've taken one of our most popular pill organizers, the monthly pill planner, and made it into a twice a day monthly pill planner now you can have all your pills ready to go for an entire month! 31 am and 31 pm numbered compartments corresponding to the days of the month. Pill organizer twice a day ebay. Twice a day monthly large pill organizer set am and pm medication organizer. Pill organizers from. Am pm 31 day monthly pill organizer pods with tray and bonus medical alert card item 995 2x blue & grey $ monthly pill planner item 310 & 310b $ details $ 6 00 details 2xl twice a day pill organizer with lock item 828 $ details 7 day pill chest item 313 $ details seven sided pill organizer small. Twice a day weekly pill organizer hopkins medical products. Twice a day weekly pill organizer no reviews be the first to review this product twice per day, weekly pill planner translucent snap lids to view pills; twice a day planning; rounded compartments makes pills easier to remove; twice a day weekly pill planner pk50 50 50 $ status. Apex twice a day pill organizer. The twice a day pill organizer is easy to maintain as well once the week is over, simply rinse the container under warm water and air dry the apex weekly pill organizer is ideal for those who are taking numerous medications and want to prevent missed or extra dosages. Am pm twice a day pill organizer. Monthly pill boxes; more than 7 days pill boxes; pill splitters and pill crushers; am pm twice a day pill organizer item 67375 rating * name *email *review subject * color coded weekly med planner 2 compartment am pm $8 59 add to cart quick view. Assured twice a day plastic pill organizers. Organize pills and avoid missed doses! plastic compartments are labeled with days of the week and "am" or "pm" to help get medications, vitamins, and supplements organized into the correct doses at the correct times they re ideal for the elderly, plus also perfect for travel great for care facilities, care packages, home, and resale.


Generic Vitinoin, like all generics, is the name given to the prescription Tretinoin medication manufactured by any company other than the original inventor of Vitinoin. The only true difference between brand name Vitinoin and generic Vitinoin is that generic Vitinoin is always less expensive.
Also known as: Aberel, Aberela, Airol, A-Ret, Avita, Effederm, Eudyna, Isotrex Gel, Isotrexin Gel, Ketrel, Locacid, Renova, Renova-Cream, Retacnyl, Retin-A, Retin-A MICRO, Retino-A, Retinoic Acid, Retinova, Retisol-A, Stieva-A, Tretin, Tretinoína, Tretinoinum, Vesanoid, Vitamin A Acid, Tretinoin (generic name).
Buy discount generic Vitinoin (Tretinoin) online by clicking on one of the low prices shown. You'll be sent to our secure shopping cart where you can safely complete your transaction.
MONDAY, Dec. 31 (HealthDay News) -- Secretary of State Hillary Clinton was admitted late Sunday to a hospital in New York City after doctors discovered a blood clot linked to a concussion she suffered earlier this month, a State Department spokesman said.
Clinton, 65, has canceled most of her public events over the past few weeks because of the head injury and "is being treated with anticoagulants and is at NewYork-Presbyterian Hospital so that they can monitor the medication over the next 48 hours," spokesman Phillippe Reines said in a statement, The New York Times reported.


Bachman Manor is a Tudor style 14,796 square foot home on a 29.55 acre property. It was built in 1976 by Randy Bachman of the band Bachman-Turner Overdrive (BTO) for 3 million dollars as a weekend retreat, though by the time it was finished it had become the family's primary home. The home was used as a recording studio for Randy and guests who stayed there such as Frank Sinatra, the Beach Boys, members of the Beatles, and rocker Sammy Hagar.
The estate as well as the property has had many upgrades since its original build. Bedrooms were expanded into luxurious suites, walls removed to reveal a more open floor plan with grand living spaces and historical features preserved. The chandelier, inspiration for BTO's logo, still gloriously hangs in the front room.
The studio, where legendary tracks were recorded, maintains its chapel like quality.
An additional outbuilding equipped with a 9 car garage, bowling alley, and full basketball court were added, along with a large lake at the front entrance of the property.
Bachman-Turner Overdrive has sold over 20 million albums worldwide and are known for 1970's era songs, such as Let It Ride, You Ain't Seen Nothing Yet, and Takin' Care of Business.
Evening Magazine - Bachman Estate 2 from Ken Harrison on Vimeo.
GLOBAL NEWS in Vancouver BC did a segment comparing properties in downtown Vancouver to our Bachman Estate here in Whatcom County. You MUST see this to believe it!


The ideal marine band radio!
The high quality VHF Marine Radio Pronto PR-P10M is a professionally designed handheld Marine band radio. Its feature rich and specifically designed for global maritime applications. Built 100% waterproof, able to flash and float and sustain a white variation in temperatures, it's the perfect tool for larger and small craft alike. PR-P10M benefits from the latest technology in power saving to ensure you never miss a transmission. "Your Pronto is always ready"


text:
Q: Write function in one line into ~/.bashrc Why when I try to write a function just in one line into .bashrc file,
list(){ ls -a }

I get error?
bash: /home/username/.bashrc: line num: syntax error: unexpected end of file

but when I write it in multi line it's ok?
list(){
    ls -a
}

A: There is a ; needed at the end of the function:
list(){ ls -a ; }

should work.
The syntax of a function definition for bash is specified as
name () { list ; }

Note that it includes a ; that is not part of the list.
That the ; is required in this place is kind of a syntax anomaly. It is not bash specific, it's the same for ksh, but it the ; is not required in zsh.

A: Functions in bash are essentially named compound commands (or code blocks). From man bash:
Compound Commands
   A compound command is one of the following:
   ...
   { list; }
          list  is simply executed in the current shell environment.  list
          must be terminated with a newline or semicolon.  This  is  known
          as  a  group  command.

...
Shell Function Definitions
   A shell function is an object that is called like a simple command  and
   executes  a  compound  command with a new set of positional parameters.
   ... [C]ommand is usually a list of commands between { and },  but
   may  be  any command listed under Compound Commands above.

There's no reason given, it's just the syntax.
Since the list in the one-line function given isn't terminated with a newline or a ;, bash complains.

A: The end of a single command (";") is implied by the newline.  In the oneline version } is parsed as an argument to the unterminated ls -a command.  Which you can see if you do:
$ foo(){ echo "a" }
}
$ foo
a }

See how the command inside the function declaration swallows the trailing curly brace?