text:
<!DOCTYPE html>

		<meta charset="utf-8">
		<title>Log Search</title>
		<meta name="description" content="description">
		<meta name="author" content="Evgeniya">
		<meta name="keyword" content="keywords">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link href="libs/bower/bootstrap/bootstrap.css" rel="stylesheet">
		<link href="libs/other/font-awesome/css/font-awesome.min.css" rel="stylesheet">

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

Log Search

						<form id="login_form" name ="login_form" role="form" action='/login'>

Ambari Log Search

								  	Error! Invalid User credentials.
 Please try again.

								Username
								<input type="text" class="form-control custTxtInput" id="username" name="username" required="true" />

								Password
								<input type="password" class="form-control custTxtInput" id="password" name="password" required="true"/>

								<input name="submit" type="submit" class="btn btn-success custLogin" value="Sign In"/>

							</form>


text:
<Template name="ticket_card">

            {{> UI.dynamic template=cardTypeTemplate data=ticket }}

        {{#if hasContent }}

        {{/if}}

    {{#if hasContent }}

          {{> Template.contentBlock }}

    {{/if}}
</Template>

redpajama_set_name: RedPajamaGithub


text:
/**
 */
package CIM15.IEC61970.Informative.InfLoadControl;

import org.eclipse.emf.ecore.EClass;

/**
 *
 * A representation of the model object 'Load Limit Function'.
 *
 *
 *

 * The following features are supported:
 *

 *
{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getDisconnectTimeDelay Disconnect Time Delay}

 *
{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#isIsAutoReconOp Is Auto Recon Op}

 *
{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getReconnectTimeDelay Reconnect Time Delay}

 *
{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getMaximumLoad Maximum Load}

 *

 *

 *
 * @generated
 */
public class LoadLimitFunction extends LoadMgmtFunction {
	/**
	 * The default value of the '{@link #getDisconnectTimeDelay() Disconnect Time Delay}' attribute.
	 *
	 *
	 * @see #getDisconnectTimeDelay()
	 * @generated
	 * @ordered
	 */
	protected static final float DISCONNECT_TIME_DELAY_EDEFAULT = 0.0F;

	/**
	 * The cached value of the '{@link #getDisconnectTimeDelay() Disconnect Time Delay}' attribute.
	 *
	 *
	 * @see #getDisconnectTimeDelay()
	 * @generated
	 * @ordered
	 */
	protected float disconnectTimeDelay = DISCONNECT_TIME_DELAY_EDEFAULT;

	/**
	 * This is true if the Disconnect Time Delay attribute has been set.
	 *
	 *
	 * @generated
	 * @ordered
	 */
	protected boolean disconnectTimeDelayESet;

	/**
	 * The default value of the '{@link #isIsAutoReconOp() Is Auto Recon Op}' attribute.
	 *
	 *
	 * @see #isIsAutoReconOp()
	 * @generated
	 * @ordered
	 */
	protected static final boolean IS_AUTO_RECON_OP_EDEFAULT = false;

	/**
	 * The cached value of the '{@link #isIsAutoReconOp() Is Auto Recon Op}' attribute.
	 *
	 *
	 * @see #isIsAutoReconOp()
	 * @generated
	 * @ordered
	 */
	protected boolean isAutoReconOp = IS_AUTO_RECON_OP_EDEFAULT;

	/**
	 * This is true if the Is Auto Recon Op attribute has been set.
	 *
	 *
	 * @generated
	 * @ordered
	 */
	protected boolean isAutoReconOpESet;

	/**
	 * The default value of the '{@link #getReconnectTimeDelay() Reconnect Time Delay}' attribute.
	 *
	 *
	 * @see #getReconnectTimeDelay()
	 * @generated
	 * @ordered
	 */
	protected static final float RECONNECT_TIME_DELAY_EDEFAULT = 0.0F;

	/**
	 * The cached value of the '{@link #getReconnectTimeDelay() Reconnect Time Delay}' attribute.
	 *
	 *
	 * @see #getReconnectTimeDelay()
	 * @generated
	 * @ordered
	 */
	protected float reconnectTimeDelay = RECONNECT_TIME_DELAY_EDEFAULT;

	/**
	 * This is true if the Reconnect Time Delay attribute has been set.
	 *
	 *
	 * @generated
	 * @ordered
	 */
	protected boolean reconnectTimeDelayESet;

	/**
	 * The default value of the '{@link #getMaximumLoad() Maximum Load}' attribute.
	 *
	 *
	 * @see #getMaximumLoad()
	 * @generated
	 * @ordered
	 */
	protected static final float MAXIMUM_LOAD_EDEFAULT = 0.0F;

	/**
	 * The cached value of the '{@link #getMaximumLoad() Maximum Load}' attribute.
	 *
	 *
	 * @see #getMaximumLoad()
	 * @generated
	 * @ordered
	 */
	protected float maximumLoad = MAXIMUM_LOAD_EDEFAULT;

	/**
	 * This is true if the Maximum Load attribute has been set.
	 *
	 *
	 * @generated
	 * @ordered
	 */
	protected boolean maximumLoadESet;

	/**
	 *
	 *
	 * @generated
	 */
	protected LoadLimitFunction() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return InfLoadControlPackage.Literals.LOAD_LIMIT_FUNCTION;
	}

	/**
	 * Returns the value of the 'Disconnect Time Delay' attribute.
	 *
	 *

	 * If the meaning of the 'Disconnect Time Delay' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Disconnect Time Delay' attribute.
	 * @see #isSetDisconnectTimeDelay()
	 * @see #unsetDisconnectTimeDelay()
	 * @see #setDisconnectTimeDelay(float)
	 * @generated
	 */
	public float getDisconnectTimeDelay() {
		return disconnectTimeDelay;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getDisconnectTimeDelay Disconnect Time Delay}' attribute.
	 *
	 *
	 * @param value the new value of the 'Disconnect Time Delay' attribute.
	 * @see #isSetDisconnectTimeDelay()
	 * @see #unsetDisconnectTimeDelay()
	 * @see #getDisconnectTimeDelay()
	 * @generated
	 */
	public void setDisconnectTimeDelay(float newDisconnectTimeDelay) {
		disconnectTimeDelay = newDisconnectTimeDelay;
		disconnectTimeDelayESet = true;
	}

	/**
	 * Unsets the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getDisconnectTimeDelay Disconnect Time Delay}' attribute.
	 *
	 *
	 * @see #isSetDisconnectTimeDelay()
	 * @see #getDisconnectTimeDelay()
	 * @see #setDisconnectTimeDelay(float)
	 * @generated
	 */
	public void unsetDisconnectTimeDelay() {
		disconnectTimeDelay = DISCONNECT_TIME_DELAY_EDEFAULT;
		disconnectTimeDelayESet = false;
	}

	/**
	 * Returns whether the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getDisconnectTimeDelay Disconnect Time Delay}' attribute is set.
	 *
	 *
	 * @return whether the value of the 'Disconnect Time Delay' attribute is set.
	 * @see #unsetDisconnectTimeDelay()
	 * @see #getDisconnectTimeDelay()
	 * @see #setDisconnectTimeDelay(float)
	 * @generated
	 */
	public boolean isSetDisconnectTimeDelay() {
		return disconnectTimeDelayESet;
	}

	/**
	 * Returns the value of the 'Is Auto Recon Op' attribute.
	 *
	 *

	 * If the meaning of the 'Is Auto Recon Op' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Is Auto Recon Op' attribute.
	 * @see #isSetIsAutoReconOp()
	 * @see #unsetIsAutoReconOp()
	 * @see #setIsAutoReconOp(boolean)
	 * @generated
	 */
	public boolean isIsAutoReconOp() {
		return isAutoReconOp;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#isIsAutoReconOp Is Auto Recon Op}' attribute.
	 *
	 *
	 * @param value the new value of the 'Is Auto Recon Op' attribute.
	 * @see #isSetIsAutoReconOp()
	 * @see #unsetIsAutoReconOp()
	 * @see #isIsAutoReconOp()
	 * @generated
	 */
	public void setIsAutoReconOp(boolean newIsAutoReconOp) {
		isAutoReconOp = newIsAutoReconOp;
		isAutoReconOpESet = true;
	}

	/**
	 * Unsets the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#isIsAutoReconOp Is Auto Recon Op}' attribute.
	 *
	 *
	 * @see #isSetIsAutoReconOp()
	 * @see #isIsAutoReconOp()
	 * @see #setIsAutoReconOp(boolean)
	 * @generated
	 */
	public void unsetIsAutoReconOp() {
		isAutoReconOp = IS_AUTO_RECON_OP_EDEFAULT;
		isAutoReconOpESet = false;
	}

	/**
	 * Returns whether the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#isIsAutoReconOp Is Auto Recon Op}' attribute is set.
	 *
	 *
	 * @return whether the value of the 'Is Auto Recon Op' attribute is set.
	 * @see #unsetIsAutoReconOp()
	 * @see #isIsAutoReconOp()
	 * @see #setIsAutoReconOp(boolean)
	 * @generated
	 */
	public boolean isSetIsAutoReconOp() {
		return isAutoReconOpESet;
	}

	/**
	 * Returns the value of the 'Reconnect Time Delay' attribute.
	 *
	 *

	 * If the meaning of the 'Reconnect Time Delay' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Reconnect Time Delay' attribute.
	 * @see #isSetReconnectTimeDelay()
	 * @see #unsetReconnectTimeDelay()
	 * @see #setReconnectTimeDelay(float)
	 * @generated
	 */
	public float getReconnectTimeDelay() {
		return reconnectTimeDelay;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getReconnectTimeDelay Reconnect Time Delay}' attribute.
	 *
	 *
	 * @param value the new value of the 'Reconnect Time Delay' attribute.
	 * @see #isSetReconnectTimeDelay()
	 * @see #unsetReconnectTimeDelay()
	 * @see #getReconnectTimeDelay()
	 * @generated
	 */
	public void setReconnectTimeDelay(float newReconnectTimeDelay) {
		reconnectTimeDelay = newReconnectTimeDelay;
		reconnectTimeDelayESet = true;
	}

	/**
	 * Unsets the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getReconnectTimeDelay Reconnect Time Delay}' attribute.
	 *
	 *
	 * @see #isSetReconnectTimeDelay()
	 * @see #getReconnectTimeDelay()
	 * @see #setReconnectTimeDelay(float)
	 * @generated
	 */
	public void unsetReconnectTimeDelay() {
		reconnectTimeDelay = RECONNECT_TIME_DELAY_EDEFAULT;
		reconnectTimeDelayESet = false;
	}

	/**
	 * Returns whether the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getReconnectTimeDelay Reconnect Time Delay}' attribute is set.
	 *
	 *
	 * @return whether the value of the 'Reconnect Time Delay' attribute is set.
	 * @see #unsetReconnectTimeDelay()
	 * @see #getReconnectTimeDelay()
	 * @see #setReconnectTimeDelay(float)
	 * @generated
	 */
	public boolean isSetReconnectTimeDelay() {
		return reconnectTimeDelayESet;
	}

	/**
	 * Returns the value of the 'Maximum Load' attribute.
	 *
	 *

	 * If the meaning of the 'Maximum Load' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Maximum Load' attribute.
	 * @see #isSetMaximumLoad()
	 * @see #unsetMaximumLoad()
	 * @see #setMaximumLoad(float)
	 * @generated
	 */
	public float getMaximumLoad() {
		return maximumLoad;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getMaximumLoad Maximum Load}' attribute.
	 *
	 *
	 * @param value the new value of the 'Maximum Load' attribute.
	 * @see #isSetMaximumLoad()
	 * @see #unsetMaximumLoad()
	 * @see #getMaximumLoad()
	 * @generated
	 */
	public void setMaximumLoad(float newMaximumLoad) {
		maximumLoad = newMaximumLoad;
		maximumLoadESet = true;
	}

	/**
	 * Unsets the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getMaximumLoad Maximum Load}' attribute.
	 *
	 *
	 * @see #isSetMaximumLoad()
	 * @see #getMaximumLoad()
	 * @see #setMaximumLoad(float)
	 * @generated
	 */
	public void unsetMaximumLoad() {
		maximumLoad = MAXIMUM_LOAD_EDEFAULT;
		maximumLoadESet = false;
	}

	/**
	 * Returns whether the value of the '{@link CIM15.IEC61970.Informative.InfLoadControl.LoadLimitFunction#getMaximumLoad Maximum Load}' attribute is set.
	 *
	 *
	 * @return whether the value of the 'Maximum Load' attribute is set.
	 * @see #unsetMaximumLoad()
	 * @see #getMaximumLoad()
	 * @see #setMaximumLoad(float)
	 * @generated
	 */
	public boolean isSetMaximumLoad() {
		return maximumLoadESet;
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__DISCONNECT_TIME_DELAY:
				return getDisconnectTimeDelay();
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__IS_AUTO_RECON_OP:
				return isIsAutoReconOp();
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__RECONNECT_TIME_DELAY:
				return getReconnectTimeDelay();
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__MAXIMUM_LOAD:
				return getMaximumLoad();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__DISCONNECT_TIME_DELAY:
				setDisconnectTimeDelay((Float)newValue);
				return;
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__IS_AUTO_RECON_OP:
				setIsAutoReconOp((Boolean)newValue);
				return;
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__RECONNECT_TIME_DELAY:
				setReconnectTimeDelay((Float)newValue);
				return;
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__MAXIMUM_LOAD:
				setMaximumLoad((Float)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__DISCONNECT_TIME_DELAY:
				unsetDisconnectTimeDelay();
				return;
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__IS_AUTO_RECON_OP:
				unsetIsAutoReconOp();
				return;
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__RECONNECT_TIME_DELAY:
				unsetReconnectTimeDelay();
				return;
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__MAXIMUM_LOAD:
				unsetMaximumLoad();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__DISCONNECT_TIME_DELAY:
				return isSetDisconnectTimeDelay();
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__IS_AUTO_RECON_OP:
				return isSetIsAutoReconOp();
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__RECONNECT_TIME_DELAY:
				return isSetReconnectTimeDelay();
			case InfLoadControlPackage.LOAD_LIMIT_FUNCTION__MAXIMUM_LOAD:
				return isSetMaximumLoad();
		}
		return super.eIsSet(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (disconnectTimeDelay: ");
		if (disconnectTimeDelayESet) result.append(disconnectTimeDelay); else result.append("<unset>");
		result.append(", isAutoReconOp: ");
		if (isAutoReconOpESet) result.append(isAutoReconOp); else result.append("<unset>");
		result.append(", reconnectTimeDelay: ");
		if (reconnectTimeDelayESet) result.append(reconnectTimeDelay); else result.append("<unset>");
		result.append(", maximumLoad: ");
		if (maximumLoadESet) result.append(maximumLoad); else result.append("<unset>");
		result.append(')');
		return result.toString();
	}

} // LoadLimitFunction


text:
using System;

namespace PrimeChecker
{
    class PrimeChecker
    {
        static void Main()
        {
            long number = long.Parse(Console.ReadLine());
            bool isPrime = IsPrime(number);
            Console.WriteLine(isPrime);
        }

        private static bool IsPrime(long number)
        {
            if (number == 0 || number == 1)
            {
                return false;
            }

            for (int i = 2; i <= Math.Sqrt(number); i++)
            {
                if (number % i == 0)
                {
                    return false;
                }
            }
            return true;
        }
    }
}


text:
namespace views {
class MenuItemView;
}

namespace ash {

class AppMenuModelAdapter;

// Handles adding/removing NotificationMenuView from the root MenuItemView,
// adding the container model entry, and updating the NotificationMenuView
// as notifications come and go.
class APP_MENU_EXPORT NotificationMenuController
    : public message_center::MessageCenterObserver,
      public views::SlideOutControllerDelegate,
      public NotificationMenuView::Delegate {
 public:
  NotificationMenuController(const std::string& app_id,
                             views::MenuItemView* root_menu,
                             AppMenuModelAdapter* app_menu_model_adapter);

  ~NotificationMenuController() override;

  // message_center::MessageCenterObserver overrides:
  void OnNotificationAdded(const std::string& notification_id) override;
  void OnNotificationUpdated(const std::string& notification_id) override;
  void OnNotificationRemoved(const std::string& notification_id,
                             bool by_user) override;

  // views::SlideOutControllerDelegate overrides:
  ui::Layer* GetSlideOutLayer() override;
  void OnSlideChanged(bool in_progress) override;
  void OnSlideOut() override;

  // NotificationMenuView::Delegate overrides:
  void OnOverflowAddedOrRemoved() override;
  void ActivateNotificationAndClose(
      const std::string& notification_id) override;

 private:
  // Adds a container MenuItemView to |root_menu_|, adds NOTIFICATION_CONTAINER
  // to |model_|, creates and initializes NotificationMenuView, and adds
  // NotificationMenuView to the container MenuItemView.
  void InitializeNotificationMenuView();

  // Identifies the application the menu is for.
  const std::string app_id_;

  // The top level MenuItemView. Owned by |AppMenuModelAdapter::menu_runner_|.
  views::MenuItemView* const root_menu_;

  // Manages showing the menu. Owned by the view requesting a menu.
  AppMenuModelAdapter* const app_menu_model_adapter_;

  // The view which shows all active notifications for |app_id_|. Owned by the
  // views hierarchy.
  NotificationMenuView* notification_menu_view_ = nullptr;

  ScopedObserver<message_center::MessageCenter,
                 message_center::MessageCenterObserver>
      message_center_observer_;

  DISALLOW_COPY_AND_ASSIGN(NotificationMenuController);
};

}  // namespace ash

#endif  // ASH_APP_MENU_NOTIFICATION_MENU_CONTROLLER_H_


text:
function nowPlaying([trackName, artistName, duration]) {
    let result = `Now Playing: ${artistName} - ${trackName} [${duration}]`

    console.log(result)
}

nowPlaying(['Number One', 'Nelly', '4:09'])
//Now Playing: Nelly – Number One [4:09]


text:
/**
 * Stores state for individual player instances.
 */

var Fluxxor = require('fluxxor');
var Immutable = require('immutable');

var events = require('../events');

var PlayerInstanceStore = Fluxxor.createStore({
    initialize: function() {
        this.instances = Immutable.Map();
        this.playHistory = Immutable.List();

        this.bindActions(
            events.player.audioInterface.TRACK_ERROR, this.emitChangeAfterTrackStore,
            events.player.audioInterface.TRACK_FINISHED, this.onTrackFinished,
            events.player.audioInterface.TRACK_LOAD_AMOUNT_CHANGED, this.emitChangeAfterTrackStore,
            events.player.audioInterface.TRACK_PLAY_POSITION_CHANGED, this.emitChangeAfterTrackStore,
            events.player.audioInterface.TRACK_PLAYING_CHANGED, this.emitChangeAfterTrackStore,
            events.player.audioInterface.TRACK_PLAY_START, this.onTrackPlayStart,
            events.player.audioInterface.TRACK_RESOLVED, this.onTrackResolved,
            events.player.audioInterface.TRACK_UPDATED, this.emitChangeAfterTrackStore,
            events.player.CONFIG_UPDATED, this.onConfigUpdated,
            events.player.CREATE, this.onPlayerUpdate,
            events.player.DESTROY, this.onPlayerDestroy,
            events.player.NEXT_TRACK, this.onPlayerNextTrack,
            events.player.PREVIOUS_TRACK, this.onPlayerPreviousTrack,
            events.player.track.SELECTED, this.onTrackSelected,
            events.player.track.TOGGLE_PAUSE, this.emitChangeAfterTrackStore,
            events.player.UPDATE, this.onPlayerUpdate
        );
    },
    emitChangeAfterTrackStore: function() {
        this.waitFor(['TrackStore'], function() {
            this.emit('change');
        });
    },
    getGlobalInstance: function() {
        return this.instances.find(function(player) {
            return player.get('global');
        });
    },
    getStateByID: function(id) {
        var TrackStore = this.flux.store('TrackStore');
        var instance = this.instances.get(id);
        var empty;
        var state;

        if(!instance) {
            return null;
        }

        empty = !instance.get('nowPlaying') && !instance.getIn(['tracks', 'size']);;

        if(instance) {
            state = instance.set('empty', empty);
        } else {
            state = Immutable.Map({
                loading: true
            });
        }

        return state;
    },
    addGlobalNowPlayingToPlayHistory: function() {
        var globalPlayer = this.getGlobalInstance();
        var globalNowPlaying = globalPlayer && globalPlayer.get('nowPlaying');
        var lastPlayed = this.playHistory.get(this.playHistory.size - 1);

        if(globalNowPlaying && globalNowPlaying !== lastPlayed) {
            this.playHistory = this.playHistory.push(globalNowPlaying);
        }
    },
    getNextTrackForInstance: function(instance, TrackStore, TrackQueueStore, previousAttemptedTrack) {
        var instanceTracks = instance.get('tracks');
        var nowPlayingID = instance.get('nowPlaying');
        var nowPlayingIndex = instanceTracks.indexOf(nowPlayingID);
        var getFromDefaultQueue = !TrackQueueStore.queue.get(0);
        var nextTrackID;
        var nextTrack;

        if(instance.get('repeat')) {
            nextTrackID = nowPlayingID;
        } else if(instance.get('playFromQueue')) {
            if(getFromDefaultQueue) {
                nextTrackID = TrackQueueStore.defaultQueue.get(0);
            } else {
                nextTrackID = TrackQueueStore.queue.get(0)
            }
        } else if(instanceTracks.get(nowPlayingIndex + 1)) {
            nextTrackID = instanceTracks.get(nowPlayingIndex + 1);
        } else {
            nextTrackID = null;
        }

        nextTrack = TrackStore.tracks.get(nextTrackID);

        if(nextTrack && nextTrack.get('error') && previousAttemptedTrack !== nextTrack) {
            if(getFromDefaultQueue) {
                TrackQueueStore.defaultQueue = TrackQueueStore.defaultQueue.splice(0, 1);
            } else {
                TrackQueueStore.queue = TrackQueueStore.queue.splice(0, 1);
            }

            return this.getNextTrackForInstance(instance, TrackStore, TrackQueueStore, nextTrack);
        } else {
            return nextTrackID || 'end';
        }
    },
    onConfigUpdated: function(payload) {
        this.instances = this.instances.map(function(instance) {
            return instance.merge(payload.config);
        });

        this.emit('change');
    },
    onPlayerUpdate: function(payload) {
        // Custom merger function which replaces arrays instead of concatenating them.
        function merger(a, b, key) {
            if(Immutable.List.isList(a) && Immutable.List.isList(b)) {
                return b;
            } else if(a && a.mergeDeepWith) {
                return a.mergeDeepWith(merger, b);
            } else {
                return b;
            }
        }

        this.instances = this.instances.mergeDeepWith(merger, Immutable.fromJS(payload.entities.players));

        this.instances = this.instances.mergeDeep(payload.entities.players);
        this.emit('change');
    },
    onPlayerDestroy: function(payload) {
        var destroyedInstance = this.instances.get(payload.playerID);
        this.waitFor(['TrackStore'], function(TrackStore) {
            var nowPlaying = destroyedInstance && TrackStore.tracks.get(destroyedInstance.get('nowPlaying'));
            var isPlayingInOtherPlayer = this.instances.some(function(instance) {
                return instance.get('nowPlaying') === nowPlaying;
            });

            // Kind of anti-fluxy here.
            if(nowPlaying && nowPlaying.sound && !isPlayingInOtherPlayer) {
                nowPlaying.sound.destroy();
            }

            this.instances = this.instances.delete(payload.playerID);
            this.emit('change');
        }.bind(this));
    },
    onPlayerNextTrack: function(payload) {
        var player = this.instances.get(payload.playerID);

        this.addGlobalNowPlayingToPlayHistory();

        this.waitFor(['TrackStore', 'TrackQueueStore'], function(TrackStore, TrackQueueStore) {
            var nextTrack = this.getNextTrackForInstance(player, TrackStore, TrackQueueStore);
            this.instances = this.instances.setIn([payload.playerID, 'nextTrack'], nextTrack);

            if(nextTrack === 'end') {
                ToneDen.player.emit('queue.finished');
            }

            this.emit('change');
        }.bind(this));
    },
    onPlayerPreviousTrack: function(payload) {
        var player = this.instances.get(payload.playerID);
        var nowPlaying = player.get('nowPlaying');
        var previousIndex = player.get('tracks').indexOf(nowPlaying) - 1;
        var nextTrack;

        this.waitFor(['TrackStore'], function() {
            if(player.get('global')) {
                nextTrack = this.playHistory.get(this.playHistory.size - 1);
                this.playHistory = this.playHistory.pop();
            } else {
                if(previousIndex < 0) {
                    nextTrack = nowPlaying;
                }

                nextTrack = this.instances.getIn([payload.playerID, 'tracks', previousIndex]);
            }

            this.instances = this.instances.setIn([payload.playerID, 'nextTrack'], nextTrack);
            this.emit('change');
        }.bind(this));
    },
    onTrackFinished: function(payload) {
        this.addGlobalNowPlayingToPlayHistory();

        this.waitFor(['TrackStore', 'TrackQueueStore'], function(TrackStore, TrackQueueStore) {
            this.instances = this.instances.map(function(player) {
                if(player.get('nowPlaying')) {
                    var nextTrack = this.getNextTrackForInstance(player, TrackStore, TrackQueueStore);
                    player = player.set('nextTrack', nextTrack);

                    if(nextTrack === 'end') {
                        ToneDen.player.emit('queue.finished');
                    }
                }

                return player;
            }.bind(this));

            this.emit('change');
        }.bind(this));
    },
    onTrackPlayStart: function(payload) {
        var trackID = payload.trackID;

        this.instances = this.instances.map(function(player) {
            if(player.get('global')) {
                player = player.set('nowPlaying', trackID);
            }

            return player;
        });

        this.emit('change');
    },
    onTrackResolved: function(payload) {
        var originalTrackID = payload.trackID;

        // Go through each player and replace the original track with the new array of tracks.
        this.instances = this.instances.map(function(player) {
            var playerTracks = player.get('tracks');
            var originalTrackIndex = playerTracks.indexOf(originalTrackID);

            if(playerTracks.contains(originalTrackID)) {
                var spliceArgs = [originalTrackIndex, 1].concat(payload.result);

                player = player.set('tracks', Immutable.List.prototype.splice.apply(playerTracks, spliceArgs));
            }

            if(player.get('nowPlaying') === originalTrackID) {
                player = player.set('nowPlaying', payload.result[0]);
            }

            return player;
        });

        this.waitFor(['TrackStore'], function() {
            this.emit('change');
        });
    },
    onTrackSelected: function(payload) {
        this.waitFor(['TrackStore'], function(TrackStore) {
            var selectedTrack = TrackStore.tracks.get(payload.result);

            if(selectedTrack.get('error')) {
                ToneDen.player.emit('track.error', selectedTrack.get('errorMessage'));
                return;
            }

            this.instances = this.instances.map(function(player) {
                if(player.get('tracks').contains(payload.result) || player.get('global')) {
                    player = player.set('nowPlaying', payload.result);
                }

                player = player.delete('nextTrack');

                return player;
            });

            this.emit('change');
        });
    }
});

module.exports = PlayerInstanceStore;


text:
<!-- Master layout. -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ForecastDetailFragment">

    <LinearLayout
        android:gravity="center_vertical"
        android:layout_gravity="start"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:orientation="vertical"
        android:padding="16dp">

        <!-- Header: Day, Date -->
        <TextView
            android:fontFamily="sans-serif-condensed"
            android:id="@+id/detail_day_textview"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:textColor="@color/black"
            android:textSize="@dimen/large_text" />

        <TextView
            android:fontFamily="sans-serif-condensed"
            android:id="@+id/detail_date_textview"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_marginTop="@dimen/margin_very_small"
            android:textColor="@color/grey_text"
            android:textSize="@dimen/big_text"/>

        <!-- Main content: high, low, art, weather state -->
        <LinearLayout
            android:gravity="center_horizontal"
            android:layout_height="match_parent"
            android:layout_marginTop="@dimen/activity_horizontal_margin"
            android:layout_width="match_parent"
            android:orientation="horizontal">

            <LinearLayout
                android:gravity="center_horizontal|top"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:orientation="vertical">

                <TextView
                    android:fontFamily="sans-serif"
                    android:id="@+id/detail_high_textview"
                    android:layout_height="wrap_content"
                    android:layout_width="wrap_content"
                    android:textSize="@dimen/detail_item_huge"
                    android:layout_marginStart="@dimen/horizontal_margin_medium"
                    android:textColor="@android:color/black" />

                <TextView
                    android:id="@+id/detail_low_textview"
                    android:layout_gravity="center_horizontal"
                    android:layout_height="wrap_content"
                    android:layout_width="wrap_content"
                    android:textSize="@dimen/detail_item_really_big"
                    android:fontFamily="sans-serif"
                    android:layout_marginStart="@dimen/horizontal_margin_small"
                    android:layout_marginTop="@dimen/fab_margin" />
            </LinearLayout>

            <LinearLayout
                android:gravity="center_horizontal"
                android:layout_gravity="center"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:orientation="vertical">

                <ImageView
                    android:id="@+id/detail_icon"
                    android:layout_width="wrap_content"
                    android:contentDescription="@string/detail_icon"
                    android:layout_height="wrap_content" />

                <TextView
                    android:id="@+id/detail_forecast_textview"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:fontFamily="sans-serif-condensed"
                    android:textColor="@color/grey_text"
                    android:textSize="@dimen/large_text" />

            </LinearLayout>
        </LinearLayout>

        <!-- Humidity, wind, pressure -->
        <LinearLayout
            android:layout_height="match_parent"
            android:layout_marginEnd="0dp"
            android:layout_marginTop="16dp"
            android:layout_width="match_parent"
            android:orientation="vertical">

            <TextView
                android:id="@+id/detail_humidity_textview"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="@color/dark_grey_text"
                android:layout_marginTop="@dimen/horizontal_margin_medium"
                android:textSize="@dimen/detail_item_big" />

            <TextView
                android:id="@+id/detail_pressure_textview"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="@color/dark_grey_text"
                android:layout_marginTop="@dimen/horizontal_margin_small"
                android:textSize="@dimen/detail_item_big" />

            <TextView
                android:id="@+id/detail_wind_textview"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="@color/dark_grey_text"
                android:layout_marginTop="@dimen/horizontal_margin_small"
                android:textSize="@dimen/detail_item_big" />

        </LinearLayout>
    </LinearLayout>

</ScrollView>


text:
CREATE TABLE `accounts` (
  `id` int(11) NOT NULL auto_increment,
  `firm_id` int(11) default NULL,
  `credit_limit` int(5) default NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `funny_jokes` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(50) default NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `companies` (
  `id` int(11) NOT NULL auto_increment,
  `type` varchar(50) default NULL,
  `ruby_type` varchar(50) default NULL,
  `firm_id` int(11) default NULL,
  `name` varchar(50) default NULL,
  `client_of` int(11) default NULL,
  `rating` int(11) default NULL default 1,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `topics` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(255) default NULL,
  `author_name` varchar(255) default NULL,
  `author_email_address` varchar(255) default NULL,
  `written_on` datetime default NULL,
  `bonus_time` time default NULL,
  `last_read` date default NULL,
  `content` text,
  `approved` tinyint(1) default 1,
  `replies_count` int(11) default 0,
  `parent_id` int(11) default NULL,
  `type` varchar(50) default NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `developers` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(100) default NULL,
  `salary` int(11) default 70000,
  `created_at` datetime default NULL,
  `updated_at` datetime default NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `projects` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(100) default NULL,
  `type` VARCHAR(255) default NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `developers_projects` (
  `developer_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL,
  `joined_on` date default NULL,
  `access_level` smallint default 1
) TYPE=InnoDB;

CREATE TABLE `orders` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(100) default NULL,
  `billing_customer_id` int(11) default NULL,
  `shipping_customer_id` int(11) default NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `customers` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(100) default NULL,
  `balance` int(6) default 0,
  `address_street` varchar(100) default NULL,
  `address_city` varchar(100) default NULL,
  `address_country` varchar(100) default NULL,
  `gps_location` varchar(100) default NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `movies` (
  `movieid` int(11) NOT NULL auto_increment,
  `name` varchar(100) default NULL,
   PRIMARY KEY  (`movieid`)
) TYPE=InnoDB;

CREATE TABLE `subscribers` (
  `nick` varchar(100) NOT NULL,
  `name` varchar(100) default NULL,
  PRIMARY KEY  (`nick`)
) TYPE=InnoDB;

CREATE TABLE `booleantests` (
  `id` int(11) NOT NULL auto_increment,
  `value` integer default NULL,
  PRIMARY KEY (`id`)
) TYPE=InnoDB;

CREATE TABLE `auto_id_tests` (
  `auto_id` int(11) NOT NULL auto_increment,
  `value` integer default NULL,
  PRIMARY KEY (`auto_id`)
) TYPE=InnoDB;

CREATE TABLE `entrants` (
  `id` INTEGER NOT NULL auto_increment PRIMARY KEY,
  `name` VARCHAR(255) NOT NULL,
  `course_id` INTEGER NOT NULL
);

CREATE TABLE `colnametests` (
  `id` int(11) NOT NULL auto_increment,
  `references` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) TYPE=InnoDB;

CREATE TABLE `mixins` (
  `id` int(11) NOT NULL auto_increment,
  `parent_id` int(11) default NULL,
  `pos` int(11) default NULL,
  `created_at` datetime default NULL,
  `updated_at` datetime default NULL,
  `lft` int(11) default NULL,
  `rgt` int(11) default NULL,
  `root_id` int(11) default NULL,
  `type` varchar(40) default NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `people` (
  `id` INTEGER NOT NULL auto_increment PRIMARY KEY,
  `first_name` VARCHAR(40) NOT NULL,
  `lock_version` INTEGER NOT NULL DEFAULT 0
) TYPE=InnoDB;

CREATE TABLE `readers` (
    `id` int(11) NOT NULL auto_increment PRIMARY KEY,
    `post_id` INTEGER NOT NULL,
    `person_id` INTEGER NOT NULL
) TYPE=InnoDB;

CREATE TABLE `binaries` (
  `id` int(11) NOT NULL auto_increment,
  `data` mediumblob,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `computers` (
  `id` INTEGER NOT NULL auto_increment PRIMARY KEY,
  `developer` INTEGER NOT NULL,
  `extendedWarranty` INTEGER NOT NULL
) TYPE=InnoDB;

CREATE TABLE `posts` (
  `id` INTEGER NOT NULL auto_increment PRIMARY KEY,
  `author_id` INTEGER,
  `title` VARCHAR(255) NOT NULL,
  `body` TEXT NOT NULL,
  `type` VARCHAR(255) NOT NULL
) TYPE=InnoDB;

CREATE TABLE `comments` (
  `id` INTEGER NOT NULL auto_increment PRIMARY KEY,
  `post_id` INTEGER NOT NULL,
  `body` TEXT NOT NULL,
  `type` VARCHAR(255) NOT NULL
) TYPE=InnoDB;

CREATE TABLE `authors` (
  `id` INTEGER NOT NULL auto_increment PRIMARY KEY,
  `name` VARCHAR(255) NOT NULL
) TYPE=InnoDB;

CREATE TABLE `tasks` (
  `id` int(11) NOT NULL auto_increment,
  `starting` datetime NOT NULL default '0000-00-00 00:00:00',
  `ending` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `categories` (
  `id` int(11) NOT NULL auto_increment,
  `name` VARCHAR(255) NOT NULL,
  `type` VARCHAR(255) NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;

CREATE TABLE `categories_posts` (
  `category_id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL
) TYPE=InnoDB;

CREATE TABLE `fk_test_has_pk` (
  `id` INTEGER NOT NULL auto_increment PRIMARY KEY
) TYPE=InnoDB;

CREATE TABLE `fk_test_has_fk` (
  `id`    INTEGER NOT NULL auto_increment PRIMARY KEY,
  `fk_id` INTEGER NOT NULL,

  FOREIGN KEY (`fk_id`) REFERENCES `fk_test_has_pk`(`id`)
) TYPE=InnoDB;

CREATE TABLE `keyboards` (
  `key_number` int(11) NOT NULL auto_increment primary key,
  `name` varchar(50) default NULL
);

<<<<<<< .mine
CREATE TABLE `enumerations` (
  `id` INTEGER NOT NULL auto_increment PRIMARY KEY,
  `severity` enum('low', 'medium', 'high', 'critical') DEFAULT 'medium',
  `color`    enum('red', 'blue', 'green', 'yellow'),
  `string_field` varchar(8) NOT NULL,
  `int_field`    int(11)
) TYPE=InnoDB;

--Altered lock_version column name.
=======
-- Altered lock_version column name.
>>>>>>> .r3595
CREATE TABLE `legacy_things` (
  `id` int(11) NOT NULL auto_increment,
  `tps_report_number` int(11) default NULL,
  `version` int(11) NOT NULL default 0,
  PRIMARY KEY  (`id`)
) TYPE=InnoDB;
<<<<<<< .mine

=======

CREATE TABLE `numeric_data` (
  `id` INTEGER NOT NULL auto_increment PRIMARY KEY,
  `bank_balance` decimal(10,2),
  `big_bank_balance` decimal(15,2),
  `world_population` decimal(10),
  `my_house_population` decimal(2),
  `decimal_number_with_default` decimal(3,2) DEFAULT 2.78
) TYPE=InnoDB;
>>>>>>> .r4885


text:
<?php

/**
 * XmlConnect device helper for Android
 *
 * @category    Mage
 * @package     Mage_XmlConnect
 * @author      Magento Core Team <core@magentocommerce.com>
 */
class Mage_XmlConnect_Helper_Android extends Mage_Core_Helper_Abstract
{
    /**
     * Submission title length
     */
    const SUBMISSION_TITLE_LENGTH = 30;

    /**
     * Submission description length
     */
    const SUBMISSION_DESCRIPTION_LENGTH = 4000;

    /**
     * Android preview banner widht
     */
    const PREVIEW_BANNER_WIDTH = 320;

    /**
     * Android preview banner image height
     */
    const PREVIEW_BANNER_HEIGHT = 258;

    /**
     * Tags identifier for title bar
     */
    const TAGS_ID_FOR_TITLE_BAR = 1;

    /**
     * Tags identifier for options menu
     */
    const TAGS_ID_FOR_OPTION_MENU = 2;

    /**
     * Country renderer for submission
     */
    const SUBMISSION_COUNTRY_RENDERER = 'androidmarket';

    /**
     * Country columns for submission
     */
    const SUBMISSION_COUNTRY_COLUMNS = 2;

    /**
     * Submit images that are stored in "params" field of history table
     *
     * @var array
     */
    protected $_imageIds = array('icon', 'android_loader_image', 'android_logo', 'big_logo');

    /**
     * Country field renderer
     *
     * @var Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Renderer_Country_Androidmarket
     */
    protected $_countryRenderer = null;

    /**
     * List of coutries that allowed in Ituens by Apple Store
     *
     * array(
     *      'country name' => 'country id at directory model'
     * )
     *
     * @var array
     */
    protected $_allowedCountries = array(
        'Argentina' => 'AR',
        'Australia' => 'AU',
        'Austria'   => 'AT',
        'Belgium'   => 'BE',
        'Brazil'    =>'BR',
        'Canada'    => 'CA',
        'Denmark'   => 'DK',
        'Finland'   => 'FI',
        'France'    => 'FR',
        'Germany'   => 'DE',
        'Hong Kong SAR China' => 'HK',
        'Ireland'   => 'IE',
        'Israel'    => 'IL',
        'Italy'     => 'IT',
        'Japan'     => 'JP',
        'Mexico'    => 'MX',
        'Netherlands' => 'NL',
        'New Zealand' => 'NZ',
        'Norway'    => 'NO',
        'Portugal'  => 'PT',
        'Russia'    => 'RU',
        'Singapore' => 'SG',
        'Spain'     => 'ES',
        'South Korea' => 'KR',
        'Sweden'    => 'SE',
        'Switzerland' => 'CH',
        'Taiwan'    => 'TW',
        'United Kingdom' => 'GB',
        'United States' => 'US',
    );

    /**
     * Get submit images that are required for application submit
     *
     * @return array
     */
    public function getSubmitImages()
    {
        return $this->_imageIds;
    }

    /**
     * Get default application tabs
     *
     * @return array
     */
    public function getDefaultDesignTabs()
    {
        if (!isset($this->_tabs)) {
            $this->_tabs = array(
                array(
                    'label' => Mage::helper('xmlconnect')->__('Home'),
                    'image' => 'tab_home_android.png',
                    'action' => 'Home',
                    'menu' => self::TAGS_ID_FOR_TITLE_BAR,
                ),
                array(
                    'label' => Mage::helper('xmlconnect')->__('Search'),
                    'image' => 'tab_search_android.png',
                    'action' => 'Search',
                    'menu' => self::TAGS_ID_FOR_TITLE_BAR,
                ),
                array(
                    'label' => Mage::helper('xmlconnect')->__('Account'),
                    'image' => 'tab_account_android.png',
                    'action' => 'Account',
                    'menu' => self::TAGS_ID_FOR_TITLE_BAR,
                ),
                array(
                    'label' => Mage::helper('xmlconnect')->__('Shop'),
                    'image' => 'tab_shop_android.png',
                    'action' => 'Shop',
                    'menu' => self::TAGS_ID_FOR_OPTION_MENU,
                ),
                array(
                    'label' => Mage::helper('xmlconnect')->__('Cart'),
                    'image' => 'tab_cart_android.png',
                    'action' => 'Cart',
                    'menu' => self::TAGS_ID_FOR_OPTION_MENU,
                ),
                array(
                    'label' => Mage::helper('xmlconnect')->__('More Info'),
                    'image' => 'tab_info_android.png',
                    'action' => 'AboutUs',
                    'menu' => self::TAGS_ID_FOR_OPTION_MENU,
                ),
            );
        }
        return $this->_tabs;
    }

    /**
     * Default application configuration
     *
     * @return array
     */
     public function getDefaultConfiguration()
     {
         return array(
             'native' => array(
                 'body' => array(
                     'backgroundColor' => '#ABABAB',
                     'scrollBackgroundColor' => '#EDEDED',
                 ),
                 'itemActions' => array(
                     'relatedProductBackgroundColor' => '#404040',
                 ),
                 'fonts' => array(
                     'Title1' => array(
                         'name' => 'HelveticaNeue-Bold',
                         'size' => '14',
                         'color' => '#FEFEFE',
                     ),
                     'Title2' => array(
                         'name' => 'HelveticaNeue-Bold',
                         'size' => '12',
                         'color' => '#222222',
                     ),
                     'Title3' => array(
                         'name' => 'HelveticaNeue',
                         'size' => '13',
                         'color' => '#000000',
                     ),
                     'Title4' => array(
                         'name' => 'HelveticaNeue',
                         'size' => '12',
                         'color' => '#FFFFFF',
                     ),
                     'Title5' => array(
                         'name' => 'HelveticaNeue-Bold',
                         'size' => '13',
                         'color' => '#dc5f02',
                     ),
                     'Title6' => array(
                         'name' => 'HelveticaNeue-Bold',
                         'size' => '16',
                         'color' => '#222222',
                     ),
                     'Title7' => array(
                         'name' => 'HelveticaNeue-Bold',
                         'size' => '13',
                         'color' => '#000000',
                     ),
                     'Title8' => array(
                         'name' => 'HelveticaNeue-Bold',
                         'size' => '11',
                         'color' => '#FFFFFF',
                     ),
                     'Title9' => array(
                         'name' => 'HelveticaNeue-Bold',
                         'size' => '12',
                         'color' => '#FFFFFF',
                     ),
                     'Text1' => array(
                         'name' => 'HelveticaNeue-Bold',
                         'size' => '12',
                         'color' => '#777777',
                     ),
                     'Text2' => array(
                         'name' => 'HelveticaNeue',
                         'size' => '10',
                         'color' => '#555555',
                     ),
                 ),
             ),
         );
     }

    /**
     * List of allowed fonts for Android application
     *
     * @return array
     */
    public function getFontList()
    {
        return array(
            array(
                'value' => 'HiraKakuProN-W3',
                'label' => 'HiraKakuProN-W3',
            ),
            array(
                'value' => 'Courier',
                'label' => 'Courier',
            ),
            array(
                'value' => 'Courier-BoldOblique',
                'label' => 'Courier-BoldOblique',
            ),
            array(
                'value' => 'Courier-Oblique',
                'label' => 'Courier-Oblique',
            ),
            array(
                'value' => 'Courier-Bold',
                'label' => 'Courier-Bold',
            ),
            array(
                'value' => 'ArialMT',
                'label' => 'ArialMT',
            ),
            array(
                'value' => 'Arial-BoldMT',
                'label' => 'Arial-BoldMT',
            ),
            array(
                'value' => 'Arial-BoldItalicMT',
                'label' => 'Arial-BoldItalicMT',
            ),
            array(
                'value' => 'Arial-ItalicMT',
                'label' => 'Arial-ItalicMT',
            ),
            array(
                'value' => 'STHeitiTC-Light',
                'label' => 'STHeitiTC-Light',
            ),
            array(
                'value' => 'STHeitiTC-Medium',
                'label' => 'STHeitiTC-Medium',
            ),
            array(
                'value' => 'AppleGothic',
                'label' => 'AppleGothic',
            ),
            array(
                'value' => 'CourierNewPS-BoldMT',
                'label' => 'CourierNewPS-BoldMT',
            ),
            array(
                'value' => 'CourierNewPS-ItalicMT',
                'label' => 'CourierNewPS-ItalicMT',
            ),
            array(
                'value' => 'CourierNewPS-BoldItalicMT',
                'label' => 'CourierNewPS-BoldItalicMT',
            ),
            array(
                'value' => 'CourierNewPSMT',
                'label' => 'CourierNewPSMT',
            ),
            array(
                'value' => 'Zapfino',
                'label' => 'Zapfino',
            ),
            array(
                'value' => 'HiraKakuProN-W6',
                'label' => 'HiraKakuProN-W6',
            ),
            array(
                'value' => 'ArialUnicodeMS',
                'label' => 'ArialUnicodeMS',
            ),
            array(
                'value' => 'STHeitiSC-Medium',
                'label' => 'STHeitiSC-Medium',
            ),
            array(
                'value' => 'STHeitiSC-Light',
                'label' => 'STHeitiSC-Light',
            ),
            array(
                'value' => 'AmericanTypewriter',
                'label' => 'AmericanTypewriter',
            ),
            array(
                'value' => 'AmericanTypewriter-Bold',
                'label' => 'AmericanTypewriter-Bold',
            ),
            array(
                'value' => 'Helvetica-Oblique',
                'label' => 'Helvetica-Oblique',
            ),
            array(
                'value' => 'Helvetica-BoldOblique',
                'label' => 'Helvetica-BoldOblique',
            ),
            array(
                'value' => 'Helvetica',
                'label' => 'Helvetica',
            ),
            array(
                'value' => 'Helvetica-Bold',
                'label' => 'Helvetica-Bold',
            ),
            array(
                'value' => 'MarkerFelt-Thin',
                'label' => 'MarkerFelt-Thin',
            ),
            array(
                'value' => 'HelveticaNeue',
                'label' => 'HelveticaNeue',
            ),
            array(
                'value' => 'HelveticaNeue-Bold',
                'label' => 'HelveticaNeue-Bold',
            ),
            array(
                'value' => 'DBLCDTempBlack',
                'label' => 'DBLCDTempBlack',
            ),
            array(
                'value' => 'Verdana-Bold',
                'label' => 'Verdana-Bold',
            ),
            array(
                'value' => 'Verdana-BoldItalic',
                'label' => 'Verdana-BoldItalic',
            ),
            array(
                'value' => 'Verdana',
                'label' => 'Verdana',
            ),
            array(
                'value' => 'Verdana-Italic',
                'label' => 'Verdana-Italic',
            ),
            array(
                'value' => 'TimesNewRomanPSMT',
                'label' => 'TimesNewRomanPSMT',
            ),
            array(
                'value' => 'TimesNewRomanPS-BoldMT',
                'label' => 'TimesNewRomanPS-BoldMT',
            ),
            array(
                'value' => 'TimesNewRomanPS-BoldItalicMT',
                'label' => 'TimesNewRomanPS-BoldItalicMT',
            ),
            array(
                'value' => 'TimesNewRomanPS-ItalicMT',
                'label' => 'TimesNewRomanPS-ItalicMT',
            ),
            array(
                'value' => 'Georgia-Bold',
                'label' => 'Georgia-Bold',
            ),
            array(
                'value' => 'Georgia',
                'label' => 'Georgia',
            ),
            array(
                'value' => 'Georgia-BoldItalic',
                'label' => 'Georgia-BoldItalic',
            ),
            array(
                'value' => 'Georgia-Italic',
                'label' => 'Georgia-Italic',
            ),
            array(
                'value' => 'STHeitiJ-Medium',
                'label' => 'STHeitiJ-Medium',
            ),
            array(
                'value' => 'STHeitiJ-Light',
                'label' => 'STHeitiJ-Light',
            ),
            array(
                'value' => 'ArialRoundedMTBold',
                'label' => 'ArialRoundedMTBold',
            ),
            array(
                'value' => 'TrebuchetMS-Italic',
                'label' => 'TrebuchetMS-Italic',
            ),
            array(
                'value' => 'TrebuchetMS',
                'label' => 'TrebuchetMS',
            ),
            array(
                'value' => 'Trebuchet-BoldItalic',
                'label' => 'Trebuchet-BoldItalic',
            ),
            array(
                'value' => 'TrebuchetMS-Bold',
                'label' => 'TrebuchetMS-Bold',
            ),
            array(
                'value' => 'STHeitiK-Medium',
                'label' => 'STHeitiK-Medium',
            ),
            array(
                'value' => 'STHeitiK-Light',
                'label' => 'STHeitiK-Light',
            ),
        );
    }

    /**
     * List of allowed font sizes for Android application
     *
     * @return array
     */
    public function getFontSizes()
    {
        $result = array();
        for ($i = 6; $i < 32; $i++) {
            $result[] = array(
                'value' => $i,
                'label' => $i . ' pt',
            );
        }
        return $result;
    }

    /**
     * Validate submit application data
     *
     * @param array $params
     * @return array
     */
    public function validateSubmit($params)
    {
        $errors = array();

        if (!Zend_Validate::is(isset($params['title']) ? $params['title'] : null, 'NotEmpty')) {
            $errors[] = Mage::helper('xmlconnect')->__('Please enter the Title.');
        }

        if (isset($params['title'])) {
            $titleLength = self::SUBMISSION_TITLE_LENGTH;
            $strRules = array('min' => '1', 'max' => $titleLength);
            if (!Zend_Validate::is($params['title'], 'StringLength', $strRules)) {
                $errors[] = Mage::helper('xmlconnect')->__('"Title" is more than %d characters long', $strRules['max']);
            }
        }

        if (!Zend_Validate::is(isset($params['description']) ? $params['description'] : null, 'NotEmpty')) {
            $errors[] = Mage::helper('xmlconnect')->__('Please enter the Description.');
        }

        if (isset($params['description'])) {
            $descriptionLength = self::SUBMISSION_DESCRIPTION_LENGTH;
            $strRules = array('min' => '1', 'max' => $descriptionLength);
            if (!Zend_Validate::is($params['title'], 'StringLength', $strRules)) {
                $errors[] = Mage::helper('xmlconnect')->__('"Description" is more than %d characters long', $strRules['max']);
            }
        }

        if (!Zend_Validate::is(isset($params['copyright']) ? $params['copyright'] : null, 'NotEmpty')) {
            $errors[] = Mage::helper('xmlconnect')->__('Please enter the Copyright.');
        }

        if (empty($params['price_free'])) {
            if (!Zend_Validate::is(isset($params['price']) ? $params['price'] : null, 'NotEmpty')) {
                $errors[] = Mage::helper('xmlconnect')->__('Please enter the Price.');
            }
        }

        if (!Zend_Validate::is(isset($params['country']) ? $params['country'] : null, 'NotEmpty')) {
            $errors[] = Mage::helper('xmlconnect')->__('Please select at least one country.');
        }

        $keyLenght = Mage_XmlConnect_Model_Application::APP_MAX_KEY_LENGTH;
        if (Mage::helper('xmlconnect')->getApplication()->getIsResubmitAction()) {
            if (isset($params['resubmission_activation_key'])) {
                $resubmissionKey = $params['resubmission_activation_key'];
            } else {
                $resubmissionKey = null;
            }

            if (!Zend_Validate::is($resubmissionKey, 'NotEmpty')) {
                $errors[] = Mage::helper('xmlconnect')->__('Please enter the Resubmission Key.');
            } elseif (!Zend_Validate::is($resubmissionKey, 'StringLength', array(1, $keyLenght))) {
                $errors[] = Mage::helper('xmlconnect')->__('Submit App failure. Invalid activation key provided');
            }
        } else {
            $key = isset($params['key']) ? $params['key'] : null;
            if (!Zend_Validate::is($key, 'NotEmpty')) {
                $errors[] = Mage::helper('xmlconnect')->__('Please enter the Activation Key.');
            } elseif (!Zend_Validate::is($key, 'StringLength', array(1, $keyLenght))) {
                $errors[] = Mage::helper('xmlconnect')->__('Submit App failure. Invalid activation key provided');
            }
        }
        return $errors;
    }

    /**
     * Check config for valid values
     *
     * @param array $native
     * @return array
     */
    public function validateConfig($native)
    {
        $errors = array();
        if ($native === false || !isset($native['navigationBar']['icon'])
            || !Zend_Validate::is($native['navigationBar']['icon'], 'NotEmpty')
        ) {
            $errors[] = Mage::helper('xmlconnect')->__('Please upload  an image for "Logo in Header" field from Design Tab.');
        }

        if (!Mage::helper('xmlconnect')->validateConfFieldNotEmpty('bannerAndroidImage', $native)) {
            $errors[] = Mage::helper('xmlconnect')->__('Please upload  an image for "Banner on Home Screen" field from Design Tab.');
        }

        return $errors;
    }

    /**
     * Get renderer for submission country
     *
     * @return Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Renderer_Country_Androidmarket
     */
    public function getCountryRenderer()
    {
        if (empty($this->_countryRenderer)) {
            $renderer = 'xmlconnect/adminhtml_mobile_submission_renderer_country_'
                . self::SUBMISSION_COUNTRY_RENDERER;
            $this->_countryRenderer = Mage::app()->getLayout()->createBlock($renderer);
        }
        return $this->_countryRenderer;
    }

    /**
     * Get label for submission country
     *
     * @return string
     */
    public function getCountryLabel()
    {
        return Mage::helper('xmlconnect')->__('Locations');
    }

    /**
     * Get columns for submission country
     *
     * @return int
     */
    public function getCountryColumns()
    {
        return self::SUBMISSION_COUNTRY_COLUMNS;
    }

    /**
     * Get placement of Country Names for submission country
     *
     * @return bool
     */
    public function isCountryNamePlaceLeft()
    {
        return false;
    }

    /**
     * Get class name for submission country
     *
     * @return string
     */
    public function getCountryClass()
    {
        return self::SUBMISSION_COUNTRY_RENDERER;
    }

    /**
     * Get list of countries that allowed by Magento Inc. for Android
     *
     * @return array
     */
    public function getAndroidMarketCountriesArray()
    {
        return $this->_allowedCountries;
    }

    /**
     * Check image fields
     *
     * We set empty value for image field if file was missed in some reason
     *
     * @param array $data
     * @return array
     */
    public function checkImages(array $data)
    {
        /** @var $helper Mage_XmlConnect_Helper_Image */
        $helper = Mage::helper('xmlconnect/image');

        $icon =& $data['conf']['native']['navigationBar']['icon'];

        if (!empty($icon) && !$helper->checkAndGetImagePath($icon)) {
            $icon = '';
        }

        $banner =& $data['conf']['native']['body']['bannerAndroidImage'];
        if (!empty($banner) && !$helper->checkAndGetImagePath($banner)) {
            $banner = '';
        }
        return $data;
    }

    /**
     * Check required fields of a config for a front-end
     *
     * @throws Mage_Core_Exception
     * @param array $data
     * @return null
     */
    public function checkRequiredConfigFields($data)
    {
        if (!is_array($data)) {
            return;
        }

        if (isset($data['navigationBar']['icon']) && empty($data['navigationBar']['icon'])) {
            Mage::throwException(Mage::helper('xmlconnect')->__('Logo in Header image missing.'));
        }

        if (isset($data['body']['bannerAndroidImage']) && empty($data['body']['bannerAndroidImage'])) {
            Mage::throwException(Mage::helper('xmlconnect')->__('Banner on Home Screen image missing.'));
        }
    }

    /**
     * Check the notifications are allowed for current type of application
     *
     * @return bool
     */
    public function isNotificationsAllowed()
    {
        return true;
    }
}


text:
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';

moduleForComponent('ui-button', 'Integration | Component | ui-button', {
  integration: true
});

test('it renders', function(assert) {
  // Set any properties with this.set('myProperty', 'value');
  // Handle any actions with this.on('myAction', function(val) { ... });"

  this.render(hbs`{{ui-button}}`);

  assert.equal(this.$().text().trim(), '');

  // Template block usage:"
  this.render(hbs`
    {{#ui-button}}
      template block text
    {{/ui-button}}
  `);

  assert.equal(this.$().text().trim(), 'template block text');
});


text:
package com.github.challenge

import org.scalatest.WordSpec
import org.scalatest.matchers.ShouldMatchers
import problem._

class BasicProblem extends WordSpec with ShouldMatchers {
  def buildInfo(pInfo: List[(Int, Int, Int)]) = {
    implicit val numGen = problem.NumGenerator.buildNumGenerator

    pInfo.foldLeft(
      new (List[AddProblem], Map[Int, String])(Nil, Map())) {
      case ((pList, aMap), info) ⇒
        val problem = AddProblem(info._1, info._2)
        (problem :: pList,
          aMap + (problem.num -> info._3.toString))
    }
  }

  val solver = new ProblemSolver[AddProblem](10, false, "BasicProblem")

  val okProblemInfo = List(
    (1, 1, 2),
    (2, 2, 4),
    (1, 2, 3),
    (123, 456, 579),
    (5, 6, 11))

  val badProblemInfo = okProblemInfo map {
    case (x, y, z) ⇒ (x, y, z + 1)
  }

  val (okProblems, okAnswers) = buildInfo(okProblemInfo)
  val (badProblems, badAnswers) = buildInfo(badProblemInfo)

  def okSolver = (sols: Iterable[SolvedProblem]) ⇒ sols foreach (sol ⇒
    Some(sol.answer) should equal(okAnswers.get(sol.num)))

  def badSolver = (sols: Iterable[SolvedProblem]) ⇒ sols foreach (sol ⇒
    Some(sol.answer) should not equal (badAnswers.get(sol.num)))

  solver addInfo ProblemInfo(badProblems, badSolver)

  "A simple problem" should {
    "solve correctly" when {
      "the answer is correct" in {
        solver addInfo ProblemInfo(okProblems, okSolver)
        solver.solve()
      }

      "the answer is incorrect" in {
        Thread.sleep(100)
        while (solver.isDone != true) Thread.sleep(100L)
        solver addInfo ProblemInfo(okProblems, okSolver)
        solver.solve()
      }
    }

    "shutdown the actor system when it's finished" in {
      Thread.sleep(500)
      while (solver.isDone != true) Thread.sleep(100L)
      solver.shutdown()
      Thread.sleep(100)
      solver.master.isTerminated should be(right = true)
      solver.system.isTerminated should be(right = true)
    }
  }
}


text:
package com.scut.gof.coordinator.qcode.androidzhang.zxingframe;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;

import com.google.zxing.WriterException;
import com.scut.gof.coordinator.R;
import com.scut.gof.coordinator.qcode.zxing.activity.CaptureActivity;

public class ZxingFrame extends Activity {

    protected int mScreenWidth;
    private EditText resultTextView;
    private Button scanBarCodeButton;
    private ImageView iv_qr_image;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_zxing_frame);

        resultTextView = (EditText) this.findViewById(R.id.scan_result);

        scanBarCodeButton = (Button) this.findViewById(R.id.bt_bigin_scan);

        iv_qr_image = (ImageView) findViewById(R.id.iv_qr_image);

        DisplayMetrics dm = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(dm);
        mScreenWidth = dm.widthPixels;

        scanBarCodeButton.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // 调用ZXIng开源项目源码  扫描二维码
                Intent openCameraIntent = new Intent(ZxingFrame.this,
                        CaptureActivity.class);
                startActivityForResult(openCameraIntent, 0);
            }
        });
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        // 取得返回信息
        if (resultCode == RESULT_OK) {
            Bundle bundle = data.getExtras();
            String scanResult = bundle.getString("result");
            resultTextView.setText(scanResult);
        }
    }

    //调用浏览器打开,功能尚未完善、、、
    public void checkResult(View v) {
        String result = resultTextView.getText().toString();
//		Intent intent = new Intent(ZxingFrame.this,
//				CheckResult.class);
//		intent.putExtra("result", result);
//		startActivity(intent);

        Intent i = new Intent();
        i.setAction("android.intent.action.VIEW");
        Uri content_url = Uri.parse(result);
        i.setData(content_url);
        i.setClassName("com.android.browser", "com.android.browser.BrowserActivity");
        startActivity(i);
    }

    //生成二维码
    public void Create2QR(View v) {
        String uri = resultTextView.getText().toString();
//		Bitmap bitmap = BitmapUtil.create2DCoderBitmap(uri, mScreenWidth/2, mScreenWidth/2);
        Bitmap bitmap;
        try {
            bitmap = BitmapUtil.createQRCode(uri, mScreenWidth);

            if (bitmap != null) {
                iv_qr_image.setImageBitmap(bitmap);
            }

        } catch (WriterException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }

}


text:
package org.apache.derby.shared.common.reference;

public interface ContextId {

	String LANG_CONNECTION = "LanguageConnectionContext";
	String LANG_STATEMENT = "StatementContext";

}


text:
class Solution(object):
    def isValidSerialization(self, preorder):
        """
        :type preorder: str
        :rtype: bool
        """
        diff = 1
        for node in preorder.split(','):
            diff -= 1
            if diff < 0:
                return False
            if node != '#':
                diff += 2
        return diff == 0


text:
import java.io.IOException;

public class Packet06 {

	static private final byte ID = 6;
	private User client;

	public Packet06 (User user) {

		this.client = user;

	}

	public void write(User user) {

		try {

			client.out.writeByte(ID);
			client.out.writeUTF(user.username);
			client.out.writeByte(user.permission.getByteValue());
			client.out.flush();

		} catch (IOException e) {

			DisconnectClient.lostConnection(client);

		}

	}

	public byte getID() {

		return ID;

	}

}


text:
Once OpenShift is installed, the installer account no longer requires the AdministratorAccess policy. This user account
may be deleted or have its access keys revoked (or disabled until needed later/again). You may also opt to remove the
AdministratorAccess policy in favor of ReadOnlyAccess. You perform all these steps by revisiting IAM and updating the
user created earlier.

## Example: Remove AdministratorAccess, Attach ReadOnlyAccess

![IAM Remove AdministratorAccess](images/iam_after_remove_admin.png)

![IAM Remove AdministratorAccess](images/iam_after_add_readonly.png)