text:
using System;
using System.Windows.Forms;
using OpenZWaveDotNet;

namespace OZWForm
{
    /// <summary>
    /// Executes a controller command and show a dialog window while the controller command is running
    /// </summary>
    public partial class ControllerCommandDlg : Form
    {
        private static ZWManager m_manager;
        private static ControllerCommandDlg m_dlg;
        private static UInt32 m_homeId;

        private static ZWControllerCommand m_op;
        private static Byte m_nodeId;
        private static DialogResult result;

        private MainForm m_mainDlg;

        public MainForm MainDlg
        {
            get { return m_mainDlg; }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ControllerCommandDlg"/> class.
        /// </summary>
        /// <param name="_mainDlg">The main form.</param>
        /// <param name="_manager">The manager.</param>
        /// <param name="homeId">The home identifier.</param>
        /// <param name="_op">The Controller Command.</param>
        /// <param name="nodeId">The node identifier.</param>
        public ControllerCommandDlg(MainForm _mainDlg, ZWManager _manager, UInt32 homeId, ZWControllerCommand _op,
            Byte nodeId)
        {
            m_mainDlg = _mainDlg;
            m_manager = _manager;
            m_homeId = homeId;
            m_op = _op;
            m_nodeId = nodeId;
            m_dlg = this;

            InitializeComponent();

            m_manager.OnNotification += new ManagedNotificationsHandler(NotificationHandler);
            switch (m_op)
            {
                case ZWControllerCommand.RequestNodeNeighborUpdate:
                {
                    this.Text = "Node Neighbor Update";
                    this.label1.Text = "Request that a node update its list of neighbors.";

                    if (!m_manager.RequestNodeNeighborUpdate(m_homeId, m_nodeId))
                    {
                        MyControllerStateChangedHandler(ZWControllerState.Failed);
                    }
                    break;
                }
                case ZWControllerCommand.AddDevice:
                {
                    this.Text = "Add Device";
                    this.label1.Text =
                        "Press the program button on the Z-Wave device to add it to the network.\nFor security reasons, the PC Z-Wave Controller must be close to the device being added.";

                    if (!m_manager.AddNode(m_homeId, m_mainDlg.SecurityEnabled))
                    {
                        MyControllerStateChangedHandler(ZWControllerState.Failed);
                    }
                    break;
                }
                case ZWControllerCommand.CreateNewPrimary:
                {
                    this.Text = "Create New Primary Controller";
                    this.label1.Text =
                        "Put the target controller into receive configuration mode.\nThe PC Z-Wave Controller must be within 2m of the controller that is being made the primary.";

                    if (!m_manager.CreateNewPrimary(m_homeId))
                    {
                        MyControllerStateChangedHandler(ZWControllerState.Failed);
                    }
                    break;
                }
                case ZWControllerCommand.ReceiveConfiguration:
                {
                    this.Text = "Receive Configuration";
                    this.label1.Text =
                        "Transfering the network configuration\nfrom another controller.\n\nPlease bring the other controller within 2m of the PC controller and set it to send its network configuration.";

                    if (!m_manager.ReceiveConfiguration(m_homeId))
                    {
                        MyControllerStateChangedHandler(ZWControllerState.Failed);
                    }
                    break;
                }
                case ZWControllerCommand.RemoveDevice:
                {
                    this.Text = "Remove Device";
                    this.label1.Text =
                        "Press the program button on the Z-Wave device to remove it from the network.\nFor security reasons, the PC Z-Wave Controller must be close to the device being removed.";

                    if (!m_manager.RemoveNode(m_homeId))
                    {
                        MyControllerStateChangedHandler(ZWControllerState.Failed);
                    }
                    break;
                }
                case ZWControllerCommand.TransferPrimaryRole:
                {
                    this.Text = "Transfer Primary Role";
                    this.label1.Text =
                        "Transfering the primary role\nto another controller.\n\nPlease bring the new controller within 2m of the PC controller and set it to receive the network configuration.";

                    if (!m_manager.TransferPrimaryRole(m_homeId))
                    {
                        MyControllerStateChangedHandler(ZWControllerState.Failed);
                    }
                    break;
                }
                case ZWControllerCommand.HasNodeFailed:
                {
                    this.ButtonCancel.Enabled = false;
                    this.Text = "Has Node Failed";
                    this.label1.Text = "Testing whether the node has failed.\nThis command cannot be cancelled.";

                    if (!m_manager.HasNodeFailed(m_homeId, m_nodeId))
                    {
                        MyControllerStateChangedHandler(ZWControllerState.Failed);
                    }
                    break;
                }
                case ZWControllerCommand.RemoveFailedNode:
                {
                    this.ButtonCancel.Enabled = false;
                    this.Text = "Remove Failed Node";
                    this.label1.Text =
                        "Removing the failed node from the controller's list.\nThis command cannot be cancelled.";

                    if (!m_manager.RemoveFailedNode(m_homeId, m_nodeId))
                    {
                        MyControllerStateChangedHandler(ZWControllerState.Failed);
                    }
                    break;
                }
                case ZWControllerCommand.ReplaceFailedNode:
                {
                    this.ButtonCancel.Enabled = false;
                    this.Text = "Replacing Failed Node";
                    this.label1.Text = "Testing the failed node.\nThis command cannot be cancelled.";

                    if (!m_manager.ReplaceFailedNode(m_homeId, m_nodeId))
                    {
                        MyControllerStateChangedHandler(ZWControllerState.Failed);
                    }
                    break;
                }
                case ZWControllerCommand.RequestNetworkUpdate:
                {
                    this.ButtonCancel.Enabled = false;
                    this.Text = "Requesting Network Update";
                    this.label1.Text = "Requesting the Network Update.";

                    if (!m_manager.RequestNetworkUpdate(m_homeId, m_nodeId))
                    {
                        MyControllerStateChangedHandler(ZWControllerState.Failed);
                    }
                    break;
                }
                default:
                {
                    m_manager.OnNotification -= NotificationHandler;
                    break;
                }
            }
        }

        /// <summary>
        /// Handles Notifications.
        /// </summary>
        /// <param name="notification">The notification.</param>
        public static void NotificationHandler(ZWNotification notification)
        {
            switch (notification.GetType())
            {
                case ZWNotification.Type.ControllerCommand:
                {
                    MyControllerStateChangedHandler(((ZWControllerState) notification.GetEvent()));
                    break;
                }
            }
        }

        /// <summary>
        /// Handles controller state changes.
        /// </summary>
        /// <param name="state">The state.</param>
        public static void MyControllerStateChangedHandler(ZWControllerState state)
        {
            // Handle the controller state notifications here.
            bool complete = false;
            String dlgText = "";
            bool buttonEnabled = true;

            switch (state)
            {
                case ZWControllerState.Waiting:
                {
                    // Display a message to tell the user to press the include button on the controller
                    if (m_op == ZWControllerCommand.ReplaceFailedNode)
                    {
                        dlgText =
                            "Press the program button on the replacement Z-Wave device to add it to the network.\nFor security reasons, the PC Z-Wave Controller must be close to the device being added.\nThis command cannot be cancelled.";
                    }
                    break;
                }
                case ZWControllerState.InProgress:
                {
                    // Tell the user that the controller has been found and the adding process is in progress.
                    dlgText = "Please wait...";
                    buttonEnabled = false;
                    break;
                }
                case ZWControllerState.Completed:
                {
                    // Tell the user that the controller has been successfully added.
                    // The command is now complete
                    dlgText = "Command Completed OK.";
                    complete = true;
                    result = DialogResult.OK;
                    break;
                }
                case ZWControllerState.Failed:
                {
                    // Tell the user that the controller addition process has failed.
                    // The command is now complete
                    dlgText = "Command Failed.";
                    complete = true;
                    result = DialogResult.Abort;
                    break;
                }
                case ZWControllerState.NodeOK:
                {
                    dlgText = "Node has not failed.";
                    complete = true;
                    result = DialogResult.No;
                    break;
                }
                case ZWControllerState.NodeFailed:
                {
                    dlgText = "Node has failed.";
                    complete = true;
                    result = DialogResult.Yes;
                    break;
                }
                case ZWControllerState.Cancel:
                {
                    dlgText = "Command was cancelled.";
                    complete = true;
                    result = DialogResult.Cancel;
                    break;
                }
                case ZWControllerState.Error:
                {
                    dlgText = "An error occurred while processing the controller command.";
                    complete = true;
                    result = DialogResult.Cancel;
                    break;
                }
            }

            if (dlgText != "")
            {
                m_dlg.SetDialogText(dlgText);
            }

            m_dlg.SetButtonEnabled(buttonEnabled);

            if (complete)
            {
                m_dlg.SetButtonText("OK");

                // Remove the event handler
                m_manager.OnNotification -= NotificationHandler;
            }
        }

        /// <summary>
        /// Sets the dialog text.
        /// </summary>
        /// <param name="text">The text.</param>
        private void SetDialogText(String text)
        {
            if (m_dlg.InvokeRequired)
            {
                Invoke(new MethodInvoker(delegate() { SetDialogText(text); }));
            }
            else
            {
                m_dlg.label1.Text = text;
            }
        }

        /// <summary>
        /// Sets the button text.
        /// </summary>
        /// <param name="text">The text.</param>
        private void SetButtonText(String text)
        {
            if (m_dlg.InvokeRequired)
            {
                Invoke(new MethodInvoker(delegate() { SetButtonText(text); }));
            }
            else
            {
                m_dlg.ButtonCancel.Text = text;
            }
        }

        /// <summary>
        /// Sets the button enabled.
        /// </summary>
        /// <param name="enabled">if set to <c>true</c> [enabled].</param>
        private void SetButtonEnabled(bool enabled)
        {
            if (m_dlg.InvokeRequired)
            {
                Invoke(new MethodInvoker(delegate() { SetButtonEnabled(enabled); }));
            }
            else
            {
                m_dlg.ButtonCancel.Enabled = enabled;
            }
        }

        /// <summary>
        /// Handles the Click event of the ButtonCancel control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void ButtonCancel_Click(object sender, EventArgs e)
        {
            if (ButtonCancel.Text != "OK")
            {
                // Remove the event handler
                m_manager.OnNotification -= NotificationHandler;

                // Cancel the operation
                m_manager.CancelControllerCommand(m_homeId);
            }

            // Close the dialog
            Close();
            m_dlg.DialogResult = result;
        }
    }
}


text:
/*
 * sslDebug.h - Debugging macros.
 */

#ifndef	_SSL_DEBUG_H_
#define _SSL_DEBUG_H_

#ifdef KERNEL
/* TODO: support secdebug in the kernel */
#define secdebug(x...)
#else /* KERNEL */
#include <utilities/debugging.h>
#endif

#ifndef	NDEBUG
#include <AssertMacros.h>
#endif

#define ssl_secdebug secdebug

#ifndef NDEBUG

/* log changes in handshake state */
#define sslHdskStateDebug(args...)		ssl_secdebug("sslHdskState", ## args)

/* log handshake and alert messages */
#define sslHdskMsgDebug(args...)		ssl_secdebug("sslHdskMsg", ## args)

/* log negotiated handshake parameters */
#define sslLogNegotiateDebug(args...)	ssl_secdebug("sslLogNegotiate", ## args)

/* log received protocol messsages */
#define sslLogRxProtocolDebug(msgType)	ssl_secdebug("sslLogRxProtocol", \
										"---received protoMsg %s", msgType)

/* log resumable session info */
#define sslLogResumSessDebug(args...)	ssl_secdebug("sslResumSession", ## args)

/* log low-level session info in appleSession.c */
#define sslLogSessCacheDebug(args...)	ssl_secdebug("sslSessionCache", ## args)

/* log record-level I/O (SSLRead, SSLWrite) */
#define sslLogRecordIo(args...)			ssl_secdebug("sslRecordIo", ## args)

/* cert-related info */
#define sslCertDebug(args...)			ssl_secdebug("sslCert", ## args)

/* Diffie-Hellman */
#define sslDhDebug(args...)				ssl_secdebug("sslDh", ## args)

/* EAP-FAST PAC-based session resumption */
#define sslEapDebug(args...)			ssl_secdebug("sslEap", ## args)

/* ECDSA */
#define sslEcdsaDebug(args...)			ssl_secdebug("sslEcdsa", ## args)

#else /* NDEBUG */

/*  deployment build */
#define sslHdskStateDebug(args...)
#define sslHdskMsgDebug(args...)
#define sslLogNegotiateDebug(args...)
#define sslLogRxProtocolDebug(msgType)
#define sslLogResumSessDebug(args...)
#define sslLogSessCacheDebug(args...)
#define sslLogRecordIo(args...)
#define sslCertDebug(args...)
#define sslDhDebug(args...)
#define sslEapDebug(args...)
#define sslEcdsaDebug(args...)

#endif	/*
NDEBUG */

#ifdef	NDEBUG

/* all errors logged to stdout for DEBUG config only */
#define sslErrorLog(args...)
#define sslDebugLog(args...)
#define sslDump(d, l)

#else

extern void SSLDump(const unsigned char *data, unsigned long len);

/* extra debug logging of non-error conditions, if SSL_DEBUG is defined */
#if SSL_DEBUG
//#define sslDebugLog(args...)        printf(args)
#define sslDebugLog(args...)        ssl_secdebug("sslDebug", ## args)
#else
#define sslDebugLog(args...)
#endif
/* all errors logged to stdout for DEBUG config only */
//#define sslErrorLog(args...)        printf(args)
#define sslErrorLog(args...)        ssl_secdebug("sslError", ## args)
#define sslDump(d, l)               SSLDump((d), (l))

#endif	/* NDEBUG */

#ifdef	NDEBUG
#define ASSERT(s)
#else
#define ASSERT(s)	check(s)
#endif

#endif	/* _SSL_DEBUG_H_ */

redpajama_set_name: RedPajamaGithub


text:
import socket
import time

if __name__ == "__main__":
    sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
    conn = '/tmp/GameRoomConn'
    sock.connect(conn)
    time.sleep(1)
    sock.send('hello world')
    sock.close()


text:
			Posted on

			by

{{message.user}} : {{message.text}}

{{user}}

	<form name="inputForm" ng-submit="sendMessage()" ng-disabled="bSending">
		<input style="width:calc(100% - 50px);" name="input" type="text" ng-model="input" required></input>

	</form>


text:
import time

import ray
from ray.cluster_utils import Cluster
from ray.test_utils import get_other_nodes

num_redis_shards = 5
redis_max_memory = 10**8
object_store_memory = 10**8
num_nodes = 10

message = ("Make sure there is enough memory on this machine to run this "
           "workload. We divide the system memory by 2 to provide a buffer.")
assert (num_nodes * object_store_memory + num_redis_shards * redis_max_memory <
        ray.utils.get_system_memory() / 2), message

# Simulate a cluster on one machine.

cluster = Cluster()
for i in range(num_nodes):
    cluster.add_node(
        redis_port=6379 if i == 0 else None,
        num_redis_shards=num_redis_shards if i == 0 else None,
        num_cpus=2,
        num_gpus=0,
        resources={str(i): 2},
        object_store_memory=object_store_memory,
        redis_max_memory=redis_max_memory,
        dashboard_host="0.0.0.0")
ray.init(address=cluster.address)

# Run the workload.

@ray.remote
def f(*xs):
    return 1

iteration = 0
previous_ids = [1 for _ in range(100)]
start_time = time.time()
previous_time = start_time
while True:
    for _ in range(100):
        previous_ids = [f.remote(previous_id) for previous_id in previous_ids]

    ray.get(previous_ids)

    for _ in range(100):
        previous_ids = [f.remote(previous_id) for previous_id in previous_ids]
    node_to_kill = get_other_nodes(cluster, exclude_head=True)[0]

    # Remove the first non-head node.
    cluster.remove_node(node_to_kill)
    cluster.add_node()

    new_time = time.time()
    print("Iteration {}:\n"
          "  - Iteration time: {}.\n"
          "  - Absolute time: {}.\n"
          "  - Total elapsed time: {}.".format(
              iteration, new_time - previous_time, new_time,
              new_time - start_time))
    previous_time = new_time
    iteration += 1


text:
namespace sync_pb {
class EntityMetadata;
class ModelTypeState;
}  // namespace sync_pb

namespace syncer {

// A thin wrapper around an SyncMetadataStore that implements sync's
// MetadataChangeList interface. Changes are passed directly into the store and
// not stored inside this object.
class SyncMetadataStoreChangeList : public MetadataChangeList {
 public:
  using ErrorCallback = base::RepeatingCallback<void(const ModelError&)>;

  // If an error happened during any Update*/Clear* operation, then
  // `error_callback` will be called during destruction and passed the error.
  // Should typically be bound to ModelTypeChangeProcessor::ReportError().
  SyncMetadataStoreChangeList(SyncMetadataStore* store,
                              ModelType type,
                              ErrorCallback error_callback);
  ~SyncMetadataStoreChangeList() override;

  // MetadataChangeList implementation.
  void UpdateModelTypeState(
      const sync_pb::ModelTypeState& model_type_state) override;
  void ClearModelTypeState() override;
  void UpdateMetadata(const std::string& storage_key,
                      const sync_pb::EntityMetadata& metadata) override;
  void ClearMetadata(const std::string& storage_key) override;

  // Allows querying and manually handling any error, instead of relying on the
  // error callback passed to the constructor.
  // TODO(crbug.com/1356990): Consider removing this method. Callers can use
  // ModelTypeChangeProcessor::GetError() instead.
  absl::optional<ModelError> TakeError();

  const SyncMetadataStore* GetMetadataStoreForTesting() const;

 private:
  void SetError(ModelError error);

  // The metadata store to store metadata in; always outlives |this|.
  raw_ptr<SyncMetadataStore> store_;

  // The sync model type for this metadata.
  ModelType type_;

  // The first error encountered by this object, if any.
  absl::optional<ModelError> error_;

  const ErrorCallback error_callback_;
};

}  // namespace syncer

#endif  // COMPONENTS_SYNC_MODEL_SYNC_METADATA_STORE_CHANGE_LIST_H_


text:
Specifications are notes I find as I dig around in different BBS and DOOR kit source code. I think of
this as my wiki knowledgebase of resources to make sure ExchangeBBS is compatible with other products
available old and new.


text:
package com.navercorp.pinpoint.hbase.schema.reader.core;

import org.springframework.util.Assert;

import java.util.Objects;

/**
 * @author HyunGil Jeong
 */
public abstract class ColumnFamilyChange implements Change {

    private final String name;
    private final ColumnFamilyConfiguration columnFamilyConfiguration;

    protected ColumnFamilyChange(String name, ColumnFamilyConfiguration columnFamilyConfiguration) {
        Assert.hasLength(name, "name must not be empty");
        this.name = name;
        this.columnFamilyConfiguration = Objects.requireNonNull(columnFamilyConfiguration, "columnFamilyConfiguration");
    }

    public ColumnFamilyConfiguration getColumnFamilyConfiguration() {
        return columnFamilyConfiguration;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ColumnFamilyChange that = (ColumnFamilyChange) o;
        return Objects.equals(name, that.name) &&
                Objects.equals(columnFamilyConfiguration, that.columnFamilyConfiguration);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, columnFamilyConfiguration);
    }

    @Override
    public final String getName() {
        return name;
    }
}


text:
<?php
    $title = "Sign In";
    include_once "includes/header.php";
     ?>

JamHub

        <?php if (login_check($mysqli) == true) : ?>

Browse:

            <form method="get" action="user.php"

User

                <?php
                //Queries the database for the users to display in this list. May get long. TODO: Pagination, Search
                $query = "SELECT id, username FROM members";
                $stmt = $mysqli->query($query);
                while($row = $stmt->fetch_assoc()) {
                  echo "
 <button type='submit' name='userprofile' value='".$row['id']."' class='btn'>".$row['username']."</button>
";
                }

                ?>

      </form>
      <?php endif; ?>

<?php include_once "includes/footer.php" ?>


text:
SQL API
=======

The SQL API provides a node.js based API for running SQL queries against CartoDB.

Like the other components of CartoDB is Open Source and you can find the source code at `CartoDB/CartoDB-SQL-API <http://github.com/cartodb/cartodb-sql-api>`_

You can find usage documentation at http://docs.cartodb.com/cartodb-platform/sql-api.html.

Although you can chechout any branch of the repository most of them are usually work in progress that is not guaranteed to work. In order to run a production ready SQL API service you need to use **master** branch.


text:
package org.eclipse.ui.texteditor.rulers;

import java.util.Set;

import org.eclipse.core.runtime.Assert;

import org.eclipse.jface.preference.IPreferenceStore;

import org.eclipse.ui.internal.texteditor.rulers.StringSetSerializer;

/**
 * Manages the preferences for ruler contributions stored in a preference store.
 *
 * @since 3.3
 */
public final class RulerColumnPreferenceAdapter {
	private final IPreferenceStore fStore;
	private final String fKey;

	/**
	 * Creates a new preference adapter that will read and write under the specified key in the
	 * given preference store.
	 *
	 * @param store the preference store
	 * @param key the key
	 */
	public  RulerColumnPreferenceAdapter(IPreferenceStore store, String key) {
		Assert.isLegal(store != null);
		Assert.isLegal(key != null);
		fStore= store;
		fKey= key;
	}

	/**
	 * Returns the enablement state of the given ruler contribution.
	 *
	 * @param descriptor a ruler contribution descriptor
	 * @return true if the ruler is enabled, false otherwise
	 */
	public boolean isEnabled(RulerColumnDescriptor descriptor) {
		Assert.isLegal(descriptor != null);
		String preference= fStore.getString(fKey);
		return StringSetSerializer.deserialize(preference).contains(descriptor.getId()) ^ descriptor.getDefaultEnablement();
	}

	/**
	 * Sets the enablement state of the given ruler contribution.
	 *
	 * @param descriptor a ruler contribution descriptor
	 * @param enabled true to enable the contribution, false to
	 *        disable it
	 */
	public void setEnabled(RulerColumnDescriptor descriptor, boolean enabled) {
		Assert.isLegal(descriptor != null);
		String id= descriptor.getId();
		String preference= fStore.getString(fKey);
		Set marked= StringSetSerializer.deserialize(preference);
		boolean shouldMark= enabled ^ descriptor.getDefaultEnablement();
		boolean isMarked= marked.contains(id);
		if (isMarked != shouldMark) {
			if (shouldMark)
				marked.add(id);
			else
				marked.remove(id);
			fStore.setValue(fKey, StringSetSerializer.serialize(marked));
		}
	}

	/**
	 * Toggles the enablement state of given the ruler contribution.
	 *
	 * @param descriptor a ruler contribution descriptor
	 */
	public void toggle(RulerColumnDescriptor descriptor) {
		Assert.isLegal(descriptor != null);
		setEnabled(descriptor, !isEnabled(descriptor));
	}
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Welcome to Gangneung Style!</title>

    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">

    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">

    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">

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

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

    <link href="/assets/docs.css" rel="stylesheet">
    <link href="/css/flag-icon.css" rel="stylesheet">

          Gangneung Style
          Pantalla de inicio

Gangneung Style

Welcome to Gangneung Style!

14 Jul 2014  David

        Lire ce post en  français

        Read this post in  english

Post en espanol

You'll find this post in your _posts directory - edit this post and re-build (or run with the -w switch) to see your changes!
To add new posts, simply add a file in the _posts directory that follows the convention: YYYY-MM-DD-name-of-post.ext.

강릉 스타일

Jekyll also offers powerful support for code snippets:

def show
  @widget = Widget(params[:id])
  respond_to do |format|
    format.html # show.html.erb
    format.json { render json: @widget }
  end
end

Informacion

 2014


text:
slingshop
=========

A MEAN stack based e-commerce site, for selling sling bags!

Usage
-----
Clone the project

	git clone https://github.com/asthas/slingshop.git

Change directory and install dependencies

	cd slingshop
	sudo npm install

Install vendor files

	cd app/public
	bower update

Run the app

	npm start

Authors
- [Astha Sharma](http://astha.me)
- [Shantanu Raj](http://sraj.me)


text:
package net.mooko.moosm.config;

import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

import javax.servlet.Filter;

/**
 * Created by puras on 15/5/19.
 */
public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class<?>[] {AppConfig.class, BoneCPDataSourceConfig.class, MyBatisConfig.class};
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class<?>[] {WebMvcConfig.class};
    }

    @Override
    protected String[] getServletMappings() {
        return new String[] {"/"};
    }

    @Override
    protected Filter[] getServletFilters() {
        CharacterEncodingFilter characterEncodingFilter = new CharacterEncodingFilter();
        characterEncodingFilter.setEncoding("UTF-8");
        characterEncodingFilter.setForceEncoding(true);
//        return super.getServletFilters();
        return new Filter[] {characterEncodingFilter};
    }
}


text:
Airline 2.10 has a single minor breaking change that only affects users of the `airline-help-bash` module.

## `@BashCompletion` package relocation

In order to avoid package collisions between modules and enable the `airline-help-bash` module to become a JPMS module
this annotation was moved into a new sub-package `com.github.rvesse.airline.annotations.help.bash`

## Inject Dependencies are now optional

As noted in [Migrating to Airline 2.9](#migration-to-airline-29) Airline is moving away from usage of the `@Inject`
annotation for composition in favour of its own `@AirlineModule` annotation.  As part of this move the `jakarta.
inject-api` and `airline-backcompat-javaxinject` dependencies became `optional` in 2.10.  This means that if you have an
existing Airline based application that is using `@Inject` annotations you must now provide the relevant dependency
yourself as you will not automatically pick it up as a transitive dependency of Airline.

# Migration to Airline 2.9

Airline 2.9 introduces some changes to composition annotations in preparation for breaking changes in future releases.
In particular unless you use Airline in conjunction with a dependency injection framework you should stop using the
`@Inject` annotation on command fields and transition to using the `@AirlineModule` annotation instead.

For backwards compatibility purposes usage of the older `@Inject` annotation remains supported for the time being
**BUT** this will require explicit user configuration in future releases.

## Excluding Inject Dependencies

Users who are able to transition to `@AirlineModule` may wish to explicitly exclude the following dependencies when
depending on Airline to avoid polluting their classpath with unnecessary dependencies if they no longer need `@Inject`
present:

```xml
<exclusions>
  <exclusion>
    <groupId>jakarta.inject</groupId>
    <artifactId>jakarta.inject-api</artifactId>
  </exclusion>
  <exclusion>
    <groupId>com.github.rvesse</groupId>
    <artifactId>airline-backcompat-javaxinject</artifactId>
  </exclusion>
</exclusions>
```

# Migration to Airline 2.2 from Airline 2.1

Airline 2.2 has some minor breaking changes versus Airline 2.1

## `@Arguments` arity

Previously `@Arguments` had an `arity` field that was used to control the maximum arity of arguments.  In 2.2 this is
removed and you should use the `@MaxOccurrences` restriction annotation to achieve the same effect e.g.

```java
@Arguments
@MaxOccurrences(occurrences = 3)
private List<String> args = new ArrayList<>();
```

## RONN Help Removed

The `airline-help-ronn` module was removed in 2.2 as it was already deprecated.  For Markdown format help use the
`airline-help-markdown` module and for Man pages uses the `airline-help-man` module.

## Global Restriction Annotations

Previously global restrictions for CLIs could only be specified via the `restrictions` field of the `@Cli` annotation.
As of Airline 2.2 the global restrictions can now be specified via annotations in the same way that option and argument
restrictions are specified.

Airline 2.2 supports the following global restriction annotations:

- `@CommandRequired`
- `@NoUnexpectedArguments`
- `@NoMissingOptionValues`
- `@None`

Note that most users will not need to use these annotations as the `@Cli` annotation has the
`includeDefaultRestrictions` field default to `true` which causes the default set of global restrictions to be included
without any further user configuration.

---

# Migrating to Airline 2.1 from Airline 2

Airline 2.1 includes a number of breaking changes which are part of improvements and restructuring of the help systems.

## Help Modules

Previously all help generators were included in the main `airline` module.  With Airline 2.1 only the CLI help is
included in that module, all other help generators are provided by separate modules which can be pulled in as desired.

Help Generators | New Module
---------------------- | -----------------
RONN (**Deprecated in 2.1**) | `airline-help-ronn`
HTML | `airline-help-html`
Bash Completion | `airline-help-bash`
Man (**New in 2.1**) | `airline-help-man`
Markdown (**New in 2.1**) | `airline-help-markdown`

If you were using any of these then you may need to tweak your dependencies appropriately.

## Generating Man pages

Previously we provided RONN format help generators which generated RONN output (an extended dialect of Markdown) that
could then be converted into `man` pages with the `ronn` tool.  However we found that RONN had a number of bugs that
could cause the generated man pages to have strange formatting in some cases.

To address this new Man format help generators are introduced which are capable of generating man pages directly without
needing an intermediate format or third party tool.  As a result the existing RONN generators are deprecated and should
be avoided in favour of the new help generators.

## Generating Markdown help

Since RONN generators are now deprecated we have also added new Markdown format help generators which can be used to
generate Markdown format help directly.  These don't use any of the extended RONN syntax though they do use GitHub
Flavoured Markdown table syntax for tables.

## Bash Completion

Previously information for Bash completion was provided by the `completionBehaviour` and `completionCommand` fields of
the `@Option` and `@Arguments` annotations.  In 2.1 these are now moved into their own `@BashCompletion` annotation
which is now found in the `airline-help-bash` module.

For example in Airline 2:

    @Option(name = { "--example" }, arity = 1, completionBehaviour = CompletionBehaviour.FILES)
    private String example;

Would change to the following in Airline 2.1:

    @Option(name = { "--examples" }, arity = 1)
    @BashCompletion(behaviour = CompletionBehaviour.FILES)
    private String example;

## Restriction Factories

In Airline 2.0 restriction factories had to be explicitly registered with the `RestrictionRegistry`, Airline 2.1 moves
to using `ServiceLoader` for discovery of restriction factories.  While factories may still be explicitly registered
they can now also be specified in the following files:

- `META-INF/services/com.github.rvesse.airline.restrictions.factories.OptionRestrictionFactory`
- `META-INF/services/com.github.rvesse.airline.restrictions.factories.ArgumentsRestrictionFactory`

Note that if you want to use this mechanism and intend to use the Maven shade plugin or similar to build a single JAR
you must ensure that you preserve the built-in services files from the `airline` module as otherwise the built-in
restriction annotations will not be honoured.

## Help Section Factories

In Airline 2.0 help section factories had to be explicitly registered with the `HelpSectionFactory`, Airline 2.1 moves
to using `ServiceLoader` for discovery of help section factories.  While factories may still be explicitly registered
they can now also be specified in the following file:

- `META-INF/services/com.github.rvesse.airline.help.sections.factories.HelpSectionFactory`

Note that if you want to use this mechanism and intend to use the Maven shade plugin or similar to build a single JAR
you must ensure that you preserve the built-in services files from the `airline` module as otherwise the built-in help
section annotations will not be honoured.

Additionally the `HelpSectionRegistry` was moved into the `com.github.rvesse.airline.help.sections.factories` package.

---

# Migrating to Airline 2 from Airline 1

Airline 2 is a significant rewrite of Airline and as such there are lots of breaking changes to be aware of.  This
document aims to guide you through the user facing changes.

Note that if you are developing in the internals of Airline there are lots of other changes which are not covered here
since they are not visible to end users.

## Defining CLIs

The major change in defining CLIs using the `CliBuilder<T>` is that all parser related options are now moved onto a new
`ParserBuilder<T>`.  This builder can be accessed via the `withParser()` method.

So for example the following Airline 1 code:

```
CliBuilder<ExampleRunnable> builder
  = Cli.<ExampleRunnable>builder("cli")
          // Add a description
          .withDescription("A simple CLI with several commands available in groups")
          // We can enable command and option abbreviation, this allows users to only
          // type part of the group/command/option name provided that the portion they
          // type is unambiguous
          .withCommandAbbreviation()
          .withOptionAbbreviation();
```

Would need changing to the following:

```
CliBuilder<ExampleRunnable> builder
  = Cli.<ExampleRunnable>builder("cli")
          // Add a description
          .withDescription("A simple CLI with several commands available in groups");

// We can enable command and option abbreviation, this allows users to only
// type part of the group/command/option name provided that the portion they
// type is unambiguous
builder.withParser()
          .withCommandAbbreviation()
          .withOptionAbbreviation();
```

You can now also define `GlobalRestriction`s using the `withRestriction()` or `withRestrictions()` methods on your
`CliBuilder<T>`.  If you don't define any restrictions a default set that provides backwards behavioural compatibility
with Airline 1 is used.  This default set can also be explicitly added by calling `withDefaultRestrictions()` on your
builder.

## Defining CLIs via Annotation

Previously CLIs could only be defined via the `CliBuilder<T>`, Airline 2 introduces a new `@Cli`  annotation that can be
used to define a CLI via a class annotation.

For example the same example as the above could now be defined like so:

    @Cli(name = "cli",
             description = "A simple CLI with several commands available in groups",
             parser = @Parser(allowOptionAbbreviation = true, allowCommandAbbreviation = true))

A class annotated in this way can be used to create a `Cli` instance like so:

    Cli<ExampleRunnable> cli = new Cli<ExampleRunnable>(AnnotatedClass.class);

## Defining Single Commands

Previously you could not specify parser options when defining single commands, you are now able to pass in a
`ParserMetadata<T>` in order to specify parser options for single command parsing.

Alternatively you can add the `@Parser` annotation to your class and this will be automatically detected and used unless
you pass a `ParserMetadata<T>` explicitly to the `singleCommand()` method.

You may now also pass in the `GlobalRestriction`s that should apply, if you don't define any restrictions a default set
that provides backwards behavioural compatibility with Airline 1 is used

## Annotation Changes

All annotations are now located in the `com.github.rvesse.airline.annotations` package or in sub-packages thereof.

### Command Annotation Changes

Some extended help fields are no longer available directly on the `@Command` annotation and instead now have
their own specific annotations:

- `examples` moved to `@Examples`
- `discussion` moved to `@Discussion`
- `exitCodes` and `exitCodeDescriptions` moved to `@ExitCodes`

#### Migrating discussion

For example discussion in Airline 1:

```
@Command(name = "example", discussion = { "This is some discussion" })
public class MyCommand {

}
```

Becomes the following in Airline 2:

```
@Command(name = "example")
@Discussion(paragraphs = { "This is some discussion" })
public class MyCommand {

}
```

### Option Annotation Changes

Some fields of the `@Option` annotation that defined restrictions on options have been removed, namely these are the
`required`, `allowedValues` and `ignoreCase` attributes.  Option restrictions are now instead expressed with specific
annotations such as `@Required`.

When overriding existing options restrictions are inherited from the parent unless new restriction(s) are defined on the
overridden option.  If you simply want to remove all existing restrictions when overriding an option you can add the
`@Unrestricted` annotation to the overridden option.

#### Migrating Required Options

For example a required option in Airline 1:

    @Option(name = "--example", arity = 1, required = true)
    private String example;

Becomes the following in Airline 2:

    @Option(name = "--example", arity = 1)
    @Required
    private String example;

#### Migrating Allowed Values

Similarly an option with allowed values in Airline 1:

    @Option(name = "--example", arity = 1, allowedValues = { "a", "b", "c" })
    private String example;

Becomes the following in Airline 2:

    @Option(name = "--example", arity = 1)
    @AllowedRawValues(allowedValues = { "a", "b", "c" })
    private String example;

#### Arguments Annotation Changes

Similar to `@Option` the `@Arguments` annotation has changed to have the `required` field removed, as with options you
can now simply add the `@Required` annotation instead to indicate that arguments are required.

Arguments now allows for applying many different restrictions such as `@AllowedRawValues` to arguments.

## Exception Changes

All exceptions are now located in the `com.github.rvesse.airline.parser.errors` package of sub-packages there-of.

## Metadata Changes

### GlobalMetadata

The `GlobalMetadata` class is now a generic type i.e. `GlobalMetadata<T>` which provides better type safety but may
require changing the type signatures of existing code you have written against Airline 1

A new `getRestrictions()` method provides access to `GlobalRestriction` instances which represent global restrictions on
the CLI.

#### Accessing Parser Metadata

Parser settings were previously held directly on `GlobalMetadata`, they are now held in a `ParserMetadata<T>` class
which is accessed via the `getParserConfiguration()` method on `GlobalMetadata<T>`

### CommandMetadata

The extended help details are no longer expressed directly as fields but as instances of `HelpSection`.  The
`getHelpSections()` method provides access to the extended help sections present for a command.

### OptionMetadata

Restrictions on options such as `required` are no longer expressed directly as fields but as instances of
`OptionRestriction`.  The `isRequired()` method on `OptionMetadata` will check if the `IsRequiredRestriction` is present
for an option.

A `getRestrictions()` method provides access to all the restrictions that are present for an option.

### ArgumentsMetadata

Restrictions on arguments such as `required` are no longer expressed directly as fields but as instances of
`ArgumentsRestriction`.  The `isRequired()` method on `ArgumentsMetadata`will check if the `IsRequiredRestriction` is
present for the arguments.

A `getRestrictions()` method provides access to all the restrictions that are present for arguments.

## Restrictions

A new restrictions framework is introduced which allows much more complex restrictions to be specified and enforced.

A few examples are given in the following table, there are many more new restrictions supported by Airline 2 than just
these shown here:

| Restriction Class | Applicability | Annotation Class | Restriction |
| -------------- | ---------------- | -------------- | --------------- |
| `IsRequiredRestriction` | Options and Arguments | `@Required` | Indicates that options/arguments are required |
| `AllowedRawValuesRestriction` | Options and Arguments | `@AllowedRawValues` | Indicates that the raw string values passed to options/arguments must be in a given set of values.  May be configured to use custom locale and case insensitive comparisons as desired |
| `RangeRestriction` | Options and Arguments | `@LongRange`, `@IntegerRange`, `@ShortRange`, `@ByteRange`, `@DoubleRange`, `@FloatRange` | Indicates that the instantiated values for options/arguments must fall within a range of values |
| `None` | Global, Options and Arguments | `@Unrestricted` | Indicates that no restrictions apply, primarily useful if you need to override restrictions inherited from a parent option |

Option and argument restrictions are automatically discovered by examining the annotations present on fields marked with
`@Option` and `@Arguments`.  The `RestrictionRegistry` is used to map annotations into instances of `OptionRestriction`
or `ArgumentsRestriction` as appropriate.

Global restrictions are defined when you create a `Cli` or `SingleCommand` instance, if you don't define any the default
set which provides backwards compatibility with the global restrictions that applied in Airline 1 are used.

The `ParseRestrictionViolatedException` serves as the parent exception type for all exceptions pertaining to restriction
violations.

### Custom Restrictions

You can create your own custom restrictions by doing the following:

- Create a class that implements `OptionRestriction` and/or `ArgumentsRestriction` and enforces your restriction.  Each
  restriction interface has a different method signature so a restriction can be implemented that applies to
  multiple things.
- Create an annotation that you will use to denote your restriction.  Remember to specify the retention for your
  annotation as `RUNTIME`
- Create a class that implements `OptionRestrictionFactory` and/or `ArgumentsRestrictionFactory`. This class does the
  work of converting your annotation into a restriction instance
- Register your restriction:
  `RestrictionRegistry.addOptionRestriction(MyAnnotation.class, new MyRestrictionFactory());`

You can now apply your annotation to the option/arguments field you want to restrict.

## Extended Help

Extended help for commands is now specified via the `HelpSection` interface.  This interface allows for supporting a
variety of different extended help formats and the built-in help generators will automatically include discovered help
sections in their outputs.

This interface is itself derived from the more basic `HelpHint` interface.  This interface is typically implemented by
other classes that serve some function as well as provided some extended help such as `OptionRestriction`
implementations.  Again the built-in help generators will automatically include restrictions which provide help hints
when formatting help for options and arguments.

Similar to restrictions extra help sections are automatically discovered by examining the annotations present on classes
marked with `@Command`.  The `HelpSectionRegistry` is used to map annotations into instances of `HelpSection`.

### Help Section Inheritance

Help section annotations are automatically inherited so for example if all your commands have a common set of exit codes
you could define these once as an annotation on a super-class and all derives command classes would automatically
include that exit code section.  Where annotations for the same section (same section being determined by having the
case-insensitive same title) are defined multiple times in the class hierarchy the definition lowest in the hierarchy
wins i.e. a derived class can always override help sections inherited from their parents.

If you are extending an annotated class and want to hide a section that you would normally inherit you can do so by
adding the `@HideSection(title = "foo")` annotation where `foo` is the title of the section you wish to hide.

### Custom Help Sections

You can create your own custom help section by doing the following:

- Create a class that implements `HelpSection`, you can derive from `BasicSection` to get yourself started
- Create an annotation that you will use to denote your help section.  Remember to specify the retention for your
  annotation as `RUNTIME`
- Create a class that implements `HelpSectionFactory`.  This class does the work of converting your annotation into a
  `HelpSection` instance
- Register your help section:
    `HelpSectionRegistry.addFactory(MyAnnotation.class, new MySectionFactory());`

You can now apply your annotation to command classes for which you wish to provide extra help.

## Parsing Changes

### Option Parsing Styles

Airline 1 supported only three option parsing styles in the following preference order:

* Classic GNU GetOpt i.e. `-nFoo`
* Long GNU GetOpt  i.e. `--name=Foo`
* Whitespace separated ie. `--name Foo`

In this release option parsing is now separated out into its own extensible `OptionParser` interface that allows you to
customise how options are parsed.  You can call `withOptionParser()` or `withOptionParsers()` on your `ParserBuilder<T>`
to specify the option parsers to use in your desired preference order.

You can also call `withDefaultOptionParsers()` to start from the default Airline 1 setup and then add your own, or call
this after adding your own to use the default setup as your fallback.  If you don't explicitly configure any option
parsers then the default Airline 1 setup is used automatically.

A couple of other parsing styles are now available but not enabled by default:

* `ListValueOptionParser` - Supports parsing options specified in the form `--name a,b,c` where the values is split on a
  separator (default `,` but configurable as desired) and passed to the option.  This parser is strict in that it
  requires users invoking commands to provide list values with the correct number of entries present
* `MaybePairValueOptionParser` - Supports parsing options of arity 2 where they may be specified either as `--name a=b`
  or `--name a b` i.e. where the user may specify the values either separated by whitespace or some separator
  (default `=` but configurable as desired)

### Customisable Type Converters

In Airline 1 how raw string values were converted into the appropriate Java types was fixed, with Airline 2 you can now
configure the `TypeConverter` instance to use for this as desired.  This can be set via the `withTypeConverter()` method
on your `ParserBuilder<T>` instance.

Creating a custom `TypeConverter` implementation allows you complete control over how you want to convert raw string
values into Java types.

### Alias chaining

In Airline 1 aliases could not refer to other aliases, in Airline 2 this behaviour may be enabled and it permits aliases
to reference each other unless a circular reference is generated during alias resolution.

To enable this you can call `withAliasesChaining()` on a `ParserBuilder<T>` or create an appropriate `ParserMetadata<T>`
instance yourself with the appropriate parameter set to `true`.


text:
namespace mana {

inline bool path_starts_with(const std::string& path, const std::string& start) {
  if(path.size() < start.size())
    return false;
  if(path == start)
    return true;
  return path.substr(0, std::min(start.size(), path.size())) == start;
}

//-------------------------------
// This class is a simple dumb
// HTTP server for service testing
//-------------------------------
class Server {
private:
  //-------------------------------
  // Internal class type aliases
  //-------------------------------
  using Port      = const unsigned;
  using Path      = std::string;
  struct MappedCallback {
    Path path;
    Callback callback;
    MappedCallback(Path pth, Callback cb) : path(pth), callback(cb) {}
  };
  using MiddlewareStack = std::vector<MappedCallback>;
  //-------------------------------
public:

  explicit Server(net::TCP&, std::chrono::seconds timeout = http::Server::DEFAULT_IDLE_TIMEOUT);

  //-------------------------------
  // Default destructor
  //-------------------------------
  ~Server() noexcept = default;

  //-------------------------------
  // Get the underlying router
  // which contain route resolution
  // configuration
  //-------------------------------
  Router& router() noexcept;

  //-------------------------------
  // Install a new route table for
  // route resolutions
  //
  // @tparam (http::Router) new_routes - The new route table
  //                                     to install
  //
  // @return - The object that invoked this method
  //-------------------------------
  template <typename Route_Table>
  Server& set_routes(Route_Table&& routes);

  //-------------------------------
  // Start the server to listen for
  // incoming connections on the
  // specified port
  //-------------------------------
  void listen(Port port)
  { server_.listen(port); }

  void use(const Path&, Middleware_ptr);

  void use(Middleware_ptr mw)
  { use("/", std::move(mw)); }

  void use(const Path&, Callback);

  void use(Callback cb)
  { use("/", std::move(cb)); }

  http::Server& http_server() noexcept
  { return server_; }

  const http::Server& http_server() const noexcept
  { return server_; }

  size_t connected_clients() const noexcept
  { return server_.connected_clients(); }

private:
  //-------------------------------
  // Class data members
  //-------------------------------
  http::Server                server_;
  Router                      router_;
  MiddlewareStack             middleware_;
  std::vector<Middleware_ptr> mw_storage_;

  //-----------------------------------
  // Deleted move and copy operations
  //-----------------------------------
  Server(const Server&) = delete;
  Server(Server&&) = delete;

  //-----------------------------------
  // Deleted move and copy assignment operations
  //-----------------------------------
  Server& operator = (const Server&) = delete;
  Server& operator = (Server&&) = delete;

  void handle_request(http::Request_ptr, http::Response_writer_ptr);

  void process(Request_ptr req, Response_ptr res);

  void process_route(Request_ptr, Response_ptr);

}; //< class Server

template <typename Route_Table>
inline Server& Server::set_routes(Route_Table&& routes) {
  router_.install_new_configuration(std::forward<Route_Table>(routes));
  return *this;
}

} // namespace mana

#endif //< MANA_SERVER_HPP


text:
<!DOCTYPE html><html><head><meta charset="utf-8" />
<meta http-equiv="refresh" content="0;url=/place/brazil/emissions/" />
</head></html>


text:
using Casanova.Prelude;
using System.Linq;
using System;
using System.Collections.Generic;
using UnityEngine;
public class World : MonoBehaviour{
public static int frame;
void Update () { Update(Time.deltaTime, this);
 frame++; }
public bool JustEntered = true;

public void Start()
	{		Velocity = new UnityEngine.Vector3(3f,0.5f,1f);
		UnityCube = UnityCube.Find();
		}
		public UnityEngine.Vector3 Position{  get { return UnityCube.Position; }
  set{UnityCube.Position = value; }
 }
	public UnityCube UnityCube;
	public UnityEngine.Vector3 Velocity;
	public UnityEngine.Animation animation{  get { return UnityCube.animation; }
 }
	public UnityEngine.AudioSource audio{  get { return UnityCube.audio; }
 }
	public UnityEngine.Camera camera{  get { return UnityCube.camera; }
 }
	public UnityEngine.Collider collider{  get { return UnityCube.collider; }
 }
	public UnityEngine.Collider2D collider2D{  get { return UnityCube.collider2D; }
 }
	public UnityEngine.ConstantForce constantForce{  get { return UnityCube.constantForce; }
 }
	public System.Boolean enabled{  get { return UnityCube.enabled; }
  set{UnityCube.enabled = value; }
 }
	public UnityEngine.GameObject gameObject{  get { return UnityCube.gameObject; }
 }
	public UnityEngine.GUIElement guiElement{  get { return UnityCube.guiElement; }
 }
	public UnityEngine.GUIText guiText{  get { return UnityCube.guiText; }
 }
	public UnityEngine.GUITexture guiTexture{  get { return UnityCube.guiTexture; }
 }
	public UnityEngine.HideFlags hideFlags{  get { return UnityCube.hideFlags; }
  set{UnityCube.hideFlags = value; }
 }
	public UnityEngine.HingeJoint hingeJoint{  get { return UnityCube.hingeJoint; }
 }
	public UnityEngine.Light light{  get { return UnityCube.light; }
 }
	public System.String name{  get { return UnityCube.name; }
  set{UnityCube.name = value; }
 }
	public UnityEngine.ParticleEmitter particleEmitter{  get { return UnityCube.particleEmitter; }
 }
	public UnityEngine.ParticleSystem particleSystem{  get { return UnityCube.particleSystem; }
 }
	public UnityEngine.Renderer renderer{  get { return UnityCube.renderer; }
 }
	public UnityEngine.Rigidbody rigidbody{  get { return UnityCube.rigidbody; }
 }
	public UnityEngine.Rigidbody2D rigidbody2D{  get { return UnityCube.rigidbody2D; }
 }
	public System.String tag{  get { return UnityCube.tag; }
  set{UnityCube.tag = value; }
 }
	public UnityEngine.Transform transform{  get { return UnityCube.transform; }
 }
	public System.Boolean useGUILayout{  get { return UnityCube.useGUILayout; }
  set{UnityCube.useGUILayout = value; }
 }
	public void Update(float dt, World world) {
		this.Rule0(dt, world);

	}
	public void Rule0(float dt, World world)
	{
	Position = (Position) + ((Velocity) * (dt));
	}

}


text:
package org.apache.beam.sdk;

import com.google.protobuf.ByteString;
import java.io.Serializable;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeMatcher;

/**
 * Matchers that are useful when writing Dataflow tests.
 */
public class DataflowMatchers {
  /**
   * Matcher for {@link ByteString} that prints the strings in UTF8.
   */
  public static class ByteStringMatcher extends TypeSafeMatcher<ByteString>
      implements Serializable {
    private ByteString expected;
    private ByteStringMatcher(ByteString expected) {
      this.expected = expected;
    }

    public static ByteStringMatcher byteStringEq(ByteString expected) {
      return new ByteStringMatcher(expected);
    }

    @Override
    public void describeTo(Description description) {
      description
          .appendText("ByteString(")
          .appendText(expected.toStringUtf8())
          .appendText(")");
    }

    @Override
    public void describeMismatchSafely(ByteString actual, Description description) {
      description
          .appendText("was ByteString(")
          .appendText(actual.toStringUtf8())
          .appendText(")");
    }

    @Override
    protected boolean matchesSafely(ByteString actual) {
      return actual.equals(expected);
    }
  }
}


text:
             {{'private-menu.main' | translate}}

             {{'private-menu.spaces' | translate}}

             {{'private-menu.models' | translate}}

             {{'private-menu.profile' | translate}}

             {{'private-menu.logout' | translate}}


text:
/// <reference path="ItemsHoldr-0.2.1.ts" />

declare module AudioPlayr {
    /**
     * Lookup for directories to the sounds contained within.
     */
    export interface ILibrarySettings {
        [i: string]: string[];
    }

    /**
     * Lookup for HTMLAudioElements keyed by their names.
     */
    export interface ISoundsLibrary {
        [i: string]: HTMLAudioElement;
    }

    /**
     * Lookup for directories of sounds to their sound libraries.
     */
    export interface IDirectoriesLibrary {
        [i: string]: ISoundsLibrary;
    }

    /**
     * Settings to initialize a new instance of an IAudioPlayr.
     */
    export interface IAudioPlayrSettings {
        /**
         * The names of the audio files to be preloaded for on-demand playback.
         */
        library: ILibrarySettings;

        /**
         * The directory in which all sub-directories of audio files are stored.
         */
        directory: string;

        /**
         * The allowed filetypes for each audio file. Each of these should have a
         * directory of their name under the main directory, which should contain
         * each file of the filetype.
         */
        fileTypes: string[];

        /**
         * A storage container to store mute/volume status locally. This can be
         * either a ItemsHoldr or localStorage equivalent.
         */
        ItemsHolder: ItemsHoldr.IItemsHoldr | Storage;

        /**
         * A String or Function to get the default theme for playTheme calls.
         * Functions are called for a return value, and Strings are constant
         * (defaults to "Theme").
         *
         */
        getThemeDefault?: string | { (...args: any[]): string };

        /**
         * A Number or Function to get the "local" volume for playLocal calls.
         * Functions are called for a return value, and Numbers are constant
         * (defaults to 1).
         *
         */
        getVolumeLocal?: number | { (...args: any[]): number };
    }

    /**
     * An audio library to automate preloading and controlled playback of multiple
     * audio tracks, with support for different browsers' preferred file types.
     */
    export interface IAudioPlayr {
        /**
         * @returns The listing of <audio> Elements, keyed by name.
         */
        getLibrary(): any;

        /**
         * @returns The allowed filetypes for audio files.
         */
        getFileTypes(): string[];

        /**
         * @returns The currently playing <audio> Elements, keyed by name.
         */
        getSounds(): any;

        /**
         * @returns The current playing theme's <audio> Element.
         */
        getTheme(): HTMLAudioElement;

        /**
         * @returns The name of the currently playing theme.
         */
        getThemeName(): string;

        /**
         * @returns The directory under which all filetype directories are to be located.
         */
        getDirectory(): string;

        /**
         * @returns The current volume as a Number in [0,1], retrieved by the ItemsHoldr.
         */
        getVolume(): number;

        /**
         * Sets the current volume. If not muted, all sounds will have their volume
         * updated.
         *
         * @param volume   A Number in [0,1] to set as the current volume.
         */
        setVolume(volume: number): void;

        /**
         * @returns Whether this is currently muted.
         */
        getMuted(): boolean;

        /**
         * Calls either setMutedOn or setMutedOff as is appropriate.
         *
         * @param muted   The new status for muted.
         */
        setMuted(muted: boolean): void;

        /**
         * Calls either setMutedOn or setMutedOff to toggle whether this is muted.
         */
        toggleMuted(): void;

        /**
         * Sets volume to 0 in all currently playing sounds and stores the muted
         * status as on in the internal ItemsHoldr.
         */
        setMutedOn(): void;

        /**
         * Sets sound volumes to their actual volumes and stores the muted status
         * as off in the internal ItemsHoldr.
         */
        setMutedOff(): void;

        /**
         * @returns The Function or Number used as the volume setter for local sounds.
         */
        getGetVolumeLocal(): any;

        /**
         * @param getVolumeLocal   A new Function or Number to use as the volume setter
         *                         for local sounds.
         */
        setGetVolumeLocal(getVolumeLocalNew: any): void;

        /**
         * @returns The Function or String used to get the default theme for playTheme.
         */
        getGetThemeDefault(): any;

        /**
         * @param getThemeDefaultNew A new Function or String to use as the source for
         *                           theme names in default playTheme calls.
         */
        setGetThemeDefault(getThemeDefaultNew: any): void;

        /**
         * Plays the sound of the given name.
         *
         * @param name   The name of the sound to play.
         * @returns The sound's <audio> element, now playing.
         * @remarks Internally, this stops any previously playing sound of that name
         *          and starts a new one, with volume set to the current volume and
         *          muted status. If the name wasn't previously being played (and
         *          therefore a new Element has been created), an event listener is
         *          added to delete it from sounds after.
         */
        play(name: string): HTMLAudioElement;

        /**
         * Pauses all currently playing sounds.
         */
        pauseAll(): void;

        /**
         * Un-pauses (resumes) all currently paused sounds.
         */
        resumeAll(): void;

        /**
         * Pauses the currently playing theme, if there is one.
         */
        pauseTheme(): void;

        /**
         * Resumes the theme, if there is one and it's paused.
         */
        resumeTheme(): void;

        /**
         * Stops all sounds and any theme, and removes all references to them.
         */
        clearAll(): void;

        /**
         * Pauses and removes the theme, if there is one.
         */
        clearTheme(): void;

        /**
         * "Local" version of play that changes the output sound's volume depending
         * on the result of a getVolumeLocal call.
         *
         * @param name   The name of the sound to play.
         * @param location   An argument for getVolumeLocal, if that's a Function.
         * @returns The sound's <audio> element, now playing.
         */
        playLocal(name: string, location?: any): HTMLAudioElement;

        /**
         * Pauses any previously playing theme and starts playback of a new theme.
         *
         * @param name   The name of the sound to be used as the theme. If not
         *               provided, getThemeDefault is used to
         *                          provide one.
         * @param loop   Whether the theme should always loop (by default, true).
         * @returns The theme's <audio> element, now playing.
         * @remarks This is different from normal sounds in that it normally loops
         *          and is controlled by pauseTheme and co. If loop is on and the
         *          sound wasn't already playing, an event listener is added for
         *          when it ends.
         */
        playTheme(name?: string, loop?: boolean): HTMLAudioElement;

        /**
         * Wrapper around playTheme that plays a sound, then a theme. This is
         * implemented using an event listener on the sound's ending.
         *
         * @param prefix    The name of a sound to play before the theme.
         * @param name   The name of the sound to be used as the theme. If not
         *               provided, getThemeDefault is used to
         *                          provide one.
         * @param loop   Whether the theme should always loop (by default, false).
         * @returns The sound's <audio> element, now playing.
         */
        playThemePrefixed(prefix?: string, name?: string, loop?: boolean): HTMLAudioElement;

        /**
         * Adds an event listener to a currently playing sound. The sound will keep
         * track of event listeners via an .addedEvents attribute, so they can be
         * cancelled later.
         *
         * @param name   The name of the sound.
         * @param event   The name of the event, such as "ended".
         * @param callback   The Function to be called by the event.
         */
        addEventListener(name: string, event: string, callback: any): void;

        /**
         * Clears all events added by this.addEventListener to a sound under a given
         * event.
         *
         * @param name   The name of the sound.
         * @param event   The name of the event, such as "ended".
         */
        removeEventListeners(name: string, event: string): void;

        /**
         * Adds an event listener to a sound. If the sound doesn't exist or has
         * finished playing, it's called immediately.
         *
         * @param name   The name of the sound.
         * @param event   The name of the event, such as "onended".
         * @param callback   The Function to be called by the event.
         */
        addEventImmediate(name: string, event: string, callback: any): void;
    }
}

module AudioPlayr {
    "use strict";

    /**
     * An audio library to automate preloading and controlled playback of multiple
     * audio tracks, with support for different browsers' preferred file types.
     */
    export class AudioPlayr implements IAudioPlayr {
        /**
         * HTMLAudioElements keyed by their name.
         */
        private library: ISoundsLibrary;

        /**
         * Directories mapping folder names to sound libraries.
         */
        private directories: IDirectoriesLibrary;

        /**
         * What file types to add as sources to sounds.
         */
        private fileTypes: string[];

        /**
         * Currently playing sound objects, keyed by name (excluding extensions).
         */
        private sounds: ISoundsLibrary;

        /**
         * The currently playing theme.
         */
        private theme: HTMLAudioElement;

        /**
         * The name of the currently playing theme.
         */
        private themeName: string;

        /**
         * Directory from which audio files are AJAXed upon startup.
         */
        private directory: string;

        /**
         * The Function or Number used to determine what playLocal's volume is.
         */
        private getVolumeLocal: any;

        /**
         * The Function or String used to get a default theme name.
         */
        private getThemeDefault: any;

        /**
         * Storage container for settings like volume and muted status.
         */
        private ItemsHolder: ItemsHoldr.IItemsHoldr | Storage;

        /**
         * Initializes a new instance of the AudioPlayr class.
         *
         * @param settings   Settings to use for initialization.
         */
        constructor(settings: IAudioPlayrSettings) {
            if (typeof settings.library === "undefined") {
                throw new Error("No library given to AudioPlayr.");
            }

            if (typeof settings.directory === "undefined") {
                throw new Error("No directory given to AudioPlayr.");
            }

            if (typeof settings.fileTypes === "undefined") {
                throw new Error("No fileTypes given to AudioPlayr.");
            }

            if (!settings.ItemsHolder) {
                throw new Error("No ItemsHoldr given to AudioPlayr.");
            }

            var volumeInitial: number;

            this.ItemsHolder = settings.ItemsHolder;

            this.directory = settings.directory;
            this.fileTypes = settings.fileTypes;
            this.getThemeDefault = settings.getThemeDefault || "Theme";
            this.getVolumeLocal = typeof settings.getVolumeLocal === "undefined"
                ? 1 : settings.getVolumeLocal;

            // Sounds should always start blank
            this.sounds = {};

            // Preload everything!
            this.generateLibraryFromSettings(settings.library);

            volumeInitial = this.ItemsHolder.getItem("volume");
            if (volumeInitial === undefined) {
                this.setVolume(1);
            } else {
                this.setVolume(volumeInitial);
            }

            this.setMuted(this.ItemsHolder.getItem("muted") || false);
        }

        /* Simple getters
        */

        /**
         * @returns The listing of <audio> Elements, keyed by name.
         */
        getLibrary(): any {
            return this.library;
        }

        /**
         * @returns The allowed filetypes for audio files.
         */
        getFileTypes(): string[] {
            return this.fileTypes;
        }

        /**
         * @returns The currently playing <audio> Elements, keyed by name.
         */
        getSounds(): any {
            return this.sounds;
        }

        /**
         * @returns The current playing theme's <audio> Element.
         */
        getTheme(): HTMLAudioElement {
            return this.theme;
        }

        /**
         * @returns The name of the currently playing theme.
         */
        getThemeName(): string {
            return this.themeName;
        }

        /**
         * @returns The directory under which all filetype directories are to be located.
         */
        getDirectory(): string {
            return this.directory;
        }

        /* Playback modifiers
        */

        /**
         * @returns The current volume as a Number in [0,1], retrieved by the ItemsHoldr.
         */
        getVolume(): number {
            return Number(this.ItemsHolder.getItem("volume") || 0);
        }

        /**
         * Sets the current volume. If not muted, all sounds will have their volume
         * updated.
         *
         * @param volume   A Number in [0,1] to set as the current volume.
         */
        setVolume(volume: number): void {
            var i: string;

            if (!this.getMuted()) {
                for (i in this.sounds) {
                    if (this.sounds.hasOwnProperty(i)) {
                        this.sounds[i].volume = Number(this.sounds[i].getAttribute("volumeReal")) * volume;
                    }
                }
            }

            this.ItemsHolder.setItem("volume", volume.toString());
        }

        /**
         * @returns Whether this is currently muted.
         */
        getMuted(): boolean {
            return Boolean(Number(this.ItemsHolder.getItem("muted")));
        }

        /**
         * Calls either setMutedOn or setMutedOff as is appropriate.
         *
         * @param muted   The new status for muted.
         */
        setMuted(muted: boolean): void {
            this.getMuted() ? this.setMutedOn() : this.setMutedOff();
        }

        /**
         * Calls either setMutedOn or setMutedOff to toggle whether this is muted.
         */
        toggleMuted(): void {
            this.setMuted(!this.getMuted());
        }

        /**
         * Sets volume to 0 in all currently playing sounds and stores the muted
         * status as on in the internal ItemsHoldr.
         */
        setMutedOn(): void {
            var i: string;

            for (i in this.sounds) {
                if (this.sounds.hasOwnProperty(i)) {
                    this.sounds[i].volume = 0;
                }
            }

            this.ItemsHolder.setItem("muted", "1");
        }

        /**
         * Sets sound volumes to their actual volumes and stores the muted status
         * as off in the internal ItemsHoldr.
         */
        setMutedOff(): void {
            var volume: number = this.getVolume(),
                sound: HTMLAudioElement,
                i: string;

            for (i in this.sounds) {
                if (this.sounds.hasOwnProperty(i)) {
                    sound = this.sounds[i];
                    sound.volume = Number(sound.getAttribute("volumeReal")) * volume;
                }
            }

            this.ItemsHolder.setItem("muted", "0");
        }

        /* Other modifiers
        */

        /**
         * @returns The Function or Number used as the volume setter for local sounds.
         */
        getGetVolumeLocal(): any {
            return this.getVolumeLocal;
        }

        /**
         * @param getVolumeLocal   A new Function or Number to use as the volume setter
         *                         for local sounds.
         */
        setGetVolumeLocal(getVolumeLocalNew: any): void {
            this.getVolumeLocal = getVolumeLocalNew;
        }

        /**
         * @returns The Function or String used to get the default theme for playTheme.
         */
        getGetThemeDefault(): any {
            return this.getThemeDefault;
        }

        /**
         * @param getThemeDefaultNew A new Function or String to use as the source for
         *                           theme names in default playTheme calls.
         */
        setGetThemeDefault(getThemeDefaultNew: any): void {
            this.getThemeDefault = getThemeDefaultNew;
        }

        /* Playback
        */

        /**
         * Plays the sound of the given name.
         *
         * @param name   The name of the sound to play.
         * @returns The sound's <audio> element, now playing.
         * @remarks Internally, this stops any previously playing sound of that name
         *          and starts a new one, with volume set to the current volume and
         *          muted status. If the name wasn't previously being played (and
         *          therefore a new Element has been created), an event listener is
         *          added to delete it from sounds after.
         */
        play(name: string): HTMLAudioElement {
            var sound: HTMLAudioElement,
                used: number;

            // If the sound isn't yet being played, see if it's in the library
            if (!this.sounds.hasOwnProperty(name)) {
                // If the sound also isn't in the library, it's unknown
                if (!this.library.hasOwnProperty(name)) {
                    throw new Error("Unknown name given to AudioPlayr.play: '" + name + "'.");
                }
                sound = this.sounds[name] = this.library[name];
            } else {
                sound = this.sounds[name];
            }

            this.soundStop(sound);

            if (this.getMuted()) {
                sound.volume = 0;
            } else {
                sound.setAttribute("volumeReal", "1");
                sound.volume = this.getVolume();
            }

            this.playSound(sound);
            used = Number(sound.getAttribute("used"));

            // If this is the song's first play, let it know how to stop
            if (!used) {
                sound.setAttribute("used", String(used + 1));
                sound.addEventListener("ended", this.soundFinish.bind(this, name));
            }

            sound.setAttribute("name", name);
            return sound;
        }

        /**
         * Pauses all currently playing sounds.
         */
        pauseAll(): void {
            var i: string;

            for (i in this.sounds) {
                if (this.sounds.hasOwnProperty(i)) {
                    this.pauseSound(this.sounds[i]);
                }
            }
        }

        /**
         * Un-pauses (resumes) all currently paused sounds.
         */
        resumeAll(): void {
            var i: string;

            for (i in this.sounds) {
                if (!this.sounds.hasOwnProperty(i)) {
                    continue;
                }
                this.playSound(this.sounds[i]);
            }
        }

        /**
         * Pauses the currently playing theme, if there is one.
         */
        pauseTheme(): void {
            if (this.theme) {
                this.pauseSound(this.theme);
            }
        }

        /**
         * Resumes the theme, if there is one and it's paused.
         */
        resumeTheme(): void {
            if (this.theme) {
                this.playSound(this.theme);
            }
        }

        /**
         * Stops all sounds and any theme, and removes all references to them.
         */
        clearAll(): void {
            this.pauseAll();
            this.clearTheme();
            this.sounds = {};
        }

        /**
         * Pauses and removes the theme, if there is one.
         */
        clearTheme(): void {
            if (!this.theme) {
                return;
            }

            this.pauseTheme();
            delete this.sounds[this.theme.getAttribute("name")];
            this.theme = undefined;
            this.themeName = undefined;
        }

        /**
         * "Local" version of play that changes the output sound's volume depending
         * on the result of a getVolumeLocal call.
         *
         * @param name   The name of the sound to play.
         * @param location   An argument for getVolumeLocal, if that's a Function.
         * @returns The sound's <audio> element, now playing.
         */
        playLocal(name: string, location?: any): HTMLAudioElement {
            var sound: HTMLAudioElement = this.play(name),
                volumeReal: number;

            switch (this.getVolumeLocal.constructor) {
                case Function:
                    volumeReal = this.getVolumeLocal(location);
                    break;
                case Number:
                    volumeReal = this.getVolumeLocal;
                    break;
                default:
                    volumeReal = Number(this.getVolumeLocal) || 1;
                    break;
            }

            sound.setAttribute("volumeReal", String(volumeReal));

            if (this.getMuted()) {
                sound.volume = 0;
            } else {
                sound.volume = volumeReal * this.getVolume();
            }

            return sound;
        }

        /**
         * Pauses any previously playing theme and starts playback of a new theme.
         *
         * @param name   The name of the sound to be used as the theme. If not
         *               provided, getThemeDefault is used to
         *                          provide one.
         * @param loop   Whether the theme should always loop (by default, true).
         * @returns The theme's <audio> element, now playing.
         * @remarks This is different from normal sounds in that it normally loops
         *          and is controlled by pauseTheme and co. If loop is on and the
         *          sound wasn't already playing, an event listener is added for
         *          when it ends.
         */
        playTheme(name?: string, loop?: boolean): HTMLAudioElement {
            this.pauseTheme();

            // Loop defaults to true
            loop = typeof loop !== "undefined" ? loop : true;

            // If name isn't given, use the default getter
            if (typeof name === "undefined") {
                switch (this.getThemeDefault.constructor) {
                    case Function:
                        name = this.getThemeDefault();
                        break;
                    default:
                        name = this.getThemeDefault;
                        break;
                }
            }

            // If a theme already exists, kill it
            if (typeof this.theme !== "undefined" && this.theme.hasAttribute("name")) {
                delete this.sounds[this.theme.getAttribute("name")];
            }

            this.themeName = name;
            this.theme = this.sounds[name] = this.play(name);
            this.theme.loop = loop;

            // If it's used (no repeat), add the event listener to resume theme
            if (this.theme.getAttribute("used") === "1") {
                this.theme.addEventListener("ended", this.playTheme.bind(this));
            }

            return this.theme;
        }

        /**
         * Wrapper around playTheme that plays a sound, then a theme. This is
         * implemented using an event listener on the sound's ending.
         *
         * @param prefix    The name of a sound to play before the theme.
         * @param name   The name of the sound to be used as the theme. If not
         *               provided, getThemeDefault is used to
         *                          provide one.
         * @param loop   Whether the theme should always loop (by default, false).
         * @returns The sound's <audio> element, now playing.
         */
        playThemePrefixed(prefix: string, name?: string, loop?: boolean): HTMLAudioElement {
            var sound: HTMLAudioElement = this.play(prefix);

            this.pauseTheme();

            // If name isn't given, use the default getter
            if (typeof name === "undefined") {
                switch (this.getThemeDefault.constructor) {
                    case Function:
                        name = this.getThemeDefault();
                        break;
                    default:
                        name = this.getThemeDefault;
                        break;
                }
            }

            this.addEventListener(prefix, "ended", this.playTheme.bind(this, prefix + " " + name, loop));

            return sound;
        }

        /* Public utilities
        */

        /**
         * Adds an event listener to a currently playing sound. The sound will keep
         * track of event listeners via an .addedEvents attribute, so they can be
         * cancelled later.
         *
         * @param name   The name of the sound.
         * @param event   The name of the event, such as "ended".
         * @param callback   The Function to be called by the event.
         */
        addEventListener(name: string, event: string, callback: any): void {
            var sound: any = this.library[name];

            if (!sound) {
                throw new Error("Unknown name given to addEventListener: '" + name + "'.");
            }

            if (!sound.addedEvents) {
                sound.addedEvents = {};
            }

            if (!sound.addedEvents[event]) {
                sound.addedEvents[event] = [callback];
            } else {
                sound.addedEvents[event].push(callback);
            }

            sound.addEventListener(event, callback);
        }

        /**
         * Clears all events added by this.addEventListener to a sound under a given
         * event.
         *
         * @param name   The name of the sound.
         * @param event   The name of the event, such as "ended".
         */
        removeEventListeners(name: string, event: string): void {
            var sound: any = this.library[name],
                events: any,
                i: number;

            if (!sound) {
                throw new Error("Unknown name given to removeEventListeners: '" + name + "'.");
            }

            if (!sound.addedEvents) {
                return;
            }

            events = sound.addedEvents[event];
            if (!events) {
                return;
            }

            for (i = 0; i < events.length; i += 1) {
                sound.removeEventListener(event, events[i]);
            }

            events.length = 0;
        }

        /**
         * Adds an event listener to a sound. If the sound doesn't exist or has
         * finished playing, it's called immediately.
         *
         * @param name   The name of the sound.
         * @param event   The name of the event, such as "onended".
         * @param callback   The Function to be called by the event.
         */
        addEventImmediate(name: string, event: string, callback: any): void {
            if (!this.sounds.hasOwnProperty(name) || this.sounds[name].paused) {
                callback();
                return;
            }

            this.sounds[name].addEventListener(event, callback);
        }

        /* Private utilities
        */

        /**
         * Called when a sound has completed to get it out of sounds.
         *
         * @param name   The name of the sound that just finished.
         */
        private soundFinish(name: string): void {
            if (this.sounds.hasOwnProperty(name)) {
                delete this.sounds[name];
            }
        }

        /**
         * Carefully stops a sound. HTMLAudioElement don't natively have a .stop()
         * function, so this is the shim to do that.
         */
        private soundStop(sound: HTMLAudioElement): void {
            this.pauseSound(sound);
            if (sound.readyState) {
                sound.currentTime = 0;
            }
        }

        /* Private loading / resetting
        */

        /**
         * Loads every sound defined in the library via AJAX. Sounds are loaded
         * into <audio> elements via createAudio and stored in the library.
         */
        private generateLibraryFromSettings(librarySettings: ILibrarySettings): void {
            var directory: ISoundsLibrary = {},
                directorySoundNames: string[],
                directoryName: string,
                name: string,
                j: number;

            this.library = {};
            this.directories = {};

            // For each given directory (e.g. names, themes):
            for (directoryName in librarySettings) {
                if (!librarySettings.hasOwnProperty(directoryName)) {
                    continue;
                }

                directory = {};
                directorySoundNames = librarySettings[directoryName];

                // For each audio file to be loaded in that directory:
                for (j = 0; j < directorySoundNames.length; j += 1) {
                    name = directorySoundNames[j];

                    // Create the sound and store it in the container
                    this.library[name] = directory[name] = this.createAudio(name, directoryName);
                }

                // The full directory is stored in the master directories
                this.directories[directoryName] = directory;
            }
        }

        /**
         * Creates an audio element, gives it sources, and starts preloading.
         *
         * @param name   The name of the sound to play.
         * @param sectionName   The name of the directory containing the sound.
         * @returns An <audio> element ocntaining the sound, currently playing.
         */
        private createAudio(name: string, directory: string): HTMLAudioElement {
            var sound: HTMLAudioElement = document.createElement("audio"),
                sourceType: string,
                child: HTMLSourceElement,
                i: number;

            // Create an audio source for each child
            for (i = 0; i < this.fileTypes.length; i += 1) {
                sourceType = this.fileTypes[i];
                child = <HTMLSourceElement>document.createElement("source");

                child.type = "audio/" + sourceType;
                child.src = this.directory + "/" + directory + "/" + sourceType + "/" + name + "." + sourceType;

                sound.appendChild(child);
            }

            // This preloads the sound.
            sound.volume = 0;
            sound.setAttribute("volumeReal", "1");
            sound.setAttribute("used", "0");
            this.playSound(sound);

            return sound;
        }

        /**
         * Utility to try to play a sound, which may not be possible in headless
         * environments like PhantomJS.
         *
         * @param sound   An <audio> element to play.
         * @returns Whether the sound was able to play.
         */
        private playSound(sound: HTMLAudioElement): boolean {
            if (sound && sound.play) {
                sound.play();
                return true;
            }

            return false;
        }

        /**
         * Utility to try to pause a sound, which may not be possible in headless
         * environments like PhantomJS.
         *
         * @param sound   An <audio> element to pause.
         * @returns Whether the sound was able to pause.
         */
        private pauseSound(sound: HTMLAudioElement): boolean {
            if (sound && sound.pause) {
                sound.pause();
                return true;
            }

            return false;
        }
    }
}


text:
import EmberObject from '../../system/object';
import { AbstractTestCase } from 'internal-test-helpers';
import { runArrayTests } from '../helpers/array';

class InvokeTests extends AbstractTestCase {
  '@test invoke should call on each object that implements'() {
    let cnt, ary, obj;

    function F(amt) {
      cnt += amt === undefined ? 1 : amt;
    }
    cnt = 0;
    ary = [
      { foo: F },
      EmberObject.create({ foo: F }),

      // NOTE: does not impl foo - invoke should just skip
      EmberObject.create({ bar: F }),

      { foo: F },
    ];

    obj = this.newObject(ary);
    obj.invoke('foo');
    this.assert.equal(cnt, 3, 'should have invoked 3 times');

    cnt = 0;
    obj.invoke('foo', 2);
    this.assert.equal(cnt, 6, 'should have invoked 3 times, passing param');
  }
}

runArrayTests('invoke', InvokeTests);


text:
    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
    <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,900' rel='stylesheet' type='text/css'>

               The GreenUp-VT app available for iOS, Android, and mobile web browsers, is a not-for-profit project developed by XenonApps.com for the Green Up Vermont organization, meant to make the annual Green-Up day more efficient and better organized, while providing valuable data to help coordinate future Green-Up days.

   Green Up Vermont is a nonprofit organization with 501(c)(3) status. Green Up's mission is to promote the stewardship of our state's natural landscape and waterways and the livability of our communities by involving people in Green Up Day and raising public awareness about the benefits of a litter-free environment.

               The app anonymously gathers GPS data from your mobile device while you work, which, when compiled with the data of other participants, is plotted as a heat map, providing all participants with a comprehensive overview of the areas that have already been cleaned and the areas that require more attention. Furthermore, the app allows participants to comment on the needs of specific locations with geocoded messages aggregated in our comments section.

Click on the app to begin a tour


text:
class UpdateReferencesColumnNames < ActiveRecord::Migration
  def change
    rename_column :references, :url, :documentation_url
    rename_column :references, :gem_name, :name
    #removing dependencies column and making the datatype Text instead of string
    remove_column :references, :dependencies
    add_column :references, :dependencies, :text
  end
end