text:
#include "GameFieldRender.h"
#include "Engine/Core/Interp.hpp"

struct GameFieldRender::IGemState
{
  virtual ~IGemState () {}
  virtual bool OnUpdate( float deltaTime, PointF &curPos ) = 0;
};
//////////////////////////////////////////////////////////////////////////

class GameFieldRender::DefaultState: public IGemState
{
public:
  DefaultState *Start() { return this; }
  bool OnUpdate( float deltaTime, PointF &curPos ) { return true; }
};
//////////////////////////////////////////////////////////////////////////

class GameFieldRender::SpringState: public IGemState
{
public:
  SpringState *Start( PointF destPos );
  bool OnUpdate( float deltaTime, PointF &curPos );
  void UpdateDestPos( PointF destPos );

private:
  PointF m_destPos;
  PointF m_velocity;
};
//////////////////////////////////////////////////////////////////////////

struct GameFieldRender::FallParams
{
  float accel;
  float delay;
};
//////////////////////////////////////////////////////////////////////////

class GameFieldRender::FallingGemsManager
{
public:
  FallingGemsManager() { Reset(); }

  FallParams NextParamsOutOfField( Point from, int cellSize );
  FallParams NextParamInField( Point from, int cellSize );
  void Reset();

private:
  static float GetFirstCellTime() { return 0.2f; }
  static float MinDelayCoeff() { return  0.06f; }
  static float FromPointDelay( Point from );

private:
  int m_flyingGemsCount[GameField::FieldSize];
};
//////////////////////////////////////////////////////////////////////////

class GameFieldRender::FallState: public IGemState
{
public:
  FallState *Start( PointF startPos, PointF destPos, float accel, float delay );
  bool OnUpdate( float deltaTime, PointF &curPos );
  static float CalcAccel(float distance, float time );

private:
  typedef bool (FallState::*UpdateStateT)( float deltaTime, PointF &curPos );

private:
  bool OnUpdateDelay( float deltaTime, PointF &curPos );
  bool OnUpdateBeforeBounce( float deltaTime, PointF &curPos );
  bool OnUpdateAfterBounce( float deltaTime, PointF &curPos );

private:
  PointF m_startPos;
  float m_moveTime;
  float m_totalTime;
  PointF m_destPos;
  float m_delay;
  float m_accel;
  float m_speedAfterBounce;
  UpdateStateT m_pState;
};
//////////////////////////////////////////////////////////////////////////

class GameFieldRender::GemObj: boost::noncopyable
{
public:
  GemObj( PointF pos, const Texture &tex );
  void Render() const;
  void Update( float deltaTime );
  void FallTo( PointF destPos, const FallParams &fallParams );
  void UpdateDragPoint( PointF destPos );
  void SetPos( PointF curPos );

private:
  PointF m_curPos;
  const Texture &m_tex;

  DefaultState m_defaultState;
  FallState m_fallingState;
  SpringState m_springState;

  IGemState *m_pCurState;
};

#endif // GameFieldRenderGem_h__


text:
package org.apache.edgent.oplet.plumbing;

import java.util.concurrent.ScheduledExecutorService;

import org.apache.edgent.function.Functions;
import org.apache.edgent.oplet.OpletContext;
import org.apache.edgent.oplet.core.Pipe;

/**
 * Isolate upstream processing from downstream
 * processing without guaranteeing tuple order.
 * An executor is used for downstream processing
 * thus tuple order cannot be guaranteed as the
 * scheduler does not guarantee execution order.
 *
 * @param <T> Type of the tuple.
 */
public class UnorderedIsolate<T> extends Pipe<T,T> {
    private static final long serialVersionUID = 1L;

    private ScheduledExecutorService executor;

    @Override
    public void initialize(OpletContext<T, T> context) {
        super.initialize(context);
        executor = context.getService(ScheduledExecutorService.class);
    }

    @Override
    public void accept(T tuple) {
        executor.execute(Functions.delayedConsume(getDestination(), tuple));
    }

    @Override
    public void close() throws Exception {
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.baidu.hsb.parser.ast.expression.string;

import com.baidu.hsb.parser.ast.expression.BinaryOperatorExpression;
import com.baidu.hsb.parser.ast.expression.Expression;
import com.baidu.hsb.parser.visitor.SQLASTVisitor;

/**
 * higherPreExpr 'NOT'? ('REGEXP'|'RLIKE') higherPreExp
 *
 * @author xiongzhao@baidu.com
 */
public class RegexpExpression extends BinaryOperatorExpression {
    private final boolean not;

    public RegexpExpression(boolean not, Expression comparee, Expression pattern) {
        super(comparee, pattern, PRECEDENCE_COMPARISION);
        this.not = not;
    }

    public boolean isNot() {
        return not;
    }

    @Override
    public String getOperator() {
        return not ? "NOT REGEXP" : "REGEXP";
    }

    @Override
    public void accept(SQLASTVisitor visitor) {
        visitor.visit(this);
    }
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.recoveryservicesbackup.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The Private Endpoint network resource that is linked to the Private Endpoint connection. */
@Fluent
public final class PrivateEndpoint {
    /*
     * Gets or sets id
     */
    @JsonProperty(value = "id")
    private String id;

    /** Creates an instance of PrivateEndpoint class. */
    public PrivateEndpoint() {
    }

    /**
     * Get the id property: Gets or sets id.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Set the id property: Gets or sets id.
     *
     * @param id the id value to set.
     * @return the PrivateEndpoint object itself.
     */
    public PrivateEndpoint withId(String id) {
        this.id = id;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}


text:
<?php

namespace Crm\AbonentBundle\Repository;

use Doctrine\ORM\EntityRepository;

/**
 * ApplRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class ApplRepository extends EntityRepository
{
}


text:
  Nitting est
       un village
       localisé dans le département de Moselle en Lorraine. On dénombrait 484 habitants en 2008.

Le parc de logements, à Nitting, se décomposait en 2011 en douze appartements et 192 maisons soit
 un marché plutôt équilibré.

La commune compte quelques  aménagements, elle dispose, entre autres, de un terrain de sport.

À coté de Nitting sont positionnées géographiquement les villes de
Voyer située à 4 km, 406 habitants,
Laneuveville-lès-Lorquin à 2 km, 91 habitants,
Métairies-Saint-Quirin à 3 km, 299 habitants,
Hermelange à 1 km, 226 habitants,
Hesse à 2 km, 613 habitants,
Xouaxange située à 3 km, 344 habitants,
 entre autres. De plus, Nitting est située à seulement sept km de Sarrebourg.

Si vous pensez emmenager à Nitting, vous pourrez aisément trouver une maison à acheter.


text:
package com.amadeus.session;

import java.util.concurrent.ConcurrentLinkedQueue;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * The class is used to determine if the application is in error or not
 *
 * If the number of error stored during the delay reach the max, the application is in error
 * period.
 *
 */

public class ErrorTracker {
  /**
   * Standard constructor
   *
   * @param period
   *          Time in milliseconds while items are kept
   * @param max
   *          If the number of items is more than the max value the Tracker is considered in error
   */
  public ErrorTracker(int period, int max) {
    this.period = period;
    this.max = max;
  }

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

  private ConcurrentLinkedQueue<Long> list = new ConcurrentLinkedQueue<Long>();

  /**
   * When a new event it added , all the event that is older that ( event time - period ) are removed from the tracker
   */
  final int period;

  /**
   * After the limits the Tracker is considering in error
   */
  final int max;

  /**
   * The parameter is a time with the format millisecond from 1900 ( System.currentTimeMillis() ). This method add an
   * event into the Tracker and remove all the old event with the following criteria:
   * now - oldevent superior to period will be removed
   *
   * @param now
   *          current instance
   */

  public void addError(long now) {
    list.add(new Long(now));
    boolean cont = true;
    while (cont) {
      Long last = list.peek();
      if (now - last > period) {
        list.poll();
      } else {
        cont = false;
      }
    }
  }

  public boolean reachLimits() {
    return list.size() >= max;
  }

  public int size() {
    return list.size();
  }

  public void reset() {
    logger.debug("reset of the ErrorTracker");
    list.clear();
  }
}


text:
DotCi defines two new [extension points] ( https://wiki.jenkins-ci.org/display/JENKINS/Extension+points)

- Add new notifications is done by extending `PostBuildNotifier`

Eg: Adding a hipchat notifier in notifications section of `.ci.yml`

```java
  @Extension
public class HipchatNotifier extends PostBuildNotifier {
	public HipchatNotifier() {
		super("hipchat");
	}
	@Override
	public boolean notify(DynamicBuild build, BuildListener listener) {
	  //notify hipchat room
	}
```

- Adding a Jenkins plugin for use through plugins section of `.ci.yml` is done by extending `DotCiPluginAdapter`

Eg: Adding cobertura to plugins section

```java
@Extension
public class CoberturaPluginAdapter extends DotCiPluginAdapter {

	public CoberturaPluginAdapter() {
		super("cobertura", "target/site/cobertura/coverage.xml");
	}

	@Override
	public boolean perform(DynamicBuild dynamicBuild, Launcher launcher, BuildListener listener) {
		CoberturaPublisher publisher = new CoberturaPublisher(pluginInputFiles, false, false, false, false, false, false, false, null, 0);

		try {
			return publisher.perform(((AbstractBuild) dynamicBuild), launcher, listener);
		} catch (Exception e) {
			e.printStackTrace(listener.getLogger());
			return false;
		}
	}

}
```
###LICENSE

The MIT License (MIT)

Copyright (c) 2014, Groupon, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


text:
package by.vshkl.pxlsrt.ui.customview;

import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Build;
import android.util.AttributeSet;
import android.view.View;

public class GridView extends View {

    private static final int NUM_ROWS = 3;
    private static final int NUM_COLS = 3;

    final private Paint blackPaint = new Paint();

    public GridView(Context context) {
        super(context);
        initialize();
    }

    public GridView(Context context, AttributeSet attrs) {
        super(context, attrs);
        initialize();
    }

    public GridView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initialize();
    }

    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
    public GridView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        initialize();
    }

    private void initialize() {
        blackPaint.setStyle(Paint.Style.FILL_AND_STROKE);
        blackPaint.setStrokeWidth(3.0F);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        canvas.drawColor(Color.TRANSPARENT);

        int width = getWidth();
        int height = getHeight();
        int widthStep = getWidth() / NUM_COLS;
        int heightStep = getHeight() / NUM_ROWS;

        for (int i = 1; i < NUM_COLS; i++) {
            for (int j = 1; j < NUM_ROWS; j++) {
                canvas.drawLine(0, j * heightStep, width, j * heightStep, blackPaint);
            }
            canvas.drawLine(i * widthStep, 0, i * widthStep, height, blackPaint);
        }

        super.onDraw(canvas);
    }
}


text:
@interface ViewController ()

@property (weak, nonatomic) IBOutlet UIButton *show;
@property (weak, nonatomic) IBOutlet UIButton *dismiss;
@property (weak, nonatomic) IBOutlet UIButton *showWithOverlay;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSMutableArray *imageArray = [NSMutableArray array];

    for (int i = 0; i<26; i++) {
        UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"loading_%d", i]];
        [imageArray addObject:image];
    }

    [DDGifLoadingView setGifWithImages:imageArray];
    _show.exclusiveTouch = _dismiss.exclusiveTouch = _showWithOverlay.exclusiveTouch = YES;
}

- (IBAction)show:(id)sender {
    [DDGifLoadingView show];
}

- (IBAction)dismiss:(id)sender {
    [DDGifLoadingView dismiss];
}

- (IBAction)showWithOverlay:(id)sender {
    [DDGifLoadingView showWithOverlay];

    // dismiss after 2 seconds
    dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 2 * NSEC_PER_SEC);
    dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
        [DDGifLoadingView dismiss];
    });
}

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

@end


text:
""" You are given two numbers - a and b. Return the first one.

Example

For a = 10 and b = 20, the output should be
  returnFirst(a, b) = 10.
"""

def returnFirst(a, b):
    return b


text:
DataObject FakeAddExecutor::operator() (const ExecutionContext& context) const {
    ++_numEvaluations;
    return context.Inputs().at(0).Add(context.Inputs().at(1));
}

DataObject FakeSubtractExecutor::operator() (const ExecutionContext& context) const {
    ++_numEvaluations;
    return DataObject(context.Inputs().at(0).ToScalar() - context.Inputs().at(2).ToScalar());
}

FakeMultichannelNode::FakeMultichannelNode(const NodePtr& base, const NodePtr& add, const NodePtr& subtract):
        Node({base, add, subtract}),
        _addExecutor(new FakeAddExecutor()),
        _subtractExecutor(new FakeSubtractExecutor()) {
    RegisterExecutor(std::shared_ptr<IExecutor>(_addExecutor));
    RegisterExecutor(std::shared_ptr<IExecutor>(_subtractExecutor));
}

int FakeMultichannelNode::GetNumAdds(void) {
    return _addExecutor->GetNumEvaluations();
}

int FakeMultichannelNode::GetNumSubtracts(void) {
    return _subtractExecutor->GetNumEvaluations();
}

void FakeMultichannelNode::ResetCounter(void) {
    _addExecutor->ResetCounter();
    _subtractExecutor->ResetCounter();
}


text:
(function () {
    'use strict';

    angular.module('ShoppingListCheckOff', [])
        .controller('ToBuyController', ToBuyController)
        .controller("AlreadyBoughtController", AlreadyBoughtController)
        .service("ShoppingListCheckOffService", ShoppingListCheckOffService);

    ToBuyController.$inject = ['ShoppingListCheckOffService'];

    function ToBuyController(ShoppingListService) {
        var ctrl = this;

        ctrl.items = ShoppingListService.getToBuyItems();

        ctrl.boughtItem = function (itemIndex) {
            try {
                ShoppingListService.boughtItem(itemIndex, ctrl.items[itemIndex].name, ctrl.items[itemIndex].quantity);
            } catch (error) {
                console.log(error.message);
            }

        }

    };

    AlreadyBoughtController.$inject = ['ShoppingListCheckOffService'];

    function AlreadyBoughtController(ShoppingListService) {
        var ctrl = this;
        ctrl.items = ShoppingListService.getBoughtItems();

    }

    function ShoppingListCheckOffService() {
        var service = this;
        var toBuyItems = [
            { quantity: 10, name: "cookies" },
            { quantity: 2, name: "apples" },
            { quantity: 4, name: "oranges" },
            { quantity: 10, name: "bananas" },
            { quantity: 2, name: "coffee" },
        ];

        var boughtItems = [];

        service.boughtItem = function (itemIndex, itemName, itemQuantity) {
            service.addItem(boughtItems, itemName, itemQuantity);

            service.removeItem(toBuyItems, itemIndex);
        }
        service.addItem = function (items, itemName, itemQuantity) {
            var item = {
                name: itemName,
                quantity: itemQuantity
            };
            items.push(item);

        };
        service.removeItem = function (items, itemIndex) {
            items.splice(itemIndex, 1);
        }

        service.getToBuyItems = function () {
            return toBuyItems;
        }
        service.getBoughtItems = function () {
            return boughtItems;
        }
    }

})();


text:
import { ApiService } from '../../../services/api.service';
import ApplicationService from '../../../services/application.service';
import MetadataService from '../../../services/metadata.service';
function UpdateMetadataDialogController(
  MetadataService: MetadataService,
  ApiService: ApiService,
  ApplicationService: ApplicationService,
  $mdDialog: angular.material.IDialogService,
  metadata,
  metadataFormats,
  $stateParams,
) {
  'ngInject';

  if ($stateParams.apiId) {
    this.referenceType = 'API';
    this.referenceId = $stateParams.apiId;
  } else if ($stateParams.applicationId) {
    this.referenceType = 'APPLICATION';
    this.referenceId = $stateParams.applicationId;
  }

  this.metadata = metadata;
  if ('DATE' === metadata.format) {
    metadata.value = metadata.value ? new Date(metadata.value) : null;
    if (metadata.defaultValue) {
      metadata.defaultValue = new Date(metadata.defaultValue);
    }
  }

  this.metadataFormats = metadataFormats;

  this.cancel = function () {
    $mdDialog.cancel();
  };

  this.save = () => {
    if ($stateParams.apiId) {
      ApiService.updateMetadata($stateParams.apiId, this.metadata).then((response) => {
        $mdDialog.hide(response.data);
      });
    } else if ($stateParams.applicationId) {
      ApplicationService.updateMetadata($stateParams.applicationId, this.metadata).then((response) => {
        $mdDialog.hide(response.data);
      });
    } else {
      MetadataService.update(this.metadata).then((response) => {
        $mdDialog.hide(response.data);
      });
    }
  };
}

export default UpdateMetadataDialogController;


text:
(function(){
  "use strict"; // Start of use strict
  var parallax = document.querySelectorAll(".parallax"), speed = 0.5; //Change the value of the variable speed to control the scrolling speen
  window.onscroll = function(){
    [].slice.call(parallax).forEach(function(el,i){
      var windowYOffset = window.pageYOffset,
          elBackgrounPos = "0 " + (windowYOffset * speed) + "px";
      el.style.backgroundPosition = elBackgrounPos;
    });
  };
})();


text:
<?php
add_action('admin_init', 'ninja_forms_register_sidebar_template_fields');

function ninja_forms_register_sidebar_template_fields(){
	$args = array(
		'name' => __( 'Template Fields', 'ninja-forms' ),
		'page' => 'ninja-forms',
		'tab' => 'field_settings',
		'display_function' => 'ninja_forms_sidebar_display_fields'
	);
	ninja_forms_register_sidebar('template_fields', $args);
}


text:
from cwr.record import TransactionRecord

"""
Agreement model classes.

These classes are used to represent an Agreement Transaction (AGR), which
consists on an Agreement Record with the details of this Agreement, and a
collection of Territories and their Interested parties.
"""

__author__ = 'Bernardo Martínez Garrido, Borja Garrido Bear'
__license__ = 'MIT'
__status__ = 'Development'

class InterestedPartyForAgreementRecord(TransactionRecord):
    """
    Represents a CWR Interested Party for the Agreement (IPA).

    This contains information on the interested parties that concluded the
    agreement and on the shares they have agreed to assign through the
    agreement.
    """

    def __init__(self,
                 record_type='',
                 transaction_sequence_n=0,
                 record_sequence_n=0,
                 ip_n='',
                 ip_last_name='',
                 agreement_role_code=None,
                 ip_writer_first_name='',
                 ipi_name_n=None,
                 ipi_base_n=None,
                 pr_society=None,
                 pr_share=0,
                 mr_society=None,
                 mr_share=0,
                 sr_society=None,
                 sr_share=0
                 ):
        """
        Constructs an AgreementInterestedParty.
        """
        super(InterestedPartyForAgreementRecord, self).__init__(
            record_type,
            transaction_sequence_n,
            record_sequence_n
        )
        # Agreement and Interested Party relationship
        self._ip_n = ip_n
        self._agreement_role_code = agreement_role_code

        # Interested Party info
        self._ipi_name_n = ipi_name_n
        self._ipi_base_n = ipi_base_n
        self._ip_last_name = ip_last_name
        self._ip_writer_first_name = ip_writer_first_name

        # Performing Rights info
        self._pr_society = pr_society
        self._pr_share = pr_share

        # Mechanical Rights info
        self._mr_society = mr_society
        self._mr_share = mr_share

        # Synchronization Rights info
        self._sr_society = sr_society
        self._sr_share = sr_share

    @property
    def agreement_role_code(self):
        """
        Agreement Role Code field. Table Lookup (Agreement Role Code).

        This code is used to indicate the party's role in the Agreement.

        In CWR v2.1 the two available roles are assignor or acquirer.

        :return: the role of the Interested Party on the Agreement
        """
        return self._agreement_role_code

    @agreement_role_code.setter
    def agreement_role_code(self, value):
        self._agreement_role_code = value

    @property
    def ip_last_name(self):
        """
        Interested Party Last Name field. Alphanumeric.

        The last name of the writer, or the name of the publisher.

        Note that if the submitter does not have the ability to split first
        and last names of writers, the entire name should be entered in this
        field in the format "Last Name, First Name" including the comma after
        the last name.

        :return: the writer last name or the publisher name
        """
        return self._ip_last_name

    @ip_last_name.setter
    def ip_last_name(self, value):
        self._ip_last_name = value

    @property
    def ip_n(self):
        """
        Interested Party Number field. Alphanumeric.

        This is the unique ID given by the submitter to the Interested Party.

        :return: ID for the interested party
        """
        return self._ip_n

    @ip_n.setter
    def ip_n(self, value):
        self._ip_n = value

    @property
    def ip_writer_first_name(self):
        """
        Interested Party Writer First Name field. Alphanumeric.

        If the interested party is a writer, provide his/her first and middle
        names.

        :return: the Writer's first and middle names
        """
        return self._ip_writer_first_name

    @ip_writer_first_name.setter
    def ip_writer_first_name(self, value):
        self._ip_writer_first_name = value

    @property
    def ipi_base_n(self):
        """
        IPI Base Number field. Table Lookup (CISAC CIS).

        The unique identifier associated with this interested party. IPI
        numbering is a sub-system of the CISAC Common Information System.

        :return: IPI base number for the interested party
        """
        return self._ipi_base_n

    @ipi_base_n.setter
    def ipi_base_n(self, value):
        self._ipi_base_n = value

    @property
    def ipi_name_n(self):
        """
        Interested Party IPI Name number field. Table Lookup (IPI Database).

        The IPI number assigned to this interested party with 2 leading zero's
        or the IPI Name number.

        These values reside in the IPI Database.

        :return: the IPI name number for this interested party
        """
        return self._ipi_name_n

    @ipi_name_n.setter
    def ipi_name_n(self, value):
        self._ipi_name_n = value

    @property
    def mr_share(self):
        """
        MR Share field. Numeric.

        The percentage of the mechanical rights acquired or retained by this
        Interested Party under this Agreement.

        This value is a float which can range from 0 (0%) to 1 (100%).

        By default this value is 0.

        :return: the mechanical of the performing rights for the Interested
        Party
        """
        return self._mr_share

    @mr_share.setter
    def mr_share(self, value):
        self._mr_share = value

    @property
    def mr_society(self):
        """
        MR Affiliation Society field. Table Lookup (Society Code Table).

        The mechanical rights society to which this Interested Party belongs.

        :return: the Interested Party's mechanical rights society
        """
        return self._mr_society

    @mr_society.setter
    def mr_society(self, value):
        self._mr_society = value

    @property
    def pr_share(self):
        """
        PR Share field. Numeric.

        The percentage of the performing rights acquired or retained by this
        Interested Party under this Agreement.

        This value is a float which can range from 0 (0%) to 1 (100%).

        By default this value is 0.

        :return: the percentage of the performing rights for the Interested
        Party
        """
        return self._pr_share

    @pr_share.setter
    def pr_share(self, value):
        self._pr_share = value

    @property
    def pr_society(self):
        """
        PR Affiliation Society field. Table Lookup (Society Code Table).

        The performing rights society to which this Interested Party belongs.

        This is only required if the PR Share is greater than zero.

        :return: the Interested Party's performing rights society
        """
        return self._pr_society

    @pr_society.setter
    def pr_society(self, value):
        self._pr_society = value

    @property
    def sr_share(self):
        """
        SR Share field. Numeric.

        The percentage of the synchronization rights acquired or retained by
        this Interested Party under this Agreement.

        This value is a float which can range from 0 (0%) to 1 (100%).

        By default this value is 0.

        :return: the percentage of the synchronization rights for the Interested
        Party
        """
        return self._sr_share

    @sr_share.setter
    def sr_share(self, value):
        self._sr_share = value

    @property
    def sr_society(self):
        """
        SR Affiliation Society field. Table Lookup (Society Code Table).

        The synchronization rights society to which this Interested Party
        belongs.

        :return: the Interested Party's synchronization rights society
        """
        return self._sr_society

    @sr_society.setter
    def sr_society(self, value):
        self._sr_society = value

class AgreementRecord(TransactionRecord):
    """
    Represents a CWR Agreement Record (AGR).

    This is the header record of an Agreement Transaction, containing the
    specific information which defines the agreement, such as it's unique
    codes, but missing any information defining relationships, such as the
    works covered, or the interested parties.

    The relationships of the Agreement should be on a Transaction class.

    The Agreement Record contains a Submitter Agreement Number that is used to
    link the agreement to a work registration. If a society has assigned an
    agreement number, then it too can be used as the link.
    """

    def __init__(self,
                 record_type='',
                 transaction_sequence_n=0,
                 record_sequence_n=0,
                 submitter_agreement_n='',
                 agreement_type=None,
                 agreement_start_date=None,
                 number_of_works=0,
                 prior_royalty_status='',
                 post_term_collection_status='',
                 international_standard_code='',
                 society_assigned_agreement_n='',
                 sales_manufacture_clause='S',
                 agreement_end_date=None,
                 date_of_signature=None,
                 retention_end_date=None,
                 prior_royalty_start_date=None,
                 post_term_collection_end_date=None,
                 shares_change=False,
                 advance_given=False
                 ):
        """
        Constructs an Agreement Record.

        :param submitter_agreement_n: the submitter's ID for the agreement
        :param agreement_type: the type of agreement
        :param agreement_start_date: starting date for the agreement
        :param prior_royalty_status: the status of the royalties before the
        agreement
        :param post_term_collection_status: if and how the the acquirer can get
        royalties after the retention end
        :param number_of_works: number of works in the agreement
        :param society_assigned_agreement_n: ID given by a society for the
        agreement
        :param international_standard_code: ISA ID for the agreement
        :param sales_manufacture_clause: indicates if the rights are for sale or
        manufacture
        :param agreement_end_date: end date for the agreement
        :param date_of_signature: date of signature of the agreement
        :param retention_end_date: end date of the rights retention
        :param prior_royalty_start_date: royalties acquisition date previous to
        the start of the agreement
        :param post_term_collection_end_date: end of royalties after the
        agreement end
        :param shares_change: indicates if the writer's shares can change
        :param advance_given: indicates if an advancement has been paid
        """
        super(AgreementRecord, self).__init__(
            record_type,
            transaction_sequence_n,
            record_sequence_n
        )
        # Agreement identification data
        self._submitter_agreement_n = submitter_agreement_n
        self._society_assigned_agreement_n = society_assigned_agreement_n
        self._international_standard_code = international_standard_code
        self._agreement_type = agreement_type

        # Agreement dates
        self._agreement_start_date = agreement_start_date
        self._agreement_end_date = agreement_end_date

        # Royalty info
        self._prior_royalty_status = prior_royalty_status
        self._prior_royalty_start_date = prior_royalty_start_date

        # Post-term collection info
        self._post_term_collection_status = post_term_collection_status
        self._post_term_collection_end_date = post_term_collection_end_date

        # Enumeration fields
        self._sales_manufacture_clause = sales_manufacture_clause

        # Boolean flags
        self._shares_change = shares_change
        self._advance_given = advance_given

        # Other dates
        self._date_of_signature = date_of_signature
        self._retention_end_date = retention_end_date

        # Other info
        self._number_of_works = number_of_works

    @property
    def advance_given(self):
        """
        Advance Given field. Boolean.

        Indicates if an advance has been paid for this agreement.

        :return: True if an advance has been given, False otherwise
        """
        return self._advance_given

    @advance_given.setter
    def advance_given(self, value):
        self._advance_given = value

    @property
    def agreement_end_date(self):
        """
        Agreement End Date field. Date.

        This is the date when the transfer of rights to the acquiring party
        ends.

        There may be provisions within the contract (as described in other
        attributes such as collection end date) which have impact on
        entitlements.

        This attribute is optional, and by default is None.

        :return: the end date for the Agreement
        """
        return self._agreement_end_date

    @agreement_end_date.setter
    def agreement_end_date(self, value):
        self._agreement_end_date = value

    @property
    def agreement_start_date(self):
        """
        Agreement Start Date field. Date.

        The date on which the transfer of rights to the acquiring party
        becomes effective.

        :return: date on which the Agreement starts
        """
        return self._agreement_start_date

    @agreement_start_date.setter
    def agreement_start_date(self, value):
        self._agreement_start_date = value

    @property
    def agreement_type(self):
        """
        Agreement Type field. Table lookup (Agreement Type Table).

        Defines the category of the agreement.

        :return: the Agreement's type
        """
        return self._agreement_type

    @agreement_type.setter
    def agreement_type(self, value):
        self._agreement_type = value

    @property
    def date_of_signature(self):
        """
        Date of Signature of Agreement field. Date.

        The date when the written form of the agreement (the contract) was
        signed.

        :return the date when the agreement contract was signed
        """
        return self._date_of_signature

    @date_of_signature.setter
    def date_of_signature(self, value):
        self._date_of_signature = value

    @property
    def international_standard_code(self):
        """
        International Standard Agreement Code field. Alphanumeric.

        If an International Standard Agreement Code exists, it is indicated
        here.

        As the ISA code may not exist when making the Agreement, this
        attribute is by default an empty string.

        :return: the ISA code for this Agreement
        """
        return self._international_standard_code

    @international_standard_code.setter
    def international_standard_code(self, value):
        self._international_standard_code = value

    @property
    def number_of_works(self):
        """
        Number of Works field. Numeric.

        Number of works registered subject to this agreement specific to this
        file.

        :return: number of works under this Agreement
        """
        return self._number_of_works

    @number_of_works.setter
    def number_of_works(self, value):
        self._number_of_works = value

    @property
    def post_term_collection_end_date(self):
        """
        Post-term Collection End Date field. Date.

        Indicates up to which date the acquiring party has right to collect
        money after the Retention End Date, if it exists, or the Agreement End
        Date, if the first does not exist.

        For this date to be valid, one of those two dates should exist and be
        previous to this one.

        Also, if the Post-Term Collection Status is not set to 'D' for date
        this attribute should be ignored.

        :return: the collection ending date after the retention or agreement
        end
        """
        return self._post_term_collection_end_date

    @post_term_collection_end_date.setter
    def post_term_collection_end_date(self, value):
        self._post_term_collection_end_date = value

    @property
    def post_term_collection_status(self):
        """
        Post-term Collection Status field. Alphanumeric.

        Indicates if the acquiring party has rights to collect money after the
        Retention End Date, if it exists, or the Agreement End Date, if the
        first does not exist.

        There are three possible values:
        - 'N' for no, if the acquiring party has no rights.
        - 'O' for open-ended, if the acquiring party can collect until further
        notification.
        - 'D' for date, if the acquiring party an collect until a specific
        date. In this case the date should be specified in the Post-term
        Collection End Date attribute.

        :return: if and which type of collection is allowed after the end of
        the agreement or the retention
        """
        return self._post_term_collection_status

    @post_term_collection_status.setter
    def post_term_collection_status(self, value):
        self._post_term_collection_status = value

    @property
    def prior_royalty_status(self):
        """
        Prior Royalty Status field. Alphanumeric.

        Indicates if the acquiring party has rights to collection money before
        the Agreement Start Date.

        There are three possible values:
        - 'N' for none. If the acquiring party has no rights.
        - 'A' for all. If the acquiring party has all the rights.
        - 'D' for date. If the acquiring party can start collection from a
        specific date. In this case the date
        should be specified in the Prior Royalty Start Date field.

        :return: if and which collection rights has the acquirer before the
        start of the agreement
        """
        return self._prior_royalty_status

    @prior_royalty_status.setter
    def prior_royalty_status(self, value):
        self._prior_royalty_status = value

    @property
    def prior_royalty_start_date(self):
        """
        Prior Royalty Start Date field. Date.

        Indicates from which date the acquiring party has right to collect
        money before the Agreement Start Date.

        This date field indicates from what earning dates the acquiring party
        can begin collecting monies if the acquiring party can begin collecting
        before the agreement start date of this agreement.

        If the Prior Royalty Status is not set to 'D' this attribute should be
        ignored.

        return the collection start date before the start of the Agreement
        """
        return self._prior_royalty_start_date

    @prior_royalty_start_date.setter
    def prior_royalty_start_date(self, value):
        self._prior_royalty_start_date = value

    @property
    def retention_end_date(self):
        """
        Retention End Date field. Date.

        If the agreement specifies that the collection rights for some or all
        of the works are retained beyond the end of the agreement, then the
        end date of this retention period is indicated here. It is not
        necessary to specify any Retention End Date if it doesn't exist on the
        Agreement.

        This date supercedes the function of the Agreement End Date when a
        retention period is part of the agreement.

        For this attribute to be valid the Retention End Date must be equal to
        or later than the Agreement End Date.

        :return: the collection end date after the end of the Agreement
        """
        return self._retention_end_date

    @retention_end_date.setter
    def retention_end_date(self, value):
        self._retention_end_date = value

    @property
    def sales_manufacture_clause(self):
        """
        Sales/Manufacture Clause field. Table Lookup ('S'/'M').

        A marker which shows whether the acquiring party has acquired rights
        either for products manufactured or for products sold in the
        territories in agreement.

        Only two values are allowed according to BIEM/CISAC-rules:
        - 'S' for Sales Clause. A stipulation which lays down that the
        acquiring party has acquired rights for products sold in the
        territories in agreement irrespective of the country of manufacture.
        - 'M' for Manufacture Clause. A stipulation which lays down that the
        acquiring party has acquired rights for products manufactured in the
        territories in agreement irrespective of the country of sale.

        This attribute is by default set to 'S'.

        :return: a marker indicating if the acquiring party has rights for
        manufacturing or for sales
        """
        return self._sales_manufacture_clause

    @sales_manufacture_clause.setter
    def sales_manufacture_clause(self, value):
        self._sales_manufacture_clause = value

    @property
    def shares_change(self):
        """
        Shares Change field. Boolean.

        Indicates if the shares assigned to the writers can change as a result
        of sub-publication or similar.

        :return: True if the writer shares can change, False otherwise
        """
        return self._shares_change

    @shares_change.setter
    def shares_change(self, value):
        self._shares_change = value

    @property
    def society_assigned_agreement_n(self):
        """
        Society-Assigned Agreement Number field. Alphanumeric.

        Identificator given by a Society to the Agreement.

        As this value is generally not known when the agreement is submitted,
        by default this is an empty string.

        :return: the society given ID
        """
        return self._society_assigned_agreement_n

    @society_assigned_agreement_n.setter
    def society_assigned_agreement_n(self, value):
        self._society_assigned_agreement_n = value

    @property
    def submitter_agreement_n(self):
        """
        Submitter Agreement Number field. Alphanumeric.

        This is the unique ID given by the submitter to the Agreement.

        :return: the submitter's ID for this Agreement
        """
        return self._submitter_agreement_n

    @submitter_agreement_n.setter
    def submitter_agreement_n(self, value):
        self._submitter_agreement_n = value

class AgreementTerritoryRecord(TransactionRecord):
    """
    Represents a CWR Territory in Agreement (TER).

    This record specifies a territory either within the territorial scope of
    an agreement or excluded from it.

    For example, if  an agreement applied to all of Europe except Switzerland,
    you can provide a TER record to include Europe, and one to exclude
    Switzerland.

    This is to be used in an Agreement Transaction.
    """

    def __init__(self,
                 record_type='',
                 transaction_sequence_n=0,
                 record_sequence_n=0,
                 tis_numeric_code=None,
                 inclusion_exclusion_indicator=None
                 ):
        """
        Constructs an AgreementTerritory.

        :param tis_numeric_code: the TIS numeric code
        :param inclusion_exclusion_indicator: indicates if it is included or
        not
        """
        super(AgreementTerritoryRecord, self).__init__(
            record_type,
            transaction_sequence_n,
            record_sequence_n
        )
        self._tis_numeric_code = tis_numeric_code
        self._inclusion_exclusion_indicator = inclusion_exclusion_indicator

    @property
    def inclusion_exclusion_indicator(self):
        """
        Inclusion/Exclusion Indicator field. Table Lookup ('E'/'I').

        Indicates if the territory is included or excluded from the Agreement.

        The possible values are:
        - 'E' for excluded.
        - 'I' for included.

        :return: a code indicating if the territory is included or excluded
        """
        return self._inclusion_exclusion_indicator

    @inclusion_exclusion_indicator.setter
    def inclusion_exclusion_indicator(self, value):
        self._inclusion_exclusion_indicator = value

    @property
    def tis_numeric_code(self):
        """
        TIS Numeric Code field. Table Lookup (TIS Numeric Code).

        Numeric identifier of a territory according to the new CISAC
        Territory Standard.

        :return: the TIS numeric code
        """
        return self._tis_numeric_code

    @tis_numeric_code.setter
    def tis_numeric_code(self, value):
        self._tis_numeric_code = value


text:
package org.elasticsearch.xpack.ql.type;

import java.util.Locale;
import java.util.Objects;

public class DataType {

    private final String typeName;

    private final String name;

    private final String esType;

    private final int size;

    /**
     * True if the type represents an integer number
     */
    private final boolean isInteger;

    /**
     * True if the type represents a rational number
     */
    private final boolean isRational;

    /**
     * True if the type supports doc values by default
     */
    private final boolean docValues;

    public DataType(String esName, int size, boolean isInteger, boolean isRational, boolean hasDocValues) {
        this(null, esName, size, isInteger, isRational, hasDocValues);
    }

    public DataType(String typeName, String esType, int size, boolean isInteger, boolean isRational, boolean hasDocValues) {
        String typeString = typeName != null ? typeName : esType;
        this.typeName = typeString.toLowerCase(Locale.ROOT);
        this.name = typeString.toUpperCase(Locale.ROOT);
        this.esType = esType;
        this.size = size;
        this.isInteger = isInteger;
        this.isRational = isRational;
        this.docValues = hasDocValues;
    }

    public String name() {
        return name;
    }

    public String typeName() {
        return typeName;
    }

    public String esType() {
        return esType;
    }

    public boolean isInteger() {
        return isInteger;
    }

    public boolean isRational() {
        return isRational;
    }

    public boolean isNumeric() {
        return isInteger || isRational;
    }

    public int size() {
        return size;
    }

    public boolean hasDocValues() {
        return docValues;
    }

    @Override
    public int hashCode() {
        return Objects.hash(typeName, esType, size, isInteger, isRational, docValues);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }

        DataType other = (DataType) obj;
        return Objects.equals(typeName, other.typeName)
                && Objects.equals(esType, other.esType)
                && size == other.size
                && isInteger == other.isInteger
                && isRational == other.isRational
                && docValues == other.docValues;
    }

    @Override
    public String toString() {
        return name;
    }
}


text:
package test.nz.ac.massey.cs.guery.benchmark;

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import org.apache.log4j.Level;
import edu.uci.ics.jung.graph.DirectedGraph;
import nz.ac.massey.cs.guery.ComputationMode;
import nz.ac.massey.cs.guery.GQL;
import nz.ac.massey.cs.guery.Motif;
import nz.ac.massey.cs.guery.MotifReader;
import nz.ac.massey.cs.guery.impl.Logging;
import nz.ac.massey.cs.guery.impl.MultiThreadedGQLImpl;
import nz.ac.massey.cs.guery.io.dsl.DefaultMotifReader;
import nz.ac.massey.cs.guery.util.ResultCollector;

/**
 * Runs a benchmark test for a multithreaded engine using the breadth first pathfinder without caching.
 * Analyses azureus for instances of cd.guery (defined in this package).
 * Results will be printed to the console.
 * @author jens dietrich
 */
public class RunBenchmarkTest4BFPathFinder {

	/**
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {

		Logging.setLogLevel(Level.WARN);

		String data = "Azureus3.0.3.4.jar.graphml";
		DirectedGraph<TypeNode,TypeRef> graph = loadGraph(data);
        Motif<TypeNode,TypeRef> motif =  loadMotif("cd.guery");

        System.out.println("query "+ motif + " on data " + data);

        System.out.println("Edges " + graph.getEdgeCount());
        System.out.println("Nodes " + graph.getVertexCount());

        ResultCounter<TypeNode,TypeRef> coll = new ResultCounter<TypeNode,TypeRef>();
		long t1 = System.currentTimeMillis();
		GQL<TypeNode,TypeRef> engine = new MultiThreadedGQLImpl<TypeNode,TypeRef>();
		engine.query(new nz.ac.massey.cs.guery.adapters.jung.JungAdapter<TypeNode,TypeRef>(graph),motif,coll,ComputationMode.ALL_INSTANCES);
		long t2 = System.currentTimeMillis();
		System.out.println("query "+motif+" on data "+data+ " returned "+coll.getCounter()+" variants");
		System.out.println("query "+motif+" on data "+data+ " took "+(t2-t1)+" millis");

	}

	private static DirectedGraph<TypeNode,TypeRef> loadGraph(String name) throws Exception {
        Reader reader = new InputStreamReader(load(name));
        GraphMLReader greader = new GraphMLReader(reader);
        DirectedGraph<TypeNode,TypeRef> g = greader.readGraph();
        greader.close();
        return g;
	}

	private static Motif<TypeNode,TypeRef> loadMotif(String name) throws Exception {
		MotifReader<TypeNode,TypeRef> reader = new DefaultMotifReader<TypeNode,TypeRef>();
        return reader.read(load(name));
	}

	private static InputStream load(String resource) throws Exception {
		return RunBenchmarkTest4BFPathFinder.class.getResourceAsStream("/test/nz/ac/massey/cs/guery/benchmark/"+resource);
	}
}


text:
#include <algorithm>
#include <cstdlib>
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <iostream>
#include <list>
#include <map>
#include <re2/re2.h>
#include <re2/stringpiece.h>
#include <sstream>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <utility>
#include <vector>

using re2::StringPiece;
using std::cerr;
using std::cin;
using std::cout;
using std::getline;
using std::istringstream;
using std::list;
using std::map;
using std::min;
using std::ostream;
using std::ostringstream;
using std::pair;
using std::string;
using std::vector;

#include "compat_fstatat.h"
#include "compat_openat.h"


text:
<?php

/**
 * Thrown if popStorage() is called on an empty stack.
 *
 * @see ezcCacheStack::popStorage()
 *
 * @package Cache
 * @version 1.5
 */
class ezcCacheStackUnderflowException extends ezcCacheException
{
    /**
     * Creates a new ezcCacheStackUnderflowException.
     *
     * @param mixed $actualType    Type of data received.
     * @param array $expectedTypes Expected data types.
     * @return void
     */
    function __construct()
    {
        parent::__construct( "No storages in stack." );
    }
}
?>


text:
package com.github.mkopylec.rpggame.domain.services;

public interface BattleParticipant {

    void receiveAttack(int amountOfDamage);

    int getAttackDamage();

    boolean isAlive();
}


text:
'use strict';

angular.module('myApp.reset',  ['ngRoute'])

.config(['$routeProvider', function($routeProvider) {
  $routeProvider.when('/reset', {
    templateUrl: 'reset/reset.html',
    controller: 'ResetCtrl'
  });
}])

.controller('ResetCtrl', ['$rootScope', '$scope', '$location', function($rootScope, $scope, $location) {
  $rootScope.hideit = true;

  firebase.auth().onAuthStateChanged(function(user) {
    if (user){
      $rootScope.$apply(function() {
        $location.path("/projects");
      });
    }
  });

  $scope.resetPassword = function(){
    var email    = $scope.user.email;
    var auth     = firebase.auth();

    if (email == null){
      Materialize.toast("indiquez votre adresse email dans le champ prévu à cet effet.", 4000);
    } else {
      auth.sendPasswordResetEmail(email).then(function() {
        Materialize.toast("Un email de réinitialiser vous a été envoyé à l\'adresse " + email, 4000);
        $rootScope.$apply(function() {
          $location.path("/login");
        });
      }, function(error) {
        Materialize.toast("Une erreur s'est produite.", 4000);
      });
    }
  }

}]);


text:
{-# LANGUAGE CPP #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
import Safe

import Control.Monad.StateVar

import Control.Concurrent.STM
import Data.IORef
import Data.STRef
import qualified Data.STRef.Lazy as L
import Control.Exception
import Control.Monad.ST
import qualified Control.Monad.ST.Lazy as L

-- Functional dependency needed so tryErrorCall's callback can refer to an
-- outside var.
class (HasGet m v, HasPut m v, Monad m) => TestStateVar m v | m -> v where
    tryErrorCall :: Maybe (m a -> m (Either ErrorCall a))

instance TestStateVar IO IORef where
    tryErrorCall = Just try

instance TestStateVar STM TVar where
    tryErrorCall = Just trySTM

instance TestStateVar (ST s) (STRef s) where
    tryErrorCall = Nothing

instance TestStateVar (L.ST s) (STRef s) where
    tryErrorCall = Nothing

trySTM :: Exception e => STM a -> STM (Either e a)
trySTM a = catchSTM (a >>= \v -> return (Right v)) (\e -> return (Left e))

testStateVar :: TestStateVar m v => v Int -> m ()
testStateVar var = do
    0 <- get var
    put var 1
    1 <- get var
    var $= 2
    2 <- get var

    modify var (+1)
    3 <- get var
    modify' var (+1)
    4 <- get var
    var $~ (+1)
    5 <- get var
    var $~! (+1)
    6 <- get var
    6 <- swap var 7
    7 <- get var

    case tryErrorCall of
        Nothing -> return ()
        Just tryE -> do
            Left (ErrorCall _) <- tryE $ do
                put' var undefined
            7 <- get var

            -- These tests assume the var may contain 'undefined'.
            modify var (\_ -> undefined)
            modify var undefined
            modify var (+1)
            _ <- get var
            Left (ErrorCall _) <- tryE $ do
                modify' var (+1)
            return ()

-- testIORef and testSTRef just make sure casual usage type check without
-- confusing ambiguities.

testIORef :: IO ()
testIORef = do
    var <- newIORef (5 :: Int)
    5 <- get var
    put var 6
    6 <- get var
    modify var (+3)
    9 <- get var
    return ()

testSTRef :: IO ()
testSTRef = do
    9 <- return $ runST $ do
        var <- newSTRef (5 :: Int)
        5 <- get var
        put var 6
        6 <- get var
        modify var (+3)
        get var
    return ()

main :: IO ()
main = do
    testSafe
    newIORef 0 >>= testStateVar
    atomically $ newTVar 0 >>= testStateVar
    () <- return $ runST $ newSTRef 0 >>= testStateVar
    () <- return $ L.runST $ L.newSTRef 0 >>= testStateVar
    testIORef
    testSTRef

    putStrLn "Passed."


text:
from google.cloud import notebooks_v1

async def sample_start_runtime():
    # Create a client
    client = notebooks_v1.ManagedNotebookServiceAsyncClient()

    # Initialize request argument(s)
    request = notebooks_v1.StartRuntimeRequest(
        name="name_value",
    )

    # Make the request
    operation = client.start_runtime(request=request)

    print("Waiting for operation to complete...")

    response = await operation.result()

    # Handle the response
    print(response)

# [END notebooks_v1_generated_ManagedNotebookService_StartRuntime_async]


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="Hotel,Table Reservation,Booking,Marriage,Halls,Gardens,Decorators,Music,Dj,Resorts,Function halls" />
    <meta name="description" content="Our Plan, Your Joy.Table reservation app,custom search for any restaurant,marriage is made easier">
    <meta name="author" content="Plan Here">
    <title>Hotel XYZ | Plan Here</title>

        <link rel="apple-touch-icon" sizes="57x57" href="./favicons/apple-icon-57x57.png">
		<link rel="apple-touch-icon" sizes="60x60" href="./favicons/apple-icon-60x60.png">
		<link rel="apple-touch-icon" sizes="72x72" href="./favicons/apple-icon-72x72.png">
		<link rel="apple-touch-icon" sizes="76x76" href="./favicons/apple-icon-76x76.png">
		<link rel="apple-touch-icon" sizes="114x114" href="./favicons/apple-icon-114x114.png">
		<link rel="apple-touch-icon" sizes="120x120" href="./favicons/apple-icon-120x120.png">
		<link rel="apple-touch-icon" sizes="144x144" href="./favicons/apple-icon-144x144.png">
		<link rel="apple-touch-icon" sizes="152x152" href="./favicons/apple-icon-152x152.png">
		<link rel="apple-touch-icon" sizes="180x180" href="./favicons/apple-icon-180x180.png">
		<link rel="icon" type="image/png" sizes="192x192"  href="./favicons/android-icon-192x192.png">
		<link rel="icon" type="image/png" sizes="32x32" href="./favicons/favicon-32x32.png">
		<link rel="icon" type="image/png" sizes="96x96" href="./favicons/favicon-96x96.png">
		<link rel="icon" type="image/png" sizes="16x16" href="./favicons/favicon-16x16.png">
		<link rel="manifest" href="./favicons/manifest.json">
		<meta name="msapplication-TileColor" content="#ffffff">
		<meta name="msapplication-TileImage" content="./favicons/ms-icon-144x144.png">
		<meta name="theme-color" content="#ffffff">

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

    <link href="css/slider-pro.min.css" rel="stylesheet">
    <link href="css/date_time_picker.css" rel="stylesheet">
    <link href="css/owl.carousel.css" rel="stylesheet">
	<link href="css/owl.theme.css" rel="stylesheet">

   <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
   <link href='http://fonts.googleapis.com/css?family=Gochi+Hand' rel='stylesheet' type='text/css'>
   <link href='http://fonts.googleapis.com/css?family=Lato:300,400' rel='stylesheet' type='text/css'>

     <?php
        include('./head_fun.php');
    ?>

    <?php include('header.php') ?>

Mariott Hotel

                    Champ de Mars, 5 Avenue Anatole, 75007 Paris.

                        from/per night ₹95

Home

Hotel

Hotel XYZ

Plasma TV

Wifi

Pool

Breakfast

Pet allowed

Accessibility

Parking

View on map

                        Lorem ipsum dolor sit amet

                             consectetur adipisicing elit

                             sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

                             Lorem ipsum dolor sit amet

                             consectetur adipisicing elit

                             Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

                             Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

                             Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

                             Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

                        <img alt="" class="sp-image" src="../src/css/images/blank.gif"
                        data-src="http://bqworks.com/slider-pro/images/image8_medium.jpg"
                        data-small="http://bqworks.com/slider-pro/images/image8_small.jpg"
                        data-medium="http://bqworks.com/slider-pro/images/image8_medium.jpg"
                        data-large="http://bqworks.com/slider-pro/images/image8_large.jpg"
                        data-retina="http://bqworks.com/slider-pro/images/image8_large.jpg"/>

                             Lorem ipsum dolor sit amet

                             consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Description

                        Lorem ipsum dolor sit amet, at omnes deseruisse pri. Quo aeterno legimus insolens ad. Sit cu detraxit constituam, an mel iudico constituto efficiendi. Eu ponderum mediocrem has, vitae adolescens in pro. Mea liber ridens inermis ei, mei legendos vulputate an, labitur tibique te qui.

Hotel facilities

                        Lorem ipsum dolor sit amet, at omnes deseruisse pri. Quo aeterno legimus insolens ad. Sit cu detraxit constituam, an mel iudico constituto efficiendi.

Lorem ipsum dolor sit amet

No scripta electram necessitatibus sit

Quidam percipitur instructior an eum

Ut est saepe munere ceteros

No scripta electram necessitatibus sit

Quidam percipitur instructior an eum

Lorem ipsum dolor sit amet

No scripta electram necessitatibus sit

Quidam percipitur instructior an eum

No scripta electram necessitatibus sit

Menu

Reviews

7.5Good (Based on 34 reviews)

Ambience

Taste

Price

Quality

                         - 10 March 2015 -

Jhon Doe

                             "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a lorem quis neque interdum consequat ut sed sem. Duis quis tempor nunc. Interdum et malesuada fames ac ante ipsum primis in faucibus."

                         - 10 March 2015 -

Jhon Doe

                             "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a lorem quis neque interdum consequat ut sed sem. Duis quis tempor nunc. Interdum et malesuada fames ac ante ipsum primis in faucibus."

                         - 10 March 2015 -

Jhon Doe

                             "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a lorem quis neque interdum consequat ut sed sem. Duis quis tempor nunc. Interdum et malesuada fames ac ante ipsum primis in faucibus."

            View on map

        <?php
				if (!count($_POST)){
			?>
        <form id="booking_hotel" action="<?php echo $_server['php_self']; ?>" method="post">

Check Availability

                        Date
                        <input class="date-pick form-control required" data-date-format="M d, D" type="text" name="check_out_hotel" id="check_out_hotel">

                                         Time
                        				<input class="time-pick form-control" value="12:00 AM" type="text">

                        Adults

                            <input type="text" value="1" id="adults_hotel" class="qty2 form-control required" name="adults_hotel">

                        Children

                            <input type="text" value="0" id="children_hotels" class="qty2 form-control required" name="children_hotels">

							Name
							<input class="form-control required" name="name_hotel_booking" id="name_hotel_booking" type="text">

							Last name
							<input class="form-control required" name="last_hotel_name_booking" id="last_hotel_name_booking" type="text">

					Email
					<input class="form-control required" type="email" name="email_hotel_booking" id="email_hotel_booking">

					Phone
					<input class="form-control required" type="text" name="phone_hotel_booking" id="phone_hotel_booking">

            <button type="submit" class="btn_full">Check now</button>
             Add to whislist
            </form>
            <?php
		}else{
	    ?>

Request Successfully Sent!

		  We will contact you shortly to confirm your request!

						<?php
						$mail = $_POST['email_hotel_booking'];

						$to = "test@doamin.com";	/*YOUR EMAIL HERE*/
						$subject = "Request From CityTours";
						$headers = "From: CityTours <noreply@yourdomain.com>";
						$message = "BOOKING for HOTEL Concordia Paris\n";
						$message .= "\nCheck in: " . $_POST['check_in_hotel'];
						$message .= "\nCheck out: " . $_POST['check_out_hotel'];
						$message .= "\nAdults: " . $_POST['adults_hotel'];
						$message .= "\nChildren: " . $_POST['children_hotels'];
						$message .= "\nName: " . $_POST['name_hotel_booking'];
						$message .= "\nLast name: " . $_POST['last_hotel_name_booking'];
						$message .= "\nEmail: " . $_POST['email_hotel_booking'];
						$message .= "\nTelephone: " . $_POST['phone_hotel_booking'];

						//Receive Variable
						$sentOk = mail($to,$subject,$message,$headers);

						//Confirmation page
						$user = "$mail";
						$usersubject = "Thank You - Booking summary from CityTours";
						$userheaders = "From: info@citytours.com\n";
						//Confirmation page WITH  SUMMARY
						$usermessage = "Thank you for your time, request successfully sent!.\nWe will contact you shortly to confirm your request!\n\n$message";
						mail($user,$usersubject,$usermessage,$userheaders);
						}
						?>

Need Help?

				+91 98496 97174
				Monday to Sunday
9.00am to 9.00pm

 <?php include 'footer.php'; ?>


text:
module Appserver
  class Nginx < Struct.new(:server_dir)

    def self.write_config (server_dir)
      new(server_dir).write_config
    end

    def initialize (server_dir)
      self.server_dir = server_dir
    end

    def write_config
      Utils.safe_replace_file(server_dir.nginx_conf) do |f|
        f.puts "# Nginx configuration automagically generated by the \"appserver\" gem using"
        f.puts "# the appserver directory config #{server_dir.config_file}"
        f.puts "# Include this file into your system's nginx.conf (using an include statement"
        f.puts "# inside a http statement) to use it. See http://github.com/zargony/appserver"
        f.puts "# for details."
        # The default server always responds with 403 Forbidden
        f.puts "server {"
        f.puts "  listen 80 default;"
        f.puts "  server_name _;"
        f.puts "  deny all;"
        f.puts "}"
        # Add application-specific Nginx configuration
        server_dir.apps.each do |app|
          f.puts ""
          f.puts "# Application: #{app.name}"
          if app.socket
            f.puts "upstream #{app.name} {"
            f.puts "  server unix:#{app.socket} fail_timeout=0;"
            f.puts "}"
            write_server_definition(f, app)
            write_server_definition(f, app, true) if app.ssl?
          end
        end
      end
    end

  protected

    def write_server_definition (f, app, ssl = false)
      f.puts "server {"
      f.puts "  listen #{ssl ? 443 : 80};"
      f.puts "  server_name #{app.hostname};"
      if ssl
        f.puts "  ssl on;"
        f.puts "  ssl_certificate #{app.ssl_cert};"
        f.puts "  ssl_certificate_key #{app.ssl_key};"
        f.puts "  ssl_session_timeout 5m;"
        f.puts "  ssl_protocols SSLv2 SSLv3 TLSv1;"
        f.puts "  ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;"
        f.puts "  ssl_prefer_server_ciphers on;"
      end
      f.puts "  root #{app.public_path};"
      f.puts "  access_log #{app.access_log};"
      # TODO: maintenance mode rewriting
      f.puts "  try_files $uri/index.html $uri.html $uri @#{app.name};"
      f.puts "  location @#{app.name} {"
      f.puts "    proxy_set_header X-Real-IP $remote_addr;"
      f.puts "    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;"
      f.puts "    proxy_set_header X-Forwarded-Proto https;" if ssl
      f.puts "    proxy_set_header Host $http_host;"
      f.puts "    proxy_redirect off;"
      f.puts "    proxy_pass http://#{app.name};"
      f.puts "  }"
      f.puts "  error_page 500 502 503 504 /500.html;" if File.exist?(File.join(app.public_path, '500.html'))
      f.puts "}"
    end
  end
end


text:
class PsAdjustmentReference :
    psRelative = 1
    psAbsolute = 2

class PsAnchorPosition :
    psTopLeft = 1
    psTopCenter = 2
    psTopRight = 3
    psMiddleLeft = 4
    psMiddleCenter = 5
    psMiddleRight = 6
    psBottomLeft = 7
    psBottomCenter = 8
    psBottomRight = 9
class PsAntiAlias  :
    psNoAntialias = 1
    psSharp = 2
    psCrisp = 3
    psStrong = 4
    psSmooth = 5

class PsAutoKernType  :
    psManual = 1
    psMetrics = 2
    psOptical = 3

class PsBatchDestinationType  :
    psNoDestination = 1
    psSaveAndClose = 2
    psFolder = 3

class PsBitmapConversionType  :
    psHalfThreshold = 1
    psPatternDither = 2
    psDiffusionDither = 3
    psHalftoneScreen = 4
    psCustomPattern = 5

class PsBitmapHalfToneType  :
    psHalftoneRound = 1
    psHalftoneDiamond = 2
    psHalftoneEllipse = 3
    psHalftoneLine = 4
    psHalftoneSquare = 5
    psHalftoneCross = 6

class PsBitsPerChannelType  :
    psDocument1Bit = 1
    psDocument8Bits = 8
    psDocument16Bits = 16
    psDocument32Bit = 32
    psPassThrough = 1
    psNormalBlend = 2
    psDissolve = 3
    psDarken = 4
    psMultiply = 5
    psColorBurn = 6
    psLinearBurn = 7
    psLighten = 8
    psScreen = 9
    psColorDodge = 10
    psLinearDodge = 11
    psOverlay = 12
    psSoftLight = 13
    psHardLight = 14
    psVividLight = 15
    psLinearLight = 16
    psPinLight = 17
    psDifference = 18
    psExclusion = 19
    psHue = 20
    psSaturationBlend = 21
    psColorBlend = 22
    psLuminosity = 23
    psHardMix = 26
    psLighterColor = 27
    psDarkerColor = 28
    psSubtract = 29
    psDivid = 30

class PsBMPDepthType  :
    psBMP1Bit = 1
    psBMP4Bits = 4
    psBMP8Bits = 8
    psBMP16Bits = 16
    psBMP24Bits = 24
    psBMP32Bits = 32
    psBMP_X1R5G5B5 = 60
    psBMP_A1R5G5B5 = 61
    psBMP_R5G6B5 = 62
    psBMP_X4R4G4B4 = 63
    psBMP_A4R4G4B4 = 64
    psBMP_R8G8B8 = 65
    psBMP_X8R8G8B8 = 66
    psBMP_A8R8G8B8 = 67

class PsByteOrder  :
    psIBMByteOrder = 1
    psMacOSByteOrder = 2

class PsCameraRAWSettingsType  :
    psCameraDefault = 0
    psSelectedImage = 1
    psCustomSettings = 2

class PsCameraRAWSize  :
    psMinimumCameraRAW = 0
    psSmallCameraRAW = 1
    psMediumCameraRAW = 2
    psLargeCameraRAW = 3
    psExtraLargeCameraRAW = 4
    psMaximumCameraRAW = 5
    psNormalCase = 1
    psAllCaps = 2
    psSmallCaps = 3

class PsChangeMode   :
    psConvertToGrayscale = 1
    psConvertToRGB = 2
    psConvertToCMYK = 3
    psConvertToLab = 4
    psConvertToBitmap = 5
    psConvertToIndexedColor = 6
    psConvertToMultiChannel = 7

class PsChannelType  :
    psComponentChannel = 1
    psMaskedAreaAlphaChannel = 2
    psSelectedAreaAlphaChannel = 3
    psSpotColorChannel = 4

class PsColorBlendMode  :
    psNormalBlendColor = 2
    psDissolveBlend = 3
    psDarkenBlend = 4
    psMultiplyBlend = 5
    psColorBurnBlend = 6
    psLinearBurnBlend = 7
    psLightenBlend = 8
    psScreenBlend = 9
    psColorDodgeBlend = 10
    psLinearDodgeBlend = 11
    psOverlayBlend = 12
    psSoftLightBlend = 13
    psHardLightBlend = 14
    psVividLightBlend = 15
    psLinearLightBlend = 16
    psPinLightBlend = 17
    psDifferenceBlend = 18
    psExclusionBlend = 19
    psHueBlend = 20
    psSaturationBlendColo = 21
    psColorBlendMode = 22
    psLuminosityBlen = 23
    psBehindBlend = 24
    psClearBlend = 25
    psHardMixBlend = 26
    psSubtract = 27
    psDivide = 28

class PsColorModel  :
    psGrayscaleModel = 1
    psRGBModel = 2
    psCMYKModel = 3
    psLabModel = 4
    psHSBModel = 5
    psNoModel = 50

class PsColorPicker  :
    psAdobeColorPicker = 1
    psAppleColorPicker = 2
    psWindowsColorPicker = 3
    psPlugInColorPicker = 4

class PsColorProfileType  :
    psNo = 1
    psWorking = 2
    psCustom = 3

class PsColorReductionType  :
    psPerceptualReduction = 0
    psSelective = 1
    psAdaptive = 2
    psRestrictive = 3
    psCustomReduction = 4
    psBlackWhiteReduction = 5
    psSFWGrayscale = 6
    psMacintoshColors = 7
    psWindowsColors = 8

class PsColorSpaceType  :
    psAdobeRGB = 0
    psColorMatchRGB = 1
    psProPhotoRGB = 2
    psSRGB = 3

class PsCopyrightedType  :
    psCopyrightedWork = 1
    psPublicDomain = 2
    psUnmarked = 3

class PsCreateFields   :
    psDuplication = 1
    psInterpolation = 2

class PsCropToType  :
    psBoundingBox = 0
    psMediaBox = 1
    psCropBox = 2
    psBleedBox = 3
    psTrimBox = 4
    psArtBox = 5

class PsDCSType  :
    psNoComposite = 1
    psGrayscaleComposite = 2
    psColorComposite = 3

class PsDepthMapSource  :
    psNoSource = 1
    psTransparencyChannel = 2
    psLayerMask = 3
    psImageHighlight = 4

class PsDescValueType  :
    psIntegerType = 1
    psDoubleType = 2
    psUnitDoubleType = 3
    psStringType = 4
    psBooleanType = 5
    psListType = 6
    psObjectType = 7
    psEnumeratedType = 8
    psReferenceType = 9
    psClassType = 10
    psAliasType = 11
    psRawType = 12

class PsDialogModes  :
    psDisplayAllDialogs = 1
    psDisplayErrorDialogs = 2
    psDisplayNoDialogs = 3

class PsDirection  :
    psHorizontal = 1
    psVertical = 2

class PsDisplacementMapType  :
    psStretchToFit = 1
    psTile = 2

class PsDitherType  :
    psNoDither = 1
    psDiffusion = 2
    psPattern = 3
    psNoise = 4

class PsDocumentFill  :
    psWhite = 1
    psBackgroundColor = 2
    psTransparent = 3

class PsDocumentMode  :
    psGrayscale = 1
    psRGB = 2
    psCMYK = 3
    psLab = 4
    psBitmap = 5
    psIndexedColor = 6
    psMultiChannel = 7
    psDuotone = 8

class PsEditLogItemsType  :
    psSessionOnly = 1
    psConcise = 2
    psDetailed = 3

class PsElementPlacement  :
    psPlaceInside = 0
    psPlaceAtBeginning = 1
    psPlaceAtEnd = 2
    psPlaceBefore = 3
    psPlaceAfter = 4

class PsEliminateFields   :
    psOddFields = 1
    psEvenFields = 2

class PsExportType  :
    psIllustratorPaths = 1
    psSaveForWeb = 2

class PsExtensionType  :
    psLowercase = 2
    psUppercase = 3

class PsFileNamingType  :
    psDocumentNameMixed = 1
    psDocumentNameLower = 2
    psDocumentNameUpper = 3
    psSerialNumber1 = 4
    psSerialNumber2 = 5
    psSerialNumber3 = 6
    psSerialNumber4 = 7
    psSerialLetterLower = 8
    psSerialLetterUpper = 9
    psMmddyy = 10
    psMmdd = 11
    psYyyymmdd = 12
    psYymmdd = 13
    psYyddmm = 14
    psDdmmyy = 15
    psDdmm = 16
    psExtensionLower = 17
    psExtensionUpper = 18
    psFontPreviewNone = 0
    psFontPreviewSmall = 1
    psFontPreviewMedium = 2
    psFontPreviewLarge = 3

class PsForcedColors  :
    psNoForced = 1
    psBlackWhite = 2
    psPrimaries = 3
    psWeb = 4

class PsFormatOptionsType  :
    psStandardBaseline = 1
    psOptimizedBaseline = 2
    psProgressive = 3

class PsGalleryConstrainType  :
    psConstrainWidth = 1
    psConstrainHeight = 2
    psConstrainBoth = 3

class PsGalleryFontType  :
    psArial = 1
    psCourierNew = 2
    psHelvetica = 3
    psTimesNewRoman = 4

class PsGallerySecurityTextPositionType  :
    psCentered = 1
    psUpperLeft = 2
    psLowerLeft = 3
    psUpperRight = 4
    psLowerRight = 5

class PsGallerySecurityTextRotateType  :
    psZero = 1
    psClockwise45 = 2
    psClockwise90 = 3
    psCounterClockwise45 = 4
    psCounterClockwise90 = 5

class PsGallerySecurityType  :
    psNoSecurity = 1
    psCustomSecurityText = 2
    psFilename = 3
    psCopyright = 4
    psCaption = 5
    psCredit = 6
    psTitle = 7

class PsGalleryThumbSizeType  :
    psSmall = 1
    psMedium = 2
    psLarge = 3
    psCustomThumbnail = 4

class PsGeometry  :
    psTriangle = 0
    psPentagon = 1
    psHexagon = 2
    psSquareGeometry = 3
    psHeptagon = 4
    psOctagon = 5

class PsGridLineStyle  :
    psGridSolidLine = 1
    psGridDashedLine = 2
    psGridDottedLine = 3

class PsGridSize  :
    psNoGrid = 1
    psSmallGrid = 2
    psMediumGrid = 3
    psLargeGrid = 4

class PsGuideLineStyle  :
    psGuideSolidLine = 1
    psGuideDashedLine = 2

class PsIllustratorPathType  :
    psDocumentBounds = 1
    psAllPaths = 2
    psNamedPath = 3

class PsIntent  :
    psPerceptual = 1
    psSaturation = 2
    psRelativeColorimetric = 3
    psAbsoluteColorimetric = 4

class PsJavaScriptExecutionMode  :
    psNeverShowDebugger = 1
    psDebuggerOnError = 2
    psBeforeRunning = 3

class PsJustification  :
    psLeft = 1
    psCenter = 2
    psRight = 3
    psLeftJustified = 4
    psCenterJustified = 5
    psRightJustified = 6
    psFullyJustified = 7

class PsLanguage  :
    psEnglishUSA = 1
    psEnglishUK = 2
    psFrench = 3
    psCanadianFrench = 4
    psFinnish = 5
    psGerman = 6
    psOldGerman = 7
    psSwissGerman = 8
    psItalian = 9
    psNorwegian = 10
    psNynorskNorwegian = 11
    psPortuguese = 12
    psBrazillianPortuguese = 13
    psSpanish = 14
    psSwedish = 15
    psDutch = 16
    psDanish = 17

class PsLayerCompressionType  :
    psRLELayerCompression = 1
    psZIPLayerCompression = 2

class PsLayerKind  :
    psNormalLayer = 1
    psTextLayer = 2
    psSolidFillLayer = 3
    psGradientFillLayer = 4
    psPatternfillLayer = 5
    psLevelsLayer = 6
    psCurvesLayer = 7
    psColorBalanceLayer = 8
    psBrightnessContrastLayer = 9
    psHueSaturationLayer = 10
    psSelectiveColorLayer = 11
    psChannelMixerLayer = 12
    psGradientMapLayer = 13
    psInversionLayer = 14
    psThresholdLayer = 15
    psPosterizeLayer = 16
    psSmartObjectLayer = 17
    psPhotoFilterLayer = 18
    psExposureLayer = 19
    psLayer3D = 20
    psVideoLayer = 21
    psBlackAndWhiteLayer = 22
    psVibrance = 23

class PsLayerType  :
    psArtLayer = 1
    psLayerSet = 2

class PsLensType  :
    psZoomLens = 1
    psPrime35 = 2
    psPrime105 = 3
    psMoviePrime = 5

class PsMagnificationType  :
    psActualSize = 0
    psFitPage = 1

class PsMatteType  :
    psNoMatte = 1
    psForegroundColorMatte = 2
    psBackgroundColorMatte = 3
    psWhiteMatte = 4
    psBlackMatte = 5
    psSemiGra = 6
    psNetscapeGrayMatte = 7

class PsMeasurementRange  :
    psAllMeasurements = 1
    psActiveMeasurements = 2

class PsMeasurementSource  :
    psMeasureSelection = 1
    psMeasureCountTool = 2
    psMeasureRulerTool = 3

class PsNewDocumentMode  :
    psNewGray = 1
    psNewRGB = 2
    psNewCMYK = 3
    psNewLab = 4
    psNewBitmap = 5

class PsNoiseDistribution  :
    psUniformNoise = 1
    psGaussianNoise = 2

class PsOffsetUndefinedAreas   :
    psOffsetSetToLayerFill = 1
    psOffsetWraparound = 2
    psOffsetRepeatEdgePixels = 3

class PsOpenDocumentMode  :
    psOpenGray = 1
    psOpenRGB = 2
    psOpenCMYK = 3
    psOpenLab = 4

class PsOpenDocumentType  :
    psPhotoshopOpen = 1
    psBMPOpen = 2
    psCompuServeGIFOpen = 3
    psPhotoshopEPSOpen = 4
    psFilmstripOpen = 5
    psJPEGOpe = 6
    psPCXOpen = 7
    psPhotoshopPDFOpen = 8
    psPhotoCDOpen = 9
    psPICTFileFormatOpen = 10
    psPICTResourceFormatOpen = 11
    psPixarOpen = 12
    psPNGOpen = 13
    psRawOpen = 14
    psScitexCTOpen = 15
    psTargaOpen = 16
    psTIFFOpen = 17
    psPhotoshopDCS_1Open = 18
    psPhotoshopDCS_2Open = 19
    psPDFOpen = 21
    psEPSOpen = 22
    psEPSPICTPreviewOpen = 23
    psEPSTIFFPreviewOpen = 24
    psAliasPIXOpen = 25
    psElectricImageOpen = 26
    psPortableBitmapOpen = 27
    psWavefrontRLAOpen = 28
    psSGIRGBOpen = 29
    psSoftImageOpen = 30
    psWirelessBitmapOpen = 31
    psCameraRAWOpen = 32
    psDICOMOpen = 33

class PsOperatingSystem  :
    psOS2 = 1
    psWindows = 2

class PsOrientation  :
    psLandscape = 1
    psPortrait = 2

class PsOtherPaintingCursors  :
    psStandardOther = 1
    psPreciseOther = 2

class PsPaintingCursors  :
    psStandard = 1
    psPrecise = 2
    psBrushsize = 3

class PsPaletteType  :
    psExact = 1
    psMacOSPalette = 2
    psWindowsPalett = 3
    psWebPalette = 4
    psUniform = 5
    psLocalPerceptual = 6
    psLocalSelective = 7
    psLocalAdaptive = 8
    psMasterPerceptual = 9
    psMasterSelective = 10
    psMasterAdaptive = 11
    psPreviousPalette = 12

class PsPathKind  :
    psNormalPath = 1
    psClippingPath = 2
    psWorkPath = 3
    psVectorMask = 4
    psTextMask = 5

class PsPDFCompatibilityType  :
    psPDF1 = 1
    psPDF1 = 2
    psPDF1 = 3
    psPDF1 = 4

class PsPDFEncoding  :
    psPDFNon = 0
    psPDFZip = 1
    psPDFJPEG = 2
    psPDFPDFZip4Bi = 3
    psPDFJPEGHIG = 4
    psPDFJPEGMEDHIG = 5
    psPDFJPEGME = 6
    psPDFJPEGMEDLO = 7
    psPDFJPEGLO = 8
    psPDFJPEG2000High = 9
    psPDFJPEG2000MEDHIGH = 10
    psPDFJPEG2000MED = 11
    psPDFJPEG2000MEDLOW = 12
    psPDFJPEG2000LOW = 13
    psPDFJPEG2000LOSSLESS = 14

class PsPDFResampleType  :
    psNoResampl = 0
    psPDFAverag = 1
    psPDFSubSample = 2
    psPDFBicubi = 3

class PsPDFStandardType  :
    psNoStandar = 0
    psPDFX1A200 = 1
    psPDFX1A200 = 2
    psPDFX3200 = 3
    psPDFX32003 = 4

class PsPhotoCDColorSpace  :
    psRGB8 = 1
    psRGB16 = 2
    psLab8 = 3
    psLab16 = 4

class PsPhotoCDSize  :
    psMinimumPhotoCD = 1
    psSmallPhotoCD = 2
    psMediumPhotoCD = 3
    psLargePhotoCD = 4
    psExtralargePhotoCD = 5
    psMaximumPhotoCD = 6

class PsPICTBitsPerPixels  :
    psPICTTwoBits = 2
    psPICTFourBits = 4
    psPICTEightBits = 8
    psPICTSixteenBits = 16
    psPICTThirtyTwoBits = 32

class PsPICTCompression  :
    psNoPICTCompression = 1
    psJPEGLowPICT = 2
    psJPEGMediumPICT = 4
    psJPEGHighPICT = 5
    psJPEGMaximumPICT = 6

class PsPicturePackageTextType  :
    psNoText = 1
    psUserText = 2
    psFilenameText = 3
    psCopyrightText = 4
    psCaptionText = 5
    psCreditText = 6
    psOriginText = 7

class PsPointKind  :
    psSmoothPoint = 1
    psCornerPoint = 2

class PsPointType  :
    psPostScriptPoints = 1
    psTraditionalPoints = 2

class PsPolarConversionType  :
    psRectangularToPolar = 1
    psPolarToRectangular = 2

class PsPreviewType  :
    psNoPreview = 1
    psMonochromeTIFF = 2
    psEightbitTIFF = 3

class PsPurgeTarget   :
    psUndoCaches = 1
    psHistoryCaches = 2
    psClipboardCache = 3
    psAllCaches = 4

class PsQueryStateType  :
    psAlways = 1
    psAsk = 2
    psNever = 3

class PsRadialBlurMethod :
    psSpin = 1
    psZoom = 2

class PsRadialBlurQuality  :
    psRadialBlurDraft = 1
    psRadialBlurGood = 2
    psRadialBlurBest = 3

class PsRasterizeType  :
    psTextContents = 1
    psShape = 2
    psFillContent = 3
    psLayerClippingPath = 4
    psEntireLayer = 5
    psLinkedLayers = 6

class PsReferenceFormType   :
    psReferenceNameType = 1
    psReferenceIndexType = 2
    psReferenceIdentifierType = 3
    psReferenceOffsetType = 4
    psReferenceEnumeratedType = 5
    psReferencePropertyType = 6
    psReferenceClassType = 7

class PsResampleMethod  :
    psNoResampling = 1
    psNearestNeighbor = 2
    psBilinear = 3
    psBicubic = 4
    psBicubicSharper = 5
    psBicubicSmoother = 6

class PsRippleSize  :
    psSmallRipple = 1
    psMediumRipple = 2
    psLargeRipple = 3

class PsSaveBehavior  :
    psNeverSave = 1
    psAlwaysSave = 2
    psAskWhenSaving = 3

class PsSaveDocumentType  :
    psPhotoshopSave = 1
    psBMPSave = 2
    psCompuServeGIFSave = 3
    psPhotoshopEPSSave = 4
    psJPEGSave = 6
    psPCXSave = 7
    psPhotoshopPDFSave = 8
    psPICTFileFormatSave = 10
    psPixarSave = 12
    psPNGSave = 13
    psRawSave = 14
    psScitexCTSave = 15
    psTargaSave = 16
    psTIFFSave = 17
    psPhotoshopDCS_1Save = 18
    psPhotoshopDCS_2Save = 19
    psAliasPIXSave = 25
    psElectricImageSave = 26
    psPortableBitmapSave = 27
    psWavefrontRLASave = 28
    psSGIRGBSave = 29
    psSoftImageSave = 30
    psWirelessBitmapSave = 31

class PsSaveEncoding  :
    psBinary = 1
    psJPEGLow = 2
    psAscii = 3
    psJPEGMedium = 4
    psJPEGHigh = 5
    psJPEGMaximum = 6

class PsSaveLogItemsType  :
    psMetadata = 1
    psLogFile = 2
    psLogFileAndMetadata = 3

class PsSaveOptions  :
    psSaveChanges = 1
    psDoNotSaveChanges = 2
    psPromptToSaveChanges = 3

class PsSelectionType  :
    psReplaceSelection = 1
    psExtendSelection = 2
    psDiminishSelection = 3
    psIntersectSelection = 4

class PsShapeOperation  :
    psShapeAdd = 1
    psShapeXOR = 2
    psShapeIntersect = 3
    psShapeSubtract = 4

class PsSmartBlurMode   :
    psSmartBlurNormal = 1
    psSmartBlurEdgeOnly = 2
    psSmartBlurOverlayEdge = 3

class PsSmartBlurQuality  :
    psSmartBlurLow = 1
    psSmartBlurMedium = 2
    psSmartBlurHigh = 3

class PsSourceSpaceType  :
    psDocumentSpace = 1
    psProofSpace = 2

class PsSpherizeMode   :
    psNormalSpherize = 1
    psHorizontalSpherize = 2
    psVerticalSpherize = 3

class PsStrikeThruType  :
    psStrikeOff = 1
    psStrikeHeight = 2
    psStrikeBox = 3

class PsStrokeLocation  :
    psInsideStroke = 1
    psCenterStroke = 2
    psOutsideStroke = 3

class PsTargaBitsPerPixels  :
    psTarga16Bits = 16
    psTarga24Bits = 24
    psTarga32Bits = 32

class PsTextComposer  :
    psAdobeSingleLine = 1
    psAdobeEveryLine = 2

class PsTextType  :
    psPointText = 1
    psParagraphText = 2

class PsTextureType  :
    psBlocksTexture = 1
    psCanvasTexture = 2
    psFrostedTexture = 3
    psTinyLensTexture = 4
    psTextureFile = 5

class PsTIFFEncodingType  :
    psNoTIFFCompression = 1
    psTiffLZW = 2
    psTiffJPEG = 3
    psTiffZIP = 4

class PsToolType  :
    psPencil = 1
    psBrush = 2
    psEraser = 3
    psBackgroundEraser = 4
    psCloneStamp = 5
    psPatternStamp = 6
    psHealingBrush = 7
    psHistoryBrush = 8
    psArtHistoryBrush = 9
    psSmudge = 10
    psBlur = 11
    psSharpen = 12
    psDodge = 13
    psBurn = 14
    psSponge = 15
    psColorReplacementTool = 16

class PsTransitionType  :
    psBlindsHorizontal = 1
    psBlindsVertical = 2
    psDissolveTransition = 3
    psBoxIn = 4
    psBoxOut = 5
    psGlitterDown = 6
    psGlitterRight = 7
    psGlitterRightDown = 8
    psNoTransition = 9
    psRandom = 10
    psSplitHorizontalIn = 11
    psSplitHorizontalOut = 12
    psSplitVerticalIn = 13
    psSplitVerticalOut = 14
    psWipeDown = 15
    psWipeLleft = 16
    psWipeRight = 17
    psWipeUp = 18

class PsTrimType  :
    psTransparentPixels = 0
    psTopLeftPixel = 1
    psBottomRightPixe = 9

class PsTypeUnits  :
    psTypePixels = 1
    psTypeMM = 4
    psTypePoints = 5

class PsUndefinedAreas   :
    psWrapAround = 1
    psRepeatEdgePixels = 2

class PsUnderlineType  :
    psUnderlineOff = 1
    psUnderlineRight = 2
    psUnderlineLeft = 3

class PsUnits  :
    psPixels = 1
    psInches = 2
    psCM = 3
    psMM = 4
    psPoints = 5
    psPicas = 6
    psPercent = 7

class PsUrgency  :
    psNone = 0
    psLow = 1
    psTwo = 2
    psThree = 3
    psFour = 4
    psNormal = 5
    psSix = 6
    psSeven = 7
    psHigh = 8

class PsWarpStyle  :
    psNone = 1
    psArc = 2
    psArcLower = 3
    psArcUpper = 4
    psArch = 5
    psBulge = 6
    psShellLower = 7
    psShellUpper = 8
    psFlag = 9
    psWave = 10
    psFish = 11
    psRise = 12
    psFishEye = 13
    psInflate = 14
    psSqueeze = 15
    psTwist = 16

class PsWaveType  :
    psSine = 1
    psTriangular = 2
    psSquare = 3

class PsWhiteBalanceType  :
    psAsShot = 0
    psAuto = 1
    psDaylight = 2
    psCloudy = 3
    psShade = 4
    psTungsten = 5
    psFluorescent = 6
    psFlash = 7
    psCustomCameraSettings = 8

class PsZigZagType   :
    psAroundCenter = 1
    psOutFromCenter = 2
    psPondRipples = 3


text:
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import Button from'../src/Button';

var instance = null;

describe('Button', () => {
  beforeEach(() => {
    instance = TestUtils.renderIntoDocument(<Button waves='light'>Stuff</Button>);
  });

  it('should output a button', function() {
      assert.equal(ReactDOM.findDOMNode(instance).nodeName, 'BUTTON');
  });

  it('should output a component with btn class', function() {
      assert.include(ReactDOM.findDOMNode(instance).className, 'btn');
  });

  it('should apply waves', function() {
      assert.include(ReactDOM.findDOMNode(instance).className, 'waves-effect');
  });

  it('should apply waves with color', function() {
      assert.include(ReactDOM.findDOMNode(instance).className, 'waves-effect');
  });

  it('should apply large styles', function() {
      instance = TestUtils.renderIntoDocument(<Button large>Stuff</Button>);
      assert.include(ReactDOM.findDOMNode(instance).className, 'btn-large');
  });

  it('should apply floating styles', function() {
      instance = TestUtils.renderIntoDocument(<Button floating>Stuff</Button>);
      assert.include(ReactDOM.findDOMNode(instance).className, 'btn-floating');
  });

  it('should apply flat styles', function() {
      instance = TestUtils.renderIntoDocument(<Button flat>Stuff</Button>);
      assert.include(ReactDOM.findDOMNode(instance).className, 'btn-flat');
  });

  it('should apply disable styles', function() {
      instance = TestUtils.renderIntoDocument(<Button disabled>Stuff</Button>);
      assert.include(ReactDOM.findDOMNode(instance).className, 'disabled');
  });
});


text:
package org.springframework.social.google.api.plus;

import static org.springframework.util.ObjectUtils.*;

/**
 * Organization from a Google+ profile
 *
 * @author Gabriel Axel
 *
 */
public class Organization {

	private String name;

	private String title;

	private String type;

	private String startDate;

	private String endDate;

	private boolean primary;

	Organization() {

	}

	Organization(String name, String title, String type, String startDate,
			String endDate, boolean primary) {
		this.name = name;
		this.title = title;
		this.type = type;
		this.startDate = startDate;
		this.endDate = endDate;
		this.primary = primary;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + nullSafeHashCode(name);
		result = prime * result + nullSafeHashCode(title);
		result = prime * result + nullSafeHashCode(type);
		result = prime * result + nullSafeHashCode(startDate);
		result = prime * result + nullSafeHashCode(endDate);
		result = prime * result + nullSafeHashCode(primary);
		return result;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof Organization)) {
			return false;
		}
		Organization other = (Organization)o;
		return nullSafeEquals(name, other.name) &&
				nullSafeEquals(title, other.title) &&
				nullSafeEquals(type, other.type) &&
				nullSafeEquals(startDate, other.startDate) &&
				nullSafeEquals(endDate, other.endDate) &&
				primary == other.primary;
	}

	@Override
	public String toString() {
		return name;
	}

	public String getName() {
		return name;
	}

	public String getTitle() {
		return title;
	}

	public String getType() {
		return type;
	}

	public String getStartDate() {
		return startDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public boolean isPrimary() {
		return primary;
	}
}


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Kwitansi_langsung_ds extends CI_Controller {

	function __construct() {
        parent::__construct();
    }

	public function index()
	{
		$this->db->select('*');
		$this->db->where('created_at >=', $_GET['start']);
		$this->db->where('created_at <=', $_GET['end']);
		$data = $this->db->get('t_kwitansi_langsung')->result();
		echo json_encode($data);
	}
}


text:
For Users (Quick Guide)
-----------------------

Installing a Package
====================
Installing a package with pydeploy is as easy as it gets::

  pydeploy install <package>

**package** can be either one of:

* a local package directory (containing a **setup.py** file)
* a URL of a package (compressed) to download and install
* a URL of an SCM repository (like git://some_hostname/repo)
* a name of a package to be searched in PyPI (in this case it's actually invokes *easy_install* under the hood).

.. note:: if you would like the package to be installed in a virtual environment (with **virtualenv**), you can use the **--env=path** flag to point it to your virtual environment directory.

Running a Configuration File
============================
In some cases pydeploy is used to run a file which dictates what steps are to be done. In this case you should just do::

  pydeploy run <file>

**file** can be either:

* a local file on your filesystem
* a URL to a file on a server somewhere

.. note:: the --env flag exists for the **run** command as well. It will execute the file in the context of the virtual environment specified. See :doc:`the next chapter <for_developers>` for more details.

Bootstrapping Pydeploy
======================

On hosts that don't have pydeploy installed (and perhaps installation is an issue due to permissions), a bootstrapper for pydeploy is available online:
::

  wget https://github.com/vmalloc/pydeploy/raw/master/scripts/bootstrapper.py
  python bootstrapper.py <args>

Where *args* are the argument you would pass to pydeploy. You can even do this in one line:
::

  curl https://github.com/vmalloc/pydeploy/raw/master/scripts/bootstrapper.py | python - <args>

Or even shorter:
::

  curl -L bit.ly/ilTVUN | python - <args>


text:
@implementation NonDaikiri

@end


text:
typedef struct Edge
{
    ILint yUpper;
    ILfloat xIntersect, dxPerScan;
    struct Edge* next;
} Edge;

#endif //ILU_REGION_H