text:
// @formatter:off

package com.microsoft.alm.visualstudio.services.extensionmanagement.webapi;

import java.util.ArrayList;
import java.util.UUID;

/**
 * Base class for extension properties which are shared by the extension manifest and the extension model
 *
 */
public class ExtensionManifest {

    /**
    * Uri used as base for other relative uri's defined in extension
    */
    private String baseUri;
    /**
    * List of contributions made by this extension
    */
    private ArrayList<Contribution> contributions;
    /**
    * List of contribution types defined by this extension
    */
    private ArrayList<ContributionType> contributionTypes;
    /**
    * List of explicit demands required by this extension
    */
    private ArrayList<String> demands;
    /**
    * Collection of endpoints that get called when particular extension events occur
    */
    private ExtensionEventCallbackCollection eventCallbacks;
    /**
    * Secondary location that can be used as base for other relative uri's defined in extension
    */
    private String fallbackBaseUri;
    /**
    * Language Culture Name set by the Gallery
    */
    private String language;
    /**
    * How this extension behaves with respect to licensing
    */
    private ExtensionLicensing licensing;
    /**
    * Version of the extension manifest format/content
    */
    private double manifestVersion;
    /**
    * List of all oauth scopes required by this extension
    */
    private ArrayList<String> scopes;
    /**
    * The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed
    */
    private UUID serviceInstanceType;

    /**
    * Uri used as base for other relative uri&#039;s defined in extension
    */
    public String getBaseUri() {
        return baseUri;
    }

    /**
    * Uri used as base for other relative uri&#039;s defined in extension
    */
    public void setBaseUri(final String baseUri) {
        this.baseUri = baseUri;
    }

    /**
    * List of contributions made by this extension
    */
    public ArrayList<Contribution> getContributions() {
        return contributions;
    }

    /**
    * List of contributions made by this extension
    */
    public void setContributions(final ArrayList<Contribution> contributions) {
        this.contributions = contributions;
    }

    /**
    * List of contribution types defined by this extension
    */
    public ArrayList<ContributionType> getContributionTypes() {
        return contributionTypes;
    }

    /**
    * List of contribution types defined by this extension
    */
    public void setContributionTypes(final ArrayList<ContributionType> contributionTypes) {
        this.contributionTypes = contributionTypes;
    }

    /**
    * List of explicit demands required by this extension
    */
    public ArrayList<String> getDemands() {
        return demands;
    }

    /**
    * List of explicit demands required by this extension
    */
    public void setDemands(final ArrayList<String> demands) {
        this.demands = demands;
    }

    /**
    * Collection of endpoints that get called when particular extension events occur
    */
    public ExtensionEventCallbackCollection getEventCallbacks() {
        return eventCallbacks;
    }

    /**
    * Collection of endpoints that get called when particular extension events occur
    */
    public void setEventCallbacks(final ExtensionEventCallbackCollection eventCallbacks) {
        this.eventCallbacks = eventCallbacks;
    }

    /**
    * Secondary location that can be used as base for other relative uri&#039;s defined in extension
    */
    public String getFallbackBaseUri() {
        return fallbackBaseUri;
    }

    /**
    * Secondary location that can be used as base for other relative uri&#039;s defined in extension
    */
    public void setFallbackBaseUri(final String fallbackBaseUri) {
        this.fallbackBaseUri = fallbackBaseUri;
    }

    /**
    * Language Culture Name set by the Gallery
    */
    public String getLanguage() {
        return language;
    }

    /**
    * Language Culture Name set by the Gallery
    */
    public void setLanguage(final String language) {
        this.language = language;
    }

    /**
    * How this extension behaves with respect to licensing
    */
    public ExtensionLicensing getLicensing() {
        return licensing;
    }

    /**
    * How this extension behaves with respect to licensing
    */
    public void setLicensing(final ExtensionLicensing licensing) {
        this.licensing = licensing;
    }

    /**
    * Version of the extension manifest format/content
    */
    public double getManifestVersion() {
        return manifestVersion;
    }

    /**
    * Version of the extension manifest format/content
    */
    public void setManifestVersion(final double manifestVersion) {
        this.manifestVersion = manifestVersion;
    }

    /**
    * List of all oauth scopes required by this extension
    */
    public ArrayList<String> getScopes() {
        return scopes;
    }

    /**
    * List of all oauth scopes required by this extension
    */
    public void setScopes(final ArrayList<String> scopes) {
        this.scopes = scopes;
    }

    /**
    * The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed
    */
    public UUID getServiceInstanceType() {
        return serviceInstanceType;
    }

    /**
    * The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed
    */
    public void setServiceInstanceType(final UUID serviceInstanceType) {
        this.serviceInstanceType = serviceInstanceType;
    }
}


text:
<?php
namespace Wms\Model;

 class Stock
 {
     public $id;
     public $storehouse_sn;
     public $goods_id;
     public $goods_name;
     public $goods_barcode;
     public $totalstock;
     public $stock;
     public $lockstock;
     public $defectivestock;
     public $lockdefectivestock;
     public $shop_id;

     public function exchangeArray($data)
     {
         $this->id             = (!empty($data['id'])) ? $data['id'] : null;
         $this->storehouse_sn  = (!empty($data['storehouse_sn'])) ? $data['storehouse_sn'] : null;
         $this->goods_id       = (!empty($data['goods_id'])) ? $data['goods_id'] : null;
         $this->goods_name     = (!empty($data['goods_name'])) ? $data['goods_name'] : null;
         $this->goods_barcode  = (!empty($data['goods_barcode'])) ? $data['goods_barcode'] : null;
         $this->totalstock     = (!empty($data['totalstock'])) ? $data['totalstock'] : null;
         $this->stock          = (!empty($data['stock'])) ? $data['stock'] : null;
         $this->lockstock      = (!empty($data['lockstock'])) ? $data['lockstock'] : null;
         $this->defectivestock = (!empty($data['defectivestock'])) ? $data['defectivestock'] : null;
         $this->shop_id        = (!empty($data['shop_id'])) ? $data['shop_id'] : null;
     }
 }

redpajama_set_name: RedPajamaGithub


text:
namespace YAML
{
	Scanner::SimpleKey::SimpleKey(const Mark& mark_, int flowLevel_)
		: mark(mark_), flowLevel(flowLevel_), pIndent(0), pMapStart(0), pKey(0)
	{
	}

	void Scanner::SimpleKey::Validate()
	{
		// Note: pIndent will *not* be garbage here;
		//       we "garbage collect" them so we can
		//       always refer to them
		if(pIndent)
			pIndent->status = IndentMarker::VALID;
		if(pMapStart)
			pMapStart->status = Token::VALID;
		if(pKey)
			pKey->status = Token::VALID;
	}

	void Scanner::SimpleKey::Invalidate()
	{
		if(pIndent)
			pIndent->status = IndentMarker::INVALID;
		if(pMapStart)
			pMapStart->status = Token::INVALID;
		if(pKey)
			pKey->status = Token::INVALID;
	}

	// CanInsertPotentialSimpleKey
	bool Scanner::CanInsertPotentialSimpleKey() const
	{
		if(!m_simpleKeyAllowed)
			return false;

		return !ExistsActiveSimpleKey();
	}

	// ExistsActiveSimpleKey
	// . Returns true if there's a potential simple key at our flow level
	//   (there's allowed at most one per flow level, i.e., at the start of the flow start token)
	bool Scanner::ExistsActiveSimpleKey() const
	{
		if(m_simpleKeys.empty())
			return false;

		const SimpleKey& key = m_simpleKeys.top();
		return key.flowLevel == GetFlowLevel();
	}

	// InsertPotentialSimpleKey
	// . If we can, add a potential simple key to the queue,
	//   and save it on a stack.
	void Scanner::InsertPotentialSimpleKey()
	{
		if(!CanInsertPotentialSimpleKey())
			return;

		SimpleKey key(INPUT.mark(), GetFlowLevel());

		// first add a map start, if necessary
		if(InBlockContext()) {
			key.pIndent = PushIndentTo(INPUT.column(), IndentMarker::MAP);
			if(key.pIndent) {
				key.pIndent->status = IndentMarker::UNKNOWN;
				key.pMapStart = key.pIndent->pStartToken;
				key.pMapStart->status = Token::UNVERIFIED;
			}
		}

		// then add the (now unverified) key
		m_tokens.push(Token(Token::KEY, INPUT.mark()));
		key.pKey = &m_tokens.back();
		key.pKey->status = Token::UNVERIFIED;

		m_simpleKeys.push(key);
	}

	// InvalidateSimpleKey
	// . Automatically invalidate the simple key in our flow level
	void Scanner::InvalidateSimpleKey()
	{
		if(m_simpleKeys.empty())
			return;

		// grab top key
		SimpleKey& key = m_simpleKeys.top();
		if(key.flowLevel != GetFlowLevel())
			return;

		key.Invalidate();
		m_simpleKeys.pop();
	}

	// VerifySimpleKey
	// . Determines whether the latest simple key to be added is valid,
	//   and if so, makes it valid.
	bool Scanner::VerifySimpleKey()
	{
		if(m_simpleKeys.empty())
			return false;

		// grab top key
		SimpleKey key = m_simpleKeys.top();

		// only validate if we're in the correct flow level
		if(key.flowLevel != GetFlowLevel())
			return false;

		m_simpleKeys.pop();

		bool isValid = true;

		// needs to be less than 1024 characters and inline
		if(INPUT.line() != key.mark.line || INPUT.pos() - key.mark.pos > 1024)
			isValid = false;

		// invalidate key
		if(isValid)
			key.Validate();
		else
			key.Invalidate();

		return isValid;
	}

	void Scanner::PopAllSimpleKeys()
	{
		while(!m_simpleKeys.empty())
			m_simpleKeys.pop();
	}
}


text:
@class FLEXGlobalsTableViewControllerEntry;

@interface FLEXManager ()

/// An array of FLEXGlobalsTableViewControllerEntry objects that have been registered by the user.
@property (nonatomic, readonly, strong) NSArray<FLEXGlobalsTableViewControllerEntry *> *userGlobalEntries;

@end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>
        Marina Cafe Jobs
    </title>
    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <meta content="BCIT CST: Web Development Assignment 2" name="description">
    <meta content="width=device-width, initial-scale=1, user-scalable=0" name="viewport">
    <link href="images/icon.ico" rel="shortcut icon">

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/main.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">

                <button class="navbar-toggle" data-target=".navbar-ex1-collapse" data-toggle="collapse" type="button">Toggle navigation
                </button>

                        Home

                        Menu

                        Performances

                        Jobs

                        Jobs

                    Apply now for the opportunity to be more than just an employee.

                    A Career with Marina Cafe

                Are you a college student who would like a part time job?

                Apply at Marina Cafe - we will work around your schedule.

                Complete the information form below to get the application process started.

                Or, if you prefer, stop by Marina Cafe any time and ask about employment opportunities.

                Marina Cafe is an equal opportunity employer.

                We celebrate the diversity of our associates!

                    Apply Online

            <form class="form-horizontal" method="post" action="job_application.php">

                    Name:

                        <input type="text" class="form-control" id="name" placeholder="Enter name" required="required">

                    Email:

                        <input type="email" class="form-control" id="email" placeholder="Enter email" required="required">

                    Phone:

                        <input type="tel" class="form-control" id="phone" placeholder="###-###-####" required="required">

Please select the job roles you are interested in:

                                <input type="checkbox" name="bar" id="bar" value="yes">Bar Associate

                                <input type="checkbox" name="server" id="server" value="yes">Server

                                <input type="checkbox" name="clean" id="clean" value="yes">Cleaning & Maintenance

                                <input type="checkbox" name="manager" id="manager" value="yes">Manager

                    Employment Type:

                                <input type="radio" name="employmentType" id="typePart" value="part">Part-time

                                <input type="radio" name="employmentType" id="typeFull" value="full">Full-time

                    Gender:

                                <input type="radio" name="gender" id="genderMale" value="male">Male

                                <input type="radio" name="gender" id="genderFemale" value="female">Female

                    Years of experience:

                        <select size="1" name="experience" id="experience">
                            <option>Pick One</option>
                            <option value="No experience">No experience</option>
                            <option value="Less than 1 year">Less than 1 year</option>
                            <option value="More than 1 year">More than 1 year</option>
                        </select>

                    Comments:

                        <textarea name="comments" id="comments" cols="40" rows="4" placeholder="Tell us a little bit about you."></textarea>

                        <button type="submit" class="btn btn-default">Submit</button>
                        <button type="reset" class="btn btn-default">Reset</button>

            </form>

                        Pages

                        Home

                        Menu

                        Performances

                        Jobs

                        Contact Us

                <address>
                        667 Lawrence Ave.

                        Kelowna, BC V1Y 6L8

                        1-888-888-8888
                    </address>Email: marina@marinacafe.com

                        Follow Us

                        Services

                    Free car parking at the rear entrance.

 Free Wifi.

                    And More...

        Copyright @ 2017 Marina Cafe


text:
module TChart

  #
  # The input data file specifies settings, data lines, and separators.
  # This class stores the settings from the data file.  Responsible for
  # providing default values for those settings that are not specified
  # in the input file.  Also responsible for answering whether a setting
  # name is known or not, and for providing a list of all setting names.
  #
  # All setting values are in millimeters.  The Settings and TeXBuilder
  # are the only two classes that know what units are being used.  All
  # other classes are unit agnostic.
  #
  class Settings

    #
    # The amount of horizontal space available for the chart.  It must be
    # large enough to accomodate the width of the y-axis labels, the width
    # of the x axis, and the margins to the left and right of the x axis.
    #
    attr_accessor :chart_width

    #
    # The amount of vertical space to allocate for each line of the chart.
    # It must be large enough to accomodate the larger of the y axis label
    # height and the bar height.
    #
    attr_accessor :line_height

    #
    # The amount of horizontal space to allocate for each x axis label.
    # Used to determine the width of the margins to the left and right of
    # the x axis, and also passed to TikZ/TeX.
    #
    attr_accessor :x_axis_label_width

    #
    # The distance of the mid point of the x axis labels from the x axis.
    #
    attr_accessor :x_axis_label_y_coordinate

    #
    # The width of the y axis labels.  Used to calculate the amount of
    # horizontal space to leave for the labels, and also passed in the
    # generated TikX code.
    #
    attr_accessor :y_axis_label_width

    def initialize
      @chart_width                = 164.99
      @line_height                = 4.6
      @x_axis_label_width         = 10
      @x_axis_label_y_coordinate  = -3
      @y_axis_label_width         = 24
    end

    def has_setting?(setting_name)
      setting_names.include?(setting_name)
    end

    def setting_names # => [ "chart_width", "line_height", ... ]
      methods                                 # => [ "has_setting?", "chart_width", "chart_width=", ... ]
        .grep(/\w=$/)                         # => [ "chart_width=", ... ]
        .map {|name| name.to_s.chomp('=')}    # => [ "chart_width", ... ]
    end

  end
end


text:
glTF-Cpp aims to be a modern C++ library for loading [glTF][1] files and
exposing their content to the user. The library is released under an [MIT
Licence](LICENCE) and has its repository hosted on [GitHub][2].

## Current Status

You can clone the project right now if you want. However, apart from this
[README](README), the [LICENCE](LICENCE) and a [.gitignore](.gitignore), you
will find nothing interesting for the moment.

## Roadmap

Work for [Version 0.1][3] will consist in adding support for:

1. [Meshes][4];
2. [Materials and techniques][5];
3. [Scene graph][6];
4. [Cameras][7];
5. [Lights][8].

[1]: https://www.khronos.org/gltf/
[2]: https://github.com/pierremoreau/glTF-Cpp/
[3]: https://github.com/pierremoreau/glTF-Cpp/milestones
[4]: https://github.com/KhronosGroup/glTF/blob/master/specification/README.md#meshes
[5]: https://github.com/KhronosGroup/glTF/blob/master/specification/README.md#materials-and-shading
[6]: https://github.com/KhronosGroup/glTF/blob/master/specification/README.md#scenes
[7]: https://github.com/KhronosGroup/glTF/blob/master/specification/README.md#cameras
[8]: https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_materials_common#lights


text:
@interface NSObject (AMAssociatedObjects)
- (void)associateValue:(id)value withKey:(void *)key; // Strong reference
- (void)weaklyAssociateValue:(id)value withKey:(void *)key;
- (id)associatedValueForKey:(void *)key;

@end

@interface NSMenuItem (boardDict)

@property (nonatomic) NSDictionary *boardDictionary;

@end


text:
package libvirtxml

type DomainInterfaceSource struct {
	node *Node
}

func newDomainInterfaceSource(node *Node) DomainInterfaceSource {
	return DomainInterfaceSource{
		node: node,
	}
}

func (s DomainInterfaceSource) Network() string {
	return s.node.getAttribute(nameForLocal("network"))
}

func (s DomainInterfaceSource) SetNetwork(value string) {
	s.node.setAttribute(nameForLocal("network"), value)
}


text:
#ifndef SkReader32_DEFINED
#define SkReader32_DEFINED

#include "SkTypes.h"

#include "SkScalar.h"
#include "SkPoint.h"
#include "SkRect.h"

class SkReader32 : SkNoncopyable {
public:
    SkReader32() : fCurr(NULL), fStop(NULL), fBase(NULL) {}
    SkReader32(const void* data, size_t size)  {
        this->setMemory(data, size);
    }

    void setMemory(const void* data, size_t size) {
        SkASSERT(ptr_align_4(data));
        SkASSERT(SkAlign4(size) == size);

        fBase = fCurr = (const char*)data;
        fStop = (const char*)data + size;
    }

    uint32_t size() const { return fStop - fBase; }
    uint32_t offset() const { return fCurr - fBase; }
    bool eof() const { return fCurr >= fStop; }
    const void* base() const { return fBase; }
    const void* peek() const { return fCurr; }
    void rewind() { fCurr = fBase; }

    void setOffset(size_t offset) {
        SkASSERT(SkAlign4(offset) == offset);
        SkASSERT(offset <= this->size());
        fCurr = fBase + offset;
    }

    bool readBool() { return this->readInt() != 0; }

    int32_t readInt() {
        SkASSERT(ptr_align_4(fCurr));
        int32_t value = *(const int32_t*)fCurr;
        fCurr += sizeof(value);
        SkASSERT(fCurr <= fStop);
        return value;
    }

    SkScalar readScalar() {
        SkASSERT(ptr_align_4(fCurr));
        SkScalar value = *(const SkScalar*)fCurr;
        fCurr += sizeof(value);
        SkASSERT(fCurr <= fStop);
        return value;
    }

    const SkPoint* skipPoint() {
        return (const SkPoint*)this->skip(sizeof(SkPoint));
    }

    const SkRect* skipRect() {
        return (const SkRect*)this->skip(sizeof(SkRect));
    }

    const void* skip(size_t size) {
        SkASSERT(ptr_align_4(fCurr));
        const void* addr = fCurr;
        fCurr += SkAlign4(size);
        SkASSERT(fCurr <= fStop);
        return addr;
    }

    void read(void* dst, size_t size) {
        SkASSERT(dst != NULL);
        SkASSERT(ptr_align_4(fCurr));
        memcpy(dst, fCurr, size);
        fCurr += SkAlign4(size);
        SkASSERT(fCurr <= fStop);
    }

    uint8_t readU8() { return (uint8_t)this->readInt(); }
    uint16_t readU16() { return (uint16_t)this->readInt(); }
    int32_t readS32() { return this->readInt(); }
    uint32_t readU32() { return this->readInt(); }

private:
    // these are always 4-byte aligned
    const char* fCurr;  // current position within buffer
    const char* fStop;  // end of buffer
    const char* fBase;  // beginning of buffer

#ifdef SK_DEBUG
    static bool ptr_align_4(const void* ptr)
    {
        return (((const char*)ptr - (const char*)NULL) & 3) == 0;
    }
#endif
};

#endif


text:
from django.utils.translation import ugettext_lazy as _

from horizon import exceptions
from horizon import tabs
from openstack_dashboard import api
from openstack_dashboard.dashboards.project.routers.extensions.routerrules\
    import tabs as rr_tabs
from openstack_dashboard.dashboards.project.routers.ports import tables as ptbl

class InterfacesTab(tabs.TableTab):
    table_classes = (ptbl.PortsTable,)
    name = _("Interfaces")
    slug = "interfaces"
    template_name = "horizon/common/_detail_table.html"

    def get_interfaces_data(self):
        ports = self.tab_group.ports
        for p in ports:
            p.set_id_as_name_if_empty()
        return ports

class RouterDetailTabs(tabs.TabGroup):
    slug = "router_details"
    tabs = (InterfacesTab, rr_tabs.RulesGridTab, rr_tabs.RouterRulesTab)
    sticky = True

    def __init__(self, request, **kwargs):
        rid = kwargs['router_id']
        self.router = {}
        if 'router' in kwargs:
            self.router = kwargs['router']
        else:
            self.router = api.neutron.router_get(request, rid)
        try:
            self.ports = api.neutron.port_list(request, device_id=rid)
        except Exception:
            self.ports = []
            msg = _('Unable to retrieve router details.')
            exceptions.handle(request, msg)
        super(RouterDetailTabs, self).__init__(request, **kwargs)


text:
package net.acardenas.rest.domain;

/**
 * Created by acardenas on 3/26/14.
 */
public class ItemWrapper<T>
{
    private T item;

    public T getItem()
    {
        return item;
    }

    public void setItem(T anItem)
    {
        item = anItem;
    }
}


text:
#include "qpid/client/FailoverListener.h"
#include "qpid/client/Session.h"
#include "qpid/framing/Uuid.h"
#include "qpid/log/Statement.h"
#include "qpid/log/Helpers.h"
#include "qpid/UrlArray.h"

namespace qpid {
namespace client {

const std::string FailoverListener::AMQ_FAILOVER("amq.failover");

FailoverListener::FailoverListener(Connection c) :
    connection(c),
    session(c.newSession(AMQ_FAILOVER+"."+framing::Uuid(true).str())),
    subscriptions(session)
{ init(true); }

FailoverListener::FailoverListener(Connection c, bool useInitial) :
    connection(c),
    session(c.newSession(AMQ_FAILOVER+"."+framing::Uuid(true).str())),
    subscriptions(session)
{ init(useInitial); }

void FailoverListener::init(bool useInitial) {
    if (useInitial) knownBrokers = connection.getInitialBrokers();
    if (session.exchangeQuery(arg::name=AMQ_FAILOVER).getNotFound()) {
        session.close();
        return;
    }
    std::string qname=session.getId().getName();
    session.queueDeclare(arg::queue=qname, arg::exclusive=true, arg::autoDelete=true);
    session.exchangeBind(arg::queue=qname, arg::exchange=AMQ_FAILOVER);
    subscriptions.subscribe(*this, qname, SubscriptionSettings(FlowControl::unlimited(),
                                                                ACCEPT_MODE_NONE));
    thread = sys::Thread(*this);
}

void FailoverListener::run() {
    try {
        subscriptions.run();
    } catch(...) {}
}

FailoverListener::~FailoverListener() {
    try {
        subscriptions.stop();
        thread.join();
        if (connection.isOpen()) {
            session.sync();
            session.close();
        }
    } catch (...) {}
}

void FailoverListener::received(Message& msg) {
    sys::Mutex::ScopedLock l(lock);
    knownBrokers = getKnownBrokers(msg);
}

std::vector<Url> FailoverListener::getKnownBrokers() const {
    sys::Mutex::ScopedLock l(lock);
    return knownBrokers;
}

std::vector<Url> FailoverListener::getKnownBrokers(const Message& msg) {
    framing::Array urlArray;
    msg.getHeaders().getArray("amq.failover", urlArray);
    return urlArrayToVector(urlArray);
}

}} // namespace qpid::client


text:
<?php
namespace Interns\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class HelloController extends AbstractActionController
{
    public function worldAction()
    {
        $message = $this->params()->fromQuery('message', 'foo');
        return new ViewModel(array('message' => $message));
    }
}


text:
<?php

include_once __DIR__.'/LockBaseTask.php';

/**
 * Class LockBaseTask
 */
class LockInitTask extends LockBaseTask
{
    private $force = false;

    /**
     * @param boolean $force
     */
    public function setForce($force)
    {
        $this->force = $force;
    }

    /**
     * @return boolean
     */
    public function getForce()
    {
        return $this->force;
    }

    public function main()
    {
        $this->log("Creating lock file: ".$this->getLockFile());

        if (!file_exists($this->getLockFile()) || $this->getForce()) {
            $this->createLock();
        } else {
            $data =  $this->getLockData();

            $echo = new EchoTask();
            $echo->setProject($this->getProject());
            $echo->setTaskName($this->getTaskName());
            $echo->setLevel(Project::MSG_ERR);
            $echo->setMessage($this->formatText($this->getMessage(), $data));
            $echo->main();

            $input = new InputTask();
            $input->setProject($this->getProject());
            $input->setTaskName($this->getTaskName());
            $input->setPropertyName(self::PROPERTY_LOCK_FORCE);
            $input->setMessage('Force deploy');
            $input->setPromptChar('?');
            $input->setValidargs('y,n');
            $input->setDefaultValue('y');
            $input->main();

            $inputValue = $this->getProject()->getProperty(self::PROPERTY_LOCK_FORCE);

            if ($inputValue == 'y')
            {
                $this->createLock();
            } else {
                throw new \BuildException("Another build is running.");
            }
        }
    }
}


text:
/*
 * @(#)PlayerControllerTest.java 1.0 08/2017
 */
package br.com.futapp.futappbackend.controller;

import br.com.futapp.futappbackend.dto.PlayerDto;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.MockitoAnnotations;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

import static org.junit.Assert.*;

public class PlayerControllerTest {

	@InjectMocks
	private PlayerController playerController;

	@Before
	public void setUp() {
		MockitoAnnotations.initMocks(this);
	}

	@Test
	public void testGetPlayer1() throws Exception {

		ResponseEntity<PlayerDto> responseEntity = playerController.get(1L);

		assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
		assertNotNull(responseEntity.getBody());
		assertEquals(new Long(1), responseEntity.getBody().getId());

	}

	@Test
	public void testGetPlayer2() throws Exception {

		ResponseEntity<PlayerDto> responseEntity = playerController.get(2L);

		assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
		assertNotNull(responseEntity.getBody());
		assertEquals(new Long(2), responseEntity.getBody().getId());

	}

}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xuexi.dao.UserDao">

	<resultMap type="User" id="UserResult">
		<result property="id" column="id"/>
		<result property="userName" column="userName"/>
		<result property="password" column="password"/>
		<result property="trueName" column="trueName"/>
		<result property="email" column="email"/>
		<result property="phone" column="phone"/>
		<result property="roleName" column="roleName"/>
	</resultMap>

	<select id="login" parameterType="User" resultMap="UserResult">
		select * from t_user where userName=#{userName} and password=#{password} and roleName=#{roleName}
	</select>

	<select id="find" parameterType="Map" resultMap="UserResult">
		select * from t_user
		<where>
			<if test="userName!=null and userName!='' ">
				and userName like #{userName}
			</if>
			<if test="roleName!=null and roleName!='' ">
				and roleName like #{roleName}
			</if>
		</where>
		<if test="start!=null and size!=null">
			limit #{start},#{size}
		</if>
	</select>

	<select id="getTotal" parameterType="Map" resultType="Long">
		select count(*) from t_user
		<where>
			<if test="userName!=null and userName!='' ">
				and userName like #{userName}
			</if>
			<if test="roleName!=null and roleName!='' ">
				and roleName like #{roleName}
			</if>
		</where>
	</select>

	<insert id="add" parameterType="User">
		insert into t_user values(null,#{userName},#{password},#{trueName},#{email},#{phone},#{roleName})
	</insert>

	<update id="update" parameterType="User">
		update t_user
		<set>
			<if test="userName!=null and userName!='' ">
				userName=#{userName},
			</if>
			<if test="password!=null and password!='' ">
				password=#{password},
			</if>
			<if test="trueName!=null and trueName!='' ">
				trueName=#{trueName},
			</if>
			<if test="email!=null and email!='' ">
				email=#{email},
			</if>
			<if test="phone!=null and phone!='' ">
				phone=#{phone},
			</if>
			<if test="roleName!=null and roleName!='' ">
				roleName=#{roleName},
			</if>
		</set>
		where id=#{id}
	</update>

	<delete id="delete" parameterType="Integer">
		delete from t_user where id=#{id}
	</delete>
</mapper>


text:
<resources>

    <!-- Base application theme. -->

    <style name="AppBaseTheme" parent="Theme.AppCompat.Light.NoActionBar">

        <!-- toolbar(actionbar)颜色 -->
        <item name="colorPrimary">#4876FF</item>

        <!-- 状态栏颜色 -->
        <item name="colorPrimaryDark">#3A5FCD</item>

        <!-- 窗口的背景颜色 -->
        <item name="android:windowBackground">@android:color/white</item>
        <!-- SearchView -->
        <item name="searchViewStyle">@style/MySearchViewStyle</item>

    </style>

    <style name="AppTheme" parent="@style/AppBaseTheme"></style>

    <style name="MySearchViewStyle" parent="Widget.AppCompat.SearchView"></style>

</resources>