text:
/**
 * Description : This is a test suite that tests an LRS endpoint based on the testing requirements document
 * found at https://github.com/adlnet/xapi-lrs-conformance-requirements
 */

(function (module, fs, extend, moment, request, requestPromise, chai, liburl, Joi, helper, multipartParser, redirect, templatingSelection) {
    // "use strict";

    var expect = chai.expect;
    if(global.OAUTH)
        request = helper.OAuthRequest(request);

describe('Statement Lifecycle Requirements (Data 2.3)', () => {

/**  Matchup with Conformance Requirements Document
 * XAPI-00016 - below
 * XAPI-00017 - in voiding.js
 * XAPI-00018 - below
 * XAPI-00019 - in voiding.js
 * XAPI-00020 - in voiding.js
 */

    templatingSelection.createTemplate('voiding.js');

/**  XAPI-00018, Data 2.3.2 Voiding
 * An LRS MUST consider a Statement it contains voided if the Statement is not itself a voiding Statement and the LRS also contains a voiding Statement referring to the first Statement.
 * Test: Void a statement and then send a GET for that statement which uses "statementId" instead of "voidedStatementId." The statement should then not be returned in the GET request, which should return a 404.
 */
    describe('A Voided Statement is defined as a Statement that is not a Voiding Statement and is the Target of a Voiding Statement within the LRS (Data 2.3.2.s2.b3, XAPI-00018)', function () {
        var voidedId = helper.generateUUID();
        var stmtTime;

        before('persist voided statement', function (done) {
            var templates = [
                {statement: '{{statements.default}}'}
            ];
            var voided = helper.createFromTemplate(templates);
            voided = voided.statement;
            voided.id = voidedId;

            request(helper.getEndpointAndAuth())
                .post(helper.getEndpointStatements())
                .headers(helper.addAllHeaders({}))
                .json(voided)
                .expect(200, done);
        });

        before('persist voiding statement', function (done) {
            var templates = [
                {statement: '{{statements.voiding}}'}
            ];
            var voiding = helper.createFromTemplate(templates);
            voiding = voiding.statement;
            voiding.object.id = voidedId;
            stmtTime = Date.now();

            request(helper.getEndpointAndAuth())
                .post(helper.getEndpointStatements())
                .headers(helper.addAllHeaders({}))
                .json(voiding)
                .expect(200, done);
        });

        it('should return a voided statement when using GET "voidedStatementId"', function (done) {
            this.timeout(0);
            var query = helper.getUrlEncoding({voidedStatementId: voidedId});
            request(helper.getEndpointAndAuth())
                .get(helper.getEndpointStatements() + '?' + query)
                .wait(helper.genDelay(stmtTime, '?' + query, voidedId))
                .headers(helper.addAllHeaders({}))
                .expect(200)
                .end(function (err, res) {
                    if (err) {
                        done(err);
                    } else {
                        var statement = helper.parse(res.body, done);
                        expect(statement.id).to.equal(voidedId);
                        done();
                    }
                });
        });

        it('should return 404 when using GET with "statementId"', function (done) {
            this.timeout(0);
            var query = helper.getUrlEncoding({statementId: voidedId});
            request(helper.getEndpointAndAuth())
                .get(helper.getEndpointStatements() + '?' + query)
                .wait(helper.genDelay(stmtTime, '?' + query, voidedId))
                .headers(helper.addAllHeaders({}))
                .expect(404, done);
        });
    });

/**  XAPI-00016, Data 2.3.2 Voiding
 * A Voiding Statement cannot Target another Voiding Statement.
 * LRS behavior this new VOIDING statement MAY be rejected.
 * If the LRS accepts that statement, the violating VOIDING statement SHOULD be ignored.
 * Adjust this test accordingly
 */
    describe('A Voiding Statement cannot Target another Voiding Statement (Data 2.3.2.s2.b7, XAPI-00016)', function () {
        var voidedId, voidingId;

        before('persist voided statement', function (done) {
            var templates = [
                {statement: '{{statements.default}}'}
            ];
            var data = helper.createFromTemplate(templates);
            data = data.statement;

            request(helper.getEndpointAndAuth())
            .post(helper.getEndpointStatements())
            .headers(helper.addAllHeaders({}))
            .json(data).expect(200).end(function (err, res) {
                if (err) {
                    done(err);
                } else {
                    voidedId = res.body[0];
                    done();
                }
            });
        });

        before('persist voiding statement', function (done) {
            var templates = [
                {statement: '{{statements.voiding}}'}
            ];
            var data = helper.createFromTemplate(templates);
            data = data.statement;
            data.object.id = voidedId;

            request(helper.getEndpointAndAuth())
            .post(helper.getEndpointStatements())
            .headers(helper.addAllHeaders({}))
            .json(data).expect(200).end(function (err, res) {
                if (err) {
                    done(err);
                } else {
                    voidingId = res.body[0];
                    done();
                }
            });
        });

        it('should not void an already voided statement', function (done) {
            this.timeout(0);
            var templates = [
                {statement: '{{statements.object_statementref}}'},
                {verb: '{{verbs.voided}}'}
            ];
            var data = helper.createFromTemplate(templates);
            data = data.statement;
            data.object.id = voidedId;
            var stmtTime = Date.now();

            request(helper.getEndpointAndAuth())
            .post(helper.getEndpointStatements())
            .headers(helper.addAllHeaders({}))
            .json(data).end(function (err, res) {
                if (err) {
                    done(err);
                } else {
                    var query = '?voidedStatementId=' + voidedId;
                    request(helper.getEndpointAndAuth())
                    .get(helper.getEndpointStatements())
                    .wait(helper.genDelay(stmtTime, query, voidedId))
                    .headers(helper.addAllHeaders({}))
                    .expect(200, done);
                }
            });
        });

        it('should not void a voiding statement', function (done) {
            this.timeout(0);
            var templates = [
                {statement: '{{statements.object_statementref}}'},
                {verb: '{{verbs.voided}}'}
            ];
            var data = helper.createFromTemplate(templates);
            data = data.statement;
            data.object.id = voidingId;
            var stmtTime = Date.now();
            request(helper.getEndpointAndAuth())
            .post(helper.getEndpointStatements())
            .headers(helper.addAllHeaders({}))
            .json(data).end(function (err, res) {
                if (err) {
                    done(err);
                } else {
                    var query = '?statementId=' + voidingId;
                    request(helper.getEndpointAndAuth())
                    .get(helper.getEndpointStatements() + query)
                    .headers(helper.addAllHeaders({}))
                    .wait(helper.genDelay(stmtTime, query, voidingId))
                    .expect(200, done);
                }
            });
        });

    });

});

}(module, require('fs'), require('extend'), require('moment'), require('super-request'), require('supertest-as-promised'), require('chai'), require('url'), require('joi'), require('./../helper'), require('./../multipartParser'), require('./../redirect.js'), require('./../templatingSelection.js')));


text:
__all__ = ['affine_initializer']

import warnings
from tempfile import mktemp

from .. import utils

def affine_initializer(fixed_image, moving_image, search_factor=20,
                        radian_fraction=0.1, use_principal_axis=False,
                        local_search_iterations=10, mask=None, txfn=None ):
    """
    A multi-start optimizer for affine registration
    Searches over the sphere to find a good initialization for further
    registration refinement, if needed.  This is a arapper for the ANTs
    function antsAffineInitializer.

    ANTsR function: `affineInitializer`

    Arguments
    ---------
    fixed_image : ANTsImage
        the fixed reference image
    moving_image : ANTsImage
        the moving image to be mapped to the fixed space
    search_factor : scalar
        degree of increments on the sphere to search
    radian_fraction : scalar
        between zero and one, defines the arc to search over
    use_principal_axis : boolean
        boolean to initialize by principal axis
    local_search_iterations : scalar
        gradient descent iterations
    mask : ANTsImage (optional)
        optional mask to restrict registration
    txfn : string (optional)
        filename for the transformation

    Returns
    -------
    ndarray
        transformation matrix

    Example
    -------
    >>> import ants
    >>> fi = ants.image_read(ants.get_ants_data('r16'))
    >>> mi = ants.image_read(ants.get_ants_data('r27'))
    >>> txfile = ants.affine_initializer( fi, mi )
    >>> tx = ants.read_transform(txfile, dimension=2)
    """

    if txfn is None:
        txfn = mktemp(suffix='.mat')

    veccer = [fixed_image.dimension, fixed_image, moving_image, txfn,
                search_factor, radian_fraction, int(use_principal_axis),
                local_search_iterations]
    if mask is not None:
        veccer.append(mask)

    xxx = utils._int_antsProcessArguments(veccer)
    libfn = utils.get_lib_fn('antsAffineInitializer')
    retval = libfn(xxx)

    if retval != 0:
        warnings.warn('ERROR: Non-zero exit status!')

    return txfn

redpajama_set_name: RedPajamaGithub


text:
using UnityEngine;
using System.Collections;

public class MoveForward : MonoBehaviour {

	// Use this for initialization
	void Start () {

	}

	// Update is called once per frame
	void Update () {
        //Debug.Log("move forward");
        //transform.Translate(new Vector3(.1F, .1F, 0));
        transform.Translate(Vector3.forward * Time.deltaTime);
	}
}


text:
import _Error from "./error"
export default class ReturnTypeMismatch extends _Error {
    /**
     * Builds the object
     * @param {?string} message Any overriding message
     */
    constructor(message = null) {
        super(message || "Practical return type does not match signature")
    }
}


text:
package de.uni_bonn.bit;

import org.bitcoinj.core.*;
import org.bitcoinj.params.UnitTestParams;
import de.uni_bonn.bit.wallet_protocol.*;
import org.apache.avro.ipc.NettyServer;
import org.apache.avro.ipc.NettyTransceiver;
import org.apache.avro.ipc.reflect.ReflectRequestor;
import org.apache.avro.ipc.reflect.ReflectResponder;
import org.junit.Test;

import java.io.IOException;
import java.math.BigInteger;
import java.net.InetSocketAddress;
import java.util.Map;

import static de.uni_bonn.bit.BitcoinECMathHelper.convertBigIntToPrivKey;

/**
 * This class performs the same tests as {@link de.uni_bonn.bit.TransactionSignerTests}, but all messages
 * are exchanged via serialization. This class primarily checks that the Avro serialization used for the
 * communication between desktop and phone can successfully (de)serialize all objects required for the
 * protocol.
 */
public class TransactionSignerSerializationTests extends TransactionSignerBaseTest {

    /**
     * Similar to {@link TransactionSignerTests#testTheTransactionSigners()}, this test signs a
     * Bitcoin transaction with the two-party ECDSA signature protocol. All messages exchanged between
     * the {@link de.uni_bonn.bit.DesktopTransactionSigner} and the {@link de.uni_bonn.bit.PhoneTransactionSigner}
     * are serialized and sent over the local loopback. This test primarily exists to check that the
     * (de)serialization with avro works correctly.
     * @throws InsufficientMoneyException
     */
    @Test
    public void testTheTransactionSigners() throws InsufficientMoneyException, IOException, InterruptedException {
        ECKey receiverKey = convertBigIntToPrivKey(new BigInteger("100"));
        Address receiverAddress = receiverKey.toAddress(UnitTestParams.get());
        Wallet.SendRequest req = Wallet.SendRequest.to(receiverAddress, Coin.valueOf(0,3));
        req.missingSigsMode = Wallet.MissingSigsMode.USE_DUMMY_SIG;
        this.wallet.completeTx(req);

        PaillierKeyPair pkpDesktop = PaillierKeyPair.generatePaillierKeyPair();
        PaillierKeyPair pkpPhone = PaillierKeyPair.generatePaillierKeyPair();

        WalletProtocolTestImpl impl = new WalletProtocolTestImpl(req.tx, desktopKeyShare, clearedCopy(phoneKeyShare),
                pkpDesktop, pkpPhone.clearPrivateKey(), desktopBCParameters, phoneBCParameters.clearPrivate());

        NettyServer server = new NettyServer(new ReflectResponder(IWalletProtocol.class,
                impl), new InetSocketAddress(20000));

        NettyTransceiver transceiver = new NettyTransceiver(new InetSocketAddress(20000));
        IWalletProtocol proxy = ReflectRequestor.getClient(IWalletProtocol.class, transceiver);

        TransactionInfo txInfo = proxy.fetchTransactionInfo();
        PhoneTransactionSigner signer = new PhoneTransactionSigner(txInfo, phoneKeyShare, clearedCopy(desktopKeyShare),
                pkpDesktop.clearPrivateKey(), pkpPhone, desktopBCParameters.clearPrivate(), phoneBCParameters);

        SignatureParts[] signatureParts = proxy.getSignatureParts();
        EphemeralValueShare[] ephemeralValueShares = signer.generateEphemeralValueShare(signatureParts);

        EphemeralPublicValueWithProof[] ephemeralPublicValuesWithProof = proxy.getEphemeralPublicValuesWithProof(ephemeralValueShares);
        EncryptedSignatureWithProof[] encryptedSignaturesWithProof = signer.computeEncryptedSignatures(ephemeralPublicValuesWithProof);
        proxy.sendEncryptedSignatures(encryptedSignaturesWithProof);

        Thread.sleep(1000);
        Transaction signedTx = impl.transaction;
        server.close();

        //Testing code, which throws VerificationException
        signedTx.verify();
        for(TransactionInput input : signedTx.getInputs()){
            input.verify();
        }
    }

    public static class WalletProtocolTestImpl implements IWalletProtocol {

        Transaction transaction;
        Map<String, ECKey> keyShareMap;
        DesktopTransactionSigner signer;

        public WalletProtocolTestImpl(Transaction transaction, ECKey privateKey, ECKey otherPublicKey,
                                      PaillierKeyPair pkpDesktop, PaillierKeyPair pkpPhone, BCParameters desktopBCParameters,
                                      BCParameters phoneBCParameters) {
            this.transaction = transaction;
            this.keyShareMap = keyShareMap;
            this.signer = new DesktopTransactionSigner(transaction, privateKey, otherPublicKey, pkpDesktop, pkpPhone,
                    desktopBCParameters, phoneBCParameters);
        }

        @Override
        public TransactionInfo fetchTransactionInfo() {
            return new TransactionInfo(transaction);
        }

        @Override
        public SignatureParts[] getSignatureParts() {
            return signer.computeSignatureParts();
        }

        @Override
        public EphemeralPublicValueWithProof[] getEphemeralPublicValuesWithProof(EphemeralValueShare[] ephemeralValueShares) {
            return signer.computeEphemeralPublicValue(ephemeralValueShares);
        }

        @Override
        public boolean sendEncryptedSignatures(EncryptedSignatureWithProof[] encryptedSignatures) {
            transaction = signer.addEncryptedSignaturesToTransaction(encryptedSignatures);
            return true;
        }
    }

}


text:
import random
import string
from model.contact import Contact

#def random_string(prefix, maxlen):
    #symbols = string.ascii_letters + string.digits + " "*10
    #return prefix + "".join([random.choice(symbols) for i in range(random.randrange(maxlen))])

#def random_number(maxlen):
    #symbols =  string.digits + " "*10 + "+" + "-"*4
    #return "".join([random.choice(symbols) for i in range(random.randrange(maxlen))])

testdata = [Contact(firstname="igor", middlename="igor2", lastname="igor3",
    nickname="nick", title="dir", company="app", address="street", home="09876", mobile="54321", work="777",
    fax="222", email="qwerty@yandex.ru", email2="igor@ya.ru", email3="igor2@ya.ru", homepage="www",
    byear="1991", ayear="1991", phone2="home phone", address2="street-street", notes="non")]

data_edit = [Contact(firstname="ganna", middlename="ganna2", lastname="ganna3",
    nickname="cate", title="neft", company="gazprom", address="avenu", home="666", mobile="131313", work="777",
    fax="222", email="ganna@ya.ru", email2="ganna2@ya.ru", email3="derty@ya.ru", homepage="www.yandex.ru",
    byear="2002", ayear="2020", phone2="13666", address2="lenina", notes="No")]

#testdata = [Contact(firstname="igor", middlename="igor2", lastname="igor3",
    #nickname="nick", title="dir", company="app", address="street", home="09876", mobile="54321", work="777",
    #fax="222", email="qwerty@yandex.ru", email2="igor@ya.ru", email3="igor2@ya.ru", homepage="www",
    #byear="1991", ayear="1991", phone2="home phone", address2="street-street", notes="non")] + [
    #Contact(firstname = random_string("firstname", 15), middlename = random_string("middlename", 15), lastname = random_string("lastname", 15),
            #nickname = random_string("nickname", 25), title = random_string("title", 20), company = random_string("company", 25),
            #address = random_string("address", 40), home = random_number(30), mobile = random_number(25),
            #work = random_number(30), fax = random_number(25),
            #email = random_string("email", 20), email2 = random_string("email2", 20), email3 = random_string("email3", 15),
            #byear="1991", ayear="1991",
            #phone2 = random_number(30), address2 = random_string("address2", 40), notes = random_string("notes", 30))
#]


text:
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![GitHub release](https://img.shields.io/github/release/zaproxy/zaproxy.svg)](https://github.com/zaproxy/zaproxy/wiki/Downloads)
[![Build Status](https://travis-ci.org/zaproxy/zaproxy.svg?branch=master)](https://travis-ci.org/zaproxy/zaproxy)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/24/badge)](https://bestpractices.coreinfrastructure.org/projects/24)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/5559/badge.svg)](https://scan.coverity.com/projects/zaproxy-zaproxy)
[![Github Releases](https://img.shields.io/github/downloads/zaproxy/zaproxy/latest/total.svg?maxAge=2592000)](https://zapbot.github.io/zap-mgmt-scripts/downloads.html)
[![OWASP Flagship](https://img.shields.io/badge/owasp-flagship-brightgreen.svg)](https://www.owasp.org/index.php/OWASP_Project_Inventory#tab=Flagship_Projects)
[![ToolsWatch Rank 1](https://www.toolswatch.org/badges/toptools/rank1_2015.svg)](http://www.toolswatch.org/2016/02/2015-top-security-tools-as-voted-by-toolswatch-org-readers/)
[![Twitter Follow](https://img.shields.io/twitter/follow/zaproxy.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/zaproxy)

The OWASP Zed Attack Proxy (ZAP) is one of the world's most popular free security tools and is actively maintained by hundreds of international volunteers[*](#justification). It can help you automatically find security vulnerabilities in your web applications while you are developing and testing your applications. Its also a great tool for experienced pentesters to use for manual security testing.

[![](https://raw.githubusercontent.com/wiki/zaproxy/zaproxy/images/ZAP-Download.png)](https://github.com/zaproxy/zaproxy/wiki/Downloads)

####Please help us to make ZAP even better for you by answering the [ZAP User Questionnaire](https://docs.google.com/forms/d/1-k-vcj_sSxlil6XLxCFade-m-IQVeE2h9gduA-2ZPPA/viewform)!

For general information about ZAP:
  * [Home page](https://www.owasp.org/index.php/ZAP) - the official ZAP page on the OWASP wiki (includes a donate button;)
  * [Twitter](https://twitter.com/zaproxy)	- official ZAP announcements (low volume)
  * [Blog](https://zaproxy.blogspot.com/)	- official ZAP blog
  * [Monthly Newsletters](https://github.com/zaproxy/zaproxy/wiki/Newsletters) - ZAP news, tutorials, 3rd party tools and featured contributors
  * [Swag!](https://github.com/zaproxy/zap-swag) - official ZAP swag that you can buy, as well as all of the original artwork released under the CC License

For help using ZAP:
  * [Getting Started Guide (pdf)](https://github.com/zaproxy/zaproxy/releases/download/2.5.0/ZAPGettingStartedGuide-2.5.pdf) - an introductory guide you can print
  * [Tutorial Videos](https://www.youtube.com/playlist?list=PLEBitBW-Hlsv8cEIUntAO8st2UGhmrjUB)
  * [Frequently Asked Questions](https://github.com/zaproxy/zaproxy/wiki/FAQtoplevel)
  * [User Guide](https://github.com/zaproxy/zap-core-help/wiki) - online version of the User Guide included with ZAP
  * [User Group](https://groups.google.com/group/zaproxy-users) - ask questions about using ZAP
  * IRC: irc.mozilla.org #websectools (eg [using Mibbit](http://chat.mibbit.com/?server=irc.mozilla.org%3A%2B6697&channel=%23websectools)) - chat with core ZAP developers (European office hours usually best)
  * [Add-ons](https://github.com/zaproxy/zap-extensions/wiki) - help for the optional add-ons you can install
  * [StackOverflow](https://stackoverflow.com/questions/tagged/zap) - because some people use this for everything ;)

To learn more about ZAP development:
  * [Source Code](https://github.com/zaproxy) - for all of the ZAP related projects
  * [Wiki](https://github.com/zaproxy/zaproxy/wiki/Introduction) - lots of detailed info
  * [Developer Group](https://groups.google.com/group/zaproxy-develop) - ask questions about the ZAP internals
  * [Crowdin (GUI)](https://crowdin.com/project/owasp-zap) - help translate the ZAP GUI
  * [Crowdin (User Guide)](https://crowdin.com/project/owasp-zap-help) - help translate the ZAP User Guide
  * [OpenHub](https://www.openhub.net/p/zaproxy)	- FOSS analytics
  * [BountySource](https://www.bountysource.com/teams/zap/issues)	- Vote on ZAP issues (you can also donate money here, but 10% taken out)

#### Justification
Justification for the statements made in the tagline at the top;)

Popularity:
  * ToolsWatch Annual Best Free/Open Source Security Tool Survey:
   * 2015 [1st](http://www.toolswatch.org/2016/02/2015-top-security-tools-as-voted-by-toolswatch-org-readers/)
   * 2014 [2nd](http://www.toolswatch.org/2015/01/2014-top-security-tools-as-voted-by-toolswatch-org-readers/)
   * 2013 [1st] (http://www.toolswatch.org/2013/12/2013-top-security-tools-as-voted-by-toolswatch-org-readers/)

Contributors:
  * [Code Contributors](https://www.openhub.net/p/zaproxy)
  * [ZAP core i18n Contributors](https://crowdin.com/project/owasp-zap)
  * [ZAP help i18n Contributors](https://crowdin.com/project/owasp-zap-help)


text:
namespace Farmhand.Installers.Patcher.Injection.Components.Hooks.Converters
{
    /// <summary>
    ///     The IReturnableHookHandlerAttributeConverter interface.
    /// </summary>
    public interface IReturnableHookHandlerAttributeConverter : IAttributeConverter
    {
        /// <summary>
        ///     Gets a value indicating whether is exit.
        /// </summary>
        bool IsExit { get; }

        /// <summary>
        ///     Gets the type.
        /// </summary>
        string Type { get; }

        /// <summary>
        ///     Gets the method.
        /// </summary>
        string Method { get; }
    }
}


text:
package mysql

import (
	"github.com/cossacklabs/acra/decryptor/base"
	"github.com/cossacklabs/acra/decryptor/base/type_awareness"
	base_mysql "github.com/cossacklabs/acra/decryptor/mysql/base"
	"github.com/cossacklabs/acra/encryptor/config"
	"github.com/cossacklabs/acra/encryptor/config/common"
)

// DataTypeFormat implementation of type_awareness.DataTypeFormat for PostgreSQL
type DataTypeFormat struct {
	columnInfo    base.ColumnInfo
	columnSetting config.ColumnEncryptionSetting
}

// NewDataTypeFormat create new DataTypeFormat from ColumnInfo and ColumnEncryptionSetting
func NewDataTypeFormat(columnInfo base.ColumnInfo, columnSetting config.ColumnEncryptionSetting) *DataTypeFormat {
	return &DataTypeFormat{
		columnInfo:    columnInfo,
		columnSetting: columnSetting,
	}
}

// IsBinaryFormat check if columnInfo is binary
func (p *DataTypeFormat) IsBinaryFormat() bool {
	return p.columnInfo.IsBinaryFormat()
}

// IsBinaryDataOperation check from columnSetting if binaryOperation
func (p *DataTypeFormat) IsBinaryDataOperation() bool {
	return config.IsBinaryDataOperation(p.columnSetting)
}

// GetDefaultDataValue return DefaultDataValue
func (p *DataTypeFormat) GetDefaultDataValue() *string {
	return p.columnSetting.GetDefaultDataValue()
}

// GetDBDataTypeID return DBDataTypeID
func (p *DataTypeFormat) GetDBDataTypeID() uint32 {
	return p.columnSetting.GetDBDataTypeID()
}

// GetResponseOnFail return ResponseOnFail
func (p *DataTypeFormat) GetResponseOnFail() common.ResponseOnFail {
	return p.columnSetting.GetResponseOnFail()
}

// GetColumnName return ColumnName
func (p *DataTypeFormat) GetColumnName() string {
	return p.columnSetting.ColumnName()
}

// updateFieldEncodedType change the field type according to provided DataType
func updateFieldEncodedType(field *ColumnDescription, schemaStore config.TableSchemaStore) {
	tableSchema := schemaStore.GetTableSchema(string(field.Table))
	if tableSchema == nil {
		return
	}

	if setting := tableSchema.GetColumnEncryptionSettings(string(field.Name)); setting != nil {
		newFieldType, ok := mapEncryptedTypeToField(setting.GetDBDataTypeID())
		if ok {
			field.originType = field.Type
			field.Type = base_mysql.Type(newFieldType)
			field.changed = true
		}
	}
}

// mapEncryptedTypeToField convert EncryptedType to mysql related type
func mapEncryptedTypeToField(dataTypeID uint32) (uint32, bool) {
	mysqlEncoders := type_awareness.GetMySQLDataTypeIDEncoders()
	if _, ok := mysqlEncoders[dataTypeID]; !ok {
		return 0, false
	}

	return dataTypeID, true
}


text:
<!DOCTYPE html>

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>Actions Example</title>
    <link rel="stylesheet" type="text/css" href="../shared/example.css" />

Actions Example

This example shows how to create multiple active UI event handling widgets from a single Action definition.

Both Buttons and MenuItems can be created from the same Action instance. Action's enable, disable, hide, show and
    setText methods affect every Component created from that Action.

In this example, the Action is disabled when there is no grid selection, and this disables both Buttons and MenuItems.

Note that the js is not minified so it is readable. See action-grid.js.


text:
package com.vikingbrain.nmt.operations;

import java.util.LinkedHashMap;

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

import com.vikingbrain.nmt.responses.DavidBoxResponse;
import com.vikingbrain.nmt.util.exceptions.TheDavidBoxClientException;

/**
 * Abstract class for a Davidbox operation.
 *
 * @author vikingBrain
 *
 * @param <T> the type of the response object for the operation
 */
public abstract class AbstractTheDavidboxOperation<T extends DavidBoxResponse> implements DavidBoxOperation {

	/** Logger. */
	static Logger logger = LoggerFactory.getLogger(AbstractTheDavidboxOperation.class);

	/** The operation factory. */
	private final TheDavidboxOperationFactory operationFactory;

	/** The operation type. */
	private final OperationType operationType;

	/** The response target class. */
	private final Class<T> responseTargetClass;

	/**
	 * Constructor.
	 * @param factory the operation factory
	 * @param operationType the operation type
	 * @param responseTargetClass the response target class
	 */
    protected AbstractTheDavidboxOperation(TheDavidboxOperationFactory factory, OperationType operationType, Class<T> responseTargetClass) {
        this.operationFactory = factory;
        this.operationType = operationType;
        this.responseTargetClass = responseTargetClass;
    }

    /**
     * Getter of property.
     * @return the operation factory.
     */
    public final TheDavidboxOperationFactory getOperationFactory() {
        return operationFactory;
    }

    /** {@inheritDoc} */
	public final OperationType getOperationType() {
		return operationType;
	}

	/**
	 * It executes the operation.
	 * @return the object with the result of the operation
	 * @throws TheDavidBoxClientException exception in the client
	 */
    public T execute() throws TheDavidBoxClientException {
    	return (T)getOperationFactory().execute(this, responseTargetClass);
    }

    /** {@inheritDoc} */
	public LinkedHashMap<String, String> buildHttpArguments(){
		//Init http arguments
		LinkedHashMap<String, String> httpArguments = new LinkedHashMap<String,String>();
		return httpArguments;
	}

}


text:
package com.google.appengine.api.search;

import java.util.Iterator;
import java.util.LinkedList;

/**
 * A utility class that does various checks on search and indexing parameters.
 */
final class Util {
  /**
   * A helper method for testing two objects are equal.
   *
   * @return whether the two objects a and b are equal
   */
  static boolean equalObjects(Object a, Object b) {
    return a == b || (a != null && a.equals(b));
  }

  /**
   * A helper method for overriding null values with a default value.
   *
   * @param value the value of some field
   * @param defaultValue the default value for the field
   * @return value if it is not null, otherwise the defaultValue
   */
  static <T> T defaultIfNull(T value, T defaultValue) {
    return value == null ? defaultValue : value;
  }

  /**
   * Returns a string representation of the iterable objects. This is
   * used in debugging. The limit parameter is used to control how many
   * elements of the iterable are used to build the final string. Use
   * 0 or negative values, to include all.
   *
   * @param objects an iterable of objects to be turned into a string
   * @param limit the maximum number of objects from iterable to be used
   * to build a string
   */
  static <T> String iterableToString(Iterable<T> objects, int limit) {
    StringBuilder builder = new StringBuilder()
        .append("[");
    String sep = "";
    int head = (limit <= 0) ? Integer.MAX_VALUE : (limit + 1) / 2;
    int tail = (limit <= 0) ? 0 : limit - head;
    Iterator<T> iter = objects.iterator();
    while (iter.hasNext() && --head >= 0) {
      builder.append(sep).append(iter.next());
      sep = ", ";
    }
    LinkedList<T> tailMembers = new LinkedList<T>();
    int seen = 0;
    while (iter.hasNext()) {
      tailMembers.add(iter.next());
      if (++seen > tail) {
        tailMembers.removeFirst();
      }
    }
    if (seen > tail) {
      builder.append(", ...");
    }
    for (T o : tailMembers) {
      builder.append(sep).append(o);
      sep = ", ";
    }
    return builder.append("]").toString();
  }

  /**
   * Helper for constructing {@link String} representations of Search API objects.
   */
  static class ToStringHelper {
    private final StringBuilder sb;
    private boolean first = true;
    private boolean done = false;

    ToStringHelper(String objectName) {
      sb = new StringBuilder(objectName + "(");
    }

    ToStringHelper addField(String fieldName, Object value) {
      if (done) {
        throw new IllegalStateException();
      }
      if (value != null) {
        if (first) {
          first = false;
        } else {
          sb.append(", ");
        }
        sb.append(fieldName).append("=").append(value);
      }
      return this;
    }

    ToStringHelper addIterableField(String fieldName, Iterable<?> objects, int max) {
      if (done) {
        throw new IllegalStateException();
      }
      Iterator<?> iterator = objects.iterator();
      if (iterator.hasNext()) {
        if (first) {
          first = false;
        } else {
          sb.append(", ");
        }
        sb.append(fieldName).append("=").append(Util.iterableToString(objects, max));
      }
      return this;
    }

    ToStringHelper addIterableField(String fieldName, Iterable<?> objects) {
      return addIterableField(fieldName, objects, 0);
    }

    String finish() {
      done = true;
      sb.append(")");
      return sb.toString();
    }

    @Override
    public String toString() {
      return done ? sb.toString() : sb + ")";
    }
  }

  private Util() {}
}


text:
import * as dom from 'vs/base/browser/dom';
import { IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
import * as strings from 'vs/base/common/strings';
import { URI } from 'vs/base/common/uri';
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { AbstractCodeEditorService } from 'vs/editor/browser/services/abstractCodeEditorService';
import { IContentDecorationRenderOptions, IDecorationRenderOptions, IThemeDecorationRenderOptions, isThemeColor } from 'vs/editor/common/editorCommon';
import { IModelDecorationOptions, IModelDecorationOverviewRulerOptions, InjectedTextOptions, OverviewRulerLane, TrackedRangeStickiness } from 'vs/editor/common/model';
import { IColorTheme, IThemeService, ThemeColor } from 'vs/platform/theme/common/themeService';

export class RefCountedStyleSheet {

	private readonly _parent: CodeEditorServiceImpl;
	private readonly _editorId: string;
	private readonly _styleSheet: HTMLStyleElement;
	private _refCount: number;

	public get sheet() {
		return this._styleSheet.sheet as CSSStyleSheet;
	}

	constructor(parent: CodeEditorServiceImpl, editorId: string, styleSheet: HTMLStyleElement) {
		this._parent = parent;
		this._editorId = editorId;
		this._styleSheet = styleSheet;
		this._refCount = 0;
	}

	public ref(): void {
		this._refCount++;
	}

	public unref(): void {
		this._refCount--;
		if (this._refCount === 0) {
			this._styleSheet.parentNode?.removeChild(this._styleSheet);
			this._parent._removeEditorStyleSheets(this._editorId);
		}
	}

	public insertRule(rule: string, index?: number): void {
		const sheet = <CSSStyleSheet>this._styleSheet.sheet;
		sheet.insertRule(rule, index);
	}

	public removeRulesContainingSelector(ruleName: string): void {
		dom.removeCSSRulesContainingSelector(ruleName, this._styleSheet);
	}
}

export class GlobalStyleSheet {
	private readonly _styleSheet: HTMLStyleElement;

	public get sheet() {
		return this._styleSheet.sheet as CSSStyleSheet;
	}

	constructor(styleSheet: HTMLStyleElement) {
		this._styleSheet = styleSheet;
	}

	public ref(): void {
	}

	public unref(): void {
	}

	public insertRule(rule: string, index?: number): void {
		const sheet = <CSSStyleSheet>this._styleSheet.sheet;
		sheet.insertRule(rule, index);
	}

	public removeRulesContainingSelector(ruleName: string): void {
		dom.removeCSSRulesContainingSelector(ruleName, this._styleSheet);
	}
}

export abstract class CodeEditorServiceImpl extends AbstractCodeEditorService {

	private _globalStyleSheet: GlobalStyleSheet | null;
	private readonly _decorationOptionProviders = new Map<string, IModelDecorationOptionsProvider>();
	private readonly _editorStyleSheets = new Map<string, RefCountedStyleSheet>();
	private readonly _themeService: IThemeService;

	constructor(
		styleSheet: GlobalStyleSheet | null,
		@IThemeService themeService: IThemeService,
	) {
		super();
		this._globalStyleSheet = styleSheet ? styleSheet : null;
		this._themeService = themeService;
	}

	private _getOrCreateGlobalStyleSheet(): GlobalStyleSheet {
		if (!this._globalStyleSheet) {
			this._globalStyleSheet = new GlobalStyleSheet(dom.createStyleSheet());
		}
		return this._globalStyleSheet;
	}

	private _getOrCreateStyleSheet(editor: ICodeEditor | undefined): GlobalStyleSheet | RefCountedStyleSheet {
		if (!editor) {
			return this._getOrCreateGlobalStyleSheet();
		}
		const domNode = editor.getContainerDomNode();
		if (!dom.isInShadowDOM(domNode)) {
			return this._getOrCreateGlobalStyleSheet();
		}
		const editorId = editor.getId();
		if (!this._editorStyleSheets.has(editorId)) {
			const refCountedStyleSheet = new RefCountedStyleSheet(this, editorId, dom.createStyleSheet(domNode));
			this._editorStyleSheets.set(editorId, refCountedStyleSheet);
		}
		return this._editorStyleSheets.get(editorId)!;
	}

	_removeEditorStyleSheets(editorId: string): void {
		this._editorStyleSheets.delete(editorId);
	}

	public registerDecorationType(description: string, key: string, options: IDecorationRenderOptions, parentTypeKey?: string, editor?: ICodeEditor): void {
		let provider = this._decorationOptionProviders.get(key);
		if (!provider) {
			const styleSheet = this._getOrCreateStyleSheet(editor);
			const providerArgs: ProviderArguments = {
				styleSheet: styleSheet,
				key: key,
				parentTypeKey: parentTypeKey,
				options: options || Object.create(null)
			};
			if (!parentTypeKey) {
				provider = new DecorationTypeOptionsProvider(description, this._themeService, styleSheet, providerArgs);
			} else {
				provider = new DecorationSubTypeOptionsProvider(this._themeService, styleSheet, providerArgs);
			}
			this._decorationOptionProviders.set(key, provider);
			this._onDecorationTypeRegistered.fire(key);
		}
		provider.refCount++;
	}

	public removeDecorationType(key: string): void {
		const provider = this._decorationOptionProviders.get(key);
		if (provider) {
			provider.refCount--;
			if (provider.refCount <= 0) {
				this._decorationOptionProviders.delete(key);
				provider.dispose();
				this.listCodeEditors().forEach((ed) => ed.removeDecorations(key));
			}
		}
	}

	public resolveDecorationOptions(decorationTypeKey: string, writable: boolean): IModelDecorationOptions {
		const provider = this._decorationOptionProviders.get(decorationTypeKey);
		if (!provider) {
			throw new Error('Unknown decoration type key: ' + decorationTypeKey);
		}
		return provider.getOptions(this, writable);
	}

	public resolveDecorationCSSRules(decorationTypeKey: string) {
		const provider = this._decorationOptionProviders.get(decorationTypeKey);
		if (!provider) {
			return null;
		}
		return provider.resolveDecorationCSSRules();
	}
}

interface IModelDecorationOptionsProvider extends IDisposable {
	refCount: number;
	getOptions(codeEditorService: AbstractCodeEditorService, writable: boolean): IModelDecorationOptions;
	resolveDecorationCSSRules(): CSSRuleList;
}

export class DecorationSubTypeOptionsProvider implements IModelDecorationOptionsProvider {

	private readonly _styleSheet: GlobalStyleSheet | RefCountedStyleSheet;
	public refCount: number;

	private readonly _parentTypeKey: string | undefined;
	private _beforeContentRules: DecorationCSSRules | null;
	private _afterContentRules: DecorationCSSRules | null;

	constructor(themeService: IThemeService, styleSheet: GlobalStyleSheet | RefCountedStyleSheet, providerArgs: ProviderArguments) {
		this._styleSheet = styleSheet;
		this._styleSheet.ref();
		this._parentTypeKey = providerArgs.parentTypeKey;
		this.refCount = 0;

		this._beforeContentRules = new DecorationCSSRules(ModelDecorationCSSRuleType.BeforeContentClassName, providerArgs, themeService);
		this._afterContentRules = new DecorationCSSRules(ModelDecorationCSSRuleType.AfterContentClassName, providerArgs, themeService);
	}

	public getOptions(codeEditorService: AbstractCodeEditorService, writable: boolean): IModelDecorationOptions {
		const options = codeEditorService.resolveDecorationOptions(this._parentTypeKey, true);
		if (this._beforeContentRules) {
			options.beforeContentClassName = this._beforeContentRules.className;
		}
		if (this._afterContentRules) {
			options.afterContentClassName = this._afterContentRules.className;
		}
		return options;
	}

	public resolveDecorationCSSRules(): CSSRuleList {
		return this._styleSheet.sheet.cssRules;
	}

	public dispose(): void {
		if (this._beforeContentRules) {
			this._beforeContentRules.dispose();
			this._beforeContentRules = null;
		}
		if (this._afterContentRules) {
			this._afterContentRules.dispose();
			this._afterContentRules = null;
		}
		this._styleSheet.unref();
	}
}

interface ProviderArguments {
	styleSheet: GlobalStyleSheet | RefCountedStyleSheet;
	key: string;
	parentTypeKey?: string;
	options: IDecorationRenderOptions;
}

export class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider {

	private readonly _disposables = new DisposableStore();
	private readonly _styleSheet: GlobalStyleSheet | RefCountedStyleSheet;
	public refCount: number;

	public description: string;
	public className: string | undefined;
	public inlineClassName: string | undefined;
	public inlineClassNameAffectsLetterSpacing: boolean | undefined;
	public beforeContentClassName: string | undefined;
	public afterContentClassName: string | undefined;
	public glyphMarginClassName: string | undefined;
	public isWholeLine: boolean;
	public overviewRuler: IModelDecorationOverviewRulerOptions | undefined;
	public stickiness: TrackedRangeStickiness | undefined;
	public beforeInjectedText: InjectedTextOptions | undefined;
	public afterInjectedText: InjectedTextOptions | undefined;

	constructor(description: string, themeService: IThemeService, styleSheet: GlobalStyleSheet | RefCountedStyleSheet, providerArgs: ProviderArguments) {
		this.description = description;

		this._styleSheet = styleSheet;
		this._styleSheet.ref();
		this.refCount = 0;

		const createCSSRules = (type: ModelDecorationCSSRuleType) => {
			const rules = new DecorationCSSRules(type, providerArgs, themeService);
			this._disposables.add(rules);
			if (rules.hasContent) {
				return rules.className;
			}
			return undefined;
		};
		const createInlineCSSRules = (type: ModelDecorationCSSRuleType) => {
			const rules = new DecorationCSSRules(type, providerArgs, themeService);
			this._disposables.add(rules);
			if (rules.hasContent) {
				return { className: rules.className, hasLetterSpacing: rules.hasLetterSpacing };
			}
			return null;
		};

		this.className = createCSSRules(ModelDecorationCSSRuleType.ClassName);
		const inlineData = createInlineCSSRules(ModelDecorationCSSRuleType.InlineClassName);
		if (inlineData) {
			this.inlineClassName = inlineData.className;
			this.inlineClassNameAffectsLetterSpacing = inlineData.hasLetterSpacing;
		}
		this.beforeContentClassName = createCSSRules(ModelDecorationCSSRuleType.BeforeContentClassName);
		this.afterContentClassName = createCSSRules(ModelDecorationCSSRuleType.AfterContentClassName);

		if (providerArgs.options.beforeInjectedText && providerArgs.options.beforeInjectedText.contentText) {
			const beforeInlineData = createInlineCSSRules(ModelDecorationCSSRuleType.BeforeInjectedTextClassName);
			this.beforeInjectedText = {
				content: providerArgs.options.beforeInjectedText.contentText,
				inlineClassName: beforeInlineData?.className,
				inlineClassNameAffectsLetterSpacing: beforeInlineData?.hasLetterSpacing || providerArgs.options.beforeInjectedText.affectsLetterSpacing
			};
		}

		if (providerArgs.options.afterInjectedText && providerArgs.options.afterInjectedText.contentText) {
			const afterInlineData = createInlineCSSRules(ModelDecorationCSSRuleType.AfterInjectedTextClassName);
			this.afterInjectedText = {
				content: providerArgs.options.afterInjectedText.contentText,
				inlineClassName: afterInlineData?.className,
				inlineClassNameAffectsLetterSpacing: afterInlineData?.hasLetterSpacing || providerArgs.options.afterInjectedText.affectsLetterSpacing
			};
		}

		this.glyphMarginClassName = createCSSRules(ModelDecorationCSSRuleType.GlyphMarginClassName);

		const options = providerArgs.options;
		this.isWholeLine = Boolean(options.isWholeLine);
		this.stickiness = options.rangeBehavior;

		const lightOverviewRulerColor = options.light && options.light.overviewRulerColor || options.overviewRulerColor;
		const darkOverviewRulerColor = options.dark && options.dark.overviewRulerColor || options.overviewRulerColor;
		if (
			typeof lightOverviewRulerColor !== 'undefined'
			|| typeof darkOverviewRulerColor !== 'undefined'
		) {
			this.overviewRuler = {
				color: lightOverviewRulerColor || darkOverviewRulerColor,
				darkColor: darkOverviewRulerColor || lightOverviewRulerColor,
				position: options.overviewRulerLane || OverviewRulerLane.Center
			};
		}
	}

	public getOptions(codeEditorService: AbstractCodeEditorService, writable: boolean): IModelDecorationOptions {
		if (!writable) {
			return this;
		}

		return {
			description: this.description,
			inlineClassName: this.inlineClassName,
			beforeContentClassName: this.beforeContentClassName,
			afterContentClassName: this.afterContentClassName,
			className: this.className,
			glyphMarginClassName: this.glyphMarginClassName,
			isWholeLine: this.isWholeLine,
			overviewRuler: this.overviewRuler,
			stickiness: this.stickiness,
			before: this.beforeInjectedText
		};
	}

	public resolveDecorationCSSRules(): CSSRuleList {
		return this._styleSheet.sheet.rules;
	}

	public dispose(): void {
		this._disposables.dispose();
		this._styleSheet.unref();
	}
}

export const _CSS_MAP: { [prop: string]: string; } = {
	color: 'color:{0} !important;',
	opacity: 'opacity:{0};',
	backgroundColor: 'background-color:{0};',

	outline: 'outline:{0};',
	outlineColor: 'outline-color:{0};',
	outlineStyle: 'outline-style:{0};',
	outlineWidth: 'outline-width:{0};',

	border: 'border:{0};',
	borderColor: 'border-color:{0};',
	borderRadius: 'border-radius:{0};',
	borderSpacing: 'border-spacing:{0};',
	borderStyle: 'border-style:{0};',
	borderWidth: 'border-width:{0};',

	fontStyle: 'font-style:{0};',
	fontWeight: 'font-weight:{0};',
	fontSize: 'font-size:{0};',
	fontFamily: 'font-family:{0};',
	textDecoration: 'text-decoration:{0};',
	cursor: 'cursor:{0};',
	letterSpacing: 'letter-spacing:{0};',

	gutterIconPath: 'background:{0} center center no-repeat;',
	gutterIconSize: 'background-size:{0};',

	contentText: 'content:\'{0}\';',
	contentIconPath: 'content:{0};',
	margin: 'margin:{0};',
	padding: 'padding:{0};',
	width: 'width:{0};',
	height: 'height:{0};',

	verticalAlign: 'vertical-align:{0};',
};

class DecorationCSSRules {

	private _theme: IColorTheme;
	private readonly _className: string;
	private readonly _unThemedSelector: string;
	private _hasContent: boolean;
	private _hasLetterSpacing: boolean;
	private readonly _ruleType: ModelDecorationCSSRuleType;
	private _themeListener: IDisposable | null;
	private readonly _providerArgs: ProviderArguments;
	private _usesThemeColors: boolean;

	constructor(ruleType: ModelDecorationCSSRuleType, providerArgs: ProviderArguments, themeService: IThemeService) {
		this._theme = themeService.getColorTheme();
		this._ruleType = ruleType;
		this._providerArgs = providerArgs;
		this._usesThemeColors = false;
		this._hasContent = false;
		this._hasLetterSpacing = false;

		let className = CSSNameHelper.getClassName(this._providerArgs.key, ruleType);
		if (this._providerArgs.parentTypeKey) {
			className = className + ' ' + CSSNameHelper.getClassName(this._providerArgs.parentTypeKey, ruleType);
		}
		this._className = className;

		this._unThemedSelector = CSSNameHelper.getSelector(this._providerArgs.key, this._providerArgs.parentTypeKey, ruleType);

		this._buildCSS();

		if (this._usesThemeColors) {
			this._themeListener = themeService.onDidColorThemeChange(theme => {
				this._theme = themeService.getColorTheme();
				this._removeCSS();
				this._buildCSS();
			});
		} else {
			this._themeListener = null;
		}
	}

	public dispose() {
		if (this._hasContent) {
			this._removeCSS();
			this._hasContent = false;
		}
		if (this._themeListener) {
			this._themeListener.dispose();
			this._themeListener = null;
		}
	}

	public get hasContent(): boolean {
		return this._hasContent;
	}

	public get hasLetterSpacing(): boolean {
		return this._hasLetterSpacing;
	}

	public get className(): string {
		return this._className;
	}

	private _buildCSS(): void {
		const options = this._providerArgs.options;
		let unthemedCSS: string, lightCSS: string, darkCSS: string;
		switch (this._ruleType) {
			case ModelDecorationCSSRuleType.ClassName:
				unthemedCSS = this.getCSSTextForModelDecorationClassName(options);
				lightCSS = this.getCSSTextForModelDecorationClassName(options.light);
				darkCSS = this.getCSSTextForModelDecorationClassName(options.dark);
				break;
			case ModelDecorationCSSRuleType.InlineClassName:
				unthemedCSS = this.getCSSTextForModelDecorationInlineClassName(options);
				lightCSS = this.getCSSTextForModelDecorationInlineClassName(options.light);
				darkCSS = this.getCSSTextForModelDecorationInlineClassName(options.dark);
				break;
			case ModelDecorationCSSRuleType.GlyphMarginClassName:
				unthemedCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options);
				lightCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.light);
				darkCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.dark);
				break;
			case ModelDecorationCSSRuleType.BeforeContentClassName:
				unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.before);
				lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.before);
				darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.before);
				break;
			case ModelDecorationCSSRuleType.AfterContentClassName:
				unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.after);
				lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.after);
				darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.after);
				break;
			case ModelDecorationCSSRuleType.BeforeInjectedTextClassName:
				unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.beforeInjectedText);
				lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.beforeInjectedText);
				darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.beforeInjectedText);
				break;
			case ModelDecorationCSSRuleType.AfterInjectedTextClassName:
				unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.afterInjectedText);
				lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.afterInjectedText);
				darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.afterInjectedText);
				break;
			default:
				throw new Error('Unknown rule type: ' + this._ruleType);
		}
		const sheet = this._providerArgs.styleSheet;

		let hasContent = false;
		if (unthemedCSS.length > 0) {
			sheet.insertRule(`${this._unThemedSelector} {${unthemedCSS}}`, 0);
			hasContent = true;
		}
		if (lightCSS.length > 0) {
			sheet.insertRule(`.vs${this._unThemedSelector} {${lightCSS}}`, 0);
			hasContent = true;
		}
		if (darkCSS.length > 0) {
			sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${darkCSS}}`, 0);
			hasContent = true;
		}
		this._hasContent = hasContent;
	}

	private _removeCSS(): void {
		this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector);
	}

	/**
	 * Build the CSS for decorations styled via `className`.
	 */
	private getCSSTextForModelDecorationClassName(opts: IThemeDecorationRenderOptions | undefined): string {
		if (!opts) {
			return '';
		}
		const cssTextArr: string[] = [];
		this.collectCSSText(opts, ['backgroundColor'], cssTextArr);
		this.collectCSSText(opts, ['outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr);
		this.collectBorderSettingsCSSText(opts, cssTextArr);
		return cssTextArr.join('');
	}

	/**
	 * Build the CSS for decorations styled via `inlineClassName`.
	 */
	private getCSSTextForModelDecorationInlineClassName(opts: IThemeDecorationRenderOptions | undefined): string {
		if (!opts) {
			return '';
		}
		const cssTextArr: string[] = [];
		this.collectCSSText(opts, ['fontStyle', 'fontWeight', 'textDecoration', 'cursor', 'color', 'opacity', 'letterSpacing'], cssTextArr);
		if (opts.letterSpacing) {
			this._hasLetterSpacing = true;
		}
		return cssTextArr.join('');
	}

	/**
	 * Build the CSS for decorations styled before or after content.
	 */
	private getCSSTextForModelDecorationContentClassName(opts: IContentDecorationRenderOptions | undefined): string {
		if (!opts) {
			return '';
		}
		const cssTextArr: string[] = [];

		if (typeof opts !== 'undefined') {
			this.collectBorderSettingsCSSText(opts, cssTextArr);
			if (typeof opts.contentIconPath !== 'undefined') {
				cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, dom.asCSSUrl(URI.revive(opts.contentIconPath))));
			}
			if (typeof opts.contentText === 'string') {
				const truncated = opts.contentText.match(/^.*$/m)![0]; // only take first line
				const escaped = truncated.replace(/['\\]/g, '\\$&');

				cssTextArr.push(strings.format(_CSS_MAP.contentText, escaped));
			}
			this.collectCSSText(opts, ['verticalAlign', 'fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'textDecoration', 'color', 'opacity', 'backgroundColor', 'margin', 'padding'], cssTextArr);
			if (this.collectCSSText(opts, ['width', 'height'], cssTextArr)) {
				cssTextArr.push('display:inline-block;');
			}
		}

		return cssTextArr.join('');
	}

	/**
	 * Build the CSS for decorations styled via `glpyhMarginClassName`.
	 */
	private getCSSTextForModelDecorationGlyphMarginClassName(opts: IThemeDecorationRenderOptions | undefined): string {
		if (!opts) {
			return '';
		}
		const cssTextArr: string[] = [];

		if (typeof opts.gutterIconPath !== 'undefined') {
			cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, dom.asCSSUrl(URI.revive(opts.gutterIconPath))));
			if (typeof opts.gutterIconSize !== 'undefined') {
				cssTextArr.push(strings.format(_CSS_MAP.gutterIconSize, opts.gutterIconSize));
			}
		}

		return cssTextArr.join('');
	}

	private collectBorderSettingsCSSText(opts: any, cssTextArr: string[]): boolean {
		if (this.collectCSSText(opts, ['border', 'borderColor', 'borderRadius', 'borderSpacing', 'borderStyle', 'borderWidth'], cssTextArr)) {
			cssTextArr.push(strings.format('box-sizing: border-box;'));
			return true;
		}
		return false;
	}

	private collectCSSText(opts: any, properties: string[], cssTextArr: string[]): boolean {
		const lenBefore = cssTextArr.length;
		for (let property of properties) {
			const value = this.resolveValue(opts[property]);
			if (typeof value === 'string') {
				cssTextArr.push(strings.format(_CSS_MAP[property], value));
			}
		}
		return cssTextArr.length !== lenBefore;
	}

	private resolveValue(value: string | ThemeColor): string {
		if (isThemeColor(value)) {
			this._usesThemeColors = true;
			const color = this._theme.getColor(value.id);
			if (color) {
				return color.toString();
			}
			return 'transparent';
		}
		return value;
	}
}

const enum ModelDecorationCSSRuleType {
	ClassName = 0,
	InlineClassName = 1,
	GlyphMarginClassName = 2,
	BeforeContentClassName = 3,
	AfterContentClassName = 4,
	BeforeInjectedTextClassName = 5,
	AfterInjectedTextClassName = 6,
}

class CSSNameHelper {

	public static getClassName(key: string, type: ModelDecorationCSSRuleType): string {
		return 'ced-' + key + '-' + type;
	}

	public static getSelector(key: string, parentKey: string | undefined, ruleType: ModelDecorationCSSRuleType): string {
		let selector = '.monaco-editor .' + this.getClassName(key, ruleType);
		if (parentKey) {
			selector = selector + '.' + this.getClassName(parentKey, ruleType);
		}
		if (ruleType === ModelDecorationCSSRuleType.BeforeContentClassName) {
			selector += '::before';
		} else if (ruleType === ModelDecorationCSSRuleType.AfterContentClassName) {
			selector += '::after';
		}
		return selector;
	}
}


text:
//
// LoginForm.java
//

//
package com.parseexception.formbeans;

//
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;

/*
 *
 */
public class LoginForm extends ActionForm
{
	private static final long serialVersionUID = -4915925268959069338L;

	// Fields
    private String provider = null;
    private boolean keepLoggedIn = false;

    // Methods
    /*
     * ctor()
     */
    public LoginForm()
    {
        super();
    }

    /**
     * Validate the properties that have been set from this HTTP request,
     * and return an ActionMessages object that encapsulates any
     * validation errors that have been found.  If no errors are found, return
     * null or an ActionMessages object with no
     * recorded error messages.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     *
     * @return ActionMessages if any validation errors occurred
     */
    public ActionErrors validate (
        ActionMapping mapping,
        HttpServletRequest request)
    {
        ActionErrors errors = new ActionErrors();

        // Check provider
        if (provider == null || provider.length() < 3)
        {
        	errors.add("error", new ActionMessage("errors.invalid", "Provider"));
        }

        return errors;
    }

	/************************************************************************************
	 * Getter & Setter methods
	 ************************************************************************************/
    /* provider */
    public String getProvider()
    {
        return provider;
    }

    public void setProvider(String s)
    {
    	provider = s.trim();
    }

    /* keepLoggedIn */
    public boolean getKeepLoggedIn()
    {
    	return keepLoggedIn;
    }

    public void setKeepLoggedIn(boolean b)
    {
    	keepLoggedIn = b;
    }

}


text:
package de.jofre.visual.support;

import java.io.IOException;
import java.util.ListIterator;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.faces.application.Resource;
import javax.faces.application.ResourceHandler;
import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;

public class IncludeResource {

	private static Logger logger = Logger.getLogger(IncludeResource.class
			.getName());

	// Include a css resource
	public static void includeCss(FacesContext context, String resource)
			throws IOException {

		if (resourceIncluded(context, resource)) {
			logger.log(Level.INFO, "CSS Resource '" + resource
					+ "' already included!");
			return;
		}

		ResourceHandler rh = context.getApplication().getResourceHandler();
		Resource r = rh.createResource(resource);
		ResponseWriter w = context.getResponseWriter();
		w.write('\n');
		w.startElement("link", null);
		w.writeAttribute("type", "text/css", null);
		w.writeAttribute("rel", "stylesheet", null);
		w.writeAttribute("href", ((r != null) ? r.getRequestPath() : ""), null);
		w.endElement("link");
		w.append('\r');
		w.append('\n');
	}

	// Include a javascript resource
	public static void includeJavaScript(FacesContext context, String resource)
			throws IOException {

		if (resourceIncluded(context, resource)) {
			logger.log(Level.INFO, "JavaScript Resource '" + resource
					+ "' already included!");
			return;
		}

		ResourceHandler rh = context.getApplication().getResourceHandler();
		Resource r = rh.createResource(resource);
		ResponseWriter w = context.getResponseWriter();
		w.write('\n');
		w.startElement("script", null);
		w.writeAttribute("type", "text/javascript", null);
		w.writeAttribute("src", ((r != null) ? r.getRequestPath() : ""), null);
		w.endElement("script");
		/*w.write("<script type=\"text/javascript\" src=\"");
		w.write(((r != null) ? r.getRequestPath() : ""));
		w.write("\"></script>");*/
		w.append('\r');
		w.append('\n');
	}

	// Check if resource is already in context
	public static boolean resourceIncluded(FacesContext context, String resource)
			throws IOException {

		// Check head
		UIViewRoot viewRoot = context.getViewRoot();
		ListIterator<UIComponent> iter = (viewRoot.getComponentResources(context, "head"))
				.listIterator();
		while (iter.hasNext()) {
			UIComponent c = (UIComponent) iter.next();
			String rname = (String) c.getAttributes().get("name");
			if (resource.equals(rname)) {
				return true;
			}
		}

		// Check body
		iter = (viewRoot.getComponentResources(context, "body")).listIterator();
		while (iter.hasNext()) {
			UIComponent c = (UIComponent) iter.next();
			String rname = (String) c.getAttributes().get("name");
			if (resource.equals(rname)) {
				return true;
			}
		}

		// Check forms
		iter = (viewRoot.getComponentResources(context, "form")).listIterator();
		while (iter.hasNext()) {
			UIComponent c = (UIComponent) iter.next();
			String rname = (String) c.getAttributes().get("name");
			if (resource.equals(rname)) {
				return true;
			}
		}

		return false;
	}
}


text:
locations.models module
=======================

.. automodule:: locations.models
    :members:
    :undoc-members:
    :show-inheritance:


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Champ. paras. homme anim. 147 (1902)

#### Original name
Trichophyton concentricum R. Blanch., 1895

### Remarks
null


text:
package armmanagedapplications

import "time"

// Application - Information about managed application.
type Application struct {
	// REQUIRED; The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog.
	Kind *string `json:"kind,omitempty"`

	// REQUIRED; The managed application properties.
	Properties *ApplicationProperties `json:"properties,omitempty"`

	// The identity of the resource.
	Identity *Identity `json:"identity,omitempty"`

	// Resource location
	Location *string `json:"location,omitempty"`

	// ID of the resource that manages this resource.
	ManagedBy *string `json:"managedBy,omitempty"`

	// The plan information.
	Plan *Plan `json:"plan,omitempty"`

	// The SKU of the resource.
	SKU *SKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource ID
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

// ApplicationArtifact - Managed application artifact.
type ApplicationArtifact struct {
	// REQUIRED; The managed application artifact name.
	Name *ApplicationArtifactName `json:"name,omitempty"`

	// REQUIRED; The managed application artifact type.
	Type *ApplicationArtifactType `json:"type,omitempty"`

	// REQUIRED; The managed application artifact blob uri.
	URI *string `json:"uri,omitempty"`
}

// ApplicationAuthorization - The managed application provider authorization.
type ApplicationAuthorization struct {
	// REQUIRED; The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the
	// managed application resources.
	PrincipalID *string `json:"principalId,omitempty"`

	// REQUIRED; The provider's role definition identifier. This role will define all the permissions that the provider must have
	// on the managed application's container resource group. This role definition cannot have
	// permission to delete the resource group.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
}

// ApplicationBillingDetailsDefinition - Managed application billing details definition.
type ApplicationBillingDetailsDefinition struct {
	// The managed application resource usage Id.
	ResourceUsageID *string `json:"resourceUsageId,omitempty"`
}

// ApplicationClientDetails - The application client details to track the entity creating/updating the managed app resource.
type ApplicationClientDetails struct {
	// The client application Id.
	ApplicationID *string `json:"applicationId,omitempty"`

	// The client Oid.
	Oid *string `json:"oid,omitempty"`

	// The client Puid
	Puid *string `json:"puid,omitempty"`
}

// ApplicationClientListOperationsOptions contains the optional parameters for the ApplicationClient.ListOperations method.
type ApplicationClientListOperationsOptions struct {
	// placeholder for future optional parameters
}

// ApplicationDefinition - Information about managed application definition.
type ApplicationDefinition struct {
	// REQUIRED; The managed application definition properties.
	Properties *ApplicationDefinitionProperties `json:"properties,omitempty"`

	// Resource location
	Location *string `json:"location,omitempty"`

	// ID of the resource that manages this resource.
	ManagedBy *string `json:"managedBy,omitempty"`

	// The SKU of the resource.
	SKU *SKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource ID
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

// ApplicationDefinitionArtifact - Application definition artifact.
type ApplicationDefinitionArtifact struct {
	// REQUIRED; The managed application definition artifact name.
	Name *ApplicationDefinitionArtifactName `json:"name,omitempty"`

	// REQUIRED; The managed application definition artifact type.
	Type *ApplicationArtifactType `json:"type,omitempty"`

	// REQUIRED; The managed application definition artifact blob uri.
	URI *string `json:"uri,omitempty"`
}

// ApplicationDefinitionListResult - List of managed application definitions.
type ApplicationDefinitionListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// The array of managed application definitions.
	Value []*ApplicationDefinition `json:"value,omitempty"`
}

// ApplicationDefinitionPatchable - Information about an application definition request.
type ApplicationDefinitionPatchable struct {
	// Application definition tags
	Tags map[string]*string `json:"tags,omitempty"`
}

// ApplicationDefinitionProperties - The managed application definition properties.
type ApplicationDefinitionProperties struct {
	// REQUIRED; The managed application lock level.
	LockLevel *ApplicationLockLevel `json:"lockLevel,omitempty"`

	// The collection of managed application artifacts. The portal will use the files specified as artifacts to construct the
	// user experience of creating a managed application from a managed application
	// definition.
	Artifacts []*ApplicationDefinitionArtifact `json:"artifacts,omitempty"`

	// The managed application provider authorizations.
	Authorizations []*ApplicationAuthorization `json:"authorizations,omitempty"`

	// The createUiDefinition json for the backing template with Microsoft.Solutions/applications resource. It can be a JObject
	// or well-formed JSON string.
	CreateUIDefinition interface{} `json:"createUiDefinition,omitempty"`

	// The managed application deployment policy.
	DeploymentPolicy *ApplicationDeploymentPolicy `json:"deploymentPolicy,omitempty"`

	// The managed application definition description.
	Description *string `json:"description,omitempty"`

	// The managed application definition display name.
	DisplayName *string `json:"displayName,omitempty"`

	// A value indicating whether the package is enabled or not.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// The managed application locking policy.
	LockingPolicy *ApplicationPackageLockingPolicyDefinition `json:"lockingPolicy,omitempty"`

	// The inline main template json which has resources to be provisioned. It can be a JObject or well-formed JSON string.
	MainTemplate interface{} `json:"mainTemplate,omitempty"`

	// The managed application management policy that determines publisher's access to the managed resource group.
	ManagementPolicy *ApplicationManagementPolicy `json:"managementPolicy,omitempty"`

	// The managed application notification policy.
	NotificationPolicy *ApplicationNotificationPolicy `json:"notificationPolicy,omitempty"`

	// The managed application definition package file Uri. Use this element
	PackageFileURI *string `json:"packageFileUri,omitempty"`

	// The managed application provider policies.
	Policies []*ApplicationPolicy `json:"policies,omitempty"`

	// The storage account id for bring your own storage scenario.
	StorageAccountID *string `json:"storageAccountId,omitempty"`

	// READ-ONLY; Provisioning state.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

// ApplicationDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationDefinitionsClient.BeginCreateOrUpdate
// method.
type ApplicationDefinitionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

// ApplicationDefinitionsClientBeginDeleteOptions contains the optional parameters for the ApplicationDefinitionsClient.BeginDelete
// method.
type ApplicationDefinitionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

// ApplicationDefinitionsClientGetOptions contains the optional parameters for the ApplicationDefinitionsClient.Get method.
type ApplicationDefinitionsClientGetOptions struct {
	// placeholder for future optional parameters
}

// ApplicationDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ApplicationDefinitionsClient.ListByResourceGroup
// method.
type ApplicationDefinitionsClientListByResourceGroupOptions struct {
	// placeholder for future optional parameters
}

// ApplicationDefinitionsClientListBySubscriptionOptions contains the optional parameters for the ApplicationDefinitionsClient.ListBySubscription
// method.
type ApplicationDefinitionsClientListBySubscriptionOptions struct {
	// placeholder for future optional parameters
}

// ApplicationDefinitionsClientUpdateOptions contains the optional parameters for the ApplicationDefinitionsClient.Update
// method.
type ApplicationDefinitionsClientUpdateOptions struct {
	// placeholder for future optional parameters
}

// ApplicationDeploymentPolicy - Managed application deployment policy.
type ApplicationDeploymentPolicy struct {
	// REQUIRED; The managed application deployment mode.
	DeploymentMode *DeploymentMode `json:"deploymentMode,omitempty"`
}

// ApplicationJitAccessPolicy - Managed application Jit access policy.
type ApplicationJitAccessPolicy struct {
	// REQUIRED; Whether the JIT access is enabled.
	JitAccessEnabled *bool `json:"jitAccessEnabled,omitempty"`

	// JIT approval mode.
	JitApprovalMode *JitApprovalMode `json:"jitApprovalMode,omitempty"`

	// The JIT approvers
	JitApprovers []*JitApproverDefinition `json:"jitApprovers,omitempty"`

	// The maximum duration JIT access is granted. This is an ISO8601 time period value.
	MaximumJitAccessDuration *string `json:"maximumJitAccessDuration,omitempty"`
}

// ApplicationListResult - List of managed applications.
type ApplicationListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// The array of managed applications.
	Value []*Application `json:"value,omitempty"`
}

// ApplicationManagementPolicy - Managed application management policy.
type ApplicationManagementPolicy struct {
	// The managed application management mode.
	Mode *ApplicationManagementMode `json:"mode,omitempty"`
}

// ApplicationNotificationEndpoint - Managed application notification endpoint.
type ApplicationNotificationEndpoint struct {
	// REQUIRED; The managed application notification endpoint uri.
	URI *string `json:"uri,omitempty"`
}

// ApplicationNotificationPolicy - Managed application notification policy.
type ApplicationNotificationPolicy struct {
	// REQUIRED; The managed application notification endpoint.
	NotificationEndpoints []*ApplicationNotificationEndpoint `json:"notificationEndpoints,omitempty"`
}

// ApplicationPackageContact - The application package contact information.
type ApplicationPackageContact struct {
	// REQUIRED; The contact email.
	Email *string `json:"email,omitempty"`

	// REQUIRED; The contact phone number.
	Phone *string `json:"phone,omitempty"`

	// The contact name.
	ContactName *string `json:"contactName,omitempty"`
}

// ApplicationPackageLockingPolicyDefinition - Managed application locking policy.
type ApplicationPackageLockingPolicyDefinition struct {
	// The deny assignment excluded actions.
	AllowedActions []*string `json:"allowedActions,omitempty"`

	// The deny assignment excluded data actions.
	AllowedDataActions []*string `json:"allowedDataActions,omitempty"`
}

// ApplicationPackageSupportUrls - The appliance package support URLs.
type ApplicationPackageSupportUrls struct {
	// The government cloud support URL.
	GovernmentCloud *string `json:"governmentCloud,omitempty"`

	// The public azure support URL.
	PublicAzure *string `json:"publicAzure,omitempty"`
}

// ApplicationPatchable - Information about managed application.
type ApplicationPatchable struct {
	// The identity of the resource.
	Identity *Identity `json:"identity,omitempty"`

	// The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog.
	Kind *string `json:"kind,omitempty"`

	// Resource location
	Location *string `json:"location,omitempty"`

	// ID of the resource that manages this resource.
	ManagedBy *string `json:"managedBy,omitempty"`

	// The plan information.
	Plan *PlanPatchable `json:"plan,omitempty"`

	// The managed application properties.
	Properties *ApplicationProperties `json:"properties,omitempty"`

	// The SKU of the resource.
	SKU *SKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource ID
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

// ApplicationPolicy - Managed application policy.
type ApplicationPolicy struct {
	// The policy name
	Name *string `json:"name,omitempty"`

	// The policy parameters.
	Parameters *string `json:"parameters,omitempty"`

	// The policy definition Id.
	PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"`
}

// ApplicationProperties - The managed application properties.
type ApplicationProperties struct {
	// The fully qualified path of managed application definition Id.
	ApplicationDefinitionID *string `json:"applicationDefinitionId,omitempty"`

	// The managed application Jit access policy.
	JitAccessPolicy *ApplicationJitAccessPolicy `json:"jitAccessPolicy,omitempty"`

	// The managed resource group Id.
	ManagedResourceGroupID *string `json:"managedResourceGroupId,omitempty"`

	// Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string.
	Parameters interface{} `json:"parameters,omitempty"`

	// READ-ONLY; The collection of managed application artifacts.
	Artifacts []*ApplicationArtifact `json:"artifacts,omitempty" azure:"ro"`

	// READ-ONLY; The read-only authorizations property that is retrieved from the application package.
	Authorizations []*ApplicationAuthorization `json:"authorizations,omitempty" azure:"ro"`

	// READ-ONLY; The managed application billing details.
	BillingDetails *ApplicationBillingDetailsDefinition `json:"billingDetails,omitempty" azure:"ro"`

	// READ-ONLY; The client entity that created the JIT request.
	CreatedBy *ApplicationClientDetails `json:"createdBy,omitempty" azure:"ro"`

	// READ-ONLY; The read-only customer support property that is retrieved from the application package.
	CustomerSupport *ApplicationPackageContact `json:"customerSupport,omitempty" azure:"ro"`

	// READ-ONLY; The managed application management mode.
	ManagementMode *ApplicationManagementMode `json:"managementMode,omitempty" azure:"ro"`

	// READ-ONLY; Name and value pairs that define the managed application outputs.
	Outputs interface{} `json:"outputs,omitempty" azure:"ro"`

	// READ-ONLY; The managed application provisioning state.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The publisher tenant Id.
	PublisherTenantID *string `json:"publisherTenantId,omitempty" azure:"ro"`

	// READ-ONLY; The read-only support URLs property that is retrieved from the application package.
	SupportUrls *ApplicationPackageSupportUrls `json:"supportUrls,omitempty" azure:"ro"`

	// READ-ONLY; The client entity that last updated the JIT request.
	UpdatedBy *ApplicationClientDetails `json:"updatedBy,omitempty" azure:"ro"`
}

// ApplicationPropertiesPatchable - The managed application properties.
type ApplicationPropertiesPatchable struct {
	// The fully qualified path of managed application definition Id.
	ApplicationDefinitionID *string `json:"applicationDefinitionId,omitempty"`

	// The managed resource group Id.
	ManagedResourceGroupID *string `json:"managedResourceGroupId,omitempty"`

	// Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string.
	Parameters interface{} `json:"parameters,omitempty"`

	// READ-ONLY; Name and value pairs that define the managed application outputs.
	Outputs interface{} `json:"outputs,omitempty" azure:"ro"`

	// READ-ONLY; The managed application provisioning state.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

// ApplicationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.BeginCreateOrUpdate
// method.
type ApplicationsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

// ApplicationsClientBeginDeleteOptions contains the optional parameters for the ApplicationsClient.BeginDelete method.
type ApplicationsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

// ApplicationsClientBeginRefreshPermissionsOptions contains the optional parameters for the ApplicationsClient.BeginRefreshPermissions
// method.
type ApplicationsClientBeginRefreshPermissionsOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

// ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method.
type ApplicationsClientGetOptions struct {
	// placeholder for future optional parameters
}

// ApplicationsClientListAllowedUpgradePlansOptions contains the optional parameters for the ApplicationsClient.ListAllowedUpgradePlans
// method.
type ApplicationsClientListAllowedUpgradePlansOptions struct {
	// placeholder for future optional parameters
}

// ApplicationsClientListByResourceGroupOptions contains the optional parameters for the ApplicationsClient.ListByResourceGroup
// method.
type ApplicationsClientListByResourceGroupOptions struct {
	// placeholder for future optional parameters
}

// ApplicationsClientListBySubscriptionOptions contains the optional parameters for the ApplicationsClient.ListBySubscription
// method.
type ApplicationsClientListBySubscriptionOptions struct {
	// placeholder for future optional parameters
}

// ApplicationsClientUpdateOptions contains the optional parameters for the ApplicationsClient.Update method.
type ApplicationsClientUpdateOptions struct {
	// Parameters supplied to update an existing managed application.
	Parameters *ApplicationPatchable
}

// ErrorAdditionalInfo - The resource management error additional info.
type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info interface{} `json:"info,omitempty" azure:"ro"`

	// READ-ONLY; The additional info type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

// ErrorDetail - The error detail.
type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"`

	// READ-ONLY; The error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; The error details.
	Details []*ErrorDetail `json:"details,omitempty" azure:"ro"`

	// READ-ONLY; The error message.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; The error target.
	Target *string `json:"target,omitempty" azure:"ro"`
}

// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations.
// (This also follows the OData error response format.).
type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail `json:"error,omitempty"`
}

// GenericResource - Resource information.
type GenericResource struct {
	// Resource location
	Location *string `json:"location,omitempty"`

	// ID of the resource that manages this resource.
	ManagedBy *string `json:"managedBy,omitempty"`

	// The SKU of the resource.
	SKU *SKU `json:"sku,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource ID
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

// Identity for the resource.
type Identity struct {
	// The identity type.
	Type *ResourceIdentityType `json:"type,omitempty"`

	// The list of user identities associated with the resource. The user identity dictionary key references will be resource
	// ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities map[string]*UserAssignedResourceIdentity `json:"userAssignedIdentities,omitempty"`

	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant ID of resource.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

// JitApproverDefinition - JIT approver definition.
type JitApproverDefinition struct {
	// REQUIRED; The approver service principal Id.
	ID *string `json:"id,omitempty"`

	// The approver display name.
	DisplayName *string `json:"displayName,omitempty"`

	// The approver type.
	Type *JitApproverType `json:"type,omitempty"`
}

// JitAuthorizationPolicies - The JIT authorization policies.
type JitAuthorizationPolicies struct {
	// REQUIRED; The the principal id that will be granted JIT access.
	PrincipalID *string `json:"principalId,omitempty"`

	// REQUIRED; The role definition id that will be granted to the Principal.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
}

// JitRequestDefinition - Information about JIT request definition.
type JitRequestDefinition struct {
	// Resource location
	Location *string `json:"location,omitempty"`

	// The JIT request properties.
	Properties *JitRequestProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource ID
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

// JitRequestDefinitionListResult - List of JIT requests.
type JitRequestDefinitionListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// The array of Jit request definition.
	Value []*JitRequestDefinition `json:"value,omitempty"`
}

// JitRequestPatchable - Information about JIT request.
type JitRequestPatchable struct {
	// Jit request tags
	Tags map[string]*string `json:"tags,omitempty"`
}

// JitRequestProperties - Information about JIT request properties
type JitRequestProperties struct {
	// REQUIRED; The parent application id.
	ApplicationResourceID *string `json:"applicationResourceId,omitempty"`

	// REQUIRED; The JIT authorization policies.
	JitAuthorizationPolicies []*JitAuthorizationPolicies `json:"jitAuthorizationPolicies,omitempty"`

	// REQUIRED; The JIT request properties.
	JitSchedulingPolicy *JitSchedulingPolicy `json:"jitSchedulingPolicy,omitempty"`

	// READ-ONLY; The client entity that created the JIT request.
	CreatedBy *ApplicationClientDetails `json:"createdBy,omitempty" azure:"ro"`

	// READ-ONLY; The JIT request state.
	JitRequestState *JitRequestState `json:"jitRequestState,omitempty" azure:"ro"`

	// READ-ONLY; The JIT request provisioning state.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The publisher tenant id.
	PublisherTenantID *string `json:"publisherTenantId,omitempty" azure:"ro"`

	// READ-ONLY; The client entity that last updated the JIT request.
	UpdatedBy *ApplicationClientDetails `json:"updatedBy,omitempty" azure:"ro"`
}

// JitRequestsClientBeginCreateOrUpdateOptions contains the optional parameters for the JitRequestsClient.BeginCreateOrUpdate
// method.
type JitRequestsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

// JitRequestsClientDeleteOptions contains the optional parameters for the JitRequestsClient.Delete method.
type JitRequestsClientDeleteOptions struct {
	// placeholder for future optional parameters
}

// JitRequestsClientGetOptions contains the optional parameters for the JitRequestsClient.Get method.
type JitRequestsClientGetOptions struct {
	// placeholder for future optional parameters
}

// JitRequestsClientListByResourceGroupOptions contains the optional parameters for the JitRequestsClient.ListByResourceGroup
// method.
type JitRequestsClientListByResourceGroupOptions struct {
	// placeholder for future optional parameters
}

// JitRequestsClientListBySubscriptionOptions contains the optional parameters for the JitRequestsClient.ListBySubscription
// method.
type JitRequestsClientListBySubscriptionOptions struct {
	// placeholder for future optional parameters
}

// JitRequestsClientUpdateOptions contains the optional parameters for the JitRequestsClient.Update method.
type JitRequestsClientUpdateOptions struct {
	// placeholder for future optional parameters
}

// JitSchedulingPolicy - The JIT scheduling policies.
type JitSchedulingPolicy struct {
	// REQUIRED; The required duration of the JIT request.
	Duration *string `json:"duration,omitempty"`

	// REQUIRED; The start time of the request.
	StartTime *time.Time `json:"startTime,omitempty"`

	// REQUIRED; The type of JIT schedule.
	Type *JitSchedulingType `json:"type,omitempty"`
}

// Operation - Details of a REST API operation, returned from the Resource Provider Operations API
type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay `json:"display,omitempty"`

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType `json:"actionType,omitempty" azure:"ro"`

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool `json:"isDataAction,omitempty" azure:"ro"`

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin `json:"origin,omitempty" azure:"ro"`
}

// OperationDisplay - Localized display information for this particular operation.
type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string `json:"operation,omitempty" azure:"ro"`

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string `json:"provider,omitempty" azure:"ro"`

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string `json:"resource,omitempty" azure:"ro"`
}

// OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to
// get the next set of results.
type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation `json:"value,omitempty" azure:"ro"`
}

// Plan for the managed application.
type Plan struct {
	// REQUIRED; The plan name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The product code.
	Product *string `json:"product,omitempty"`

	// REQUIRED; The publisher ID.
	Publisher *string `json:"publisher,omitempty"`

	// REQUIRED; The plan's version.
	Version *string `json:"version,omitempty"`

	// The promotion code.
	PromotionCode *string `json:"promotionCode,omitempty"`
}

// PlanPatchable - Plan for the managed application.
type PlanPatchable struct {
	// The plan name.
	Name *string `json:"name,omitempty"`

	// The product code.
	Product *string `json:"product,omitempty"`

	// The promotion code.
	PromotionCode *string `json:"promotionCode,omitempty"`

	// The publisher ID.
	Publisher *string `json:"publisher,omitempty"`

	// The plan's version.
	Version *string `json:"version,omitempty"`
}

// Resource information.
type Resource struct {
	// Resource location
	Location *string `json:"location,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource ID
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

// SKU for the resource.
type SKU struct {
	// REQUIRED; The SKU name.
	Name *string `json:"name,omitempty"`

	// The SKU capacity.
	Capacity *int32 `json:"capacity,omitempty"`

	// The SKU family.
	Family *string `json:"family,omitempty"`

	// The SKU model.
	Model *string `json:"model,omitempty"`

	// The SKU size.
	Size *string `json:"size,omitempty"`

	// The SKU tier.
	Tier *string `json:"tier,omitempty"`
}

// SystemData - Metadata pertaining to creation and last modification of the resource.
type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

// UserAssignedResourceIdentity - Represents the user assigned identity that is contained within the UserAssignedIdentities
// dictionary on ResourceIdentity
type UserAssignedResourceIdentity struct {
	// READ-ONLY; The principal id of user assigned identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant id of user assigned identity.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}


text:
package com.mikeart.rxartistlist.data.repository.datasource;

import com.mikeart.rxartistlist.data.ApplicationTestCase;
import com.mikeart.rxartistlist.data.cache.ListCache;

import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;

import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.verify;

public class ArtistDataStoreFactoryTest extends ApplicationTestCase {

  private ArtistDataStoreFactory artistDataStoreFactory;

  @Mock private ListCache mockListCache;

  @Before
  public void setUp() {
    MockitoAnnotations.initMocks(this);
    artistDataStoreFactory =
        new ArtistDataStoreFactory(RuntimeEnvironment.application, mockListCache);
  }

  @Test
  public void testCreateDiskDataStore() {
    given(mockListCache.isCached()).willReturn(true);
    given(mockListCache.isExpired()).willReturn(false);

    ArtistDataStore artistDataStore = artistDataStoreFactory.createList();

    assertThat(artistDataStore, is(notNullValue()));
    assertThat(artistDataStore, is(instanceOf(ArtistDataStore.class)));

    verify(mockListCache).isCached();
    verify(mockListCache).isExpired();
  }

  @Test
  public void testCreateCloudDataStore() {
    given(mockListCache.isExpired()).willReturn(true);
    given(mockListCache.isCached()).willReturn(false);

    ArtistDataStore artistDataStore = artistDataStoreFactory.createList();

    assertThat(artistDataStore, is(notNullValue()));
    assertThat(artistDataStore, is(instanceOf(CloudArtistDataStore.class)));

    verify(mockListCache).isExpired();
  }

}


text:
package fortiss.gui.listeners.helper;

import java.io.IOException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collections;

import com.google.gson.annotations.Expose;

import fortiss.simulation.PlanningTool;
import memap.examples.ExampleFiles;
import memap.helper.DataInterface;
import memap.helper.TimedDataAdapter;
import memap.helper.UntimedData;
import memap.helper.profilehandler.TimedData;

public class MaxBuyLimit {

	private static final String DEFAULT_FILE = "HLZFEXAMPLE";
	private static final double DEFAULT_PRICE = 1.0;
	static final String [] labels = { "Maximum Buy Limit for MEMAP" };
	private static final String units = "";

	@Expose
	private boolean fixed;
	@Expose
	private double limit;
	@Expose
	private String limitFilePath;
	private int mpcHorizon;

	private DataInterface fixedLimitData;
	private DataInterface variableLimitData;

	public MaxBuyLimit(double price, int mpcHorizon) {
		this.setFixed(true);
		this.limit = price;
		this.limitFilePath = DEFAULT_FILE;
		this.mpcHorizon = mpcHorizon;
	}

	public MaxBuyLimit(String priceFilePath, int mpcHorizon) {
		this.setFixed(true);
		this.limit = DEFAULT_PRICE;
		this.limitFilePath = priceFilePath;
		this.mpcHorizon = mpcHorizon;
	}

	/** Intended for deserialization */
	public MaxBuyLimit(boolean fixed, double limit, String limitFilePath, int mpcHorizon) {
		this.setFixed(fixed);
		this.limit = limit;
		this.limitFilePath = limitFilePath;
		this.mpcHorizon = mpcHorizon;
	}

	public String getUnits() {
		return units;
	}

	public String[] getLabels() {
		return labels;
	}

	public String getDefaultFile() {
		return DEFAULT_FILE;
	}

	public void updateMPCHorizon(int mpcHorizon2) {
		this.mpcHorizon = mpcHorizon2;
	}

	public int getMpcHorizon() {
		return mpcHorizon;
	}

	public void loadFromFile(int mpcHorizon) {
		setDataFromValue(mpcHorizon);
		setDataFromFile();
	}

	public void setDataFilePath(String priceFilePath) {
		this.limitFilePath = priceFilePath;
		setDataFromFile();
		setSaved(false);
	}

	public void setDataFromValue(int mpcStep) {
		fixedLimitData = new UntimedData();

		ArrayList<Double> values = new ArrayList<Double>(
				Collections.nCopies(mpcStep * 2, limit));

		((UntimedData) fixedLimitData).addSeries("limit", values);
	}

	public void setDataFromFile() {

		if (limitFilePath == null || limitFilePath.isEmpty()) {
			limitFilePath = getDefaultFile(); // Load empty data
		}

		try {
			FileManager fm = new FileManager();
			ExampleFiles ef = new ExampleFiles();
			if (ef.isExample(limitFilePath)) {
				variableLimitData = new TimedDataAdapter(
						new TimedData(fm.readFromResources(ef.getFile(limitFilePath)), getLabels()));
			} else {
				variableLimitData = new TimedDataAdapter(new TimedData(fm.readFromSource(limitFilePath), getLabels()));
			}
		} catch (IOException | ParseException e) {
			e.printStackTrace();
			limitFilePath = ""; // Fix path and load empty data
		}
	}

	public DataInterface getVariableLimitData() {
		return variableLimitData;
	}

	public boolean isFixed() {
		return fixed;
	}

	public String getLimitString() {
		String priceString = null;
		if (isFixed()) {
			priceString = String.valueOf(limit);
		} else {
			priceString = limitFilePath;
		}
		return priceString;
	}

	public DataInterface getLimit() {
		DataInterface data;
		if (fixed) {
			data = fixedLimitData;
		} else {
			data = variableLimitData;
		}
		return data;
	}

	public void setFixed(boolean fixed) {
		this.fixed = fixed;
	}

	public void setSaved(boolean saved) {
		PlanningTool.getInstance().setSaved(saved);
	}

	public void setLimit(double price, int mpcHorizon) {
		this.limit = price;
		setDataFromValue(mpcHorizon);
		setSaved(false);
	}

}