text:
//
//  ZJMasterViewController.m
//  ZJCustomViewControllerTransition
//
//  Created by Zhu J on 11/4/13.
//  Copyright (c) 2013 Zhu J. All rights reserved.
//

#import "ZJMasterViewController.h"
#import "ZJDetailViewController.h"

#import "ZJToViewController.h"

#import "ZJTransitionDelegateObj.h"

#import "ZJSliderTransition.h"

@interface ZJMasterViewController () {
    NSMutableArray *_objects;
}
@property (nonatomic, strong) ZJTransitionDelegateObj *transitionObj;
@property (nonatomic, strong) ZJSliderTransition *slideTransition;
@end

@implementation ZJMasterViewController

- (void)awakeFromNib
{
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
        self.clearsSelectionOnViewWillAppear = NO;
        self.preferredContentSize = CGSizeMake(320.0, 600.0);
    }
    [super awakeFromNib];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
//    self.navigationItem.leftBarButtonItem = self.editButtonItem;
//
//    UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];
//    self.navigationItem.rightBarButtonItem = addButton;
//    self.detailViewController = (ZJDetailViewController *)[[self.splitViewController.viewControllers lastObject] topViewController];

    ZJTransitionDelegateObj *transition = [[ZJTransitionDelegateObj alloc] init];
    self.transitionObj = transition;

}
- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    self.navigationController.delegate = nil;
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)insertNewObject:(id)sender
{
    if (!_objects) {
        _objects = [[NSMutableArray alloc] init];
    }
    [_objects insertObject:[NSDate date] atIndex:0];
    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
    [self.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
}

#pragma mark - Table View

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

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

//- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
//{
//    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"staticCell" forIndexPath:indexPath];
//
//    NSDate *object = _objects[indexPath.row];
//    cell.textLabel.text = [object description];
//    return cell;
//}

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
    // Return NO if you do not want the specified item to be editable.
    return YES;
}

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        [_objects removeObjectAtIndex:indexPath.row];
        [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
    } else if (editingStyle == UITableViewCellEditingStyleInsert) {
        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
    }
}

/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
{
}
*/

/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
    // Return NO if you do not want the item to be re-orderable.
    return YES;
}
*/

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
        NSDate *object = _objects[indexPath.row];
        self.detailViewController.detailItem = object;
    }

    if (indexPath.row == 1)
    {
        ZJToViewController *toViewController = [[ZJToViewController alloc] initWithNibName:nil bundle:nil];
//        toViewController.transitioningDelegate = self.transitionObj;;
        self.navigationController.delegate = self;
        [self.navigationController pushViewController:toViewController animated:YES];
    }

    else if (2 == indexPath.row)
    {
        ZJToViewController *toViewController = [[ZJToViewController alloc] initWithNibName:nil bundle:nil];
        //        toViewController.transitioningDelegate = self.transitionObj;;
        toViewController.isInterActiveEnable = YES;
        [self.navigationController pushViewController:toViewController animated:YES];

    }
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if ([[segue identifier] isEqualToString:@"showDetail"]) {
        NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
        NSDate *object = _objects[indexPath.row];
        [[segue destinationViewController] setDetailItem:object];
    }
}
- (id<UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController animationControllerForOperation:(UINavigationControllerOperation)operation fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC
{

    NSIndexPath *selected = [self.tableView indexPathForSelectedRow];
    ZJTransitionDelegateObj *obj = [[ZJTransitionDelegateObj alloc] init];
    if (1 == selected.row)
    {
        obj.tranStyle = TransitionStylePresent;
        return obj;

    }
//    else if (2 == selected.row)
//    {
//        obj.tranStyle = TransitionStylePush;
//        return obj;
//    }
    else
    {
        return nil;
    }

}
@end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>Text - pixi.js</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">

            API Docs for: 2.1.0

APIs

Classes

Modules

            <input type="search" id="api-filter" placeholder="Type to filter APIs">

AbstractFilter

AjaxRequest

AlphaMaskFilter

AsciiFilter

AssetLoader

AtlasLoader

autoDetectRecommendedRenderer

autoDetectRenderer

BaseTexture

BitmapFontLoader

BitmapText

BlurFilter

BlurXFilter

BlurYFilter

CanvasBuffer

CanvasGraphics

CanvasMaskManager

CanvasRenderer

CanvasTinter

Circle

ColorMatrixFilter

ColorStepFilter

ComplexPrimitiveShader

ConvolutionFilter

CrossHatchFilter

DisplacementFilter

DisplayObject

DisplayObjectContainer

DotScreenFilter

Ellipse

Event

EventTarget

FilterBlock

FilterTexture

Graphics

GraphicsData

GrayFilter

ImageLoader

InteractionData

InteractionManager

InvertFilter

JsonLoader

Matrix

MovieClip

NoiseFilter

NormalMapFilter

PixelateFilter

PixiFastShader

PixiShader

Point

Polygon

PolyK

PrimitiveShader

Rectangle

RenderTexture

RGBSplitFilter

Rope

Rounded Rectangle

SepiaFilter

SmartBlurFilter

Spine

SpineLoader

Sprite

SpriteBatch

SpriteSheetLoader

Stage

Strip

StripShader

Text

Texture

TilingSprite

TiltShiftFilter

TiltShiftXFilter

TiltShiftYFilter

TwistFilter

WebGLBlendModeManager

WebGLFastSpriteBatch

WebGLFilterManager

WebGLGraphics

WebGLGraphicsData

WebGLMaskManager

WebGLRenderer

WebGLShaderManager

WebGLSpriteBatch

WebGLStencilManager

PIXI

        Show:

            <input type="checkbox" id="api-show-inherited" checked>
            Inherited

            <input type="checkbox" id="api-show-protected">
            Protected

            <input type="checkbox" id="api-show-private">
            Private

            <input type="checkbox" id="api-show-deprecated">
            Deprecated

Text Class

            Extends Sprite

            Defined in: src/pixi/text/Text.js:6

            Module: PIXI

A Text Object will create a line or multiple lines of text. To split a line you can use '\n' in your text string,
or add a wordWrap property set to true and and wordWrapWidth property with a value in the style object.

Constructor

Text

            (

                        text

                        [style]

)

                Defined in

        src/pixi/text/Text.js:6

Parameters:

                        text
                        String

The copy that you would like the text to display

                        [style]
                        Object
                        optional

The style parameters

                                    [font]
                                    String
                                    optional

default 'bold 20px Arial' The style and size of the font

                                    [fill='black']
                                    String | Number
                                    optional

A canvas fillstyle that will be used on the text e.g 'red', '#00FF00'

                                    [align='left']
                                    String
                                    optional

Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text

                                    [stroke]
                                    String | Number
                                    optional

A canvas fillstyle that will be used on the text stroke e.g 'blue', '#FCFF00'

                                    [strokeThickness=0]
                                    Number
                                    optional

A number that represents the thickness of the stroke. Default is 0 (no stroke)

                                    [wordWrap=false]
                                    Boolean
                                    optional

Indicates if word wrap should be used

                                    [wordWrapWidth=100]
                                    Number
                                    optional

The width at which text will wrap, it needs wordWrap to be set to true

                                    [dropShadow=false]
                                    Boolean
                                    optional

Set a drop shadow for the text

                                    [dropShadowColor='#000000']
                                    String
                                    optional

A fill style to be used on the dropshadow e.g 'red', '#00FF00'

                                    [dropShadowAngle=Math.PI/4]
                                    Number
                                    optional

Set a angle of the drop shadow

                                    [dropShadowDistance=5]
                                    Number
                                    optional

Set a distance of the drop shadow

Index

Methods

Properties

Item Index

Methods

                                _destroyCachedSprite

                                _generateCachedSprite

                                _renderCachedSprite

                                _renderCanvas

                                _renderWebGL

                                addChild

                                addChildAt

                                click

                                destroy

                                determineFontProperties

                                generateTexture

                                getBounds

                                getChildAt

                                getChildIndex

                                getLocalBounds

                                mousedown

                                mouseout

                                mouseover

                                mouseup

                                mouseupoutside

                                onTextureUpdate

                                removeChild

                                removeChildAt

                                removeChildren

                                removeStageReference

                                rightclick

                                rightdown

                                rightup

                                rightupoutside

                                setChildIndex

                                setStageReference

                                setStyle

                                setText

                                setTexture

                                swapChildren

                                tap

                                toGlobal

                                toLocal

                                touchend

                                touchendoutside

                                touchstart

                                updateCache

                                updateText

                                updateTexture

                                wordWrap

Properties

                                _bounds

                                _cacheAsBitmap

                                _cacheIsDirty

                                _cr

                                _currentBounds

                                _height

                                _interactive

                                _sr

                                _width

                                alpha

                                anchor

                                blendMode

                                buttonMode

                                cacheAsBitmap

                                canvas

                                children

                                context

                                defaultCursor

                                filterArea

                                filters

                                height

                                hitArea

                                interactive

                                mask

                                parent

                                pivot

                                position

                                renderable

                                resolution

                                rotation

                                scale

                                shader

                                stage

                                texture

                                tint

                                visible

                                width

                                worldAlpha

                                worldTransform

                                worldVisible

                                x

                                y

Methods

_destroyCachedSprite

        ()

        private

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:689

Destroys the cached sprite.

_generateCachedSprite

        ()

        private

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:647

Internal method.

_renderCachedSprite

            (

                        renderSession

)

        private

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:626

Internal method.

Parameters:

                        renderSession
                        Object

The render session

_renderCanvas

            (

                        renderSession

)

        private

Inherited from

                DisplayObject

            but overwritten in

        src/pixi/text/Text.js:321

Renders the object using the Canvas renderer

Parameters:

                        renderSession
                        RenderSession

_renderWebGL

            (

                        renderSession

)

        private

Inherited from

                DisplayObject

            but overwritten in

        src/pixi/text/Text.js:301

Renders the object using the WebGL renderer

Parameters:

                        renderSession
                        RenderSession

addChild

            (

                        child

)

            DisplayObject

Inherited from
                DisplayObjectContainer:

        src/pixi/display/DisplayObjectContainer.js:90

Adds a child to the container.

Parameters:

                        child
                        DisplayObject

The DisplayObject to add to the container

Returns:

                        DisplayObject:

The child that was added.

addChildAt

            (

                        child

                        index

)

            DisplayObject

Inherited from
                DisplayObjectContainer:

        src/pixi/display/DisplayObjectContainer.js:102

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

Parameters:

                        child
                        DisplayObject

The child to add

                        index
                        Number

The index to place the child in

Returns:

                        DisplayObject:

The child that was added.

click

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:233

A callback that is used when the users clicks on the displayObject with their mouse's left button

Parameters:

                        interactionData
                        InteractionData

destroy

            (

                        destroyBaseTexture

)

                Defined in

        src/pixi/text/Text.js:510

Destroys this text object.

Parameters:

                        destroyBaseTexture
                        Boolean

whether to destroy the base texture as well

determineFontProperties

            (

                        fontStyle

)

        private

                Defined in

        src/pixi/text/Text.js:341

Calculates the ascent, descent and fontSize of a given fontStyle

Parameters:

                        fontStyle
                        Object

generateTexture

            (

                        resolution

                        scaleMode

                        renderer

)

            Texture

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:559

Useful function that returns a texture of the displayObject object that can then be used to create sprites
This can be quite useful if your displayObject is static / complicated and needs to be reused multiple times.

Parameters:

                        resolution
                        Number

The resolution of the texture being generated

                        scaleMode
                        Number

Should be one of the PIXI.scaleMode consts

                        renderer
                        CanvasRenderer | WebGLRenderer

The renderer used to generate the texture.

Returns:

                        Texture:

a texture of the graphics object

getBounds

            (

                        matrix

)

            Rectangle

Inherited from

                DisplayObject

            but overwritten in

        src/pixi/text/Text.js:492

Returns the bounds of the Text as a rectangle. The bounds calculation takes the worldTransform into account.

Parameters:

                        matrix
                        Matrix

the transformation matrix of the Text

Returns:

                        Rectangle:

the framing rectangle

getChildAt

            (

                        index

)

            DisplayObject

Inherited from
                DisplayObjectContainer:

        src/pixi/display/DisplayObjectContainer.js:193

Returns the child at the specified index

Parameters:

                        index
                        Number

The index to get the child from

Returns:

                        DisplayObject:

The child at the given index, if any.

getChildIndex

            (

                        child

)

            Number

Inherited from
                DisplayObjectContainer:

        src/pixi/display/DisplayObjectContainer.js:158

Returns the index position of a child DisplayObject instance

Parameters:

                        child
                        DisplayObject

The DisplayObject instance to identify

Returns:

                        Number:

The index position of the child display object to identify

getLocalBounds

        ()

            Rectangle

Inherited from

                DisplayObject

            but overwritten in

        src/pixi/display/DisplayObjectContainer.js:362

Retrieves the non-global local bounds of the displayObjectContainer as a rectangle. The calculation takes all visible children into consideration.

Returns:

                        Rectangle:

The rectangular bounding area

mousedown

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:239

A callback that is used when the user clicks the mouse's left button down over the sprite

Parameters:

                        interactionData
                        InteractionData

mouseout

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:226

A callback that is used when the users mouse leaves the displayObject

Parameters:

                        interactionData
                        InteractionData

mouseover

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:220

A callback that is used when the users mouse rolls over the displayObject

Parameters:

                        interactionData
                        InteractionData

mouseup

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:245

A callback that is used when the user releases the mouse's left button that was over the displayObject
for this callback to be fired, the mouse's left button must have been pressed down over the displayObject

Parameters:

                        interactionData
                        InteractionData

mouseupoutside

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:252

A callback that is used when the user releases the mouse's left button that was over the displayObject but is no longer over the displayObject
for this callback to be fired, the mouse's left button must have been pressed down over the displayObject

Parameters:

                        interactionData
                        InteractionData

onTextureUpdate

            (

                        event

)

        private

Inherited from
                Sprite:

        src/pixi/display/Sprite.js:147

When the texture is updated, this event will fire to update the scale and frame

Parameters:

                        event
                        Object

removeChild

            (

                        child

)

            DisplayObject

Inherited from
                DisplayObjectContainer:

        src/pixi/display/DisplayObjectContainer.js:210

Removes a child from the container.

Parameters:

                        child
                        DisplayObject

The DisplayObject to remove

Returns:

                        DisplayObject:

The child that was removed.

removeChildAt

            (

                        index

)

            DisplayObject

Inherited from
                DisplayObjectContainer:

        src/pixi/display/DisplayObjectContainer.js:225

Removes a child from the specified index position.

Parameters:

                        index
                        Number

The index to get the child from

Returns:

                        DisplayObject:

The child that was removed.

removeChildren

            (

                        beginIndex

                        endIndex

)

Inherited from
                DisplayObjectContainer:

        src/pixi/display/DisplayObjectContainer.js:243

Removes all children from this container that are within the begin and end indexes.

Parameters:

                        beginIndex
                        Number

The beginning position. Default value is 0.

                        endIndex
                        Number

The ending position. Default value is size of the container.

removeStageReference

        ()

Inherited from
                DisplayObjectContainer:

        src/pixi/display/DisplayObjectContainer.js:404

Removes the current stage reference from the container and all of its children.

rightclick

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:260

A callback that is used when the users clicks on the displayObject with their mouse's right button

Parameters:

                        interactionData
                        InteractionData

rightdown

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:266

A callback that is used when the user clicks the mouse's right button down over the sprite

Parameters:

                        interactionData
                        InteractionData

rightup

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:272

A callback that is used when the user releases the mouse's right button that was over the displayObject
for this callback to be fired the mouse's right button must have been pressed down over the displayObject

Parameters:

                        interactionData
                        InteractionData

rightupoutside

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:279

A callback that is used when the user releases the mouse's right button that was over the displayObject but is no longer over the displayObject
for this callback to be fired, the mouse's right button must have been pressed down over the displayObject

Parameters:

                        interactionData
                        InteractionData

setChildIndex

            (

                        child

                        index

)

Inherited from
                DisplayObjectContainer:

        src/pixi/display/DisplayObjectContainer.js:175

Changes the position of an existing child in the display object container

Parameters:

                        child
                        DisplayObject

The child DisplayObject instance for which you want to change the index number

                        index
                        Number

The resulting index number for the child display object

setStageReference

            (

                        stage

)

Inherited from

                DisplayObject

            but overwritten in

        src/pixi/display/DisplayObjectContainer.js:386

Sets the containers Stage reference. This is the Stage that this object, and all of its children, is connected to.

Parameters:

                        stage
                        Stage

the stage that the container will have as its current stage reference

setStyle

            (

                        [style]

                        [style.font='bold

)

                Defined in

        src/pixi/text/Text.js:110

Set the style of the text

Parameters:

                        [style]
                        Object
                        optional

The style parameters

                                    [fill='black']
                                    Object
                                    optional

A canvas fillstyle that will be used on the text eg 'red', '#00FF00'

                                    [align='left']
                                    String
                                    optional

Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text

                                    [stroke='black']
                                    String
                                    optional

A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00'

                                    [strokeThickness=0]
                                    Number
                                    optional

A number that represents the thickness of the stroke. Default is 0 (no stroke)

                                    [wordWrap=false]
                                    Boolean
                                    optional

Indicates if word wrap should be used

                                    [wordWrapWidth=100]
                                    Number
                                    optional

The width at which text will wrap

                                    [dropShadow=false]
                                    Boolean
                                    optional

Set a drop shadow for the text

                                    [dropShadowColor='#000000']
                                    String
                                    optional

A fill style to be used on the dropshadow e.g 'red', '#00FF00'

                                    [dropShadowAngle=Math.PI/4]
                                    Number
                                    optional

Set a angle of the drop shadow

                                    [dropShadowDistance=5]
                                    Number
                                    optional

Set a distance of the drop shadow

                        [style.font='bold
                        String

20pt Arial']  The style and size of the font

setText

            (

                        text

)

                Defined in

        src/pixi/text/Text.js:147

Set the copy for the text object. To split a line you can use '\n'.

Parameters:

                        text
                        String

The copy that you would like the text to display

setTexture

            (

                        texture

)

Inherited from
                Sprite:

        src/pixi/display/Sprite.js:135

Sets the texture of the sprite

Parameters:

                        texture
                        Texture

The PIXI texture that is displayed by the sprite

swapChildren

            (

                        child

                        child2

)

Inherited from
                DisplayObjectContainer:

        src/pixi/display/DisplayObjectContainer.js:133

Swaps the position of 2 Display Objects within this container.

Parameters:

                        child
                        DisplayObject

                        child2
                        DisplayObject

tap

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:290

A callback that is used when the users taps on the sprite with their finger
basically a touch version of click

Parameters:

                        interactionData
                        InteractionData

toGlobal

            (

                        position

)

            Point

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:593

Calculates the global position of the display object

Parameters:

                        position
                        Point

The world origin to calculate from

Returns:

                        Point:

A point object representing the position of this object

toLocal

            (

                        position

                        [from]

)

            Point

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:606

Calculates the local position of the display object relative to another point

Parameters:

                        position
                        Point

The world origin to calculate from

                        [from]
                        DisplayObject
                        optional

The DisplayObject to calculate the global position from

Returns:

                        Point:

A point object representing the position of this object

touchend

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:303

A callback that is used when the user releases a touch over the displayObject

Parameters:

                        interactionData
                        InteractionData

touchendoutside

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:309

A callback that is used when the user releases the touch that was over the displayObject
for this callback to be fired, The touch must have started over the sprite

Parameters:

                        interactionData
                        InteractionData

touchstart

            (

                        interactionData

)

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:297

A callback that is used when the user touches over the displayObject

Parameters:

                        interactionData
                        InteractionData

updateCache

        ()

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:583

Generates and updates the cached sprite for this object.

updateText

        ()

        private

                Defined in

        src/pixi/text/Text.js:159

Renders text and updates it when needed

updateTexture

        ()

        private

                Defined in

        src/pixi/text/Text.js:281

Updates texture size based on canvas size

wordWrap

            (

                        text

)

        private

                Defined in

        src/pixi/text/Text.js:444

Applies newlines to a string to have it optimally fit into the horizontal
bounds set by the Text object's wordWrapWidth property.

Parameters:

                        text
                        String

Properties

_bounds

    Rectangle

        private

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:170

The original, cached bounds of the object

_cacheAsBitmap

    Boolean

        private

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:197

Cached internal flag.

_cacheIsDirty

    Boolean

        private

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:206

Cached internal flag.

_cr

    Number

        private

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:152

cached sin rotation and cos rotation

_currentBounds

    Rectangle

        private

Inherited from

                DisplayObject

            but overwritten in

        src/pixi/display/DisplayObject.js:179

The most up-to-date bounds of the object

_height

    Number

        private

Inherited from
                Sprite:

        src/pixi/display/Sprite.js:50

The height of the sprite (this is initially set by the texture)

_interactive

    Boolean

        private

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:114

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

_sr

    Number

        private

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:143

cached sin rotation and cos rotation

_width

    Number

        private

Inherited from
                Sprite:

        src/pixi/display/Sprite.js:41

The width of the sprite (this is initially set by the texture)

alpha

    Number

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:46

The opacity of the object.

anchor

    Point

Inherited from
                Sprite:

        src/pixi/display/Sprite.js:22

The anchor sets the origin point of the texture.
The default is 0,0 this means the texture's origin is the top left
Setting than anchor to 0.5,0.5 means the textures origin is centered
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

blendMode

    Number

Inherited from
                Sprite:

        src/pixi/display/Sprite.js:68

The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Default: PIXI.blendModes.NORMAL;

buttonMode

    Boolean

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:71

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

cacheAsBitmap

    Boolean

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:417

Set if this display object is cached as a bitmap.
This basically takes a snap shot of the display object as it is at that moment. It can provide a performance benefit for complex static displayObjects.
To remove simply set this property to 'null'

canvas

    HTMLCanvasElement

                Defined in

        src/pixi/text/Text.js:29

The canvas element that everything is drawn to

children

    Array<DisplayObject>

Inherited from
                DisplayObjectContainer:

        src/pixi/display/DisplayObjectContainer.js:17

[read-only] The array of children of this container.

context

    HTMLCanvasElement

                Defined in

        src/pixi/text/Text.js:37

The canvas 2d context that everything is drawn with

defaultCursor

    String

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:124

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

filterArea

    Rectangle

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:161

The area the filter is applied to like the hitArea this is used as more of an optimisation
rather than figuring out the dimensions of the displayObject each frame you can set this rectangle

filters

    Array An array of filters

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:381

Sets the filters for the displayObject.

IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer.
To remove filters simply set this property to 'null'

height

    Number

Inherited from

                DisplayObjectContainer

            but overwritten in

        src/pixi/text/Text.js:86

The height of the Text, setting this will actually modify the scale to achieve the value set

hitArea

    Rectangle | Circle | Ellipse | Polygon

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:62

This is the defined area that will pick up mouse / touch events. It is null by default.
Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

interactive

    Boolean

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:320

Indicates if the sprite will have touch and mouse interactivity. It is false by default

Default: false

mask

    Graphics

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:361

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping.
To remove a mask, set this property to null.

parent

    DisplayObjectContainer

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:87

[read-only] The display object container that contains this display object.

pivot

    Point

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:30

The pivot point of the displayObject that it rotates around

position

    Point

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:14

The coordinate of the object relative to the local coordinates of the parent.

renderable

    Boolean

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:79

Can this object be rendered

resolution

    Number

                Defined in

        src/pixi/text/Text.js:44

The resolution of the canvas.

rotation

    Number

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:38

The rotation of the object in radians.

scale

    Point

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:22

The scale factor of the object.

shader

    PIXI.AbstractFilter

Inherited from
                Sprite:

        src/pixi/display/Sprite.js:77

The shader that will be used to render the texture to the stage. Set to null to remove a current shader.

Default: null

stage

    Stage

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:96

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

texture

    Texture

Inherited from
                Sprite:

        src/pixi/display/Sprite.js:33

The texture that the sprite is using

tint

    Number

Inherited from
                Sprite:

        src/pixi/display/Sprite.js:59

The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

Default: 0xFFFFFF

visible

    Boolean

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:54

The visibility of the object.

width

    Number

Inherited from

                DisplayObjectContainer

            but overwritten in

        src/pixi/text/Text.js:62

The width of the Text, setting this will actually modify the scale to achieve the value set

worldAlpha

    Number

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:105

[read-only] The multiplied alpha of the displayObject

worldTransform

    Matrix

        private

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:133

[read-only] Current transform of the object based on world (parent) factors

worldVisible

    Boolean

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:340

[read-only] Indicates if the sprite is globally visible.

x

    Number

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:736

The position of the displayObject on the x axis relative to the local coordinates of the parent.

y

    Number

Inherited from
                DisplayObject:

        src/pixi/display/DisplayObject.js:751

The position of the displayObject on the y axis relative to the local coordinates of the parent.

redpajama_set_name: RedPajamaGithub


text:
package jcuda.driver;

/**
 * Cubin matching fallback strategies.

 *

 * Most comments are taken from the CUDA reference manual.

 *
 * @see JCudaDriver#cuModuleLoadDataEx
 */
public class CUjit_fallback
{
    /**
     * Prefer to compile ptx if exact binary match not found
     */
    public static final int CU_PREFER_PTX = 0;

    /**
     * Prefer to fall back to compatible binary code if
     * exact binary match not found
     */
    public static final int CU_PREFER_BINARY = 1;

    /**
     * Returns the String identifying the given CUjit_fallback
     *
     * @param n The CUjit_fallback
     * @return The String identifying the given CUjit_fallback
     */
    public static String stringFor(int n)
    {
        switch (n)
        {
            case CU_PREFER_PTX: return "CU_PREFER_PTX";
            case CU_PREFER_BINARY: return "CU_PREFER_BINARY";
        }
        return "INVALID CUjit_fallback: "+n;
    }

    /**
     * Private constructor to prevent instantiation.
     */
    private CUjit_fallback()
    {
    }

}


text:
<?php

/**
 * This code was generated by
 * \ / _    _  _|   _  _
 * | (_)\/(_)(_|\/| |(/_  v1.0.0
 * /       /
 */

namespace Twilio\Tests\Integration\Preview\Deployeddevices\Fleet;

use Twilio\Exceptions\DeserializeException;
use Twilio\Exceptions\TwilioException;
use Twilio\Http\Response;
use Twilio\Tests\HolodeckTestCase;
use Twilio\Tests\Request;

class DeploymentTest extends HolodeckTestCase {
    public function testFetchRequest(): void {
        $this->holodeck->mock(new Response(500, ''));

        try {
            $this->twilio->preview->deployedDevices->fleets("FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                   ->deployments("DLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->fetch();
        } catch (DeserializeException $e) {}
          catch (TwilioException $e) {}

        $this->assertRequest(new Request(
            'get',
            'https://preview.twilio.com/DeployedDevices/Fleets/FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Deployments/DLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
        ));
    }

    public function testFetchResponse(): void {
        $this->holodeck->mock(new Response(
            200,
            '
            {
                "sid": "DLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "friendly_name": "friendly_name",
                "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "fleet_sid": "FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "sync_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "date_created": "2016-07-30T20:00:00Z",
                "date_updated": "2016-07-30T20:00:00Z",
                "url": "https://preview.twilio.com/DeployedDevices/Fleets/FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Deployments/DLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
            }
            '
        ));

        $actual = $this->twilio->preview->deployedDevices->fleets("FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                         ->deployments("DLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->fetch();

        $this->assertNotNull($actual);
    }

    public function testDeleteRequest(): void {
        $this->holodeck->mock(new Response(500, ''));

        try {
            $this->twilio->preview->deployedDevices->fleets("FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                   ->deployments("DLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->delete();
        } catch (DeserializeException $e) {}
          catch (TwilioException $e) {}

        $this->assertRequest(new Request(
            'delete',
            'https://preview.twilio.com/DeployedDevices/Fleets/FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Deployments/DLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
        ));
    }

    public function testDeleteResponse(): void {
        $this->holodeck->mock(new Response(
            204,
            null
        ));

        $actual = $this->twilio->preview->deployedDevices->fleets("FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                         ->deployments("DLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->delete();

        $this->assertTrue($actual);
    }

    public function testCreateRequest(): void {
        $this->holodeck->mock(new Response(500, ''));

        try {
            $this->twilio->preview->deployedDevices->fleets("FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                   ->deployments->create();
        } catch (DeserializeException $e) {}
          catch (TwilioException $e) {}

        $this->assertRequest(new Request(
            'post',
            'https://preview.twilio.com/DeployedDevices/Fleets/FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Deployments'
        ));
    }

    public function testCreateResponse(): void {
        $this->holodeck->mock(new Response(
            201,
            '
            {
                "sid": "DLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "friendly_name": "friendly_name",
                "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "fleet_sid": "FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "sync_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "date_created": "2016-07-30T20:00:00Z",
                "date_updated": "2016-07-30T20:00:00Z",
                "url": "https://preview.twilio.com/DeployedDevices/Fleets/FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Deployments/DLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
            }
            '
        ));

        $actual = $this->twilio->preview->deployedDevices->fleets("FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                         ->deployments->create();

        $this->assertNotNull($actual);
    }

    public function testReadRequest(): void {
        $this->holodeck->mock(new Response(500, ''));

        try {
            $this->twilio->preview->deployedDevices->fleets("FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                   ->deployments->read();
        } catch (DeserializeException $e) {}
          catch (TwilioException $e) {}

        $this->assertRequest(new Request(
            'get',
            'https://preview.twilio.com/DeployedDevices/Fleets/FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Deployments'
        ));
    }

    public function testReadEmptyResponse(): void {
        $this->holodeck->mock(new Response(
            200,
            '
            {
                "deployments": [],
                "meta": {
                    "first_page_url": "https://preview.twilio.com/DeployedDevices/Fleets/FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Deployments?PageSize=50&Page=0",
                    "key": "deployments",
                    "next_page_url": null,
                    "page": 0,
                    "page_size": 50,
                    "previous_page_url": null,
                    "url": "https://preview.twilio.com/DeployedDevices/Fleets/FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Deployments?PageSize=50&Page=0"
                }
            }
            '
        ));

        $actual = $this->twilio->preview->deployedDevices->fleets("FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                         ->deployments->read();

        $this->assertNotNull($actual);
    }

    public function testReadFullResponse(): void {
        $this->holodeck->mock(new Response(
            200,
            '
            {
                "deployments": [
                    {
                        "sid": "DLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                        "friendly_name": "friendly_name",
                        "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                        "fleet_sid": "FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                        "sync_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                        "date_created": "2016-07-30T20:00:00Z",
                        "date_updated": "2016-07-30T20:00:00Z",
                        "url": "https://preview.twilio.com/DeployedDevices/Fleets/FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Deployments/DLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                    }
                ],
                "meta": {
                    "first_page_url": "https://preview.twilio.com/DeployedDevices/Fleets/FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Deployments?PageSize=50&Page=0",
                    "key": "deployments",
                    "next_page_url": null,
                    "page": 0,
                    "page_size": 50,
                    "previous_page_url": null,
                    "url": "https://preview.twilio.com/DeployedDevices/Fleets/FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Deployments?PageSize=50&Page=0"
                }
            }
            '
        ));

        $actual = $this->twilio->preview->deployedDevices->fleets("FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                         ->deployments->read();

        $this->assertGreaterThan(0, \count($actual));
    }

    public function testUpdateRequest(): void {
        $this->holodeck->mock(new Response(500, ''));

        try {
            $this->twilio->preview->deployedDevices->fleets("FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                   ->deployments("DLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->update();
        } catch (DeserializeException $e) {}
          catch (TwilioException $e) {}

        $this->assertRequest(new Request(
            'post',
            'https://preview.twilio.com/DeployedDevices/Fleets/FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Deployments/DLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
        ));
    }

    public function testUpdateResponse(): void {
        $this->holodeck->mock(new Response(
            200,
            '
            {
                "sid": "DLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "friendly_name": "friendly_name",
                "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "fleet_sid": "FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "sync_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "date_created": "2016-07-30T20:00:00Z",
                "date_updated": "2016-07-30T20:00:00Z",
                "url": "https://preview.twilio.com/DeployedDevices/Fleets/FLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Deployments/DLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
            }
            '
        ));

        $actual = $this->twilio->preview->deployedDevices->fleets("FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                         ->deployments("DLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->update();

        $this->assertNotNull($actual);
    }
}


text:
package gov.nih.nci.caintegrator.web.action.query.form;

import gov.nih.nci.caintegrator.domain.application.CopyNumberAlterationCriterion;
import gov.nih.nci.caintegrator.domain.application.CopyNumberCriterionTypeEnum;

import java.util.List;

/**
 * Wraps access to a single CopyNumberAlterationCriterion.
 */
public class CallsValueCriterionWrapper extends AbstractCopyNumberCoordinateWrapper {

    /**
     * The gene name label.
     */
    public static final String FIELD_NAME = "Calls";

    CallsValueCriterionWrapper(AbstractCriterionRow row) {
        this(new CopyNumberAlterationCriterion(), row);
    }

    CallsValueCriterionWrapper(CopyNumberAlterationCriterion criterion, AbstractCriterionRow row) {
        super(row, criterion);
        criterion.setCopyNumberCriterionType(CopyNumberCriterionTypeEnum.CALLS_VALUE);
        setMinNumberParameters(1);
        if (isStudyHasMultipleCopyNumberPlatformsWithCghCall()) {
            getParameters().add(createPlatformNameParameter(getCopyNumberPlatformNamesWithCghCall()));
            setMinNumberParameters(2);
        }
        getParameters().add(createCallsValueParameter());
        getParameters().add(createIntervalTypeParameter());
        setIntervalParameters();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    String getFieldName() {
        return FIELD_NAME;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    CriterionTypeEnum getCriterionType() {
        return CriterionTypeEnum.CGHCALL;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected void updateControlParameters() {
        // no-op, no control parameters for segmentation criterion.
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected boolean platformParameterUpdateOnChange() {
        return false;
    }

    private MultiSelectParameter<Integer> createCallsValueParameter() {
        OptionList<Integer> options = new OptionList<Integer>();
        options.addOption("-1", -1);
        options.addOption("0", 0);
        options.addOption("1", 1);
        options.addOption("2", 2);
        ValuesSelectedHandler<Integer> handler = new ValuesSelectedHandler<Integer>() {
            @Override
            public void valuesSelected(List<Integer> values) {
                getCopyNumberAlterationCriterion().getCallsValues().clear();
                getCopyNumberAlterationCriterion().getCallsValues().addAll(values);
            }
        };
        MultiSelectParameter<Integer> callsValueParameter =
            new MultiSelectParameter<Integer>(getParameters().size(), getRow().getRowIndex(),
                    options, handler, getCopyNumberAlterationCriterion().getCallsValues());
        callsValueParameter.setLabel("Calls Value in");
        return callsValueParameter;
    }

}


text:
import {Component} from '@angular/core';
import {Router} from '@angular/router';

@Component({
    templateUrl: 'settings.html'
})
export class SettingsComponent  {

    menuEntries = [
        {name: 'Project', link:['project']},
        {name: 'Modules', link:['modules']},
        {name: 'Connector', link:['connector']}
    ];

    constructor(private router:Router) {}

    isActive(name: string) {
        return this.router.isActive('settings/' + name, false);
    }
}


text:
layout: post
title:  "Long Ass Description"
description: Thhhhhhhiiiiiiiiiiiss description is tooooooooooooooooooooo long. Like waaaay toooo looong. Gooooooglllllleeeeee is nooooooot goooooiiiiinng tooooooooooo lliiiiiiikkkkkkkke thiiiiiiiisssssssss.
---

Aw yeah.


text:
__author__ = 'Michael Aquilina'

# Encrypt and Decrypt messages using a very simple Caesar cipher
# NOTE: This is here just for educational purposes, you should not rely
# on the security of this cipher for sending messages. Caesar ciphers are
# very easily broken through frequency analysis.
#
# Use aes.py to encrypt and decrypt messages with good security.

# python caesar.py <message> <number> --encrypt
# python caesar.py <message> <number> --decrypt

# The <number> specified can be thought of as the key for this cipher

def encrypt_message(key, plaintext):
    return ''.join([chr((key + ord(c)) % 255) for c in plaintext])

def decrypt_message(key, ciphertext):
    return ''.join([chr((ord(c) - key) % 255) for c in ciphertext])

if __name__ == '__main__':
    import argparse
    import sys

    parser = argparse.ArgumentParser(description='Encrypt and Decrypt messages using a very simple Caesar cipher')
    parser.add_argument('text', help='The text to encrypt or decrypt depending on the operation being performed.')
    parser.add_argument('key', type=int, help='The key with which the encrypt or decrypt the incoming text. Integer value expected')
    parser.add_argument('--encrypt', '-e', action='store_true', help='Specify to encrypt the incoming message. Input text expected in ASCII format.')
    parser.add_argument('--decrypt', '-d', action='store_true', help='Specify to decrypt the incoming message. Input text expected in Hex format.')

    args = parser.parse_args()

    if args.encrypt:
        ct = encrypt_message(args.key, args.text)

        # Use hex encoding to prevent command line from printing wrong characters
        print 'Your encrypted text is (in hex format):'
        print ct.encode('hex')

    elif args.decrypt:
        ct = args.text.decode('hex')

        print 'Your decrypted text is:'
        print decrypt_message(args.key, ct)
    else:
        print 'Please specify if you wish to --encrypt or --decrypt'
        sys.exit(1)


text:
<?php
/**
 * Pico Configuration
 *
 *  This is the configuration file for Pico. It comes loaded with the
 *  default values, which can be found in the get_config() method of
 *  the Pico class (lib/pico.php).
 *
 * @author Gilbert Pellegrom
 * @link http://picocms.org
 * @license http://opensource.org/licenses/MIT
 * @version 0.9
 *
 * To override any of the default settings below, copy this file to
 * `config.php`, uncomment the line and make and save your changes.
 */

/*
 * BASIC
 */
$config['site_title'] = 'Stage';              // Site title
// $config['base_url'] = '';                    // Override base URL (e.g. http://example.com)

/*
 * THEME
 */
$config['theme'] = 'fancy';                // Set the theme (defaults to "default")
// $config['twig_config'] = array(              // Twig settings
//	'cache' => false,	                        // To enable Twig caching change this to CACHE_DIR
//	'autoescape' => false,                      // Autoescape Twig vars
//	'debug' => false                            // Enable Twig debug
// );

/*
 * CONTENT
 */
$config['date_format'] = '%d-%m-%Y';             // Set the PHP date format as described here: http://php.net/manual/en/function.strftime.php
$config['pages_order_by'] = 'date';           // Order pages by "alpha" or "date"
$config['pages_order'] = 'desc';                // Order pages "asc" or "desc"
// $config['excerpt_length'] = 50;                // The pages excerpt length (in words)
$config['content_dir'] = 'content/';    // Content directory

/*
 * TIMEZONE
 */
// date_default_timezone_set('UTC');              // Timezone may be reqired by your php install

/*
 * Minify - https://github.com/NiklasTeich/pico-minify
 */
$config['pico_minify'] = array(
    'minify' => true,
    'compress_css' => true,
    'compress_js' => true,
    'remove_comments' => true
);

/*
 * Cache - https://github.com/glumb/pico_cache
 */
$config['cache_enabled'] = false; // default
$config['cache_dir'] = 'content/cache/'; // default
$config['cache_time'] = '604800'; // 60*60*24*7, seven days (default)

/*
 * CUSTOM
 */
// $config['custom_setting'] = 'Hello';           // Can be accessed by {{ config.custom_setting }} in a theme
$config['date_time_format'] = '%d-%m-%Y %R';
$config['site_author'] = 'Johan van Eck';
$config['site_description'] = 'Een blogje met informatie over mijn stage bij Mangrove';

// Keep this line
return $config;


text:
// Copyright (C) 2010, 2011 and 2012 Marcin Arkadiusz Skrobiranda.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
// 3. Neither the name of the project nor the names of its contributors
//    may be used to endorse or promote products derived from this software
//    without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.

#include <Game/GameServer/World/WorldPersistenceFacade.hpp>
#include <Game/GameServer/World/WorldRecord.hpp>
#include <Game/GameServerUT/Persistence/TransactionDummy.hpp>
#include <Game/GameServerUT/World/WorldAccessorMock.hpp>

using namespace GameServer::Persistence;
using namespace GameServer::World;
using namespace boost;
using namespace std;

using testing::Return;
using testing::Throw;

/**
 * @brief A test class.
 */
class WorldPersistenceFacadeTest
    : public testing::Test
{
protected:
    /**
     * @brief Constructs the test class.
     */
    WorldPersistenceFacadeTest()
        : m_world_name_1("World2"),
          m_world_name_2("World1"),
          m_land_name("Land")
    {
    }

    /**
     * @brief Compares the world with expected values.
     *
     * @param a_world      The world to be compared.
     * @param a_world_name The expected name of the world.
     */
    void compareWorld(
        IWorldShrPtr      a_world,
        std::string const a_world_name
    )
    {
        ASSERT_STREQ(a_world_name.c_str(), a_world->getWorldName().c_str());
    }

    /**
     * @brief Test constants: the names of the worlds.
     */
    string m_world_name_1,
           m_world_name_2;

    /**
     * @brief Test constants: the name of the land.
     */
    string m_land_name;
};

TEST_F(WorldPersistenceFacadeTest, CtorDoesNotThrow)
{
    IWorldAccessorAutPtr accessor(new WorldAccessorMock);

    ASSERT_NO_THROW(WorldPersistenceFacade persistence_facade(accessor));
}

TEST_F(WorldPersistenceFacadeTest, createWorld_Success)
{
    ITransactionShrPtr transaction(new TransactionDummy);

    WorldAccessorMock * mock = new WorldAccessorMock;

    EXPECT_CALL(*mock, insertRecord(transaction, "World"));

    IWorldAccessorAutPtr accessor(mock);

    WorldPersistenceFacade persistence_facade(accessor);

    ASSERT_TRUE(persistence_facade.createWorld(transaction, "World"));
}

TEST_F(WorldPersistenceFacadeTest, createWorld_Failure)
{
    ITransactionShrPtr transaction(new TransactionDummy);

    WorldAccessorMock * mock = new WorldAccessorMock;

    std::exception e;

    EXPECT_CALL(*mock, insertRecord(transaction, "World"))
    .WillOnce(Throw(e));

    IWorldAccessorAutPtr accessor(mock);

    WorldPersistenceFacade persistence_facade(accessor);

    ASSERT_FALSE(persistence_facade.createWorld(transaction, "World"));
}

TEST_F(WorldPersistenceFacadeTest, getWorld_WorldDoesNotExist)
{
    ITransactionShrPtr transaction(new TransactionDummy);

    WorldAccessorMock * mock = new WorldAccessorMock;

    EXPECT_CALL(*mock, getRecord(transaction, m_world_name_1))
    .WillOnce(Return(IWorldRecordShrPtr()));

    IWorldAccessorAutPtr accessor(mock);

    WorldPersistenceFacade persistence_facade(accessor);

    IWorldShrPtr world = persistence_facade.getWorld(transaction, m_world_name_1);

    ASSERT_TRUE(world == NULL);
}

TEST_F(WorldPersistenceFacadeTest, getWorld_WorldDoesExist)
{
    ITransactionShrPtr transaction(new TransactionDummy);

    WorldAccessorMock * mock = new WorldAccessorMock;

    EXPECT_CALL(*mock, getRecord(transaction, m_world_name_1))
    .WillOnce(Return(IWorldRecordShrPtr(new WorldRecord(m_world_name_1))));

    IWorldAccessorAutPtr accessor(mock);

    WorldPersistenceFacade persistence_facade(accessor);

    IWorldShrPtr world = persistence_facade.getWorld(transaction, m_world_name_1);

    ASSERT_TRUE(world != NULL);

    compareWorld(world, m_world_name_1);
}

TEST_F(WorldPersistenceFacadeTest, getWorldByLandName_WorldDoesNotExist)
{
    ITransactionShrPtr transaction(new TransactionDummy);

    WorldAccessorMock * mock = new WorldAccessorMock;

    EXPECT_CALL(*mock, getWorldNameOfLand(transaction, m_land_name))
    .WillOnce(Return(m_world_name_1));

    EXPECT_CALL(*mock, getRecord(transaction, m_world_name_1))
    .WillOnce(Return(IWorldRecordShrPtr()));

    IWorldAccessorAutPtr accessor(mock);

    WorldPersistenceFacade persistence_facade(accessor);

    IWorldShrPtr world = persistence_facade.getWorldByLandName(transaction, m_land_name);

    ASSERT_TRUE(world == NULL);
}

TEST_F(WorldPersistenceFacadeTest, getWorldByLandName_WorldDoesExist)
{
    ITransactionShrPtr transaction(new TransactionDummy);

    WorldAccessorMock * mock = new WorldAccessorMock;

    EXPECT_CALL(*mock, getWorldNameOfLand(transaction, m_land_name))
    .WillOnce(Return(m_world_name_1));

    EXPECT_CALL(*mock, getRecord(transaction, m_world_name_1))
    .WillOnce(Return(IWorldRecordShrPtr(new WorldRecord(m_world_name_1))));

    IWorldAccessorAutPtr accessor(mock);

    WorldPersistenceFacade persistence_facade(accessor);

    IWorldShrPtr world = persistence_facade.getWorldByLandName(transaction, m_land_name);

    ASSERT_TRUE(world != NULL);

    compareWorld(world, m_world_name_1);
}

TEST_F(WorldPersistenceFacadeTest, getWorlds_WorldsDoNotExist)
{
    ITransactionShrPtr transaction(new TransactionDummy);

    WorldAccessorMock * mock = new WorldAccessorMock;

    IWorldRecordMap map;

    EXPECT_CALL(*mock, getRecords(transaction))
    .WillOnce(Return(map));

    IWorldAccessorAutPtr accessor(mock);

    WorldPersistenceFacade persistence_facade(accessor);

    IWorldMap worlds = persistence_facade.getWorlds(transaction);

    ASSERT_TRUE(worlds.empty());
}

TEST_F(WorldPersistenceFacadeTest, getWorlds_WorldsDoExist_OneWorld)
{
    ITransactionShrPtr transaction(new TransactionDummy);

    WorldAccessorMock * mock = new WorldAccessorMock;

    IWorldRecordMap map;
    map.insert(make_pair(m_world_name_1, IWorldRecordShrPtr(new WorldRecord(m_world_name_1))));

    EXPECT_CALL(*mock, getRecords(transaction))
    .WillOnce(Return(map));

    IWorldAccessorAutPtr accessor(mock);

    WorldPersistenceFacade persistence_facade(accessor);

    IWorldMap worlds = persistence_facade.getWorlds(transaction);

    ASSERT_FALSE(worlds.empty());

    ASSERT_EQ(1, worlds.size());

    compareWorld(worlds[m_world_name_1], m_world_name_1);
}

TEST_F(WorldPersistenceFacadeTest, getWorlds_WorldsDoExist_ManyWorlds)
{
    ITransactionShrPtr transaction(new TransactionDummy);

    WorldAccessorMock * mock = new WorldAccessorMock;

    IWorldRecordMap map;
    map.insert(make_pair(m_world_name_1, IWorldRecordShrPtr(new WorldRecord(m_world_name_1))));
    map.insert(make_pair(m_world_name_2, IWorldRecordShrPtr(new WorldRecord(m_world_name_2))));

    EXPECT_CALL(*mock, getRecords(transaction))
    .WillOnce(Return(map));

    IWorldAccessorAutPtr accessor(mock);

    WorldPersistenceFacade persistence_facade(accessor);

    IWorldMap worlds = persistence_facade.getWorlds(transaction);

    ASSERT_FALSE(worlds.empty());

    ASSERT_EQ(2, worlds.size());

    compareWorld(worlds[m_world_name_1], m_world_name_1);
    compareWorld(worlds[m_world_name_2], m_world_name_2);
}


text:
<?php
declare(strict_types=1);

namespace Lcobucci\Sample\App\Message;

use Lcobucci\Sample\App\App as Entity;
use Ramsey\Uuid\UuidInterface;

final class App implements \JsonSerializable
{
    /**
     * @var UuidInterface
     */
    public $id;

    /**
     * @var string
     */
    public $name;

    public static function fromEntity(Entity $app): self
    {
        $model       = new self();
        $model->id   = $app->id();
        $model->name = $app->name();

        return $model;
    }

    public function jsonSerialize()
    {
        return [
            'id'   => (string) $this->id,
            'name' => $this->name,
        ];
    }
}


text:
!function ($) {
    "use strict"; // jshint ;_;

    if( $( '#blat_menu0').length ){
        fillupBlatMenu0()
    }
    if( $( '#blat_menu1').length ){
        fillupBlatMenu1()
    }
    if( $( '#blat_menu2').length ){
        fillupBlatMenu2()
    }
    if( $( '#hmm_menu0').length ){
        fillupHmmerMenu0()
    }

    initNumberAndTypeJobInput()
    setupMappingSteps()
    summarizeForm()

    $('#jobstart').click( function(){
        var xhr = new XMLHttpRequest();

        // Cancel Job if not correct input
        if ( ! checkJobInput()){
            return;
        }

        xhr.onreadystatechange = function( e ){
            if( 4 == this.readyState ){
                var obj = $.parseJSON( this.responseText )
                setTimeout( function(){endJobSending( obj )}, 500 )
            }
        };

        xhr.open( 'POST', '/web/ajax/job', true );

        var form = $('#jobform')[0];
        var fd = new FormData( form );
        xhr.send( fd );

        clearJobForm();
    });

}(window.jQuery);

// -----------------------------------------------------------------------------
function clearJobForm(){
    $( '#jobstartbtn' ).addClass( 'hidden' )
    $( '#jobstarttext' ).html( "Job Launched" )
    $( '#jobwaitresult' ).removeClass( 'hidden' )
    $( '#jobwaittext' ).html( "Waiting result ..." )
    var bar = $( '#jobwaitbar' )
    bar.addClass( 'active' )
    bar.addClass( 'progress-striped' )
    bar.removeClass( 'progress-success' )
    bar.removeClass( 'progress-danger' )
    $( 'html, body' ).animate( {scrollTop: $(document).height() }, 100 );
}

// -----------------------------------------------------------------------------
function endJobSending( ret ){
    var bar = $( '#jobwaitbar' )
    bar.removeClass( 'active' )
    bar.removeClass( 'progress-striped' )
    if( ! ret.ok ){
        bar.addClass( 'progress-danger' )
        $( '#jobwaittext' ).html( "Job ERROR: " + ret.msg )
    }else{
        bar.addClass( 'progress-success' )
        $( '#jobwaittext' ).html( "Job sent: Go to Home to check its status" )
    }

    $( '#jobstarttext' ).html( "Launching the analysis" )
    $( '#jobstartbtn' ).removeClass( 'hidden' )
    $( '#jobstartpre' ).removeClass( 'hidden' )
    $( 'html, body' ).animate( {scrollTop: $(document).height() }, 100 );
}

// -----------------------------------------------------------------------------
function fillupBlatMenu0(){
    getFileListWithType( 3, function( files ){
        var items1 = [];

        var count = 0
        $.each(files, function( key, val ) {

            // this currently defines an array but dont get all values in (just one)
            //            items1.push( "
<input type='checkbox' name='my_blat_custom[]' value=" + val['file'] + " href=\"#\"> " + val['file'] + "
" )
            items1.push( "
<input type='checkbox' class='cleaning_steps' name='blat_custom_reads_n" + count + "' value=" + val['file'] + " href=\"#\" disabled> " + val['file'] + "
" )
            count = count + 1
        });

        $( '#blat_menu0').append( items1 );
    });
}

// -----------------------------------------------------------------------------
function fillupBlatMenu1(){
    getFileListWithType( 3, function( files ){
        var items1 = [];

        var count = 0
        $.each(files, function( key, val ) {

            items1.push( "
<input type='checkbox' class='identification_steps' name='blat_custom_ass_n" + count + "' value=" + val['file'] + " href=\"#\" disabled> " + val['file'] + "
" )

            count = count + 1
        });

        $( '#blat_menu1').append( items1 );
    });
}

// -----------------------------------------------------------------------------
function fillupBlatMenu2(){
    getFileListWithType( 4, function( files ){
        var items1 = [];

    var count = 0
        $.each(files, function( key, val ) {

            items1.push( "
<input type='checkbox' class='identification_steps' name='blat_custom_ass_aa" + count + "' value=" + val['file'] + " href=\"#\" disabled> " + val['file'] + "
" )

        count = count + 1
        });

        $( '#blat_menu2').append( items1 );
    });
}

// -----------------------------------------------------------------------------
function fillupHmmerMenu0(){
    getFileListWithType( 7, function( files ){
        var items1 = [];

    var count = 0
        $.each(files, function( key, val ) {

            items1.push( "
<input type='checkbox' class='identification_steps' name='hmm_custom" + count + "' value=" + val['file'] + " href=\"#\" disabled> " + val['file'] + "
" )

        count = count + 1
        });

        $( '#hmm_menu0').append( items1 );
    });
}

// -----------------------------------------------------------------------------
function checkJobInput(){
    // if no input type is selected:
    if ( ! $("input[name=input_type]").is(':checked') ){
        alert("You have to select a type of input at the top of the page before submitting the job")
        return false
    }

    var in_type = $("input[name=input_type]:checked").val()
    // check input type: single
    if ( in_type == "single" ){
        if ( $('#jobfile').val() == null ) {
            alert("You did not specify any reads file")
            return false
        }
    }
    // check input type: paired
    // if both reads files are the same:
    if ( in_type == "paired" ){
        if ( $('#jobfile').val() == null || $('#jobfile2').val() == null ){
            alert("You did not specify two reads files")
            return false
        }
    }
    // check input type: contigs
    if ( in_type == "contigs" ){
        if ( $('#jobfile3').val() == null ) {
            alert("You did not specify any assembly file")
            return false
        }
    }
    // check input type: contigs_with_single:
    if ( in_type == "contigs_with_single" ){
        if ( $('#jobfile').val() == null ) {
            alert("You did not specify any reads file")
            return false
        }
        if ( $('#jobfile3').val() == null ) {
            alert("You did not specify any assembly file")
            return false
        }
    }
    // check input type: contigs_with_paired:
    if ( in_type == "contigs_with_paired" ){
        if ( $('#jobfile').val() == null || $('#jobfile2').val() == null ){
            alert("You did not specify two reads files")
            return false
        }
        if ( $('#jobfile3').val() == null ) {
            alert("You did not specify any assembly file")
            return false
        }
    }

    // if both reads files are the same:
    if ( in_type == "paired" || in_type == "contigs_with_paired"){
        if ( $('#jobfile').val() == $('#jobfile2').val()){
            alert("You have to specify two different reads files as input")
            return false
        }
    }

    // if no analysis steps checked
    var steps = $(".cleaning_steps, .assembly_steps, .assembly_qc_steps, .identification_steps, .mapping_steps, .expression_steps")

    if ( ! steps.is(":checked")){
        alert("You did not specify any analysis steps")
        return false
    }
    // if no adapters but cutadapt activated:
    if ($("#adapters").is(':checked')){
        if ($("#cutadapt_option1").val() == '' || $("#cutadapt_option2").val() == '' ){
            alert("You have selected Cutadapt but did not specify two adapter sequences: please input the sequences in Cutadapt options")
            return false
        }
    }
    return true
}

// -----------------------------------------------------------------------------
function initNumberAndTypeJobInput(){
    // Select the number and type of input:
    var reads_1 = $("div[id=reads_1]")
    var reads_2 = $("div[id=reads_2]")
    var assembly_in = $("div[id=assembly_in]")
    var in_type = $("input[name=input_type]")

    // Setting single or paired reads
    in_type.change(function (){
        // unchecking all boxes
        $('.cleaning_steps').attr('checked', false)
        $('.assembly_steps').attr('checked', false)
        $('.assembly_qc_steps').attr('checked', false)
        $('.mapping_steps').attr('checked', false)
        $('.identification_steps').attr('checked', false)
        $('.expression_steps').attr('checked', false)

        // No defaults for input files:
        document.getElementById("jobfile").selectedIndex = -1;
        document.getElementById("jobfile2").selectedIndex = -1;
        document.getElementById("jobfile3").selectedIndex = -1;

        var in_type = $("input[name=input_type]:checked").val()
        //	$('#demo').append(in_type)
        var warn_read = $('div[id=no_reads_alert]')
        var warn_read2 = $('div[id=no_reads_alert2]')
        var warn_ass = $('div[id=no_assembly_alert]')
        var warn_exp = $('div[id=no_reads_and_ass_alert]')

        switch(in_type){
        case "single":
            $('#jobfile').removeAttr('disabled')
            $('#jobfile2').attr('disabled','disabled')
            $('#jobfile3').attr('disabled','disabled')
            reads_1.children("label").text("Single reads file:")
            reads_1.show()
            reads_2.hide()
            assembly_in.hide()
            $('.cleaning_steps').attr('disabled', false);
            $('.assembly_steps').attr('disabled', false);
            warn_read.hide()
            warn_read2.hide()
            $('.assembly_qc_steps').attr('disabled', true);
            $('.mapping_steps').attr('disabled', true);
            $('.identification_steps').attr('disabled', true);
            warn_ass.show()
            $('.expression_steps').attr('disabled', true)
            warn_exp.show()
            break;
        case "paired":
            $('#jobfile').removeAttr('disabled')
            $('#jobfile2').removeAttr('disabled')
            $('#jobfile3').attr('disabled','disabled')
            reads_1.children("label").text("Left reads file:")
            reads_1.show()
            reads_2.show()
            assembly_in.hide()
            $('.cleaning_steps').attr('disabled', false);
            $('.assembly_steps').attr('disabled', false);
            warn_read.hide()
            warn_read2.hide()
            $('.assembly_qc_steps').attr('disabled', true);
            $('.mapping_steps').attr('disabled', true);
            $('.identification_steps').attr('disabled', true);
            warn_ass.show()
            $('.expression_steps').attr('disabled', true)
            warn_exp.show()
            break;
        case "contigs":
            $('#jobfile3').removeAttr('disabled')
            $('#jobfile').attr('disabled','disabled')
            $('#jobfile2').attr('disabled','disabled')
            reads_1.hide()
            reads_2.hide()
            assembly_in.show()
            $('.cleaning_steps').attr('disabled', true);
            $('.assembly_steps').attr('disabled', true);
            warn_read.show()
            warn_read2.show()
            $('.assembly_qc_steps').attr('disabled', false);
            $('.mapping_steps').attr('disabled', true);
            $('.identification_steps').attr('disabled', false);
            warn_ass.hide()
            $('.expression_steps').attr('disabled', true)
            warn_exp.show()
            break;
        case "contigs_with_single":
            $('#jobfile').removeAttr('disabled')
            $('#jobfile2').attr('disabled','disabled')
            $('#jobfile3').removeAttr('disabled')
            reads_1.children("label").text("Single reads file:")
            reads_1.show()
            assembly_in.show()
            reads_2.hide()
            $('.cleaning_steps').attr('disabled', false);
            $('.assembly_steps').attr('disabled', true);
            warn_read.hide()
            warn_read2.show()
            $('.assembly_qc_steps').attr('disabled', false);
            $('.mapping_steps').attr('disabled', false);
            $('.identification_steps').attr('disabled', false);
            warn_ass.hide()
            $('.expression_steps').attr('disabled', false)
            warn_exp.hide()
            break;
        case "contigs_with_paired":
            $('#jobfile').removeAttr('disabled')
            $('#jobfile2').removeAttr('disabled','disabled')
            $('#jobfile3').removeAttr('disabled')
            reads_1.children("label").text("Left reads file:")
            reads_1.show()
            reads_2.show()
            assembly_in.show()
            $('.cleaning_steps').attr('disabled', false);
            $('.assembly_steps').attr('disabled', true);
            warn_read.hide()
            warn_read2.show()
            $('.assembly_qc_steps').attr('disabled', false);
            $('.mapping_steps').attr('disabled', false);
            $('.identification_steps').attr('disabled', false);
            warn_ass.hide()
            $('.expression_steps').attr('disabled', false)
            warn_exp.hide()
            break;
        }
    });
}

// -----------------------------------------------------------------------------
function setupMappingSteps(){
    // activate/desactivate mapping/identification steps
    var trin_check = $("input[id=trinity]")
    var warn_ass = $('div[id=no_assembly_alert]')
    var warn_exp = $('div[id=no_reads_and_ass_alert]')

    trin_check.change(function(){
        if (trin_check.is(':checked')){
            $('.mapping_steps').attr('disabled', false);
            $('.assembly_qc_steps').attr('disabled', false);
            $('.identification_steps').attr('disabled', false);
            $('.expression_steps').attr('disabled', false);
            warn_ass.hide()
            warn_exp.hide()
        }else{
            $('.mapping_steps').attr({'disabled': true, 'checked': false});
            $('.assembly_qc_steps').attr({'disabled': true, 'checked': false});
            $('.identification_steps').attr({'disabled': true, 'checked': false});
            $('.expression_steps').attr({'disabled': true, 'checked': false});
            warn_ass.show()
            warn_exp.show()
        }

    });
}

// -----------------------------------------------------------------------------
function summarizeForm(){

    $('#jobform :input').change(function(){
        $("#formsum_clean").empty()
        $("#formsum_ass").empty()
        $("#formsum_identification").empty()
        $("#formsum_expr").empty()

        $("#formsum_clean").append("
Cleaning step:")
        $(".cleaning_steps").each(function(){
            if ( $(this).is(':checked')) {
                var name = $(this).attr('name')
                $("#formsum_clean").append("
" + name + "
")
            }
        });

        $("#formsum_ass").append("
Assembly/Mapping step:")
        $(".assembly_steps, .assembly_qc_steps, .mapping_steps").each(function(){
            if ( $(this).is(':checked')) {
                var name = $(this).attr('name')
                $("#formsum_ass").append("
" + name + "
")
            }
        });
        $("#formsum_identification").append("
Identification step:")
        $(".identification_steps").each(function(){
            if ( $(this).is(':checked')) {
                var name = $(this).attr('name')
                $("#formsum_identification").append("
" + name + "
")
            }
        });
        $("#formsum_expr").append("
Expression step:")
        $(".expression_steps").each(function(){
            if ( $(this).is(':checked')) {
                var name = $(this).attr('name')
                $("#formsum_expr").append("
" + name + "
")
            }
        });
    });
}


text:
package tk.zielony.randomdata.common;

import java.util.Random;

import tk.zielony.randomdata.DataContext;
import tk.zielony.randomdata.Generator;
import tk.zielony.randomdata.Matcher;

public class StringHashGenerator extends Generator<String> {
    private Random random = new Random();
    private int length;

    public StringHashGenerator() {
        length = 32;
    }

    public StringHashGenerator(int length) {
        this.length = length;
    }

    @Override
    protected Matcher getDefaultMatcher() {
        return f -> f.getName() != null && f.getName().contains("hash");
    }

    @Override
    public String next(DataContext context) {
        char[] hash = new char[length];
        for (int i = 0; i < hash.length; i++)
            hash[i] = (char) (random.nextBoolean() ? random.nextInt('9' - '0') + '0' : random.nextInt('z' - 'a') + 'a');
        return new String(hash);
    }
}


text:
namespace games {
	class IResourceLoader {
	public:
		virtual std::shared_ptr<IDirect3DTexture9> loadTexture(IDirect3DDevice9* device, const std::string& name) = 0;
		virtual std::shared_ptr<Mesh> loadMesh(IDirect3DDevice9* device, const std::string& name) = 0;
		virtual std::shared_ptr<mage::Effect> loadEffect(IDirect3DDevice9* device, const std::string& name) = 0;
        virtual std::shared_ptr<IShader> loadShader(IDirect3DDevice9* device, const std::string& name) = 0;
	};

	class Resources
	{
	public:
		static void setLoader(std::shared_ptr<IResourceLoader> loader);

		static std::shared_ptr<IDirect3DTexture9> getTexture(IDirect3DDevice9* device, const std::string& name);
		static std::shared_ptr<Mesh> getMesh(IDirect3DDevice9* device, std::string name);
        static std::shared_ptr<IShader> getShader(IDirect3DDevice9* device, const std::string& name);
		static std::shared_ptr<mage::Effect> getEffect(IDirect3DDevice9* device, const std::string& name);
	private:
		struct private_implementation;
		static std::unique_ptr<private_implementation> pImpl;

		template <class T>
		static std::shared_ptr<T> getData(const std::string& name, std::map<std::string, std::shared_ptr<T>> cache, std::function<std::shared_ptr<T>(const std::string&)> loadData) {
			auto savedData = cache[name];
			if (savedData)
				return savedData;

			auto data = loadData(name);
			cache[name] = data;
			return data;
		}
	};
}


text:
<!DOCTYPE html>

    <title>xeogl Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">

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

ghost effect applied to a Mesh with a custom EmphasisMaterial


text:
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QTranslator appTr;
    appTr.load(QLocale::system(), St::AppName, "_", ":/translation");
    a.installTranslator(&appTr);
    Widget w;
    w.show();

    return a.exec();
}


text:
<?php

namespace execut\crudFields;

use execut\crudFields\fields\Action;
use execut\crudFields\fields\Boolean;
use execut\crudFields\fields\Date;
use execut\crudFields\fields\Id;
use execut\crudFields\fields\StringField;
use yii\base\Component;
use yii\helpers\ArrayHelper;

/**
 * Class ModelsHelper
 * @package execut\crudFields
 */
class ModelsHelper extends Component
{
    public $standardFieldsDefault = [
        'id' => [
            'class' => Id::class,
            'order' => -20,
            'column' => [
                'visible' => false,
            ],
        ],
        'visible' => [
            'class' => Boolean::class,
            'order' => 75,
            'attribute' => 'visible',
            'defaultValue' => true,
        ],
        'name' => [
            'class' => StringField::class,
            'order' => -10,
            'attribute' => 'name',
            'required' => true,
        ],
        'created' => [
            'class' => Date::class,
            'order' => 80,
            'attribute' => 'created',
            'isTime' => true,
            'column' => [
                'visible' => false,
            ],
        ],
        'updated' => [
            'class' => Date::class,
            'order' => 90,
            'attribute' => 'updated',
            'isTime' => true,
            'column' => [
                'visible' => false,
            ],
        ],
        'actions' => [
            'class' => Action::class,
            'view' => false,
        ],
    ];

    public $exclude = [];
    public $other = [];

    public function getStandardFields()
    {
        $fields = $this->standardFieldsDefault;
        foreach ($this->exclude as $key) {
            unset($fields[$key]);
        }

        $other = $this->other;
//        foreach ($other as $key => &$value) {
//            if (is_array($value) && empty($value['attribute'])) {
//                $value['attribute'] = $key;
//            }
//        }

        $fields = ArrayHelper::merge($fields, $other);

        return $fields;
    }
}


text:
package ru.stqa.pft.sandbox;

public class Main2 {
  public static void main(String[] args) {
    hello("world");
    hello("user");

    Square s = new Square(5);
    System.out.println("Площадь квадрата со стороной " + s.area() + " = " + s.area());

    Rectangle r = new Rectangle(4, 6);
    System.out.println("Площадь прямоугольника со сторонами " + r.a + " и " + r.b + " равна " + r.area());
    }

  public static void hello(String somebody) {
     System.out.println("Hello, " + somebody);

  }

}


text:
using Newtonsoft.Json;

namespace Start.Net.Entities
{
    public class Item
    {
        [JsonProperty("title")]
        public string Title { get; set; }

        [JsonProperty("amount")]
        public int Amount { get; set; }

        [JsonProperty("quantity")]
        public int Quantity { get; set; }
    }
}