text:
package fr.respawner.minecheater.nbt;

public abstract class Tag {
    protected final String name;

    public Tag(String name) {
        this.name = name;
    }

    public Tag() {
        this("");
    }

    public final String getName() {
        return this.name;
    }

    public abstract Object getValue();
}


text:
#import <Cocoa/Cocoa.h>

@interface AlertNibOwner : NSObject

/* View bindings go here */
@property IBOutlet NSTextField *path;
@property IBOutlet NSPushButton *browse;
@property IBOutlet NSPopUpButton *format;
@property IBOutlet NSPopUpButton *scale;
@property IBOutlet NSColorWell *bgColor;
@property IBOutlet NSTextField *paddingTop;
@property IBOutlet NSTextField *paddingLeft;
@property IBOutlet NSTextField *paddingRight;
@property IBOutlet NSTextField *paddingBottom;
/* End of view bindings */

@end

@implementation AlertNibOwner
@end

redpajama_set_name: RedPajamaGithub


text:
using AutoMapper;

namespace CoachLancer.Web.Infrastructure
{
    public interface IHaveCustomMappings
    {
        void CreateMappings(IMapperConfigurationExpression configuration);
    }
}


text:
from __future__ import unicode_literals

from django.db import models, migrations

class Migration(migrations.Migration):

    dependencies = [
        ('appearances', '0001_initial'),
        ('music', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='PurchaseLink',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('url', models.URLField(blank=True)),
                ('album', models.ForeignKey(related_name=b'purchase_links', blank=True, to='music.Album', null=True)),
                ('issue', models.ForeignKey(related_name=b'purchase_links', blank=True, to='appearances.Issue', null=True)),
                ('single', models.ForeignKey(related_name=b'purchase_links', blank=True, to='music.Single', null=True)),
            ],
            options={
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Store',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('romanized_name', models.CharField(max_length=200)),
                ('name', models.CharField(max_length=200, blank=True)),
                ('url', models.URLField(blank=True)),
            ],
            options={
            },
            bases=(models.Model,),
        ),
        migrations.AddField(
            model_name='purchaselink',
            name='store',
            field=models.ForeignKey(to='stores.Store'),
            preserve_default=True,
        ),
    ]


text:
layout: "docs"
page_title: "Uninstalling Vagrant"
sidebar_current: "installation-uninstallation"
description: |-
  Uninstalling Vagrant is easy and straightforward. You can either uninstall
  the Vagrant binary, the user data, or both. The sections below cover how to
  do this on every platform.
---

# Uninstalling Vagrant

Uninstalling Vagrant is easy and straightforward. You can either uninstall
the Vagrant binary, the user data, or both. The sections below cover how to
do this on every platform.

## Removing the Vagrant Program

Removing the Vagrant program will remove the `vagrant` binary and all
dependencies from your machine. After uninstalling the program, you can
always [reinstall](/docs/installation/) again using standard
methods. Uninstalling Vagrant will _not_ remove user data. The section below this
one gives more detailed instructions on how to remove that directory from your
system.

On **Windows**

> Uninstall using the add/remove programs section of the control panel

On **Mac OS X**:

```sh
rm -rf /opt/vagrant
rm -f /usr/local/bin/vagrant
sudo pkgutil --forget com.vagrant.vagrant
```

On **Linux**:

```sh
rm -rf /opt/vagrant
rm -f /usr/bin/vagrant
```

## Removing User Data

Removing the user data will remove all [boxes](/docs/boxes.html),
[plugins](/docs/plugins/), license files, and any stored state that may be used
by Vagrant. Removing the user data effectively makes Vagrant think it
is a fresh install.

On all platforms, this directory is located in the root of your home directory,
and is named `vagrant.d`. Simply remove the `~/.vagrant.d` directory to delete the user data. If on
Windows, this directory is located at `C:\Users\YourUsername\.vagrant.d`, where
`YourUsername` is the username of your local user.

When debugging, the Vagrant support team may ask you to remove this
directory. Before removing this directory, please make a backup.

Running Vagrant will automatically regenerate any data necessary to run,
so it is safe to remove the user data at any time.


text:
package org.missionassetfund.apps.android.adapters;

import java.util.ArrayList;

import org.missionassetfund.apps.android.R;
import org.missionassetfund.apps.android.models.Input;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class InputItemAdapter extends ArrayAdapter<Input> {

    public InputItemAdapter(Context context, ArrayList<Input> inputs) {
        super(context, R.layout.input_item, inputs);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        Input input = getItem(position);

        if (convertView == null) {
            convertView = LayoutInflater.from(getContext()).inflate(R.layout.input_item, parent,
                    false);
        }
        TextView tvName = (TextView) convertView.findViewById(R.id.tvName);
        TextView tvValue = (TextView) convertView.findViewById(R.id.tvValue);

        tvName.setText(input.getName());
        tvValue.setText(input.getValue());

        return convertView;
    }

}


text:
package com.google.javascript.rhino.jstype;

import static com.google.javascript.rhino.jstype.BooleanLiteralSet.BOTH;
import static com.google.javascript.rhino.jstype.BooleanLiteralSet.EMPTY;
import static com.google.javascript.rhino.jstype.BooleanLiteralSet.FALSE;
import static com.google.javascript.rhino.jstype.BooleanLiteralSet.TRUE;

import junit.framework.TestCase;

/**
 * Tests {@link BooleanLiteralSet}.
 *
*
 */
public class BooleanLiteralSetTest extends TestCase {

  public void testIntersection() {
    assertEquals(EMPTY, EMPTY.intersection(EMPTY));
    assertEquals(EMPTY, EMPTY.intersection(TRUE));
    assertEquals(EMPTY, EMPTY.intersection(FALSE));
    assertEquals(EMPTY, EMPTY.intersection(BOTH));
    assertEquals(EMPTY, TRUE.intersection(EMPTY));
    assertEquals(TRUE, TRUE.intersection(TRUE));
    assertEquals(EMPTY, TRUE.intersection(FALSE));
    assertEquals(TRUE, TRUE.intersection(BOTH));
    assertEquals(EMPTY, FALSE.intersection(EMPTY));
    assertEquals(EMPTY, FALSE.intersection(TRUE));
    assertEquals(FALSE, FALSE.intersection(FALSE));
    assertEquals(FALSE, FALSE.intersection(BOTH));
    assertEquals(EMPTY, BOTH.intersection(EMPTY));
    assertEquals(TRUE, BOTH.intersection(TRUE));
    assertEquals(FALSE, BOTH.intersection(FALSE));
    assertEquals(BOTH, BOTH.intersection(BOTH));
  }

  public void testUnion() {
    assertEquals(EMPTY, EMPTY.union(EMPTY));
    assertEquals(TRUE, EMPTY.union(TRUE));
    assertEquals(FALSE, EMPTY.union(FALSE));
    assertEquals(BOTH, EMPTY.union(BOTH));
    assertEquals(TRUE, TRUE.union(EMPTY));
    assertEquals(TRUE, TRUE.union(TRUE));
    assertEquals(BOTH, TRUE.union(FALSE));
    assertEquals(BOTH, TRUE.union(BOTH));
    assertEquals(FALSE, FALSE.union(EMPTY));
    assertEquals(BOTH, FALSE.union(TRUE));
    assertEquals(FALSE, FALSE.union(FALSE));
    assertEquals(BOTH, FALSE.union(BOTH));
    assertEquals(BOTH, BOTH.union(EMPTY));
    assertEquals(BOTH, BOTH.union(TRUE));
    assertEquals(BOTH, BOTH.union(FALSE));
    assertEquals(BOTH, BOTH.union(BOTH));
  }

  public void testGet() {
    assertEquals(TRUE, BooleanLiteralSet.get(true));
    assertEquals(FALSE, BooleanLiteralSet.get(false));
  }

  public void testContains() {
    assertFalse(EMPTY.contains(true));
    assertFalse(EMPTY.contains(false));
    assertTrue(TRUE.contains(true));
    assertFalse(TRUE.contains(false));
    assertFalse(FALSE.contains(true));
    assertTrue(FALSE.contains(false));
    assertTrue(BOTH.contains(true));
    assertTrue(BOTH.contains(false));
  }
}


text:
<!DOCTYPE html>

		<meta charset="utf-8" />
		<base href="../../../" />

		<link type="text/css" rel="stylesheet" href="page.css" />

[name]

			Handles and keeps track of loaded and pending data. A default global instance of this class
			is created and used by loaders if not supplied manually - see [page:DefaultLoadingManager].

			In general that should be sufficient, however there are times when it can be useful to have seperate loaders -
			for example if you want to show seperate loading bars for objects and textures.

Example

			[example:webgl_loader_babylon WebGL / loader / babylon]

			[example:webgl_loader_fbx WebGL / loader / fbx]

			[example:webgl_loader_obj WebGL / loader / obj]

			[example:webgl_materials_reflectivity WebGL / materials / reflectivity]

			[example:webgl_postprocessing_outline WebGL / postprocesing / outline]

			[example:webgl_terrain_dynamic WebGL / terrain / dynamic]

		var manager = new THREE.LoadingManager();
		manager.onStart = function ( url, itemsLoaded, itemsTotal ) {

			console.log( 'Started loading file: ' + url + '.\nLoaded ' + itemsLoaded + ' of ' + itemsTotal + ' files.' );

		};

		manager.onLoad = function ( ) {

			console.log( 'Loading complete!');

		};

		manager.onProgress = function ( url, itemsLoaded, itemsTotal ) {

			console.log( 'Loading file: ' + url + '.\nLoaded ' + itemsLoaded + ' of ' + itemsTotal + ' files.' );

		};

		manager.onError = function ( url ) {

			console.log( 'There was an error loading ' + url );

		};

		var loader = new THREE.OBJLoader( manager );
		loader.load( 'file.obj', function ( object ) {

			//

		} );

Constructor

[name]( [page:Function onLoad], [page:Function onProgress], [page:Function onError] )

		[page:Function onLoad] — (optional) this function will be called when all loaders are done.

		[page:Function onProgress] — (optional) this function will be called when an item is complete.

		[page:Function onError] — (optional) this function will be called a loader encounters errors.

		Creates a new [name].

Properties

[property:Function onStart]

			This function will be called when loading starts.
			The arguments are:

			[page:String url] — The url of the item just loaded.

			[page:Integer itemsLoaded] — the number  of items already loaded so far.

			[page:Iteger itemsTotal] — the total amount of items to be loaded.

			By default this is undefined.

[property:Function onLoad]

			This function will be called when all loading is completed. By default this is undefined,
			unless passed in the constructor.

[property:Function onProgress]

		This function will be called when an item is complete.
		The arguments are:

		[page:String url] — The url of the item just loaded.

		[page:Integer itemsLoaded] — the number  of items already loaded so far.

		[page:Iteger itemsTotal] — the total amount of items to be loaded.

		By default this is undefined, unless passed in the constructor.

[property:Function onError]

			This function will be called when any item errors, with the argument:

			[page:String url] — The url of the item that errored.

			By default this is undefined, unless passed in the constructor.

Methods

			Note: The following methods are designed to be called internally by loaders. You shouldn't call
			them directly.

[method:null itemStart]( [page:String url] )

		[page:String url] — the url to load

		This should be called by any loader using the manager when the loader starts loading an url.

[method:null itemEnd]( [page:String url] )

		[page:String url] — the loaded url

		This should be called by any loader using the manager when the loader ended loading an url.

[method:null itemError]( [page:String url] )

		[page:String url] — the loaded url

		This should be called by any loader using the manager when the loader errors loading an url.

Source

		[link:https://github.com/mrdoob/three.js/blob/master/src/loaders/LoadingManager.js src/loaders/LoadingManager.js]


text:
package com.orientechnologies.orient.test.database.speed;

import com.orientechnologies.common.serialization.types.OIntegerSerializer;
import com.orientechnologies.common.serialization.types.OLongSerializer;
import com.orientechnologies.orient.core.serialization.serializer.record.binary.BytesContainer;
import com.orientechnologies.orient.test.database.base.OrientMonoThreadTest;
import org.testng.annotations.Test;

@Test
public class IntgerSerializationSpeedTest extends OrientMonoThreadTest {

  @Test(enabled = false)
  public static void main(String[] iArgs) throws InstantiationException, IllegalAccessException {
    IntgerSerializationSpeedTest test = new IntgerSerializationSpeedTest();
    test.data.go(test);
  }

  public IntgerSerializationSpeedTest() throws InstantiationException, IllegalAccessException {
    super(1000000000);
  }

  @Override
  @Test(enabled = false)
  public void init() {}

  @Override
  @Test(enabled = false)
  public void cycle() {
    BytesContainer container = new BytesContainer();

    OIntegerSerializer.INSTANCE.serialize(20, container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OIntegerSerializer.INSTANCE.serialize(200, container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OIntegerSerializer.INSTANCE.serialize(20000, container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OLongSerializer.INSTANCE.serialize(200000000000000000L, container.bytes, container.offset);
    container.skip(OLongSerializer.LONG_SIZE);
    container.offset = 0;
    OIntegerSerializer.INSTANCE.deserialize(container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OIntegerSerializer.INSTANCE.deserialize(container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OIntegerSerializer.INSTANCE.deserialize(container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OLongSerializer.INSTANCE.deserialize(container.bytes, container.offset);
    container.skip(OLongSerializer.LONG_SIZE);
  }

  @Override
  @Test(enabled = false)
  public void deinit() {}
}


text:
**note**: This has a order.

## First
crawl the provinces.
```
$ scrapy crawl provinces
```

## Second
crawl the cities.
```
$ scrapy crawl cities
```

## Third
crawl the countries
```
$ scrapy crawl countries
```


text:
/**
 * @file
 *   This file includes definitions for maintaining Thread network topologies.
 */

#ifndef TOPOLOGY_HPP_
#define TOPOLOGY_HPP_

#include "openthread-core-config.h"

#include <openthread/platform/random.h>

#include "common/message.hpp"
#include "mac/mac_frame.hpp"
#include "net/ip6.hpp"
#include "thread/link_quality.hpp"
#include "thread/mle_tlvs.hpp"

namespace ot {

/**
 * This class represents a Thread neighbor.
 *
 */
class Neighbor
{
public:
    /**
     * Neighbor link states.
     *
     */
    enum State
    {
        kStateInvalid,                   ///< Neighbor link is invalid
        kStateRestored,                  ///< Neighbor is restored from non-volatile memory
        kStateParentRequest,             ///< Received an MLE Parent Request message
        kStateChildIdRequest,            ///< Received an MLE Child ID Request message
        kStateLinkRequest,               ///< Sent an MLE Link Request message
        kStateChildUpdateRequest,        ///< Sent an MLE Child Update Request message (trying to restore the child)
        kStateValid,                     ///< Link is valid
    };

    /**
     * This method returns the current state.
     *
     * @returns The current state.
     *
     */
    State GetState(void) const { return static_cast<State>(mState); }

    /**
     * This method sets the current state.
     *
     * @param[in]  aState  The state value.
     *
     */
    void SetState(State aState) { mState = static_cast<uint8_t>(aState); }

    /**
     * Check if the neighbor/child is being restored.
     *
     * @returns TRUE if the neighbor is being restored, FALSE otherwise.
     *
     */
    bool IsStateRestoring(void) const { return (mState == kStateRestored) || (mState == kStateChildUpdateRequest); }

    /**
     * Check if the neighbor/child is in valid state or if it is being restored.
     * When in these states messages can be sent to and/or received from the neighbor/child.
     *
     * @returns TRUE if the neighbor is in valid, restored, or being restored states, FALSE otherwise.
     *
     */
    bool IsStateValidOrRestoring(void) const { return (mState == kStateValid) || IsStateRestoring(); }

    /**
     * This method gets the device mode flags.
     *
     * @returns The device mode flags.
     *
     */
    uint8_t GetDeviceMode(void) const { return mMode; }

    /**
     * This method sets the device mode flags.
     *
     * @param[in]  aMode  The device mode flags.
     *
     */
    void SetDeviceMode(uint8_t aMode) { mMode = aMode; }

    /**
     * This method indicates whether or not the device is rx-on-when-idle.
     *
     * @returns TRUE if rx-on-when-idle, FALSE otherwise.
     *
     */
    bool IsRxOnWhenIdle(void) const { return (mMode & Mle::ModeTlv::kModeRxOnWhenIdle) != 0; }

    /**
     * This method indicates whether or not the device is a Full Thread Device.
     *
     * @returns TRUE if a Full Thread Device, FALSE otherwise.
     *
     */
    bool IsFullThreadDevice(void) const { return (mMode & Mle::ModeTlv::kModeFFD) != 0; }

    /**
     * This method indicates whether or not the device uses secure IEEE 802.15.4 Data Request messages.
     *
     * @returns TRUE if using secure IEEE 802.15.4 Data Request messages, FALSE otherwise.
     *
     */
    bool IsSecureDataRequest(void) const { return (mMode & Mle::ModeTlv::kModeSecureDataRequest) != 0; }

    /**
     * This method indicates whether or not the device requests Full Network Data.
     *
     * @returns TRUE if requests Full Network Data, FALSE otherwise.
     *
     */
    bool IsFullNetworkData(void) const { return (mMode & Mle::ModeTlv::kModeFullNetworkData) != 0; }

    /**
     * This method sets all bytes of the Extended Address to zero.
     *
     */
    void ClearExtAddress(void) { memset(&mMacAddr, 0, sizeof(mMacAddr)); }

    /**
     * This method returns the Extended Address.
     *
     * @returns A reference to the Extended Address.
     *
     */
    Mac::ExtAddress &GetExtAddress(void) { return mMacAddr; }

    /**
     * This method returns the Extended Address.
     *
     * @returns A reference to the Extended Address.
     *
     */
    const Mac::ExtAddress &GetExtAddress(void) const { return mMacAddr; }

    /**
     * This method sets the Extended Address.
     *
     * @param[in]  aAddress  The Extended Address value to set.
     *
     */
    void SetExtAddress(const Mac::ExtAddress &aAddress) { mMacAddr = aAddress; }

    /**
     * This method gets the key sequence value.
     *
     * @returns The key sequence value.
     *
     */
    uint32_t GetKeySequence(void) const { return mKeySequence; }

    /**
     * This method sets the key sequence value.
     *
     * @param[in]  aKeySequence  The key sequence value.
     *
     */
    void SetKeySequence(uint32_t aKeySequence) { mKeySequence = aKeySequence; }

    /**
     * This method returns the last heard time.
     *
     * @returns The last heard time.
     *
     */
    uint32_t GetLastHeard(void) const { return mLastHeard; }

    /**
     * This method sets the last heard time.
     *
     * @param[in]  aLastHeard  The last heard time.
     *
     */
    void SetLastHeard(uint32_t aLastHeard) { mLastHeard = aLastHeard; }

    /**
     * This method gets the link frame counter value.
     *
     * @returns The link frame counter value.
     *
     */
    uint32_t GetLinkFrameCounter(void) const { return mValidPending.mValid.mLinkFrameCounter; }

    /**
     * This method sets the link frame counter value.
     *
     * @param[in]  aFrameCounter  The link frame counter value.
     *
     */
    void SetLinkFrameCounter(uint32_t aFrameCounter) { mValidPending.mValid.mLinkFrameCounter = aFrameCounter; }

    /**
     * This method gets the MLE frame counter value.
     *
     * @returns The MLE frame counter value.
     *
     */
    uint32_t GetMleFrameCounter(void) const { return mValidPending.mValid.mMleFrameCounter; }

    /**
     * This method sets the MLE frame counter value.
     *
     * @param[in]  aFrameCounter  The MLE frame counter value.
     *
     */
    void SetMleFrameCounter(uint32_t aFrameCounter) { mValidPending.mValid.mMleFrameCounter = aFrameCounter; }

    /**
     * This method gets the RLOC16 value.
     *
     * @returns The RLOC16 value.
     *
     */
    uint16_t GetRloc16(void) const { return mValidPending.mValid.mRloc16; }

    /**
     * This method sets the RLOC16 value.
     *
     * @param[in]  aRloc16  The RLOC16 value.
     *
     */
    void SetRloc16(uint16_t aRloc16) { mValidPending.mValid.mRloc16 = aRloc16; }

    /**
     * This method indicates whether an IEEE 802.15.4 Data Request message was received.
     *
     * @returns TRUE if an IEEE 802.15.4 Data Request message was received, FALSE otherwise.
     *
     */
    bool IsDataRequestPending(void) const { return mDataRequest; }

    /**
     * This method sets the indicator for whether an IEEE 802.15.4 Data Request message was received.
     *
     * @param[in]  aPending  TRUE if an IEEE 802.15.4 Data Request message was received, FALSE otherwise.
     *
     */
    void SetDataRequestPending(bool aPending) { mDataRequest = aPending; }

    /**
     * This method gets the number of consecutive link failures.
     *
     * @returns The number of consecutive link failures.
     *
     */
    uint8_t GetLinkFailures(void) const { return mLinkFailures; }

    /**
     * This method increments the number of consecutive link failures.
     *
     */
    void IncrementLinkFailures(void) { mLinkFailures++; }

    /**
     * This method resets the number of consecutive link failures to zero.
     *
     */
    void ResetLinkFailures(void) { mLinkFailures = 0; }

    /**
     * This method returns the LinkQualityInfo object.
     *
     * @returns The LinkQualityInfo object.
     *
     */
    LinkQualityInfo &GetLinkInfo(void) { return mLinkInfo; }

    /**
     * This method generates a new challenge value for MLE Link Request/Response exchanges.
     *
     */
    void GenerateChallenge(void);

    /**
     * This method returns the current challenge value for MLE Link Request/Response exchanges.
     *
     * @returns The current challenge value.
     *
     */
    const uint8_t *GetChallenge(void) const { return mValidPending.mPending.mChallenge; }

    /**
     * This method returns the size (bytes) of the challenge value for MLE Link Request/Response exchanges.
     *
     * @returns The size (bytes) of the challenge value for MLE Link Request/Response exchanges.
     *
     */
    uint8_t GetChallengeSize(void) const { return sizeof(mValidPending.mPending.mChallenge); }

private:
    Mac::ExtAddress mMacAddr;            ///< The IEEE 802.15.4 Extended Address
    uint32_t        mLastHeard;          ///< Time when last heard.
    union
    {
        struct
        {
            uint32_t mLinkFrameCounter;  ///< The Link Frame Counter
            uint32_t mMleFrameCounter;   ///< The MLE Frame Counter
            uint16_t mRloc16;            ///< The RLOC16
        } mValid;
        struct
        {
            uint8_t mChallenge[Mle::ChallengeTlv::kMaxSize];  ///< The challenge value
            uint8_t mChallengeLength;    ///< The challenge length
        } mPending;
    } mValidPending;

    uint32_t        mKeySequence;        ///< Current key sequence
    uint8_t         mState : 3;          ///< The link state
    uint8_t         mMode : 4;           ///< The MLE device mode
    bool            mDataRequest : 1;    ///< Indicates whether or not a Data Poll was received
    uint8_t         mLinkFailures;       ///< Consecutive link failure count
    LinkQualityInfo mLinkInfo;           ///< Link quality info (contains average RSS, link margin and link quality)
};

/**
 * This class represents a Thread Child.
 *
 */
class Child : public Neighbor
{
public:
    enum
    {
        kMaxIp6AddressPerChild = OPENTHREAD_CONFIG_IP_ADDRS_PER_CHILD,
        kMaxRequestTlvs        = 5,
    };

    /**
     * This method clears the IPv6 addresses for the child.
     *
     */
    void ClearIp6Addresses(void) { memset(mIp6Address, 0, sizeof(mIp6Address)); }

    /**
     * This method gets the IPv6 address at index @p aIndex.
     *
     * @param[in]  aIndex  The index into the IPv6 address list.
     *
     * @returns A reference to the IPv6 address entry at index @p aIndex.
     *
     */
    Ip6::Address &GetIp6Address(uint8_t aIndex) { return mIp6Address[aIndex]; }

    /**
     * This method searches for a given IPv6 address in the child's IPv6 address list and provides the index of the
     * address in the list if it is found.
     *
     * @param[in]  aAddress           The IPv6 address to search for in the IPv6 address list.
     * @param[out] aIndex             Pointer to variable where the index of address is provided if address is found in
     *                                the list. @p aIndex can be set NULL if index is not required.
     *
     * @retval OT_ERROR_NONE          Successfully found the address in IPv6 address list and updated @p aIndex.
     * @retval OT_ERROR_NOT_FOUND     Could not find the address in the list.
     *
     */
    otError FindIp6Address(const Ip6::Address &aAddress, uint8_t *aIndex) const;

    /**
     * This method removes the address at index @p aIndex.
     *
     * @param[in] aIndex   The index into the IPv6 address list.
     *
     */
    void RemoveIp6Address(uint8_t aIndex);

    /**
     * This method gets the child timeout.
     *
     * @returns The child timeout.
     *
     */
    uint32_t GetTimeout(void) const { return mTimeout; }

    /**
     * This method sets the child timeout.
     *
     * @param[in]  aTimeout  The child timeout.
     *
     */
    void SetTimeout(uint32_t aTimeout) { mTimeout = aTimeout; }

    /**
     * This method gets the network data version.
     *
     * @returns The network data version.
     *
     */
    uint8_t GetNetworkDataVersion(void) const { return mNetworkDataVersion; }

    /**
     * This method sets the network data version.
     *
     * @param[in]  aVersion  The network data version.
     *
     */
    void SetNetworkDataVersion(uint8_t aVersion) { mNetworkDataVersion = aVersion; }

    /**
     * This method generates a new challenge value to use during a child attach.
     *
     */
    void GenerateChallenge(void);

    /**
     * This method gets the current challenge value used during attach.
     *
     * @returns The current challenge value.
     *
     */
    const uint8_t *GetChallenge(void) const { return mAttachChallenge; }

    /**
     * This method gets the challenge size (bytes) used during attach.
     *
     * @returns The challenge size (bytes).
     *
     */
    uint8_t GetChallengeSize(void) const { return sizeof(mAttachChallenge); }

    /**
     * This method gets the IEEE 802.15.4 Frame Counter used during indirect retransmissions.
     *
     * @returns The IEEE 802.15.4 Frame Counter value.
     *
     */
    uint32_t GetIndirectFrameCounter(void) const { return mIndirectFrameCounter; }

    /**
     * This method sets the IEEE 802.15.4 Frame Counter to use during indirect retransmissions.
     *
     * @param[in]  aFrameCounter  The IEEE 802.15.4 Frame Counter value.
     *
     */
    void SetIndirectFrameCounter(uint32_t aFrameCounter) { mIndirectFrameCounter = aFrameCounter; }

    /**
     * This method gets the message buffer to use for indirect transmissions.
     *
     * @returns The message buffer.
     *
     */
    Message *GetIndirectMessage(void) { return mIndirectMessage; }

    /**
     * This method sets the message buffer to use for indirect transmissions.
     *
     * @param[in]  aMessage  The message buffer.
     *
     */
    void SetIndirectMessage(Message *aMessage) { mIndirectMessage = aMessage; }

    /**
     * This method gets the 6LoWPAN Fragment Offset to use for indirect transmissions.
     *
     * @returns The 6LoWPAN Fragment Offset value.
     *
     */
    uint16_t GetIndirectFragmentOffset(void) const { return mIndirectFragmentOffset; }

    /**
     * This method sets the 6LoWPAN Fragment Offset to use for indirect transmissions.
     *
     * @param[in]  aFragmentOffset  The 6LoWPAN Fragment Offset value to use.
     *
     */
    void SetIndirectFragmentOffset(uint16_t aFragmentOffset) { mIndirectFragmentOffset = aFragmentOffset; }

    /**
     * This method gets the IEEE 802.15.4 Key ID to use for indirect retransmissions.
     *
     * @returns The IEEE 802.15.4 Key ID value.
     *
     */
    uint8_t GetIndirectKeyId(void) const { return mIndirectKeyId; }

    /**
     * This method sets the IEEE 802.15.4 Key ID value to use for indirect retransmissions.
     *
     * @param[in]  aKeyId  The IEEE 802.15.4 Key ID value.
     *
     */
    void SetIndirectKeyId(uint8_t aKeyId) { mIndirectKeyId = aKeyId; }

    /**
     * This method gets the number of indirect transmission attempts for the current message.
     *
     * @returns The number of indirect transmission attempts.
     *
     */
    uint8_t GetIndirectTxAttempts(void) const { return mIndirectTxAttempts; }

    /**
     * This method resets the number of indirect transmission attempts to zero.
     *
     */
    void ResetIndirectTxAttempts(void) { mIndirectTxAttempts = 0; }

    /**
     * This method increments the number of indirect transmission attempts.
     *
     */
    void IncrementIndirectTxAttempts(void) { mIndirectTxAttempts++; }

    /**
     * This method gets the IEEE 802.15.4 Data Sequence Number to use during indirect retransmissions.
     *
     * @returns The IEEE 802.15.4 Data Sequence Number value.
     *
     */
    uint8_t GetIndirectDataSequenceNumber(void) const { return mIndirectDsn; }

    /**
     * This method sets the IEEE 802.15.4 Data Sequence Number to use during indirect retransmissions.
     *
     * @param[in]  aDsn  The IEEE 802.15.4 Data Sequence Number value.
     *
     */
    void SetIndirectDataSequenceNumber(uint8_t aDsn) { mIndirectDsn = aDsn; }

    /**
     * This method indicates whether or not to source match on the short address.
     *
     * @returns TRUE if using the short address, FALSE if using the extended address.
     *
     */
    bool IsIndirectSourceMatchShort(void) const { return mUseShortAddress; }

    /**
     * This method sets whether or not to source match on the short address.
     *
     * @param[in]  aShort  TRUE if using the short address, FALSE if using the extended address.
     *
     */
    void SetIndirectSourceMatchShort(bool aShort) { mUseShortAddress = aShort; }

    /**
     * This method indicates whether or not the child needs to be added to the source match table.
     *
     * @returns TRUE if the child needs to be added to the source match table, FALSE otherwise.
     *
     */
    bool IsIndirectSourceMatchPending(void) const { return mSourceMatchPending; }

    /**
     * This method sets whether or not the child needs to be added to the source match table.
     *
     * @param[in]  aPending  TRUE if the child needs to be added to the source match table, FALSE otherwise.
     *
     */
    void SetIndirectSourceMatchPending(bool aPending) { mSourceMatchPending = aPending; }

    /**
     * This method returns the number of queued message(s) for the child
     *
     * @returns Number of queues message(s).
     *
     */
    uint16_t GetIndirectMessageCount(void) const { return mQueuedMessageCount; }

    /**
     * This method increments the indirect message count.
     *
     */
    void IncrementIndirectMessageCount(void) { mQueuedMessageCount++; }

    /**
     * This method decrements the indirect message count.
     *
     */
    void DecrementIndirectMessageCount(void) { mQueuedMessageCount--; }

    /**
     * This method resets the indirect message count to zero.
     *
     */
    void ResetIndirectMessageCount(void) { mQueuedMessageCount = 0; }

    /**
     * This method clears the requested TLV list.
     *
     */
    void ClearRequestTlvs(void) { memset(mRequestTlvs, Mle::Tlv::kInvalid, sizeof(mRequestTlvs)); }

    /**
     * This method returns the requested TLV at index @p aIndex.
     *
     * @param[in]  aIndex  The index into the requested TLV list.
     *
     * @returns The requested TLV at index @p aIndex.
     *
     */
    uint8_t GetRequestTlv(uint8_t aIndex) const { return mRequestTlvs[aIndex]; }

    /**
     * This method sets the requested TLV at index @p aIndex.
     *
     * @param[in]  aIndex  The index into the requested TLV list.
     * @param[in]  aType   The TLV type.
     *
     */
    void SetRequestTlv(uint8_t aIndex, uint8_t aType) { mRequestTlvs[aIndex] = aType; }

    /**
     * This method gets the mac address of child (either rloc16 or extended address depending on `UseShortAddress` flag).
     *
     * @param[out] aMacAddress A reference to a mac address object to which the child's address is copied.
     *
     * @returns A (const) reference to the mac address @a aMacAddress.
     *
     */
    const Mac::Address &GetMacAddress(Mac::Address &aMacAddress) const;

#if OPENTHREAD_ENABLE_CHILD_SUPERVISION

    /**
     * This method increments the number of seconds since last supervision of the child.
     *
     */
    void IncrementSecondsSinceLastSupervision(void) { mSecondsSinceSupervision++; }

    /**
     * This method returns the number of seconds since last supervision of the child (last message to the child)
     *
     * @returns Number of seconds since last supervision of the child.
     *
     */
    uint16_t GetSecondsSinceLastSupervision(void) const { return mSecondsSinceSupervision; }

    /**
     * This method resets the number of seconds since last supervision of the child to zero.
     *
     */
    void ResetSecondsSinceLastSupervision(void) { mSecondsSinceSupervision = 0; }

#endif // #if OPENTHREAD_ENABLE_CHILD_SUPERVISION

private:
    Ip6::Address mIp6Address[kMaxIp6AddressPerChild];  ///< Registered IPv6 addresses
    uint32_t     mTimeout;                             ///< Child timeout

    union
    {
        uint8_t mRequestTlvs[kMaxRequestTlvs];                 ///< Requested MLE TLVs
        uint8_t mAttachChallenge[Mle::ChallengeTlv::kMaxSize]; ///< The challenge value
    };

    uint32_t     mIndirectFrameCounter;                ///< Frame counter for current indirect message (used fore retx).
    Message     *mIndirectMessage;                     ///< Current indirect message.
    uint16_t     mIndirectFragmentOffset;              ///< 6LoWPAN fragment offset for the indirect message.
    uint8_t      mIndirectKeyId;                       ///< Key Id for current indirect message (used for retx).
    uint8_t      mIndirectTxAttempts;                  ///< Number of data poll triggered tx attempts.
    uint8_t      mIndirectDsn;                         ///< MAC level Data Sequence Number (DSN) for retx attempts.
    uint8_t      mNetworkDataVersion;                  ///< Current Network Data version
    uint16_t     mQueuedMessageCount : 13;             ///< Number of queued indirect messages for the child.
    bool         mUseShortAddress : 1;                 ///< Indicates whether to use short or extended address.
    bool         mSourceMatchPending : 1;              ///< Indicates whether or not pending to add to src match table.

#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
    uint16_t     mSecondsSinceSupervision;             ///< Number of seconds since last supervision of the child.
#endif // OPENTHREAD_ENABLE_CHILD_SUPERVISION

};

/**
 * This class represents a Thread Router
 *
 */
class Router : public Neighbor
{
public:
    /**
     * This method gets the router ID of the next hop to this router.
     *
     * @returns The router ID of the next hop to this router.
     *
     */
    uint8_t GetNextHop(void) const { return mNextHop; }

    /**
     * This method sets the router ID of the next hop to this router.
     *
     * @param[in]  aRouterId  The router ID of the next hop to this router.
     *
     */
    void SetNextHop(uint8_t aRouterId) { mNextHop = aRouterId; }

    /**
     * This method gets the link quality out value for this router.
     *
     * @returns The link quality out value for this router.
     *
     */
    uint8_t GetLinkQualityOut(void) const { return mLinkQualityOut; }

    /**
     * This method sets the link quality out value for this router.
     *
     * @param[in]  aLinkQuality  The link quality out value for this router.
     *
     */
    void SetLinkQualityOut(uint8_t aLinkQuality) { mLinkQualityOut = aLinkQuality; }

    /**
     * This method get the route cost to this router.
     *
     * @returns The route cost to this router.
     *
     */
    uint8_t GetCost(void) const { return mCost; }

    /**
     * This method sets the router cost to this router.
     *
     * @param[in]  aCost  The router cost to this router.
     *
     */
    void SetCost(uint8_t aCost) { mCost = aCost; }

    /**
     * This method indicates whether or not this router ID has been allocated.
     *
     * @returns TRUE if this router ID has been allocated, FALSE otherwise.
     *
     */
    bool IsAllocated(void) const { return mAllocated; }

    /**
     * This method sets whether or not this router ID has been allocated.
     *
     * @param[in]  aAllocated  TRUE if this router ID has been allocated, FALSE otherwise.
     *
     */
    void SetAllocated(bool aAllocated) { mAllocated = aAllocated; }

    /**
     * This method indicates whether the reclaim delay is in effect for this router ID.
     *
     * @returns TRUE if the reclaim delay is in effect, FALSE otherwise.
     *
     */
    bool IsReclaimDelay(void) const { return mReclaimDelay; }

    /**
     * This method sets whether the reclaim delay is in effect for this router ID.
     *
     * @param[in]  aReclaimDelay  TRUE if the reclaim delay is in effect, FALSE otherwise.
     *
     */
    void SetReclaimDelay(bool aReclaimDelay) { mReclaimDelay = aReclaimDelay; }

private:
    uint8_t mNextHop;             ///< The next hop towards this router
    uint8_t mLinkQualityOut : 2;  ///< The link quality out for this router
    uint8_t mCost : 4;            ///< The cost to this router via neighbor router
    bool    mAllocated : 1;       ///< Indicates whether or not this entry is allocated
    bool    mReclaimDelay : 1;    ///< Indicates whether or not this entry is waiting to be reclaimed
};

}  // namespace ot

#endif  // TOPOLOGY_HPP_


text:
package inject_test

import (
	"fmt"
	"reflect"
	"testing"

	"github.com/go-macaron/inject"
	. "github.com/smartystreets/goconvey/convey"
)

type SpecialString interface {
}

type TestStruct struct {
	Dep1 string        `inject:"t" json:"-"`
	Dep2 SpecialString `inject`
	Dep3 string
}

type Greeter struct {
	Name string
}

func (g *Greeter) String() string {
	return "Hello, My name is" + g.Name
}

type myFastInvoker func(string)

func (f myFastInvoker) Invoke([]interface{}) ([]reflect.Value, error) {
	return nil, nil
}

func Test_Injector_Invoke(t *testing.T) {
	Convey("Invokes function", t, func() {
		injector := inject.New()
		So(injector, ShouldNotBeNil)

		dep := "some dependency"
		injector.Map(dep)
		dep2 := "another dep"
		injector.MapTo(dep2, (*SpecialString)(nil))
		dep3 := make(chan *SpecialString)
		dep4 := make(chan *SpecialString)
		typRecv := reflect.ChanOf(reflect.RecvDir, reflect.TypeOf(dep3).Elem())
		typSend := reflect.ChanOf(reflect.SendDir, reflect.TypeOf(dep4).Elem())
		injector.Set(typRecv, reflect.ValueOf(dep3))
		injector.Set(typSend, reflect.ValueOf(dep4))

		_, err := injector.Invoke(func(d1 string, d2 SpecialString, d3 <-chan *SpecialString, d4 chan<- *SpecialString) {
			So(d1, ShouldEqual, dep)
			So(d2, ShouldEqual, dep2)
			So(reflect.TypeOf(d3).Elem(), ShouldEqual, reflect.TypeOf(dep3).Elem())
			So(reflect.TypeOf(d4).Elem(), ShouldEqual, reflect.TypeOf(dep4).Elem())
			So(reflect.TypeOf(d3).ChanDir(), ShouldEqual, reflect.RecvDir)
			So(reflect.TypeOf(d4).ChanDir(), ShouldEqual, reflect.SendDir)
		})
		So(err, ShouldBeNil)

		_, err = injector.Invoke(myFastInvoker(func(string) {}))
		So(err, ShouldBeNil)
	})

	Convey("Invokes function with return value", t, func() {
		injector := inject.New()
		So(injector, ShouldNotBeNil)

		dep := "some dependency"
		injector.Map(dep)
		dep2 := "another dep"
		injector.MapTo(dep2, (*SpecialString)(nil))

		result, err := injector.Invoke(func(d1 string, d2 SpecialString) string {
			So(d1, ShouldEqual, dep)
			So(d2, ShouldEqual, dep2)
			return "Hello world"
		})

		So(result[0].String(), ShouldEqual, "Hello world")
		So(err, ShouldBeNil)
	})
}

func Test_Injector_Apply(t *testing.T) {
	Convey("Apply a type", t, func() {
		injector := inject.New()
		So(injector, ShouldNotBeNil)

		injector.Map("a dep").MapTo("another dep", (*SpecialString)(nil))

		s := TestStruct{}
		So(injector.Apply(&s), ShouldBeNil)

		So(s.Dep1, ShouldEqual, "a dep")
		So(s.Dep2, ShouldEqual, "another dep")
	})
}

func Test_Injector_InterfaceOf(t *testing.T) {
	Convey("Check interface of a type", t, func() {
		iType := inject.InterfaceOf((*SpecialString)(nil))
		So(iType.Kind(), ShouldEqual, reflect.Interface)

		iType = inject.InterfaceOf((**SpecialString)(nil))
		So(iType.Kind(), ShouldEqual, reflect.Interface)

		defer func() {
			So(recover(), ShouldNotBeNil)
		}()
		iType = inject.InterfaceOf((*testing.T)(nil))
	})
}

func Test_Injector_Set(t *testing.T) {
	Convey("Set and get type", t, func() {
		injector := inject.New()
		So(injector, ShouldNotBeNil)

		typ := reflect.TypeOf("string")
		typSend := reflect.ChanOf(reflect.SendDir, typ)
		typRecv := reflect.ChanOf(reflect.RecvDir, typ)

		// instantiating unidirectional channels is not possible using reflect
		// http://golang.org/src/pkg/reflect/value.go?s=60463:60504#L2064
		chanRecv := reflect.MakeChan(reflect.ChanOf(reflect.BothDir, typ), 0)
		chanSend := reflect.MakeChan(reflect.ChanOf(reflect.BothDir, typ), 0)

		injector.Set(typSend, chanSend)
		injector.Set(typRecv, chanRecv)

		So(injector.GetVal(typSend).IsValid(), ShouldBeTrue)
		So(injector.GetVal(typRecv).IsValid(), ShouldBeTrue)
		So(injector.GetVal(chanSend.Type()).IsValid(), ShouldBeFalse)
	})
}

func Test_Injector_GetVal(t *testing.T) {
	Convey("Map and get type", t, func() {
		injector := inject.New()
		So(injector, ShouldNotBeNil)

		injector.Map("some dependency")

		So(injector.GetVal(reflect.TypeOf("string")).IsValid(), ShouldBeTrue)
		So(injector.GetVal(reflect.TypeOf(11)).IsValid(), ShouldBeFalse)
	})
}

func Test_Injector_SetParent(t *testing.T) {
	Convey("Set parent of injector", t, func() {
		injector := inject.New()
		So(injector, ShouldNotBeNil)

		injector.MapTo("another dep", (*SpecialString)(nil))

		injector2 := inject.New()
		So(injector, ShouldNotBeNil)

		injector2.SetParent(injector)

		So(injector2.GetVal(inject.InterfaceOf((*SpecialString)(nil))).IsValid(), ShouldBeTrue)
	})
}

func Test_Injector_Implementors(t *testing.T) {
	Convey("Check implementors", t, func() {
		injector := inject.New()
		So(injector, ShouldNotBeNil)

		g := &Greeter{"Jeremy"}
		injector.Map(g)

		So(injector.GetVal(inject.InterfaceOf((*fmt.Stringer)(nil))).IsValid(), ShouldBeTrue)
	})
}

func Test_FastInvoker(t *testing.T) {
	Convey("Check fast invoker", t, func() {
		So(inject.IsFastInvoker(myFastInvoker(nil)), ShouldBeTrue)
	})
}

//----------Benchmark InjectorInvoke-------------

func f1InjectorInvoke(d1 string, d2 SpecialString) string {
	return "f1"
}
func f2InjectorInvoke(d1 string, d2 SpecialString) string {
	return "f2"
}

func f1SimpleInjectorInvoke() {
}
func f2SimpleInjectorInvoke() {
}

// f2InjectorInvokeHandler f2 Invoke Handler
type f2InjectorInvokeHandler func(d1 string, d2 SpecialString) string

func (f2 f2InjectorInvokeHandler) Invoke(p []interface{}) ([]reflect.Value, error) {
	ret := f2(p[0].(string), p[1].(SpecialString))
	return []reflect.Value{reflect.ValueOf(ret)}, nil
}

type f2SimpleInjectorInvokeHandler func()

func (f2 f2SimpleInjectorInvokeHandler) Invoke(p []interface{}) ([]reflect.Value, error) {
	f2()
	return nil, nil
}

func BenchmarkInjectorInvokeNative(b *testing.B) {
	b.StopTimer()
	dep := "some dependency"
	dep2 := "another dep"
	var d2 SpecialString
	d2 = dep2

	b.StartTimer()
	for i := 0; i < b.N; i++ {
		f1InjectorInvoke(dep, d2)
	}
}

func BenchmarkInjectorInvokeOriginal(b *testing.B) {
	benchmarkInjectorInvoke(b, false, false)
}

func BenchmarkInjectorInvokeFast(b *testing.B) {
	benchmarkInjectorInvoke(b, true, false)
}

func BenchmarkInjectorInvokeOriginalSimple(b *testing.B) {
	benchmarkInjectorInvoke(b, false, true)
}

func BenchmarkInjectorInvokeFastSimple(b *testing.B) {
	benchmarkInjectorInvoke(b, true, true)
}

func benchmarkInjectorInvoke(b *testing.B, isFast, isSimple bool) {
	b.StopTimer()

	injector := inject.New()
	dep := "some dependency"
	injector.Map(dep)
	dep2 := "another dep"
	injector.MapTo(dep2, (*SpecialString)(nil))

	var f1, f2 interface{}
	if isSimple { //func()
		f1 = f1SimpleInjectorInvoke
		f2 = f2SimpleInjectorInvokeHandler(f2SimpleInjectorInvoke)
	} else { //func(p1, p2) ret
		f1 = f1InjectorInvoke
		f2 = f2InjectorInvokeHandler(f2InjectorInvoke)
	}
	injector.Invoke(f1)
	injector.Invoke(f2)

	b.StartTimer()
	for i := 0; i < b.N; i++ {
		if isFast {
			injector.Invoke(f2)
		} else {
			injector.Invoke(f1)
		}
	}
}


text:
package org.ofbiz.service.eca;

import java.util.HashMap;
import java.util.Map;

import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilGenerics;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.string.FlexibleStringExpander;
import org.ofbiz.entity.model.ModelUtil;
import org.w3c.dom.Element;

/**
 * ServiceEcaSetField
 */
public class ServiceEcaSetField {

    public static final String module = ServiceEcaSetField.class.getName();

    protected String fieldName = null;
    protected String mapName = null;
    protected String envName = null;
    protected String value = null;
    protected String format = null;

    public ServiceEcaSetField(Element set) {
        this.fieldName = set.getAttribute("field-name");
        if (UtilValidate.isNotEmpty(this.fieldName) && this.fieldName.indexOf('.') != -1) {
            this.mapName = fieldName.substring(0, this.fieldName.indexOf('.'));
            this.fieldName = this.fieldName.substring(this.fieldName.indexOf('.') +1);
        }
        this.envName = set.getAttribute("env-name");
        this.value = set.getAttribute("value");
        this.format = set.getAttribute("format");
    }

    public void eval(Map<String, Object> context) {
        if (fieldName != null) {
            // try to expand the envName
            if (UtilValidate.isEmpty(this.value)) {
                if (UtilValidate.isNotEmpty(this.envName) && this.envName.startsWith("${")) {
                    FlexibleStringExpander exp = FlexibleStringExpander.getInstance(this.envName);
                    String s = exp.expandString(context);
                    if (UtilValidate.isNotEmpty(s)) {
                        value = s;
                    }
                    Debug.logInfo("Expanded String: " + s, module);
                }
            }
            // TODO: rewrite using the ContextAccessor.java see hack below to be able to use maps for email notifications
            // check if target is a map and create/get from contaxt
            Map<String, Object> valueMap = null;
            if (UtilValidate.isNotEmpty(this.mapName) && context.containsKey(this.mapName)) {
                valueMap = UtilGenerics.checkMap(context.get(mapName));
            } else {
                valueMap = new HashMap<String, Object>();
            }
            // process the context changes
            Object newValue = null;
            if (UtilValidate.isNotEmpty(this.value)) {
                newValue = this.format(this.value, context);
            } else if (UtilValidate.isNotEmpty(this.envName) && context.get(this.envName) != null) {
                newValue = this.format((String) context.get(this.envName), context);
            }

            if (newValue != null) {
                if (UtilValidate.isNotEmpty(this.mapName)) {
                    valueMap.put(this.fieldName, newValue);
                    context.put(this.mapName, valueMap);
                } else {
                    context.put(this.fieldName, newValue);
                }
            }
        }
    }

    protected Object format(String s, Map<String, ? extends Object> c) {
        if (UtilValidate.isEmpty(s) || UtilValidate.isEmpty(format)) {
            return s;
        }

        // string formats
        if ("append".equalsIgnoreCase(format) && envName != null) {
            StringBuilder newStr = new StringBuilder();
            if (c.get(envName) != null) {
                newStr.append(c.get(envName));
            }
            newStr.append(s);
            return newStr.toString();
        }
        if ("to-upper".equalsIgnoreCase(format)) {
            return s.toUpperCase();
        }
        if ("to-lower".equalsIgnoreCase(format)) {
            return s.toLowerCase();
        }
        if ("hash-code".equalsIgnoreCase(format)) {
            return Integer.valueOf(s.hashCode());
        }
        if ("long".equalsIgnoreCase(format)) {
            return Long.valueOf(s);
        }
        if ("double".equalsIgnoreCase(format)) {
            return Double.valueOf(s);
        }

        // entity formats
        if ("upper-first-char".equalsIgnoreCase(format)) {
            return ModelUtil.upperFirstChar(s);
        }
        if ("lower-first-char".equalsIgnoreCase(format)) {
            return ModelUtil.lowerFirstChar(s);
        }
        if ("db-to-java".equalsIgnoreCase(format)) {
            return ModelUtil.dbNameToVarName(s);
        }
        if ("java-to-db".equalsIgnoreCase(format)) {
            return ModelUtil.javaNameToDbName(s);
        }

        Debug.logWarning("Format function not found [" + format + "] return string unchanged - " + s, module);
        return s;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof ServiceEcaSetField) {
            ServiceEcaSetField other = (ServiceEcaSetField) obj;

            if (!UtilValidate.areEqual(this.fieldName, other.fieldName)) return false;
            if (!UtilValidate.areEqual(this.envName, other.envName)) return false;
            if (!UtilValidate.areEqual(this.value, other.value)) return false;
            if (!UtilValidate.areEqual(this.format, other.format)) return false;

            return true;
        } else {
            return false;
        }
    }
}


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

package com.azure.resourcemanager.mobilenetwork.generated;

import com.azure.core.util.Context;
import com.azure.resourcemanager.mobilenetwork.models.SimGroup;
import java.util.HashMap;
import java.util.Map;

/** Samples for SimGroups UpdateTags. */
public final class SimGroupsUpdateTagsSamples {
    /*
     * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupUpdateTags.json
     */
    /**
     * Sample code: Update SIM group tags.
     *
     * @param manager Entry point to MobileNetworkManager.
     */
    public static void updateSIMGroupTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) {
        SimGroup resource =
            manager.simGroups().getByResourceGroupWithResponse("rg1", "testSimGroup", Context.NONE).getValue();
        resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply();
    }

    @SuppressWarnings("unchecked")
    private static <T> Map<String, T> mapOf(Object... inputs) {
        Map<String, T> map = new HashMap<>();
        for (int i = 0; i < inputs.length; i += 2) {
            String key = (String) inputs[i];
            T value = (T) inputs[i + 1];
            map.put(key, value);
        }
        return map;
    }
}


text:
package edu.northwestern.bioinformatics.studycalendar.utility.osgimosis;

import java.util.List;
import java.util.Collection;
import java.util.ListIterator;

/**
 * @author Jalpa Patel
 */
@SuppressWarnings({ "unchecked", "RawUseOfParameterizedType" })
public class EncapsulatedList<E> extends EncapsulatedCollection<E> implements List<E> {
    private List farList;

    public EncapsulatedList(List farList, Membrane membrane, ClassLoader nearClassLoader) {
        super(farList, membrane, nearClassLoader);
        this.farList = farList;
    }

    protected List getFarList() {
        return farList;
    }

    public boolean addAll(int index, Collection<? extends E> c) {
        int i = index;
        for (E e : c) {
            this.add(i, e);
            i++;
        }
        return index != i;
    }

    public E get(int index) {
        return (E) farToNear(getFarList().get(index));
    }

    public E set(int index, E element) {
        return (E) farToNear(getFarList().set(index, nearToFar(element)));
    }

    public void add(int index, E element) {
        getFarList().add(index, nearToFar(element));
    }

    public E remove(int index) {
        return (E) farToNear(getFarList().remove(index));
    }

    public int indexOf(Object o) {
        return getFarList().indexOf(nearToFar(o));
    }

    public int lastIndexOf(Object o) {
        return getFarList().lastIndexOf(nearToFar(o));
    }

    public ListIterator<E> listIterator() {
        return encapsulateListIterator(getFarList().listIterator());
    }

    public ListIterator<E> listIterator(int index) {
        return encapsulateListIterator(getFarList().listIterator(index));
    }

    private EncapsulatedListIterator<E> encapsulateListIterator(ListIterator farIterator) {
        return new EncapsulatedListIterator<E>(farIterator, getMembrane(), getNearClassLoader(), guessFarLoader());
    }

    public List<E> subList(int fromIndex, int toIndex) {
        List farSubList = getFarList().subList(fromIndex, toIndex);
        return new EncapsulatedList<E>(farSubList, getMembrane(), getNearClassLoader());
    }
}


text:
<!--
  #%L
  Common package for I/O and related utilities
  %%
  Copyright (C) 2005 - 2016 Open Microscopy Environment:
    - Board of Regents of the University of Wisconsin-Madison
    - Glencoe Software, Inc.
    - University of Dundee
  %%
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided with the distribution.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.
  #L%
  -->

<suite name="IO_Tests">
    <test name="ByteArrayHandle">
        <parameter name="provider" value="ByteArrayHandle"/>
        <groups>
            <run>
                <include name="readTests"/>
                <include name="writeTests"/>
                <exclude name="readLineTest"/>
            </run>
        </groups>
        <packages>
            <package name="loci.common.utests"/>
        </packages>
    </test>
    <test name="NewByteArrayHandle">
        <parameter name="provider" value="NewByteArrayHandle"/>
        <parameter name="checkGrowth" value="true"/>
        <groups>
            <run>
                <include name="writeTests"/>
                <exclude name="initialLengthTest"/>
            </run>
        </groups>
        <packages>
            <package name="loci.common.utests"/>
        </packages>
    </test>
    <test name="ExistingByteArrayHandle">
        <parameter name="provider" value="ExistingByteArrayHandle"/>
        <groups>
            <run>
                <include name="writeTests"/>
                <exclude name="initialLengthTest"/>
            </run>
        </groups>
        <packages>
            <package name="loci.common.utests"/>
        </packages>
    </test>
    <test name="BZip2Handle">
        <parameter name="provider" value="BZip2Handle"/>
        <groups>
            <run>
                <include name="readTests"/>
                <exclude name="readLineTest"/>
            </run>
        </groups>
        <classes>
            <class name="loci.common.utests.ReadOnlyTest"/>
        </classes>
        <packages>
            <package name="loci.common.utests"/>
        </packages>
    </test>
    <test name="GZipHandle">
        <parameter name="provider" value="GZipHandle"/>
        <groups>
            <run>
                <include name="readTests"/>
                <exclude name="readLineTest"/>
            </run>
        </groups>
        <classes>
            <class name="loci.common.utests.ReadOnlyTest"/>
        </classes>
        <packages>
            <package name="loci.common.utests"/>
        </packages>
    </test>
    <test name="NIOFileHandle">
        <parameter name="provider" value="NIOFileHandle"/>
        <groups>
            <run>
                <include name="readTests"/>
                <include name="writeTests"/>
            </run>
        </groups>
        <packages>
            <package name="loci.common.utests"/>
        </packages>
    </test>
    <test name="URLHandle">
        <parameter name="provider" value="URLHandle"/>
        <groups>
            <run>
                <include name="readTests"/>
                <exclude name="readLineTest"/>
            </run>
        </groups>
        <classes>
            <class name="loci.common.utests.ReadOnlyTest"/>
        </classes>
        <packages>
            <package name="loci.common.utests"/>
        </packages>
    </test>
    <test name="ZipHandle">
        <parameter name="provider" value="ZipHandle"/>
        <groups>
            <run>
                <include name="readTests"/>
                <exclude name="readLineTest"/>
            </run>
        </groups>
        <classes>
            <class name="loci.common.utests.ReadOnlyTest"/>
        </classes>
        <packages>
            <package name="loci.common.utests"/>
        </packages>
    </test>
    <test name="TypeDetection">
        <classes>
            <class name="loci.common.utests.TypeDetectionTest"/>
        </classes>
    </test>
    <test name="Location">
        <classes>
            <class name="loci.common.utests.LocationTest"/>
        </classes>
    </test>
    <test name="URLHandleTest">
        <classes>
          <class name="loci.common.utests.URLHandleTest"/>
        </classes>
    </test>
    <test name="RandomAccessInputStreamByteArray">
      <parameter name="provider" value="ByteArrayHandle"/>
      <classes>
        <class name="loci.common.utests.RandomAccessInputStreamTest"/>
      </classes>
    </test>
    <test name="RandomAccessInputStreamBZip">
      <parameter name="provider" value="BZip2Handle"/>
      <classes>
        <class name="loci.common.utests.RandomAccessInputStreamTest"/>
      </classes>
    </test>
    <test name="RandomAccessInputStreamExistingByteArray">
      <parameter name="provider" value="ExistingByteArrayHandle"/>
      <classes>
        <class name="loci.common.utests.RandomAccessInputStreamTest"/>
      </classes>
    </test>
    <test name="RandomAccessInputStreamGZip">
      <parameter name="provider" value="GZipHandle"/>
      <classes>
        <class name="loci.common.utests.RandomAccessInputStreamTest"/>
      </classes>
    </test>
    <test name="RandomAccessInputStreamNIOFile">
      <parameter name="provider" value="NIOFileHandle"/>
      <classes>
        <class name="loci.common.utests.RandomAccessInputStreamTest"/>
      </classes>
    </test>
    <test name="RandomAccessInputStreamURL">
      <parameter name="provider" value="URLHandle"/>
      <classes>
        <class name="loci.common.utests.RandomAccessInputStreamTest"/>
      </classes>
    </test>
    <test name="RandomAccessInputStreamZip">
      <parameter name="provider" value="ZipHandle"/>
      <classes>
        <class name="loci.common.utests.RandomAccessInputStreamTest"/>
      </classes>
    </test>
    <test name="DataTools">
      <classes>
        <class name="loci.common.utests.DataToolsTest"/>
      </classes>
    </test>
    <test name="DateTools">
      <classes>
        <class name="loci.common.utests.DateToolsTest"/>
      </classes>
    </test>
    <test name="DebugTools">
        <classes>
            <class name="loci.common.utests.DebugToolsTest"/>
        </classes>
    </test>
    <test name="Downsampling">
        <classes>
            <class name="loci.common.utests.SimpleImageScalerTest"/>
        </classes>
    </test>
    <!--
    <test name="Encoding">
      <classes>
        <class name="loci.common.utests.EncodingTest"/>
      </classes>
    </test>
    -->
</suite>


text:
export * from './filter-button.component';
export * from './filter-button.module';


text:
module RichText_QCA
  ( genBlocks
  )
where

import qualified Data.Sequence as Seq
import           Network.Mattermost.Types ( PostId(..), Id(..) )
import           Network.Mattermost.QuickCheck (genText, genSeq)
import           Test.Tasty.QuickCheck
import           Matterhorn.Types.RichText

genBlocks :: Gen Blocks
genBlocks = Blocks <$> genSeq genBlock

seqOf :: Gen a -> Gen (Seq.Seq a)
seqOf g = fmap Seq.fromList (listOf g)

genBlock :: Gen Block
genBlock = oneof [ Para <$> genInlines
                 , Header <$> arbitrary <*> genInlines
                 , Blockquote <$> genBlocks
                 , List <$> genListType <*> genListSpacing <*> seqOf genBlocks
                 , CodeBlock <$> genCodeBlockInfo <*> genText
                 , HTMLBlock <$> genText
                 , return HRule
                 ]

genCodeBlockInfo :: Gen CodeBlockInfo
genCodeBlockInfo = CodeBlockInfo <$> genMaybe genText <*> genMaybe genText

genMaybe :: Gen a -> Gen (Maybe a)
genMaybe g =
    oneof [ Just <$> g
          , return Nothing
          ]

genInlines :: Gen Inlines
genInlines = Inlines <$> genSeq genInline

genInline :: Gen Inline
genInline = oneof [ EText <$> genText
                  , return ESpace
                  , return ESoftBreak
                  , return ELineBreak
                  , EEmph <$> genInlines
                  , EStrong <$> genInlines
                  , ECode <$> genInlines
                  , EStrikethrough <$> genInlines
                  , EHyperlink <$> (URL <$> genText) <*> genInlines
                  , EPermalink <$> (TeamURLName <$> genText) <*> genPostId <*> (genMaybe genInlines)
                  , EImage <$> (URL <$> genText) <*> genInlines
                  , ERawHtml <$> genText
                  ]

genPostId :: Gen PostId
genPostId = PI <$> Id <$> genText

genListType :: Gen ListType
genListType = oneof [ BulletList <$> arbitrary
                    , OrderedList <$> arbitrary <*> genEnumTy <*> genDelimTy
                    ]

genListSpacing :: Gen ListSpacing
genListSpacing = elements [ TightList, LooseList ]

genEnumTy :: Gen EnumeratorType
genEnumTy = elements [ Decimal, UpperAlpha, LowerAlpha, UpperRoman, LowerRoman ]

genDelimTy :: Gen DelimiterType
genDelimTy = elements [ Period, OneParen, TwoParens ]


text:
<project>
    <groupId>com.oreilly.learningsparkexamples</groupId>
    <artifactId>learning-spark</artifactId>
    <modelVersion>4.0.0</modelVersion>
    <name>learning-spark</name>
    <packaging>jar</packaging>
    <version>0.0.2</version>
    <repositories>
        <repository>
            <id>cloudera</id>
            <url>https://repository.cloudera.com/content/repositories/releases</url>
        </repository>
        <repository>
            <id>central2</id>
            <url>http://central.maven.org/maven2/</url>
        </repository>
        <repository>
            <id>Akka repository</id>
            <url>http://repo.akka.io/releases</url>
        </repository>
        <repository>
            <id>scala-tools</id>
            <url>https://oss.sonatype.org/content/groups/scala-tools</url>
        </repository>
        <repository>
            <id>apache</id>
            <url>https://repository.apache.org/content/repositories/releases</url>
        </repository>
        <repository>
            <id>twitter</id>
            <url>http://maven.twttr.com/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency> <!-- Spark dependency -->
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-core_2.10</artifactId>
            <version>1.5.2</version>
        </dependency>
        <dependency> <!-- Spark dependency -->
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-sql_2.10</artifactId>
            <version>1.5.2</version>
        </dependency>
        <dependency> <!-- Spark dependency -->
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-hive_2.10</artifactId>
            <version>1.5.2</version>
        </dependency>
        <dependency> <!-- Spark dependency -->
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-streaming_2.10</artifactId>
            <version>1.5.2</version>
        </dependency>
        <dependency> <!-- Spark dependency -->
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-streaming-kafka_2.10</artifactId>
            <version>1.5.2</version>
        </dependency>
        <dependency> <!-- Spark dependency -->
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-mllib_2.10</artifactId>
            <version>1.5.2</version>
        </dependency>
        <dependency> <!-- Cassandra -->
            <groupId>com.datastax.spark</groupId>
            <artifactId>spark-cassandra-connector_2.10</artifactId>
            <version>1.0.0-rc5</version>
        </dependency>
        <dependency> <!-- Cassandra -->
            <groupId>com.datastax.spark</groupId>
            <artifactId>spark-cassandra-connector-java_2.10</artifactId>
            <version>1.0.0-rc5</version>
        </dependency>
        <dependency> <!-- Elastic search connector -->
            <groupId>org.elasticsearch</groupId>
            <artifactId>elasticsearch-hadoop-mr</artifactId>
            <version>2.0.0.RC1</version>
        </dependency>
        <dependency> <!-- Jetty demmo -->
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-client</artifactId>
            <version>8.1.14.v20131031</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.0</version>
        </dependency>
        <dependency>
            <groupId>net.sf.opencsv</groupId>
            <artifactId>opencsv</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.binary.version}</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.12</version>
        </dependency>
    </dependencies>
    <properties>
        <java.version>1.8</java.version>
        <scala.binary.version>2.11</scala.binary.version>
    </properties>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.4</version>
                    <!-- mvn package assembly:single The configuration of the plugin -->
                    <configuration>
                        <!-- Specifies the configuration file of the assembly plugin -->
                        <descriptorRefs>
                            <descriptorRef>jar-with-dependencies</descriptorRef>
                        </descriptorRefs>
                        <archive>
                            <manifest>
                                <mainClass>com.oreilly.learningsparkexamples.java.KafkaInput</mainClass>
                                <addClasspath>true</addClasspath>
                            </manifest>
                        </archive>
                    </configuration>
                    <executions>
                        <execution>
                            <id>make-assembly</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>


text:
package com.fniephaus.bulkdataprocessor.threads;

import java.util.List;

import com.fniephaus.bulkdataprocessor.Entry;
import com.fniephaus.bulkdataprocessor.helpers.AbstractRunnable;
import com.fniephaus.bulkdataprocessor.helpers.Configuration;
import com.fniephaus.bulkdataprocessor.helpers.SharedResource;

public class DatabaseFetcher extends AbstractRunnable {
	private static final int DBFetchSIze = Configuration.getInt("performance.db_fetch_size");
	private static final int PrintThreshold = Configuration.getInt("general.print_threshold");

	public DatabaseFetcher(SharedResource pResource) {
		super(pResource);
	}

	public void execute() {
		if (!mResource.isConnected()) {
			mLogger.warning("Failed to make connection.");
			return;
		}

		int count = 0;
		List<Entry> entries;
		while ((entries = getAllEntriesIterable(count)).size() > 0) {

			for (Entry entry : entries) {
				mResource.addTask(entry);
				if (++count % PrintThreshold == 0) {
					mLogger.info(count + " entries processed...");
				}
			}

			mEntityManager.clear();
		}

		// Add dummy to inform others about termination
		mResource.addTask(SharedResource.PoisonPill);
		mResource.setEntryCount(count);
		mLogger.info("All entries fetched.");
	}

	private List<Entry> getAllEntriesIterable(int offset) {
		return mEntityManager.createQuery("FROM Entry e ORDER BY e.id", Entry.class)
				.setHint("org.hibernate.readOnly", true)
				.setFirstResult(offset)
				.setMaxResults(DBFetchSIze).getResultList();
	}
}


text:
<RelativeLayout
    android:id="@+id/main_layout"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".presentation.home.HomeActivity">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:background="?attr/colorPrimary"
        android:elevation="6dp"
        app:theme="@style/AppTheme.ToolBarStyle"
        android:minHeight="?attr/actionBarSize"/>

    <android.support.design.widget.TabLayout
        android:id="@+id/tablayout_home"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/toolbar"
        android:background="?attr/colorPrimary"
        android:elevation="6dp"
        android:minHeight="?attr/actionBarSize"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>

    <android.support.v4.view.ViewPager
        android:id="@+id/viewpager_home"
        android:layout_width="match_parent"
        android:layout_height="fill_parent"
        android:layout_below="@id/tablayout_home"/>

</RelativeLayout>


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.poliveira.apps.exampleparallaxrecycler">

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name">
        <activity
            android:name="com.poliveira.apps.exampleparallaxrecycler.MainActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>

</manifest>


text:
@class ATMHud;

@protocol ATMHudDelegate <NSObject>

@optional
- (void)userDidTapHud:(ATMHud *)theHud;			// tapped the visible HUD
- (void)userDidTapOutsideHud:(ATMHud *)theHud;	// tapped outside the HUD

- (void)hudWillAppear:(ATMHud *)theHud;
- (void)hudDidAppear:(ATMHud *)theHud;
- (void)hudWillUpdate:(ATMHud *)theHud;
- (void)hudDidUpdate:(ATMHud *)theHud;
- (void)hudWillDisappear:(ATMHud *)theHud;

@required
- (void)hudDidDisappear:(ATMHud *)theHud;

@end


text:
package org.jutility.math.vectoralgebra;

//@formatter:off

//@formatter:on

import org.junit.Assert;
import org.junit.Test;
import org.jutility.common.datatype.util.NumberComparator;

/**
 * The {@code Matrix4Test} class provides unit tests for the {@link Matrix4}
 * class.
 *
 * @author Peter J. Radics
 * @version 0.1.2
 * @since 0.1.0
 */
@SuppressWarnings({"ObjectEqualsNull", "ConstantConditions",
        "EqualsBetweenInconvertibleTypes"})
public class Matrix4Test {

    /**
     * Test method for
     * {@link Matrix4#Matrix4(ITuple4, ITuple4, ITuple4, ITuple4, Class)}.
     */
    @Test
    public void testConstructor() {

        try {

            final Matrix4<Float> testMatrix = new Matrix4<>(null, null, null,
                    null, Float.class);

            Assert.fail("Shouldn't be able to create matrix: " + testMatrix);
        }
        catch (final IllegalArgumentException e) {

            Assert.assertEquals(
                    "Cannot create a matrix with missing I component!",
                    e.getMessage());
        }
        try {

            final Matrix4<Float> testMatrix = new Matrix4<>(
                    Vector4.iUnitVector(Float.class), null, null, null,
                    Float.class);

            Assert.fail("Shouldn't be able to create matrix: " + testMatrix);
        }
        catch (final IllegalArgumentException e) {

            Assert.assertEquals(
                    "Cannot create a matrix with missing J component!",
                    e.getMessage());
        }
        try {

            final Matrix4<Float> testMatrix = new Matrix4<>(
                    Vector4.iUnitVector(Float.class),
                    Vector4.jUnitVector(Float.class), null, null, Float.class);

            Assert.fail("Shouldn't be able to create matrix: " + testMatrix);
        }
        catch (final IllegalArgumentException e) {

            Assert.assertEquals(
                    "Cannot create a matrix with missing K component!",
                    e.getMessage());
        }
        try {

            final Matrix4<Float> testMatrix = new Matrix4<>(
                    Vector4.iUnitVector(Float.class),
                    Vector4.jUnitVector(Float.class),
                    Vector4.kUnitVector(Float.class), null, Float.class);

            Assert.fail("Shouldn't be able to create matrix: " + testMatrix);
        }
        catch (final IllegalArgumentException e) {

            Assert.assertEquals(
                    "Cannot create a matrix with missing S component!",
                    e.getMessage());
        }
    }

    /**
     * Test method for {@link Matrix4#Matrix4(IMatrix4)}.
     */
    @Test
    public void testCopyConstructor() {

        try {

            final Matrix4<Float> testMatrix = new Matrix4<>(null);

            Assert.fail("Shouldn't be able to create matrix: " + testMatrix);
        }
        catch (final Exception e) {

            Assert.assertTrue(e instanceof NullPointerException);
        }
        final Tuple4<Float> i = new Tuple4<>(1, 5, 9, 13, Float.class);
        final Tuple4<Float> j = new Tuple4<>(2, 6, 10, 14, Float.class);
        final Tuple4<Float> k = new Tuple4<>(3, 7, 11, 15, Float.class);
        final Tuple4<Float> s = new Tuple4<>(4, 8, 12, 16, Float.class);

        final Matrix4<Float> testMatrix = new Matrix4<>(i, j, k, s, Float.class);

        final Matrix4<Float> otherTestMatrix = new Matrix4<>(testMatrix);

        Assert.assertEquals(testMatrix, otherTestMatrix);
    }

    /**
     * Test method for {@link Matrix4#toColumnMajorArray()}.
     */
    @Test
    public void testToColumnMajorArray() {

        final Tuple4<Float> i = new Tuple4<>(1, 2, 3, 4, Float.class);
        final Tuple4<Float> j = new Tuple4<>(5, 6, 7, 8, Float.class);
        final Tuple4<Float> k = new Tuple4<>(9, 10, 11, 12, Float.class);
        final Tuple4<Float> s = new Tuple4<>(13, 14, 15, 16, Float.class);

        final Matrix4<Float> testMatrix = new Matrix4<>(i, j, k, s, Float.class);

        final Float[] expecteds = {1f, 2f, 3f, 4f, 5f, 6f, 7f, 8f, 9f, 10f,
                11f, 12f, 13f, 14f, 15f, 16f};

        this.assertArrayEquals(expecteds, testMatrix.toColumnMajorArray());
    }

    private void assertArrayEquals(final Float[] expected, final Float[] actual) {

        Assert.assertEquals(expected.length, actual.length);
        for (int i = 0; i < expected.length; i++) {

            Assert.assertTrue(NumberComparator.equals(expected[i], actual[i]));
        }
    }

    /**
     * Test method for {@link Matrix4#toRowMajorArray()}.
     */
    @Test
    public void testToRowMajorArray() {

        final Tuple4<Float> i = new Tuple4<>(1, 5, 9, 13, Float.class);
        final Tuple4<Float> j = new Tuple4<>(2, 6, 10, 14, Float.class);
        final Tuple4<Float> k = new Tuple4<>(3, 7, 11, 15, Float.class);
        final Tuple4<Float> s = new Tuple4<>(4, 8, 12, 16, Float.class);

        final Matrix4<Float> testMatrix = new Matrix4<>(i, j, k, s, Float.class);

        final Float[] expecteds = {1f, 2f, 3f, 4f, 5f, 6f, 7f, 8f, 9f, 10f,
                11f, 12f, 13f, 14f, 15f, 16f};

        this.assertArrayEquals(expecteds, testMatrix.toRowMajorArray());
    }

    /**
     * Test method for {@link Matrix4#transpose()}.
     */
    @Test
    public void testTranspose() {

        final Tuple4<Float> i = new Tuple4<>(1, 2, 3, 4, Float.class);
        final Tuple4<Float> j = new Tuple4<>(5, 6, 7, 8, Float.class);
        final Tuple4<Float> k = new Tuple4<>(9, 10, 11, 12, Float.class);
        final Tuple4<Float> s = new Tuple4<>(13, 14, 15, 16, Float.class);

        final Tuple4<Float> i1 = new Tuple4<>(1, 5, 9, 13, Float.class);
        final Tuple4<Float> j1 = new Tuple4<>(2, 6, 10, 14, Float.class);
        final Tuple4<Float> k1 = new Tuple4<>(3, 7, 11, 15, Float.class);
        final Tuple4<Float> s1 = new Tuple4<>(4, 8, 12, 16, Float.class);

        final Matrix4<Float> testMatrix = new Matrix4<>(i, j, k, s, Float.class);
        final Matrix4<Float> expected = new Matrix4<>(i1, j1, k1, s1,
                Float.class);

        Assert.assertEquals(expected, testMatrix.transpose());

    }

    /**
     * Test method for {@link Matrix4#toString()}.
     */
    @Test
    public void testToString() {

        final Tuple4<Float> i = new Tuple4<>(1, 5, 9, 13, Float.class);
        final Tuple4<Float> j = new Tuple4<>(2, 6, 10, 14, Float.class);
        final Tuple4<Float> k = new Tuple4<>(3, 7, 11, 15, Float.class);
        final Tuple4<Float> s = new Tuple4<>(4, 8, 12, 16, Float.class);

        final Matrix4<Float> testMatrix = new Matrix4<>(i, j, k, s, Float.class);

        StringBuilder returnValue = new StringBuilder("\n|");
        final Float[] array = testMatrix.toRowMajorArray();

        for (int v = 0; v < 16; v++) {
            if ((v > 0) && ((v % 4) == 0)) {
                returnValue.append("\t\t|\n|");
            }
            returnValue.append("\t\t").append(String.format("%.3f", array[v]));
        }

        returnValue.append("\t\t|\n");

        Assert.assertEquals(returnValue.toString(), testMatrix.toString());
    }

    /**
     * Test method for {@link Matrix4#equals(Object)}.
     */
    @SuppressWarnings("EqualsBetweenInconvertibleTypes")
    @Test
    public void testEqualsObject() {

        for (float ux = -1; org.jutility.common.datatype.util.NumberComparator
                .smallerOrEqual(ux, 1f); ux += 0.1) {
            for (float uy = -1; org.jutility.common.datatype.util.NumberComparator
                    .smallerOrEqual(uy, 1f); uy += 0.1) {
                for (float uz = -1; org.jutility.common.datatype.util.NumberComparator
                        .smallerOrEqual(uz, 1f); uz += 0.1) {
                    for (float uw = -1; org.jutility.common.datatype.util.NumberComparator
                            .smallerOrEqual(uw, 1f); uw += 0.1) {

                        final Tuple4<Float> testTuple = new Tuple4<>(ux, uy, uz,
                                uw, Float.class);
                        final Tuple4<Float> testTuple2 = new Tuple4<>(ux + 1, uy, uz, uw, Float.class);
                        final Matrix4<Float> testMatrix = new Matrix4<>(
                                testTuple, testTuple, testTuple, testTuple,
                                Float.class);
                        final Matrix4<Float> notTestMatrix = new Matrix4<>(
                                testTuple2, testTuple, testTuple, testTuple,
                                Float.class);

                        Assert.assertEquals(testMatrix, testMatrix);
                        Assert.assertFalse(testMatrix.equals(notTestMatrix));
                        Assert.assertFalse(testMatrix.equals(5));
                        Assert.assertFalse(testMatrix.equals(null));
                    }
                }
            }
        }
    }

    /**
     * Test method for {@link Matrix4#hashCode()}.
     */
    @Test
    public void testHashCode() {

        final Tuple4<Float> i = new Tuple4<>(1, 5, 9, 13, Float.class);
        final Tuple4<Float> j = new Tuple4<>(2, 6, 10, 14, Float.class);
        final Tuple4<Float> k = new Tuple4<>(3, 7, 11, 15, Float.class);
        final Tuple4<Float> s = new Tuple4<>(4, 8, 12, 16, Float.class);

        final Matrix4<Float> testMatrix = new Matrix4<>(i, j, k, s, Float.class);

        int hashCode = 23;

        hashCode += 29 * i.hashCode();
        hashCode += 31 * j.hashCode();
        hashCode += 37 * k.hashCode();
        hashCode += 39 * s.hashCode();

        Assert.assertEquals(hashCode, testMatrix.hashCode());
    }
}


text:
using System;
using System.Linq;
using Microsoft.Azure;
using Microsoft.AzureStack.Management;

namespace Microsoft.AzureStack.Management
{
    public partial interface IAzureStackClient : IDisposable
    {
        /// <summary>
        /// Your documentation here.
        /// </summary>
        string ApiVersion
        {
            get; set;
        }

        /// <summary>
        /// Your documentation here.
        /// </summary>
        Uri BaseUri
        {
            get; set;
        }

        /// <summary>
        /// Your documentation here.
        /// </summary>
        SubscriptionCloudCredentials Credentials
        {
            get; set;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        ICloudOperations Clouds
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        ICurationOperations Curation
        {
            get;
        }

        /// <summary>
        /// Operations for delegated offers.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IDelegatedOfferOperations DelegatedOffers
        {
            get;
        }

        /// <summary>
        /// Operations for delegated provider configuration.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IDelegatedProviderConfigurationOperations DelegatedProviderConfiguration
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IEventTypesOperations EventTypes
        {
            get;
        }

        /// <summary>
        /// Operations for extensions metadata.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IExtensionMetadataOperations ExtensionsMetadata
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IGalleryItemOperations GalleryItem
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IImportedSubscriptionOperations ImportedSubscriptions
        {
            get;
        }

        /// <summary>
        /// Managed locations operations for admin.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IManagedLocationOperations ManagedLocations
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IManagedOfferOperations ManagedOffers
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IManagedPlanOperations ManagedPlans
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IManagedSubscriptionOperations ManagedSubscriptions
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IOfferOperations Offers
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IPackageOperations Package
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IPlanOperations Plans
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IProviderRegistrationOperations ProviderRegistrations
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IPublicGalleryItemOperations PublicGalleryItem
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IResourceGroupOperations ResourceGroups
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IResourceOperations Resources
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IResourceProviderOperations ResourceProviders
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        IShallowResourceOperations ShallowResources
        {
            get;
        }

        /// <summary>
        /// Your documentation here.  (see
        /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXX.aspx for
        /// more information)
        /// </summary>
        ISubscriptionOperations Subscriptions
        {
            get;
        }
    }
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
J. New York Bot. Gard. 12:267. 1911

#### Original name
null

### Remarks
null


text:
package me.chanjar.weixin.cp.api;

import com.google.inject.Inject;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.cp.bean.WxCpMessage;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;

/***
 * 测试发送消息
 * @author Daniel Qian
 *
 */
@Test(groups="customMessageAPI", dependsOnGroups = "baseAPI")
@Guice(modules = ApiTestModule.class)
public class WxCpMessageAPITest {

  @Inject
  protected WxCpServiceImpl wxService;

  public void testSendCustomMessage() throws WxErrorException {
    ApiTestModule.WxXmlCpInMemoryConfigStorage configStorage = (ApiTestModule.WxXmlCpInMemoryConfigStorage) wxService.wxCpConfigStorage;
    WxCpMessage message1 = new WxCpMessage();
    message1.setAgentId(configStorage.getAgentId());
    message1.setMsgType(WxConsts.CUSTOM_MSG_TEXT);
    message1.setToUser(configStorage.getUserId());
    message1.setContent("欢迎欢迎,热烈欢迎\n换行测试\n超链接:Hello World");
    wxService.messageSend(message1);

    WxCpMessage message2 = WxCpMessage
        .TEXT()
        .agentId(configStorage.getAgentId())
        .toUser(configStorage.getUserId())
        .content("欢迎欢迎,热烈欢迎\n换行测试\n超链接:Hello World")
        .build();
    wxService.messageSend(message2);

  }

}


text:
angular.module('myApp.about', ['ui.router'])

    .config(function ($stateProvider) {
        //$stateProvider
        //    .state('app.about', {
        //        url: '/about',
        //        templateUrl: 'views/ui/about/about.html',
        //        controller: 'AboutCtrl'
        //    });
    })

    .controller('AboutCtrl', function () {

    });


text:
<form model="conv.bal" title="Import unpaid sales invoices">
    <field name="file" required="1"/>
    <field name="date_fmt" required="1"/>
    <foot>
        <button string="Import" method="import_sale_file" type="primary"/>
    </foot>
</form>


text:
import { pick } from 'lodash';
import { ChartProps } from '@superset-ui/core';
import { HookProps, FormDataProps } from '../components/Line/Line';

export default function transformProps(chartProps: ChartProps) {
  const { width, height, queriesData } = chartProps;
  const { data } = queriesData[0];
  const formData = chartProps.formData as FormDataProps;
  const hooks = chartProps.hooks as HookProps;

  /**
   * Use type-check to make sure the field names are expected ones
   * and only pick these fields to pass to the chart.
   */
  const fieldsFromFormData: (keyof FormDataProps)[] = [
    'encoding',
    'margin',
    'theme',
  ];

  const fieldsFromHooks: (keyof HookProps)[] = [
    'TooltipRenderer',
    'LegendRenderer',
    'LegendGroupRenderer',
    'LegendItemRenderer',
    'LegendItemMarkRenderer',
    'LegendItemLabelRenderer',
  ];

  return {
    data,
    width,
    height,
    ...pick(formData, fieldsFromFormData),
    ...pick(hooks, fieldsFromHooks),
  };
}


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".ui.MainActivity"
        >

    <android.support.design.widget.AppBarLayout
            android:theme="@style/AppTheme.AppBarOverlay"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            >

        <include
                layout="@layout/toolbar_actionbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_scrollFlags="scroll|enterAlways"
                />

        <android.support.design.widget.TabLayout
                android:id="@+id/tabs"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                />

    </android.support.design.widget.AppBarLayout>

    <android.support.v4.view.ViewPager
            android:id="@+id/pager"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            />

</android.support.design.widget.CoordinatorLayout>


text:
* [Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh)
* [Material Shell](https://github.com/carloscuesta/materialshell)
* [Virtualenv](https://virtualenv.pypa.io/en/stable/)
* [nvm](https://github.com/creationix/nvm)
* [thefuck](https://github.com/nvbn/thefuck)

## Softwares
* [VS Code](https://code.visualstudio.com/)


text:
package com.badlogic.gdx.tests;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.Texture.TextureFilter;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.utils.Align;
import com.badlogic.gdx.tests.utils.GdxTest;

public class LabelTest extends GdxTest {
	Skin skin;
	Stage stage;
	SpriteBatch batch;
	Actor root;
	ShapeRenderer renderer;

	@Override
	public void create () {
		batch = new SpriteBatch();
		renderer = new ShapeRenderer();
		skin = new Skin(Gdx.files.internal("data/uiskin.json"));
		skin.getAtlas().getTextures().iterator().next().setFilter(TextureFilter.Nearest, TextureFilter.Nearest);
		stage = new Stage(0, 0, false);
		Gdx.input.setInputProcessor(stage);

		Table table = new Table();
		stage.addActor(table);
		table.setPosition(200, 65);

		table.debug();
		table.add(new Label("This is regular text.", skin));
		table.row();
		table.add(new Label("This is regular text\nwith a newline.", skin));
		table.row();
		Label label3 = new Label("This is regular text\n\nwith newlines,\naligned bottom, right.", skin);
		label3.setAlignment(Align.bottom | Align.right);
		table.add(label3).minWidth(200).minHeight(110).fill();
		table.row();
		Label label4 = new Label("This is regular text with NO newlines, wrap enabled and aligned bottom, right.", skin);
		label4.setWrap(true);
		label4.setAlignment(Align.bottom | Align.right);
		table.add(label4).minWidth(200).minHeight(110).fill();
		table.row();
		Label label5 = new Label("This is regular text with\n\nnewlines, wrap\nenabled and aligned bottom, right.", skin);
		label5.setWrap(true);
		label5.setAlignment(Align.bottom | Align.right);
		table.add(label5).minWidth(200).minHeight(110).fill();

		table.pack();
	}

	@Override
	public void dispose () {
		stage.dispose();
		skin.dispose();
	}

	@Override
	public void render () {
		Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1);
		Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);

		stage.act(Math.min(Gdx.graphics.getDeltaTime(), 1 / 30f));
		stage.draw();
		Table.drawDebug(stage);

		float x = 40, y = 40;

		BitmapFont font = skin.getFont("default-font");
		batch.begin();
		font.draw(batch, "The quick brown fox jumped over the lazy cow.", x, y);
		batch.end();

		drawLine(x, y - font.getDescent(), x + 1000, y - font.getDescent());
		drawLine(x, y - font.getCapHeight() + font.getDescent(), x + 1000, y - font.getCapHeight() + font.getDescent());
	}

	public void drawLine (float x1, float y1, float x2, float y2) {
		renderer.setProjectionMatrix(batch.getProjectionMatrix());
		renderer.begin(ShapeType.Line);
		renderer.line(x1, y1, x2, y2);
		renderer.end();
	}

	@Override
	public void resize (int width, int height) {
		stage.setViewport(width, height, false);
	}

	@Override
	public boolean needsGL20 () {
		return false;
	}
}