text:
package com.martinjonsson01.sqtechpumps;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.inventory.InventoryClickEvent;

import com.martinjonsson01.sqtechpumps.objects.LargeTank;
import com.martinjonsson01.sqtechpumps.objects.MediumTank;
import com.martinjonsson01.sqtechpumps.objects.Pump;
import com.martinjonsson01.sqtechpumps.objects.SmallTank;
import com.starquestminecraft.sqtechbase.SQTechBase;
import com.starquestminecraft.sqtechbase.objects.Fluid;
import com.starquestminecraft.sqtechbase.objects.GUIBlock;
import com.starquestminecraft.sqtechbase.objects.Machine;
import com.starquestminecraft.sqtechbase.util.ObjectUtils;

import net.countercraft.movecraft.craft.Craft;
import net.countercraft.movecraft.event.CraftReleaseEvent;
import net.countercraft.movecraft.event.CraftSyncTranslateEvent;
import net.countercraft.movecraft.utils.MovecraftLocation;
import net.md_5.bungee.api.ChatColor;

public class Events implements Listener{

	@EventHandler
	public void onLiquidFlow(BlockFromToEvent e) {

		if (SQTechPumps.waterBlocks != null) {

			for (Machine m : SQTechPumps.waterBlocks.keySet()) {

				if (SQTechPumps.waterBlocks.get(m).contains(e.getBlock()) || SQTechPumps.waterBlocks.get(m).contains(e.getToBlock())) {

					e.setCancelled(true);

				}

			}

		}

	}

	@EventHandler
	public void onTankWaterDisappear(BlockPhysicsEvent e) {

		if (e.getChangedType() == Material.SAND) return;

		if (e.getChangedType() == Material.GRAVEL) return;

		for (Machine m : SQTechPumps.tankWaterBlocks.keySet()) {

			if (SQTechPumps.tankWaterBlocks.get(m).contains(e.getBlock())) {

				e.setCancelled(true);

			}

		}

	}

	@EventHandler
	public void onInventoryClick(InventoryClickEvent e) {

		if (e.getInventory().getName().equals(ChatColor.BLUE + "SQTech - Choose small tank type")) {

			e.setCancelled(true);

			Machine machine = SQTechPumps.inventoryMap.get(e.getInventory());

			if (e.getSlot() == 10) {
				//Lava
				for (Fluid f : SQTechBase.fluids) {
					if (f.name.equals("Lava")) {
						machine.maxLiquid.put(f, SQTechPumps.config.getInt("small tank max liquid"));
						machine.liquidImports.add(f);
						e.getWhoClicked().closeInventory();
						machine.getGUI((Player) e.getWhoClicked()).open();
					}
				}

			} else if (e.getSlot() == 16) {
				//Water
				for (Fluid f : SQTechBase.fluids) {
					if (f.name.equals("Water")) {
						machine.maxLiquid.put(f, SQTechPumps.config.getInt("small tank max liquid"));
						machine.liquidImports.add(f);
						e.getWhoClicked().closeInventory();
						machine.getGUI((Player) e.getWhoClicked()).open();
					}
				}

			}

		} else if (e.getInventory().getName().equals(ChatColor.BLUE + "SQTech - Choose medium tank type")) {

			e.setCancelled(true);

			Machine machine = SQTechPumps.inventoryMap.get(e.getInventory());

			if (e.getSlot() == 10) {
				//Lava
				for (Fluid f : SQTechBase.fluids) {
					if (f.name.equals("Lava")) {
						machine.maxLiquid.put(f, SQTechPumps.config.getInt("medium tank max liquid"));
						machine.liquidImports.add(f);
						e.getWhoClicked().closeInventory();
						machine.getGUI((Player) e.getWhoClicked()).open();
					}
				}

			} else if (e.getSlot() == 16) {
				//Water
				for (Fluid f : SQTechBase.fluids) {
					if (f.name.equals("Water")) {
						machine.maxLiquid.put(f, SQTechPumps.config.getInt("medium tank max liquid"));
						machine.liquidImports.add(f);
						//e.getWhoClicked().closeInventory();
						machine.getGUI((Player) e.getWhoClicked()).open();
					}
				}

			}

		} else if (e.getInventory().getName().equals(ChatColor.BLUE + "SQTech - Choose large tank type")) {

			e.setCancelled(true);

			Machine machine = SQTechPumps.inventoryMap.get(e.getInventory());

			if (e.getSlot() == 10) {
				//Lava
				for (Fluid f : SQTechBase.fluids) {
					if (f.name.equals("Lava")) {
						machine.maxLiquid.put(f, SQTechPumps.config.getInt("large tank max liquid"));
						machine.liquidImports.add(f);
						//e.getWhoClicked().closeInventory();
						machine.getGUI((Player) e.getWhoClicked()).open();
					}
				}

			} else if (e.getSlot() == 16) {
				//Water
				for (Fluid f : SQTechBase.fluids) {
					if (f.name.equals("Water")) {
						machine.maxLiquid.put(f, SQTechPumps.config.getInt("large tank max liquid"));
						machine.liquidImports.add(f);
						//e.getWhoClicked().closeInventory();
						machine.getGUI((Player) e.getWhoClicked()).open();
					}
				}

			}

		}

	}

	@EventHandler
	public void CraftMoveEvent(CraftSyncTranslateEvent e) {
		//CraftAsyncDetectEvent does not work
		//CraftAsyncBlockDetectEvent does not work
		//CraftSyncDetectEvent does not work
		//CraftSyncTranslateEvent works... I guess. When the ship moves, not detects.
		Craft c = e.getCraft();

		if (SQTechPumps.craftHasRemovedWaterInTanksBooleanMap.containsKey(c)) {
			if (SQTechPumps.craftHasRemovedWaterInTanksBooleanMap.get(c)) {
				return;
			}
		}

		for (MovecraftLocation mLoc : c.getBlockList()) {

			Block b = e.getCraft().getW().getBlockAt(mLoc.getX(), mLoc.getY(), mLoc.getZ());

			if (b.getType() == Material.LAPIS_BLOCK) {

				if (SQTechPumps.locationMachineMap.get(b.getLocation()) != null) {

					Machine m = SQTechPumps.locationMachineMap.get(b.getLocation());

					if (m.getMachineType().getName().equals("Pump")) {

						if (SQTechPumps.machineExtendingMap.containsKey(m)) {

							if (SQTechPumps.machineExtendingMap.get(m) != null) {
								e.setFailMessage(ChatColor.RED + "Error: Could not pilot craft - The pump is currently extending/retracting. Please wait.");
								e.setCancelled(true);
							}
						}

						if (SQTechPumps.pumpingLocationList.contains(m.getGUIBlock().getLocation())) {

							Pump.stopPumpingImmediately(m, e.getCraft().pilot);

							if (SQTechPumps.machineExtendingMap.containsKey(m)) {
								SQTechPumps.machineExtendingMap.remove(m);
							}

						}

					}

					if (m.getMachineType().name.equals("Small Tank")) {

						if (SQTechPumps.tankWaterBlocks.get(m) != null) {

							for (Block b2 : SQTechPumps.tankWaterBlocks.get(m)) {

								if (b2.getType() == Material.STATIONARY_LAVA || b2.getType() == Material.STATIONARY_WATER) {
									b2.setType(Material.AIR);
								}

							}
							SQTechPumps.craftHasRemovedWaterInTanksBooleanMap.put(c, true);

						}

					} else if (m.getMachineType().name.equals("Medium Tank")) {

						if (SQTechPumps.tankWaterBlocks.get(m) != null) {

							for (Block b2 : SQTechPumps.tankWaterBlocks.get(m)) {

								if (b2.getType() == Material.STATIONARY_LAVA || b2.getType() == Material.STATIONARY_WATER) {
									b2.setType(Material.AIR);
								}

							}
							SQTechPumps.craftHasRemovedWaterInTanksBooleanMap.put(c, true);

						}

					} else if (m.getMachineType().name.equals("Large Tank")) {

						if (SQTechPumps.tankWaterBlocks.get(m) != null) {
							Bukkit.getServer().broadcastMessage("size: " + SQTechPumps.tankWaterBlocks.get(m).size());
							for (Block b2 : SQTechPumps.tankWaterBlocks.get(m)) {

								if (b2.getType() == Material.STATIONARY_LAVA || b2.getType() == Material.STATIONARY_WATER) {
									b2.setType(Material.AIR);
								}

							}
							SQTechPumps.craftHasRemovedWaterInTanksBooleanMap.put(c, true);

						}

					}

				}

			}

		}

	}

	@EventHandler
	public void CraftReleaseEvent(CraftReleaseEvent e) {

		Craft c = e.getCraft();

		if (SQTechPumps.craftHasRemovedWaterInTanksBooleanMap.containsKey(c)) {
			SQTechPumps.craftHasRemovedWaterInTanksBooleanMap.put(c, false);
		}

		for (MovecraftLocation mLoc : c.getBlockList()) {

			Block b = e.getCraft().getW().getBlockAt(mLoc.getX(), mLoc.getY(), mLoc.getZ());

			if (b.getType() == Material.LAPIS_BLOCK) {

				GUIBlock guiBlock = new GUIBlock(b.getLocation(), true);

				if (ObjectUtils.getMachineFromGUIBlock(guiBlock) != null) {

					Machine m = ObjectUtils.getMachineFromGUIBlock(guiBlock);

					if (m.getMachineType().equals(SmallTank.class)) {

						SmallTank.updatePhysicalLiquid(m);
						return;

					} else if (m.getMachineType().equals(MediumTank.class)) {

						MediumTank.updatePhysicalLiquid(m);
						return;

					} else if (m.getMachineType().equals(LargeTank.class)) {

						LargeTank.updatePhysicalLiquid(m);
						return;

					}

				}

			}

		}

	}

	@EventHandler
	public void onBlockBreak(BlockBreakEvent e) {

		if (e.getBlock() != null) {

			if (SQTechPumps.ironBarList.contains(e.getBlock())) {

				e.setCancelled(true);

				e.getPlayer().sendMessage(ChatColor.RED + "You are not allowed to break the tube of the pump.");

			}

		}

	}

}


text:
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QSurfaceFormat>
#include <QOpenGLFunctions>
#include <QtOpenGL>
//#include <GL/glu.h>

#include <QOpenGLWindow>

class MainWindow : public QOpenGLWindow
{
  Q_OBJECT
  public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
  protected:
    virtual void initializeGL();
    virtual void resizeGL(int w, int h);
    virtual void paintGL();
    void paintEvent(QPaintEvent *event);
    void resizeEvent(QResizeEvent *event);
private:
  QOpenGLContext* context;
  QOpenGLFunctions* openGLFunctions;

};

#endif // MAINWINDOW_H

redpajama_set_name: RedPajamaGithub


text:
package game.component;

import game.GameComponent;

/**
 * @author Mirko Nava
 * @version 0.1
 * Created by Mirko Nava - mirkna@gmail.com
 */
public class Animator extends GameComponent {

    @Override
    public void input() {

    }

    @Override
    public void update() {

    }

    @Override
    public void output() {

    }

}


text:
namespace app {
namespace Fuse {
namespace Navigation {

struct NavTriggerUtil__uType : ::uClassType
{
};

NavTriggerUtil__uType* NavTriggerUtil__typeof();

bool NavTriggerUtil__CrossesZero(::uStatic* __this, double a, double b);
int NavTriggerUtil__Opposite(::uStatic* __this, int v);

}}}

#endif


text:
<?php

namespace Oculus\Library;
use Oculus\Engine\Container;
use Oculus\Service\LibraryService;

/*
|--------------------------------------------------------------------------
|   Description
|--------------------------------------------------------------------------
|
|   The purpose of this class is to provide a single method to replace any
|	variable that we may need in email and internal notifications.
*/

class Decorator extends LibraryService {
	private $search       = array();
	private $replace      = array();
	private $html_replace = array();

	public function __construct(Container $app) {
		parent::__construct($app);
	}

	public function decorateCustomerNotification($message, $customer, $order_id = 0) {
		$this->search = array(
			'!fname!',
			'!lname!',
			'!username!',
			'!email!',
			'!telephone!',
			'!ip_address!',
			'!points!'
		);

		$this->replace = array(
			$customer['firstname'],
			$customer['lastname'],
			$customer['username'],
			$customer['email'],
			isset($customer['telephone']) ? $customer['telephone'] : '',
			$customer['ip'],
			$customer['points']
		);

		$this->html_replace = array(
			$customer['firstname'],
			$customer['lastname'],
			$customer['username'],
			$customer['email'],
			isset($customer['telephone']) ? $customer['telephone'] : '',
			$customer['ip'],
			$customer['points']
		);

		/**
		 * If we have an order ID, let's process it and push
		 * our variables to our search and replace arrays.
		 */

		if ($order_id > 0):
			$order = $this->getOrder($order_id);

		endif;

		$this->baseDecorate();

		return $this->parse($message);
	}

	public function decorateUserNotification($message, $user) {
		$this->search = array(
			'!fname!',
			'!lname!',
			'!user_name!',
			'!email!'
		);

		$this->replace = array(
			$user['firstname'] ? $user['firstname'] : $user['user_name'],
			$user['lastname'],
			$user['user_name'],
			$user['email']
		);

		$this->html_replace = array(
			$user['firstname'] ? $user['firstname'] : $user['user_name'],
			$user['lastname'],
			$user['user_name'],
			$user['email']
		);

		$this->baseDecorate();

		return $this->parse($message);
	}

	protected function baseDecorate() {
		$search = array(
			'!store_name!',
			'!store_owner!',
			'!store_address!',
			'!store_phone!',
			'!store_send_email!',
			'!store_url!',
			'!signature!',
			'!preference!',
			'!twitter!',
			'!facebook!'
		);

		$this->search = array_merge($this->search, $search);

		$sig = $this->parse_signature();

		$replace = array(
			parent::$app['config_name'],
			parent::$app['config_owner'],
			parent::$app['config_address'],
			parent::$app['config_telephone'],
			parent::$app['config_email'],
			trim(parent::$app['http.public'], '/'),
			html_entity_decode($sig['text'], ENT_QUOTES, 'UTF-8'),
			parent::$app['http.public'] . 'account/notification/preferences',
			'http://twitter.com/' . parent::$app['config_mail_twitter'],
			'http://www.facebook.com/' . parent::$app['config_mail_facebook']
		);

		$this->replace = array_merge($this->replace, $replace);

		$html_replace = array(
			parent::$app['config_name'],
			parent::$app['config_owner'],
			nl2br(parent::$app['config_address']),
			parent::$app['config_telephone'],
			parent::$app['config_email'],
			trim(parent::$app['http.public'], '/'),
			html_entity_decode($sig['html'], ENT_QUOTES, 'UTF-8'),
			parent::$app['http.public'] . 'account/notification/preferences',
			'http://twitter.com/' . parent::$app['config_mail_twitter'],
			'http://www.facebook.com/' . parent::$app['config_mail_facebook']
		);

		$this->html_replace = array_merge($this->html_replace, $html_replace);
	}

	protected function getOrder($order_id) {

	}

	protected function parse($message) {
		if (is_array($message)):
			foreach($message as $key => $value):
				if ($key == 'html'):
					$message[$key] = str_replace($this->search, $this->html_replace, $value);
				else:
					$message[$key] = str_replace($this->search, $this->replace, $value);
				endif;
			endforeach;
		else:
			$message = str_replace($this->search, $this->replace, $message);
		endif;

		return $message;
	}

	public function decorateUrls($id, $message) {
		$web = parent::$app['http.public'] . 'account/notification/webversion?id=' . $id;
		$url = parent::$app['http.public'] . 'account/notification/unsubscribe?id=' . $id;

		$message['html'] = str_replace('!webversion!', $web, $message['html']);
		$message['html'] = str_replace('!unsubscribe!', $url, $message['html']);

		$message['text'] = str_replace('!unsubscribe!', $url, $message['text']);

		return $message;
	}

	private function parse_signature() {
		$data = array();

		$search = array(
			'!store_name!',
			'!store_owner!',
			'!store_address!',
			'!store_phone!',
			'!store_send_email!',
			'!store_url!'
		);

		$replace = array(
			parent::$app['config_name'],
			parent::$app['config_owner'],
			parent::$app['config_address'],
			parent::$app['config_telephone'],
			parent::$app['config_email'],
			trim(parent::$app['http.public'], '/')
		);

		$html_replace = array(
			parent::$app['config_name'],
			parent::$app['config_owner'],
			nl2br(parent::$app['config_address']),
			parent::$app['config_telephone'],
			parent::$app['config_email'],
			trim(parent::$app['http.public'], '/')
		);

		$data['text'] = str_replace($search, $replace, parent::$app['config_text_signature']);
		$data['html'] = str_replace($search, $html_replace, parent::$app['config_html_signature']);

		return $data;
	}
}

/**
 * Customer Variables
 *
 * !fname! - customer first name
 * !lname! - customer last name
 * !username! - customer username
 * !email! - customer email address
 * !points! - customer reward points
 * !telephone! - customer telephone
 * !ip_address! - customer IP address
 *
 * Store Variables
 * !store_name! - config_name
 * !store_owner! - config_owner
 * !store_address! - config_address
 * !store_phone! - config_telephone
 * !store_send_email - config_email
 * !store_admin_email! - config_admin_email
 * !store_url! - config_url
 * !twitter_url! - config_mail_twitter
 * !facebook_url! - config_mail_facebook
 */


text:
#ifndef INCLUDED_openfl__v2_gl_GLObject
#define INCLUDED_openfl__v2_gl_GLObject

#ifndef HXCPP_H
#include <hxcpp.h>
#endif

HX_DECLARE_CLASS3(openfl,_v2,gl,GLObject)
namespace openfl{
namespace _v2{
namespace gl{

class HXCPP_CLASS_ATTRIBUTES  GLObject_obj : public hx::Object{
	public:
		typedef hx::Object super;
		typedef GLObject_obj OBJ_;
		GLObject_obj();
		Void __construct(int version,Dynamic id);

	public:
		inline void *operator new( size_t inSize, bool inContainer=true)
			{ return hx::Object::operator new(inSize,inContainer); }
		static hx::ObjectPtr< GLObject_obj > __new(int version,Dynamic id);
		static Dynamic __CreateEmpty();
		static Dynamic __Create(hx::DynamicArray inArgs);
		//~GLObject_obj();

		HX_DO_RTTI;
		static void __boot();
		static void __register();
		void __Mark(HX_MARK_PARAMS);
		void __Visit(HX_VISIT_PARAMS);
		::String __ToString() const { return HX_CSTRING("GLObject"); }

		Dynamic id;
		bool invalidated;
		bool valid;
		int version;
		virtual ::String getType( );
		Dynamic getType_dyn();

		virtual Void invalidate( );
		Dynamic invalidate_dyn();

		virtual bool isValid( );
		Dynamic isValid_dyn();

		virtual bool isInvalid( );
		Dynamic isInvalid_dyn();

		virtual ::String toString( );
		Dynamic toString_dyn();

		virtual bool get_invalidated( );
		Dynamic get_invalidated_dyn();

		virtual bool get_valid( );
		Dynamic get_valid_dyn();

};

} // end namespace openfl
} // end namespace _v2
} // end namespace gl

#endif /* INCLUDED_openfl__v2_gl_GLObject */


text:
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""

from nipype.interfaces.base import CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath
import os

class GenerateAverageLmkFileInputSpec(CommandLineInputSpec):
    inputLandmarkFiles = InputMultiPath(traits.Str, desc="Input landmark files names (.fcsv or .wts)", sep=",", argstr="--inputLandmarkFiles %s")
    outputLandmarkFile = traits.Either(traits.Bool, File(), hash_files=False, desc="Ouput landmark file name that includes average values for landmarks (.fcsv or .wts)", argstr="--outputLandmarkFile %s")

class GenerateAverageLmkFileOutputSpec(TraitedSpec):
    outputLandmarkFile = File(desc="Ouput landmark file name that includes average values for landmarks (.fcsv or .wts)", exists=True)

class GenerateAverageLmkFile(SEMLikeCommandLine):

    """title: Average Fiducials

category: Testing

description: This program gets several fcsv file each one contains several landmarks with the same name but slightly different coordinates. For EACH landmark we compute the average coordination.

contributor: Ali Ghayoor

"""

    input_spec = GenerateAverageLmkFileInputSpec
    output_spec = GenerateAverageLmkFileOutputSpec
    _cmd = " GenerateAverageLmkFile "
    _outputs_filenames = {'outputLandmarkFile': 'outputLandmarkFile'}
    _redirect_x = False


text:
package com.google.codeu.mathlang.testing;

// TEST LISTENER
//
// This interface defines the callbacks that |Tester| will use to communicate
// events that happen while running through tests.
public interface TestListener {

  // ON TEST START
  //
  // Called when a test first starts.
  void onTestStart(String testName);

  // ON PASS
  //
  // Called when a test completed successfully.
  void onPass();

  // ON FAIL
  //
  // Called when a test fails to complete successfully. The exception
  // passed to the method is the original exception thrown during
  // execution.
  void onFail(Exception ex);
}


text:
package de.timroes.axmlrpc;

import de.timroes.axmlrpc.serializer.SerializerHandler;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.Map;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

/**
 * The ResponseParser parses the response of an XMLRPC server to an object.
 *
 * @author Tim Roes
 */
public class ResponseParser {

	private static final String FAULT_CODE = "faultCode";
	private static final String FAULT_STRING = "faultString";

	/**
	 * The given InputStream must contain the xml response from an xmlrpc server.
	 * This method extract the content of it as an object.
	 *
	 * @param serializerHandler You can inject an arbitrary one if you want to use your own transport protocol.
	 *     See the README (section "Using an arbitrary transport") for more info on this feature.
	 * @param response The InputStream of the server response.
	 * @param debugMode This prints data on System.out to make it easy to debug
	 * @return The returned object.
	 * @throws XMLRPCException Will be thrown whenever something fails.
	 * @throws XMLRPCServerException Will be thrown, if the server returns an error.
	 */
	public Object parse(SerializerHandler serializerHandler, InputStream response, boolean debugMode) throws XMLRPCException {

		try {

			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
			factory.setNamespaceAware(true);
			DocumentBuilder builder = factory.newDocumentBuilder();
			Document dom = builder.parse(response);
			if (debugMode ){
				printDocument(dom, System.out);
			}
			Element e = dom.getDocumentElement();

			// Check for root tag
			if(!e.getNodeName().equals(XMLRPCClient.METHOD_RESPONSE)) {
				throw new XMLRPCException("MethodResponse root tag is missing.");
			}

			e = XMLUtil.getOnlyChildElement(e.getChildNodes());

			if(e.getNodeName().equals(XMLRPCClient.PARAMS)) {

				e = XMLUtil.getOnlyChildElement(e.getChildNodes());

				if(!e.getNodeName().equals(XMLRPCClient.PARAM)) {
					throw new XMLRPCException("The params tag must contain a param tag.");
				}

				return getReturnValueFromElement(serializerHandler, e);

			} else if(e.getNodeName().equals(XMLRPCClient.FAULT)) {

				@SuppressWarnings("unchecked")
				Map<String,Object> o = (Map<String,Object>)getReturnValueFromElement(serializerHandler, e);

				throw new XMLRPCServerException((String)o.get(FAULT_STRING), (Integer)o.get(FAULT_CODE));

			}

			throw new XMLRPCException("The methodResponse tag must contain a fault or params tag.");

		} catch(XMLRPCServerException e) {
			throw e;
		} catch (Exception ex) {
			throw new XMLRPCException("Error getting result from server.", ex);
		}

	}

	public static void printDocument(Document doc, OutputStream out) throws IOException, TransformerException {
		TransformerFactory tf = TransformerFactory.newInstance();
		Transformer transformer = tf.newTransformer();
		transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
		transformer.setOutputProperty(OutputKeys.METHOD, "xml");
		transformer.setOutputProperty(OutputKeys.INDENT, "yes");
		transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
		transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");

		transformer.transform(new DOMSource(doc),
				new StreamResult(new OutputStreamWriter(out, "UTF-8")));
	}

	/**
	 * This method takes an element (must be a param or fault element) and
	 * returns the deserialized object of this param tag.
	 *
	 * @param element An param element.
	 * @return The deserialized object within the given param element.
	 * @throws XMLRPCException Will be thrown when the structure of the document
	 *		doesn't match the XML-RPC specification.
	 */
	private Object getReturnValueFromElement(SerializerHandler serializerHandler, Element element) throws XMLRPCException {

		Element childElement = XMLUtil.getOnlyChildElement(element.getChildNodes());

		return serializerHandler.deserialize(childElement);
	}

}


text:
package gobblin.source.extractor.extract.kafka;

import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient;
import io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException;
import io.confluent.kafka.serializers.KafkaAvroSerializer;
import io.confluent.kafka.serializers.KafkaAvroDeserializer;
import io.confluent.kafka.serializers.KafkaJsonDeserializer;
import io.confluent.kafka.serializers.KafkaJsonSerializer;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;

import kafka.message.Message;
import kafka.message.MessageAndOffset;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import org.apache.avro.Schema;
import org.apache.avro.SchemaBuilder;
import org.apache.avro.generic.GenericRecord;
import org.apache.avro.generic.GenericRecordBuilder;
import org.apache.kafka.common.serialization.Deserializer;
import org.apache.kafka.common.serialization.Serializer;
import org.testng.Assert;
import org.testng.annotations.Test;

import com.google.common.base.Optional;

import gobblin.configuration.ConfigurationKeys;
import gobblin.configuration.State;
import gobblin.configuration.WorkUnitState;
import gobblin.kafka.client.ByteArrayBasedKafkaRecord;
import gobblin.kafka.client.Kafka08ConsumerClient.Kafka08ConsumerRecord;
import gobblin.metrics.kafka.KafkaSchemaRegistry;
import gobblin.metrics.kafka.SchemaRegistryException;
import gobblin.source.extractor.WatermarkInterval;
import gobblin.source.extractor.extract.kafka.KafkaDeserializerExtractor.Deserializers;
import gobblin.source.workunit.WorkUnit;
import gobblin.util.PropertiesUtils;

@Test(groups = { "gobblin.source.extractor.extract.kafka" })
public class KafkaDeserializerExtractorTest {

  private static final String TEST_TOPIC_NAME = "testTopic";
  private static final String TEST_URL = "testUrl";
  private static final String TEST_RECORD_NAME = "testRecord";
  private static final String TEST_NAMESPACE = "testNamespace";
  private static final String TEST_FIELD_NAME = "testField";
  private static final String TEST_FIELD_NAME2 = "testField2";

  @Test
  public void testDeserializeRecord() throws IOException {
    WorkUnitState mockWorkUnitState = getMockWorkUnitState();

    String testString = "Hello World";
    ByteBuffer testStringByteBuffer = ByteBuffer.wrap(testString.getBytes(StandardCharsets.UTF_8));

    Deserializer<Object> mockKafkaDecoder = mock(Deserializer.class);
    KafkaSchemaRegistry<?, ?> mockKafkaSchemaRegistry = mock(KafkaSchemaRegistry.class);
    when(mockKafkaDecoder.deserialize(TEST_TOPIC_NAME, testStringByteBuffer.array())).thenReturn(testString);

    KafkaDeserializerExtractor kafkaDecoderExtractor = new KafkaDeserializerExtractor(mockWorkUnitState,
        Optional.fromNullable(Deserializers.BYTE_ARRAY),
        mockKafkaDecoder, mockKafkaSchemaRegistry);

    ByteArrayBasedKafkaRecord mockMessageAndOffset = getMockMessageAndOffset(testStringByteBuffer);

    Assert.assertEquals(kafkaDecoderExtractor.decodeRecord(mockMessageAndOffset), testString);
  }

  @Test
  public void testBuiltInStringDeserializer() throws ReflectiveOperationException {
    WorkUnitState mockWorkUnitState = getMockWorkUnitState();
    mockWorkUnitState.setProp(KafkaDeserializerExtractor.KAFKA_DESERIALIZER_TYPE,
        KafkaDeserializerExtractor.Deserializers.STRING.name());

    KafkaDeserializerExtractor kafkaDecoderExtractor = new KafkaDeserializerExtractor(mockWorkUnitState);

    Assert.assertEquals(kafkaDecoderExtractor.getKafkaDeserializer().getClass(),
        KafkaDeserializerExtractor.Deserializers.STRING.getDeserializerClass());
    Assert.assertEquals(kafkaDecoderExtractor.getKafkaSchemaRegistry().getClass(),
        KafkaDeserializerExtractor.Deserializers.STRING.getSchemaRegistryClass());
  }

  @Test
  public void testBuiltInGsonDeserializer() throws ReflectiveOperationException {
    WorkUnitState mockWorkUnitState = getMockWorkUnitState();
    mockWorkUnitState.setProp(KafkaDeserializerExtractor.KAFKA_DESERIALIZER_TYPE,
        KafkaDeserializerExtractor.Deserializers.GSON.name());

    KafkaDeserializerExtractor kafkaDecoderExtractor = new KafkaDeserializerExtractor(mockWorkUnitState);

    Assert.assertEquals(kafkaDecoderExtractor.getKafkaDeserializer().getClass(),
        KafkaDeserializerExtractor.Deserializers.GSON.getDeserializerClass());
    Assert.assertEquals(kafkaDecoderExtractor.getKafkaSchemaRegistry().getClass(),
        KafkaDeserializerExtractor.Deserializers.GSON.getSchemaRegistryClass());
  }

  @Test
  public void testBuiltInConfluentAvroDeserializer() throws ReflectiveOperationException {
    WorkUnitState mockWorkUnitState = getMockWorkUnitState();
    mockWorkUnitState.setProp(KafkaDeserializerExtractor.KAFKA_DESERIALIZER_TYPE,
        KafkaDeserializerExtractor.Deserializers.CONFLUENT_AVRO.name());

    KafkaDeserializerExtractor kafkaDecoderExtractor = new KafkaDeserializerExtractor(mockWorkUnitState) {
      @Override
      public Object getSchema() {
        return SchemaBuilder.record(TEST_RECORD_NAME)
            .namespace(TEST_NAMESPACE).fields()
            .name(TEST_FIELD_NAME).type().stringType().noDefault()
            .endRecord();
      }
    };

    Assert.assertEquals(kafkaDecoderExtractor.getKafkaDeserializer().getClass(),
        KafkaDeserializerExtractor.Deserializers.CONFLUENT_AVRO.getDeserializerClass());
    Assert.assertEquals(kafkaDecoderExtractor.getKafkaSchemaRegistry().getClass(),
        KafkaDeserializerExtractor.Deserializers.CONFLUENT_AVRO.getSchemaRegistryClass());
  }

  @Test
  public void testCustomDeserializer() throws ReflectiveOperationException {
    WorkUnitState mockWorkUnitState = getMockWorkUnitState();
    mockWorkUnitState
        .setProp(KafkaDeserializerExtractor.KAFKA_DESERIALIZER_TYPE, KafkaJsonDeserializer.class.getName());
    mockWorkUnitState
        .setProp(KafkaSchemaRegistry.KAFKA_SCHEMA_REGISTRY_CLASS, SimpleKafkaSchemaRegistry.class.getName());

    KafkaDeserializerExtractor kafkaDecoderExtractor = new KafkaDeserializerExtractor(mockWorkUnitState);
    Assert.assertEquals(kafkaDecoderExtractor.getKafkaDeserializer().getClass(), KafkaJsonDeserializer.class);
    Assert.assertEquals(kafkaDecoderExtractor.getKafkaSchemaRegistry().getClass(), SimpleKafkaSchemaRegistry.class);
  }

  @Test
  public void testConfluentAvroDeserializer() throws IOException, RestClientException {
    WorkUnitState mockWorkUnitState = getMockWorkUnitState();
    mockWorkUnitState.setProp("schema.registry.url", TEST_URL);

    Schema schema = SchemaBuilder.record(TEST_RECORD_NAME)
        .namespace(TEST_NAMESPACE).fields()
        .name(TEST_FIELD_NAME).type().stringType().noDefault()
        .endRecord();

    GenericRecord testGenericRecord = new GenericRecordBuilder(schema).set(TEST_FIELD_NAME, "testValue").build();

    SchemaRegistryClient mockSchemaRegistryClient = mock(SchemaRegistryClient.class);
    when(mockSchemaRegistryClient.getByID(any(Integer.class))).thenReturn(schema);

    Serializer<Object> kafkaEncoder = new KafkaAvroSerializer(mockSchemaRegistryClient);
    Deserializer<Object> kafkaDecoder = new KafkaAvroDeserializer(mockSchemaRegistryClient);

    ByteBuffer testGenericRecordByteBuffer =
        ByteBuffer.wrap(kafkaEncoder.serialize(TEST_TOPIC_NAME, testGenericRecord));

    KafkaSchemaRegistry<Integer, Schema> mockKafkaSchemaRegistry = mock(KafkaSchemaRegistry.class);
    KafkaDeserializerExtractor kafkaDecoderExtractor =
        new KafkaDeserializerExtractor(mockWorkUnitState,
            Optional.fromNullable(Deserializers.CONFLUENT_AVRO), kafkaDecoder, mockKafkaSchemaRegistry);

    ByteArrayBasedKafkaRecord mockMessageAndOffset = getMockMessageAndOffset(testGenericRecordByteBuffer);

    Assert.assertEquals(kafkaDecoderExtractor.decodeRecord(mockMessageAndOffset), testGenericRecord);
  }

  @Test
  public void testConfluentAvroDeserializerForSchemaEvolution() throws IOException, RestClientException, SchemaRegistryException {
    WorkUnitState mockWorkUnitState = getMockWorkUnitState();
    mockWorkUnitState.setProp("schema.registry.url", TEST_URL);

    Schema schemaV1 = SchemaBuilder.record(TEST_RECORD_NAME)
        .namespace(TEST_NAMESPACE).fields()
        .name(TEST_FIELD_NAME).type().stringType().noDefault()
        .endRecord();

    Schema schemaV2 = SchemaBuilder.record(TEST_RECORD_NAME)
        .namespace(TEST_NAMESPACE).fields()
        .name(TEST_FIELD_NAME).type().stringType().noDefault()
        .optionalString(TEST_FIELD_NAME2).endRecord();

    GenericRecord testGenericRecord = new GenericRecordBuilder(schemaV1).set(TEST_FIELD_NAME, "testValue").build();

    SchemaRegistryClient mockSchemaRegistryClient = mock(SchemaRegistryClient.class);
    when(mockSchemaRegistryClient.getByID(any(Integer.class))).thenReturn(schemaV1);

    Serializer<Object> kafkaEncoder = new KafkaAvroSerializer(mockSchemaRegistryClient);
    Deserializer<Object> kafkaDecoder = new KafkaAvroDeserializer(mockSchemaRegistryClient);

    ByteBuffer testGenericRecordByteBuffer =
        ByteBuffer.wrap(kafkaEncoder.serialize(TEST_TOPIC_NAME, testGenericRecord));

    KafkaSchemaRegistry<Integer, Schema> mockKafkaSchemaRegistry = mock(KafkaSchemaRegistry.class);
    when(mockKafkaSchemaRegistry.getLatestSchemaByTopic(TEST_TOPIC_NAME)).thenReturn(schemaV2);

    KafkaDeserializerExtractor kafkaDecoderExtractor = new KafkaDeserializerExtractor(mockWorkUnitState,
        Optional.fromNullable(Deserializers.CONFLUENT_AVRO), kafkaDecoder, mockKafkaSchemaRegistry);
    when(kafkaDecoderExtractor.getSchema()).thenReturn(schemaV2);

    ByteArrayBasedKafkaRecord mockMessageAndOffset = getMockMessageAndOffset(testGenericRecordByteBuffer);

    GenericRecord received = (GenericRecord) kafkaDecoderExtractor.decodeRecord(mockMessageAndOffset);
    Assert.assertEquals(received.toString(), "{\"testField\": \"testValue\", \"testField2\": null}");

  }

  @Test
  public void testConfluentJsonDeserializer() throws IOException {
    WorkUnitState mockWorkUnitState = getMockWorkUnitState();
    mockWorkUnitState.setProp("json.value.type", KafkaRecord.class.getName());

    KafkaRecord testKafkaRecord = new KafkaRecord("Hello World");

    Serializer<KafkaRecord> kafkaEncoder = new KafkaJsonSerializer<>();
    kafkaEncoder.configure(PropertiesUtils.propsToStringKeyMap(mockWorkUnitState.getProperties()), false);

    Deserializer<KafkaRecord> kafkaDecoder = new KafkaJsonDeserializer<>();
    kafkaDecoder.configure(PropertiesUtils.propsToStringKeyMap(mockWorkUnitState.getProperties()), false);

    ByteBuffer testKafkaRecordByteBuffer = ByteBuffer.wrap(kafkaEncoder.serialize(TEST_TOPIC_NAME, testKafkaRecord));

    KafkaSchemaRegistry<?, ?> mockKafkaSchemaRegistry = mock(KafkaSchemaRegistry.class);
    KafkaDeserializerExtractor kafkaDecoderExtractor =
        new KafkaDeserializerExtractor(mockWorkUnitState,
            Optional.fromNullable(Deserializers.CONFLUENT_JSON), kafkaDecoder, mockKafkaSchemaRegistry);

    ByteArrayBasedKafkaRecord mockMessageAndOffset = getMockMessageAndOffset(testKafkaRecordByteBuffer);
    Assert.assertEquals(kafkaDecoderExtractor.decodeRecord(mockMessageAndOffset), testKafkaRecord);
  }

  private WorkUnitState getMockWorkUnitState() {
    WorkUnit mockWorkUnit = WorkUnit.createEmpty();
    mockWorkUnit.setWatermarkInterval(new WatermarkInterval(new MultiLongWatermark(new ArrayList<Long>()),
        new MultiLongWatermark(new ArrayList<Long>())));

    WorkUnitState mockWorkUnitState = new WorkUnitState(mockWorkUnit, new State());
    mockWorkUnitState.setProp(KafkaSource.TOPIC_NAME, TEST_TOPIC_NAME);
    mockWorkUnitState.setProp(KafkaSource.PARTITION_ID, "1");
    mockWorkUnitState.setProp(ConfigurationKeys.KAFKA_BROKERS, "localhost:8080");
    mockWorkUnitState.setProp(KafkaSchemaRegistry.KAFKA_SCHEMA_REGISTRY_URL, TEST_URL);

    return mockWorkUnitState;
  }

  private ByteArrayBasedKafkaRecord getMockMessageAndOffset(ByteBuffer payload) {
    MessageAndOffset mockMessageAndOffset = mock(MessageAndOffset.class);
    Message mockMessage = mock(Message.class);
    when(mockMessage.payload()).thenReturn(payload);
    when(mockMessageAndOffset.message()).thenReturn(mockMessage);
    return new Kafka08ConsumerRecord(mockMessageAndOffset);
  }

  @AllArgsConstructor
  @NoArgsConstructor
  @EqualsAndHashCode
  @Getter
  @Setter
  private static class KafkaRecord {

    private String value;
  }
}


text:
This module lets you use a variable for any HTML code. It can observe variable changes and can update information in page on the fly.

It implements 2 methods: rendering for node attributes and rendering for content
```js
	{
		parseContent : function ( HTMLnode, [callback], [config] ) { ... },
		parseAttributes : function ( HTMLnode, [callback], [config] ) { ... }
	}
```
`parseContent` - function that renders content in HTML node. `config` is an object that represents data to be shown in node based on HTML node template.

`parseAttributes` - function that renders node arguments based on HTML template provided.

Also, all HTML elements will get 3 methods (they use internally functions above):
```js
	{
		renderJsTemplate : function ([context], [args], [cb]) { ... }
		renderJsArgs : function ([context], [args], [cb]) { ... }
		renderJs : function ([context], [args], [cb]) { ... }
	}
```
`renderJsTemplate` - renders `args` in `context` (HTML element) inner HTML based on template from HTML code.

`renderJsArgs` - renders attributes from `args` in `context` (HTML element) based on template from HTML.

`renderJs` - calls both `renderJsArgs` and `renderJsTemplate`.

Example:
More usage examples may be found in examples folder: [Examples](docs/examples)
```html
	<div id="mydiv">
		Hello {{ data.name }}
	</div>
```
Code inside `{{` and `}}` is a template. It will be parsed and changed when `renerJs` is called.
The code bellow renders object data into html template.
NOTE: Oject names from html template and function call must coincide, otherwise it wont work.
```js
	...
	document.selectElementById('mydiv').renderJs(null, {
		data : {
			name : 'test'
		}
	}, function (err) {
		if (!err) console.log('rendered!');
	});
```
NOTE: first parameter is `null` because, from inside function `renderJs`, context of HTML element is `this` operator. Otherwise, another node may be passed in.
The resulted string would be `Hello test`. And because no errors were detected, `rendered!` will be printed in console.
In combination with `custom-elements` from this library, you can track node changes and render content instantly.


text:
/**
 * Day 20
 * Reminder
 */
'use strict';

import React,{ Component } from 'react';
import { Image,StyleSheet,StatusBar,Text,TextInput,LayoutAnimation,TouchableHighlight,View } from 'react-native';
import Util from './utils';
// import {BlurView,VibrancyView} from 'react-native-blur';
import Icon from 'react-native-vector-icons/Ionicons';

export class ReminderContainer extends Component{
  static defaultProps = {
    listData:{
      title:"提醒事项",
      numOfItems:0,
      theme:"#fe952b",
      list:[]
    },
  };

  static propTypes = {
    listData: React.PropTypes.object,
    switch: React.PropTypes.func,
  };

  constructor(props) {
    super(props);
    this.state = {
      listData: this.props.listData,
      numOfItems: this.props.listData.numOfItems,
    }
    this.animations = {
      duration: 200,
      create: {
        type: LayoutAnimation.Types.linear,
      },
      update: {
        type: LayoutAnimation.Types.linear,
        springDamping: 0.7,
      },
    };
  }

  _done(index) {
    const listData = this.state.listData;
    listData.list[index].selected = !listData.list[index].selected;
    const numOfItems = this.state.numOfItems - 1;
    this.setState({
      listData,
      numOfItems,
    });
    LayoutAnimation.configureNext(this.animations);
  }

  _addList(text) {
    const listData = this.state.listData;
    const numOfItems = this.state.numOfItems + 1;
    listData.list.push({
      selected:false,
      text
    })
    this.refs.addList.setNativeProps({text: ''});
    this.setState({
      listData,
      numOfItems,
    })
  }

  render() {
    const listData = this.state.listData;
    const list = listData.list.map((elem,index) => {
      return (
        <View ref={"list"+index} key={index} style={[styles.reminderList,{opacity:elem.selected?0.5:1}]}>
          <TouchableHighlight underlayColor="transparent" style={[styles.check,{borderColor: elem.selected?listData.theme:"#c6c6c6"}]} onPress = {() => this._done(index)}>
            <View style={elem.selected? [styles.fill,{backgroundColor:listData.theme}]:null}></View>
          </TouchableHighlight>
          <View style={styles.input}>
            <TextInput defaultValue={elem.text} style={styles.inputText}/>
          </View>
        </View>
      );
    })
    list.push(
      <View key="add" style={styles.reminderList}>
        <View style={styles.add}>
          <Icon name="md-add" style={styles.addIcon} color="#c6c6c6" size={22}/>
        </View>
        <View style={styles.input}>
          <TextInput autoCapitalize="none" ref="addList" onBlur={(event) => this._addList(event.nativeEvent.text)} style={styles.inputText}/>
        </View>
      </View>
    );
    return(
      <View style={[styles.reminderContainer,this.props.listStyle]}>
        <Image style={styles.reminderBg} source={{uri:"packed"}}/>
        <View style={styles.reminderContent}>
          <TouchableHighlight underlayColor="transparent" onPress={this.props.switch}>
            <View style={styles.reminderTitleContainer}>
              <Text style={[styles.reminderTitle,{color:listData.theme}]}>{listData.title}</Text>
              <Text style={[styles.reminderTitle,{color:listData.theme}]}>{this.state.numOfItems}</Text>
            </View>
          </TouchableHighlight>
          <View style={styles.reminderListContainer}>
            {list}
          </View>
        </View>
      </View>
    );
  }
}

export default class extends Component{
  constructor() {
    super();
    this.listData = {
      title:"Development",
      numOfItems:6,
      theme:"#fe952b",
      list:[{
        selected:false,
        text:"day20",
      },{
        selected:false,
        text:"day21",
      },{
        selected:false,
        text:"day22",
      },{
        selected:false,
        text:"day23",
      },{
        selected:false,
        text:"day24",
      },{
        selected:false,
        text:"day25",
      }],
    };
  }

  componentDidMount() {
    StatusBar.setBarStyle(1);
  }

  render() {
    return(
      <View style={styles.container}>
        <Image source={{uri:"desktop"}} style={styles.container}>
        </Image>
        <ReminderContainer listData={this.listData}/>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container:{
    height: Util.size.height,
    width: Util.size.width,
  },
  reminderContainer:{
    height: Util.size.height-65,
    width:Util.size.width,
    borderRadius: 10,
    position:"absolute",
    top:20,
    left:0,
    backgroundColor:"#fff",
    shadowColor: "#000",
    shadowOpacity: 0.3,
    shadowRadius: 2,
    shadowOffset: {
      height: -1,
      width: 0,
    }
  },
  reminderBg:{
    height: Util.size.height-65,
    width:Util.size.width,
    borderRadius: 10,
    resizeMode:"cover",
    opacity:0.5,
  },
  reminderContent:{
    height: Util.size.height-65,
    width:Util.size.width,
    backgroundColor:"transparent",
    position:"absolute",
    top:0,
    left:0,
  },
  reminderTitleContainer:{
    height: 65,
    width: Util.size.width,
    flexDirection:"row",
    justifyContent:"space-between",
    paddingLeft:15,
    paddingRight:15,
    alignItems:"center"
  },
  reminderTitle:{
    fontSize:28,
    fontWeight:"300",
    textShadowColor:"#ccc",
    textShadowOffset:{width:0, height:1,},
    textShadowRadius:1,
  },
  reminderListContainer:{
    flex:1,
    borderTopColor:"#ccc",
    borderTopWidth:1,
  },
  reminderList:{
    flexDirection:"row",
    paddingLeft:15,
    height:45,
    width:Util.size.width,
    justifyContent:"space-between",
    alignItems:"center"
  },
  check:{
    backgroundColor:"transparent",
    borderWidth:1,
    borderColor:"#c6c6c6",
    width:22,
    height:22,
    borderRadius:11,
    shadowOffset:{
        width: 0,
        height: 1,
    },
    shadowRadius:1,
    shadowColor: '#aaa',
    shadowOpacity: 0.3,
    justifyContent:"center",
    alignItems:"center"
  },
  fill:{
    width:16,
    height:16,
    borderRadius:8,
  },
  input:{
    width:Util.size.width-50,
    height:45,
    borderBottomWidth:1,
    borderBottomColor:"#ccc",
  },
  inputText:{
    height:43,
    color:"#363636",
  },
  addIcon:{
    paddingLeft: 5
  }
});


text:
// CLASS Schene
var Scene = Class.extend({

    init: function(selector, debug) {

  		// scale factor view/world
		this._scaleFactor = 290.0; // 1 pixel in browser ^= 1cm in physical world

        // debug draw mode (canvas)
		this._debugDraw = (typeof debug == "undefined") ? false : debug;

        // the renderer context
        this._context = null;
        // external display (window)
        this._extcontext = null

        // the physical world
        this._world = this._createWorld();

		// for delta time
		this._lastTime = 0;

        // objects in the world
        this._objects = new Array();

		// stopping condition
		this._running = false;

		// detached window
		this._worldWindow = null;

		// TEMP: ground box
		// renderer element
		this._display = null;
		this._ground = null;

		// tool interaction functions
		this._toolUpdate = function(){};
		this._toolClick = function(){};
		this._toolBarUpdate = function(){};

		// represents the selection
		this._selectedBody = null;
		// represents the body that's being acted on by a tool
		this._pickedBody = null;

		this.setDisplay(selector);
    },

    setDisplay: function(selector) {
        this._paused = true;
        this._display = $(selector).get(0);

        // init drawing context
		this._initDebugRenderer();

		if (this._ground == null)
		    this._ground = this._initWalls();

		this._initMouse();
        this._paused = false;
    },

	_initMouse: function() {
		// mouse
		this._isMouseDown = false;
		this._canvasPosition = $(this._display).offset();

		// bind events
		$(this._display).mousemove($.proxy(function(e) {
			this._mouseX = (e.pageX - this._canvasPosition.left) / this._scaleFactor;
			this._mouseY = (e.pageY - this._canvasPosition.top) / this._scaleFactor;
		}, this));

		$(this._display).mousedown($.proxy(function(){
			this._isMouseDown = true;
		}, this));
		$(this._display).mouseup($.proxy(function(){
			this._isMouseDown = false;
		}, this));

		$(this._display).click($.proxy(function(e){
			this._toolClick(e);
		}, this));
	},

	bindUpdate: function(cb) {
		this._toolBarUpdate = cb;
	},

	enableDragging: function(){
		this._toolClick = function(){};
		this._toolUpdate = function() {
			// handle mouse dragging
			if (this._isMouseDown && (!this._mouseJoint)) {
				this._getBodyAtMouse();
				if (this._pickedBody) {
					// establish a new mouse joint
					var md = new b2MouseJointDef();
					md.bodyA = this._world.GetGroundBody();
					md.bodyB = this._pickedBody;
					md.target.Set(this._mouseX, this._mouseY);
					md.collideConnected = true;
					md.maxForce = 1000;
					this._mouseJoint = this._world.CreateJoint(md);
					this._pickedBody.SetAwake(true);
				}
			}
			if (this._mouseJoint) {
				if (this._isMouseDown) {
					// drag mouse joint
					this._mouseJoint.SetTarget(new b2Vec2(this._mouseX, this._mouseY));
				} else {
					// release mouse joint
					this._world.DestroyJoint(this._mouseJoint);
					this._mouseJoint = null;
					this._pickedBody = null;
				}
			}
		};
	},

	enableMoving: function(){
		this._toolClick = function(){};
		this._toolUpdate = function() {
			// handle mouse moving
			if (this._isMouseDown) {
				if (!this._pickedBody) {
					this._getBodyAtMouse();
				} else {
					// set new position
					this._pickedBody.SetAwake(true);
					// this._pickedBody.SetType(b2Body.b2_staticBody);
					this._pickedBody.SetPosition(new b2Vec2(this._mouseX, this._mouseY));
				}
			} else {
				// drop moving body
				if (this._pickedBody) {
					// this._pickedBody.SetType(b2Body.b2_dynamicBody);
					this._pickedBody = null;
				}
			}
		};
	},

	enableSelection: function(changeCb) {
		this._toolClick = function(){
			var oldSelection = this._selectedBody;
			 this._selectedBody = this._getBodyAtMouse();
			if (this._selectedBody != null && this._selectedBody != oldSelection) {
				changeCb(this._selectedBody);
			}
		};
	},

	enableCreateBox: function() {
		this._toolClick = function(e){
			var fixDef = new b2FixtureDef();
			fixDef.density = 150.0;
			fixDef.friction = 1;
			fixDef.restitution = 0.5;
			var bodyDef = new b2BodyDef();

			bodyDef.type = b2Body.b2_dynamicBody;
			bodyDef.position.y = (e.pageY - this._canvasPosition.top) / this._scaleFactor;
			bodyDef.position.x = (e.pageX - this._canvasPosition.left) / this._scaleFactor;

			fixDef.shape = new b2PolygonShape();
			fixDef.shape.SetAsBox(0.2, 0.2);
			this._world.CreateBody(bodyDef).CreateFixture(fixDef);
		};
	},

	enableCreateCircle: function() {
		this._toolClick = function(e){
			// creates ball
			var fixDef = new b2FixtureDef();
			fixDef.density = 50.0;
			fixDef.friction = 1;
			fixDef.restitution = 0.5;
			var bodyDef = new b2BodyDef();

			bodyDef.type = b2Body.b2_dynamicBody;
			bodyDef.position.y = (e.pageY - this._canvasPosition.top) / this._scaleFactor;
			bodyDef.position.x = (e.pageX - this._canvasPosition.left) / this._scaleFactor;

			fixDef.shape = new b2CircleShape();
			fixDef.shape.SetRadius(0.2);
			this._world.CreateBody(bodyDef).CreateFixture(fixDef);
		};
	},

	_getBodyCB: function(fixture) {
		// if(fixture.GetBody().GetType() != b2Body.b2_staticBody) {
			if(fixture.GetShape().TestPoint(fixture.GetBody().GetTransform(), this._mousePVec)) {
				this._pickedBody = fixture.GetBody();
				return false;
			}
		// }
		return true;
	},

	_getBodyAtMouse: function() {
		this._mousePVec = new b2Vec2(this._mouseX, this._mouseY);
		var aabb = new b2AABB();
		aabb.lowerBound.Set(this._mouseX - 0.003, this._mouseY - 0.003);
		aabb.upperBound.Set(this._mouseX + 0.003, this._mouseY + 0.003);
		// Query the world for overlapping shapes.
		this._selectedBody = null;
		this._world.QueryAABB($.proxy(this._getBodyCB, this), aabb);
		return this._pickedBody;
	},

	getWorld: function() {
		return this._world;
	},

	_initDebugRenderer: function() {
		// setup debug drawing

		if (!this._display || this._display.nodeName.toLowerCase() !="canvas") {
			throw ("render target element not found");
		}

		var debugDraw = new b2DebugDraw();
		debugDraw.SetSprite(this._display.getContext("2d"));
		debugDraw.SetDrawScale(this._scaleFactor);
		debugDraw.SetFillAlpha(0.3);
		debugDraw.SetLineThickness(1.0);
		debugDraw.SetFlags(b2DebugDraw.e_shapeBit | b2DebugDraw.e_jointBit);//| b2DebugDraw.e_velocityBit);// | b2DebugDraw.e_centerOfMassBit);
		this._world.SetDebugDraw(debugDraw);
		this._context = debugDraw;
	},

	_initExternalRenderer: function(selector, scale) {
		// setup debug drawing

		var debugDraw = new b2DebugDraw();
		debugDraw.SetSprite($(selector).get(0).getContext("2d"));
		debugDraw.SetDrawScale(scale);
		debugDraw.SetFillAlpha(0.2);
		debugDraw.SetAlpha(0.7);
		debugDraw.SetLineThickness(4.0);
		debugDraw.SetFlags(b2DebugDraw.e_shapeBit);// | b2DebugDraw.e_velocityBit);// | b2DebugDraw.e_jointBit);//| b2DebugDraw.e_velocityBit);// | b2DebugDraw.e_centerOfMassBit);
		this._extcontext = debugDraw;
	},

	_initSVGRenderer: function() {
		if (Graphic.rendererSupported("SVG")) {
			this._context = new Graphic.SVGRenderer($(this._display).identify());
		} else {
			throw ("Your browser needs SVG support.");
		}
	},

	addObject: function(obj) {
		this._objects.push(obj);
	},

    getObjectCount: function() {
        return this._objects.size();
    },

    run: function() {
		var world = this._world;
		this._running = true;
		this._paused = false;
		this._detached = false;
		this._lastTime = 0;

		var update = function(timestamp) {

			if (window.joysticks && window.joysticks.length > 0){
				window.joysticks = JSON.parse(plugin.joysticksJSON());
				// console.log(window.joysticks[0].axes[0]);
			}

			// update delta time
			if (this._lastTime == 0) {
				this._lastTime = timestamp;
			}
			var deltaTime = (timestamp - this._lastTime) / 1000;
			this._lastTime = timestamp;
			// console.log(deltaTime);
			deltaTime = 1/60;

			// alias this for callback
			var self = this;

			// update tool interaction
			this._toolUpdate();
			this._toolBarUpdate(deltaTime, timestamp/1000);

			// pause check
			if (!this._paused) {

				// advance physics world
				world.Step(deltaTime, 100, 10);

				// update actors
				for (var actor in this._objects) {
					this._objects[actor].update(deltaTime, timestamp/1000);
				}

			};

			if (this._debugDraw) {
				// debug draw mode
				this._world.DrawDebugData();
				if (this._detached == true && this._extcontext != null) {
				    this._world.SetDebugDraw(this._extcontext);
				    this._world.DrawDebugData();
				    this._world.SetDebugDraw(this._context);
				}

				/*
				if (this._objects[0].type == "Viech") {
	 				// temporary drawing of foot contacts and balance vector
					if (this._objects[0]._controller.foot1OnGround) {
						this._context.DrawCircle(this._objects[0]._controller.foot1Contact, 0.02, new b2Color(1,1,0));
					}
					if (this._objects[0]._controller.foot2OnGround) {
						this._context.DrawCircle(this._objects[0]._controller.foot2Contact, 0.02, new b2Color(1,1,0));
					}
					if (this._objects[0]._controller.foot2OnGround || this._objects[0]._controller.foot1OnGround) {
						var p = b2Math.AddVV(this._objects[0]._controller.anchorCM, this._objects[0]._controller.CMAvg);
						var q = b2Math.AddVV(this._objects[0]._controller.anchorCM, new b2Vec2(0, -1));
						this._context.DrawSegment(this._objects[0]._controller.anchorCM, p, new b2Color(1,1,0));
						this._context.DrawSegment(this._objects[0]._controller.anchorCM, q, new b2Color(0,1,0));
					}

				}
				*/
			}
			else {
				// regular mode
				this._updateWorld();
			}

			world.ClearForces();

			// repeat loop
			if (self._running) {
				requestAnimFrame(function(ts) {
					update.call(self, ts);
				});
			}
		};
		update.call(this, 0);
    },

    stop: function() {
		this._running = false;
    },

	togglePause: function() {
		return (this._paused = !this._paused);
	},

	toggleDetached: function() {
	    if (this._detached == false) {
	        this._worldWindow = window.open("extview.html", "extview", "directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes");
	        var self = this;

            this._worldWindow.onload = function() {
                console.log("onload");
                var ext = self._worldWindow.document;
                $(".fullscreen", ext).empty();
                var newCanvas = document.createElement("canvas");
                $(".fullscreen", ext).append(newCanvas);
    	        $(self._worldWindow).resize(function(){
                    console.log("onresize", $(self._worldWindow).innerWidth(), $(self._worldWindow).innerHeight(), newCanvas, ext, self, self._worldWindow);
    	            $(newCanvas).attr("height", $(self._worldWindow).innerHeight());
    	            $(newCanvas).attr("width", $(self._worldWindow).innerWidth());
    	            var scale = 290.0/580.0 * $(self._worldWindow).innerHeight();
    	            self._initExternalRenderer($(newCanvas), scale);
    	            self._worldWindow.isInitialized = true;
    	        });
    	        $(self._worldWindow).unload(function(){
    	            self._detached = false;
        	        this._extcontext = null;
    	            // warning: ugly hack
    	            var e = $("#detachWorld");
    	            $("a", e).text("Detach");
        			$(e).removeClass("selected");
	            });
            };

            if (this._worldWindow.isInitialized == true) {
                $(this._worldWindow).trigger("load");
                $(this._worldWindow).trigger("resize");
            }

	    } else {
	        this._worldWindow.close();
	    }
		return (this._detached = !this._detached);
	},

    enableMiniView: function() {
        var miniCanvas = $("#miniView");
        this._scaleFactor = 290.0/580.0 * $(miniView).innerHeight();
        this.setDisplay(miniCanvas);
    },

    disableMiniView: function() {
        this._scaleFactor = 290.0;
        this.setDisplay($('#canvas'));
    },

    _createWorld: function() {
		var world = new b2World(
			new b2Vec2(0, 9.8),	// gravity
			true                // allow sleep
		);
        return world;
    },

    _initWalls: function() {
	    var fixDef = new b2FixtureDef();
        fixDef.density = 1.0;
        fixDef.friction = 0.2;
        fixDef.restitution = 0.2;

        var bodyDef = new b2BodyDef();

        var dim = {};
        dim.width = this.v2w($(this._display).width());
        dim.height = this.v2w($(this._display).height());
        var thick = this.v2w(10.0);

        // create ground
        bodyDef.type = b2Body.b2_staticBody;
        bodyDef.position.Set(dim.width/2.0, dim.height + thick);
        fixDef.shape = new b2PolygonShape();
        fixDef.shape.SetAsBox(dim.width/2.0, thick);
        var ground = this._world.CreateBody(bodyDef);
		ground.CreateFixture(fixDef);

		// create left wall
        bodyDef.type = b2Body.b2_staticBody;
        bodyDef.position.Set(-thick, dim.height/2.0);
        fixDef.shape = new b2PolygonShape();
        fixDef.shape.SetAsBox(thick, dim.height/2.0);
        var leftWall = this._world.CreateBody(bodyDef);
		leftWall.CreateFixture(fixDef);

		// create right wall
        bodyDef.type = b2Body.b2_staticBody;
        bodyDef.position.Set(dim.width+thick, dim.height/2.0);
        fixDef.shape = new b2PolygonShape();
        fixDef.shape.SetAsBox(thick, dim.height/2.0);
        var rightWall = this._world.CreateBody(bodyDef);
		rightWall.CreateFixture(fixDef);

		return ground;
    },

    // _updateWorld: function() {
    //
    //     var node = this._world.GetBodyList();
    //     while (node) {
    //         var b = node;
    //         node = node.GetNext();
    //
    //         // update all bodies linked to a DOM element
    //         var svgShape = b.GetUserData();
    //         if (!svgShape) continue;
    //
    //         // update dom to reflect world
    //         if (b.IsAwake())
    //             this._updateElement(b, svgShape);
    //     }
    // },

    v2w: function(viewUnit) {
        // convert view to world units
        return (viewUnit / this._scaleFactor);
    },
    w2v: function(worldUnit) {
        // convert world to view units
        return (worldUnit * this._scaleFactor);
    }

});


text:
package recordwriter.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import recordwriter.Repository.RecordRepository;
import recordwriter.model.Record;
import recordwriter.model.RecordForm;

import java.util.Date;

/**
 * Created by KAJIWARAYutaka on 2015/05/17.
 */
@Controller
@RequestMapping(value="/")
public class IndexController {
    @ModelAttribute
    public RecordForm initForm(){
        return new RecordForm();
    }
    @Autowired
    RecordRepository recordRepository;

    @RequestMapping(method = RequestMethod.GET)
    public String showPage(Model model){
        model.addAttribute("records",recordRepository.findAll());
        return "index";
    }

    @RequestMapping(method = RequestMethod.POST)
    public String register(@Validated RecordForm recordForm,BindingResult result){
        if(result.hasErrors()){
            return showPage(null);
        }
        Record record = new Record();
        record.setTitle(recordForm.getTitle());
        record.setRecord(recordForm.getRecord());
        record.setDate(new Date());
        recordRepository.save(record);
        return "redirect:/";
    }
}


text:
import Route from '@ember/routing/route';

export default Route.extend({
  model() {
    return this.get('store').createRecord('simple_person', {
      name: "",
    });
  }
});


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yoktorm.Compiler;
using Yoktorm.Model;

namespace Yoktorm
{
    /// <summary>
    /// Datbase handler
    /// </summary>
    /// <typeparam name="TContext"></typeparam>
    public abstract class Database<TContext> : IDbContext, IDatabase
    {
        private Model.IModelManager modelManager;
        private Compiler.IModelCompiler modelCompiler;
        private Statement.StatementCache statementCache;

        /// <summary>
        /// Initialize new database
        /// </summary>
        public Database()
        {
            modelManager = new Model.ModelManager();
            modelCompiler = new Compiler.ModelCompiler();

            SetupCache();
        }

        /// <summary>
        /// Initialize new database
        /// </summary>
        /// <param name="modelManager">Model manager</param>
        /// <param name="modelCompiler">Model compiler</param>
        public Database(Model.IModelManager modelManager, Compiler.IModelCompiler modelCompiler)
        {
            this.modelManager = modelManager;
            this.modelCompiler = modelCompiler;

            SetupCache();
        }

        /// <summary>
        /// Initialize the caching system
        /// </summary>
        private void SetupCache()
        {
            statementCache = new Statement.StatementCache();
        }

        /// <summary>
        /// Preregistere an interface
        /// </summary>
        /// <typeparam name="T">Interface to register</typeparam>
        public void Registet<T>()
        {
            // Precompile models
        }

        /// <summary>
        /// Create a new <see cref="DbContext"/> instance
        /// </summary>
        /// <returns>Returns a new instance <see cref="IDbContext"/> instance</returns>
        public abstract TContext Create();

        /// <summary>
        /// Gets the current model manager
        /// </summary>
        protected IModelManager ModelManager
        {
            get
            {
                return modelManager;
            }
        }

        /// <summary>
        /// Gets the current model compiler
        /// </summary>
        protected IModelCompiler ModelCompiler
        {
            get
            {
                return modelCompiler;
            }
        }
    }
}


text:
using DriverSolutions.BOL.Models.ModuleSystem;
using DriverSolutions.DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DriverSolutions.BOL.Repositories.ModuleSystem
{
    public class LicenseRepository
    {
        public static List<LicenseModel> GetLicenses(DSModel db, bool? isEnabled = null)
        {
            if (db == null)
                throw new ArgumentNullException("db");

            var query = PredicateBuilder.True<ConstLicense>();
            if (isEnabled.HasValue)
                query = query.And(l => l.IsEnabled == isEnabled.Value);

            return db.ConstLicenses
                .Where(query)
                .Select(l => new LicenseModel()
                {
                    LicenseID = l.LicenseID,
                    LicenseName = l.LicenseName,
                    IsEnabled = l.IsEnabled,
                    IsChanged = false
                })
                .ToList();
        }
    }
}


text:
package net.rushashki.social.shashki64.client.activity;

import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.PlaceController;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import net.rushashki.social.shashki64.client.config.ShashkiGinjector;
import net.rushashki.social.shashki64.client.event.OnNavbarReloadEvent;
import net.rushashki.social.shashki64.client.view.BasicView;
import net.rushashki.social.shashki64.shared.locale.ShashkiConstants;

/**
 * Created with IntelliJ IDEA.
 * User: alekspo
 * Date: 24.11.14
 * Time: 14:14
 */
public class BasicActivity extends AbstractActivity {

  protected final com.google.web.bindery.event.shared.EventBus eventBus;
  protected ShashkiGinjector shashkiGinjector = ShashkiGinjector.INSTANCE;
  protected String token;
  protected PlaceController placeController;
  protected BasicView view;
  protected ShashkiConstants constants;

  public BasicActivity(String token) {
    this.token = token;
    this.eventBus = shashkiGinjector.getEventBus();
    this.placeController = shashkiGinjector.getPlaceController();
    this.constants = shashkiGinjector.getShashkiConstants();
  }

  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view.setToken(token);
    eventBus.fireEvent(new OnNavbarReloadEvent(token));
    panel.setWidget(view.asWidget());
  }

}


text:
import {bindValue} from '../../../common/model/reactive';
import {Value} from '../../../common/model/value';
import {ViewProps} from '../../../common/model/view-props';
import {ClassName} from '../../../common/view/class-name';
import {valueToClassName} from '../../../common/view/reactive';
import {View} from '../../../common/view/view';
import {bladeContainerClassName} from '../../common/view/blade-container';

interface Config {
	contentsElement: HTMLElement;
	empty: Value<boolean>;
	viewProps: ViewProps;
}

const className = ClassName('tab');

/**
 * @hidden
 */
export class TabView implements View {
	public readonly element: HTMLElement;
	public readonly itemsElement: HTMLElement;
	public readonly contentsElement: HTMLElement;

	constructor(doc: Document, config: Config) {
		this.element = doc.createElement('div');
		this.element.classList.add(className(), bladeContainerClassName());
		config.viewProps.bindClassModifiers(this.element);
		bindValue(
			config.empty,
			valueToClassName(this.element, className(undefined, 'nop')),
		);

		const itemsElem = doc.createElement('div');
		itemsElem.classList.add(className('i'));
		this.element.appendChild(itemsElem);
		this.itemsElement = itemsElem;

		const contentsElem = config.contentsElement;
		contentsElem.classList.add(className('c'));
		this.element.appendChild(contentsElem);
		this.contentsElement = contentsElem;
	}
}


text:
package com.badlogic.gdx.tools.flame;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;

import com.badlogic.gdx.graphics.Mesh;
import com.badlogic.gdx.graphics.g3d.Model;
import com.badlogic.gdx.graphics.g3d.particles.influencers.SpawnInfluencer;
import com.badlogic.gdx.graphics.g3d.particles.values.CylinderSpawnShapeValue;
import com.badlogic.gdx.graphics.g3d.particles.values.EllipseSpawnShapeValue;
import com.badlogic.gdx.graphics.g3d.particles.values.LineSpawnShapeValue;
import com.badlogic.gdx.graphics.g3d.particles.values.PointSpawnShapeValue;
import com.badlogic.gdx.graphics.g3d.particles.values.PrimitiveSpawnShapeValue;
import com.badlogic.gdx.graphics.g3d.particles.values.PrimitiveSpawnShapeValue.SpawnSide;
import com.badlogic.gdx.graphics.g3d.particles.values.RectangleSpawnShapeValue;
import com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue;
import com.badlogic.gdx.graphics.g3d.particles.values.UnweightedMeshSpawnShapeValue;
import com.badlogic.gdx.graphics.g3d.particles.values.WeightMeshSpawnShapeValue;
import com.badlogic.gdx.utils.Array;

/** @author Inferno */
class SpawnInfluencerPanel extends InfluencerPanel<SpawnInfluencer> implements TemplatePickerPanel.Listener<Model> {
	private static final String SPAWN_SHAPE_POINT = "Point",
		SPAWN_SHAPE_LINE = "Line",
		SPAWN_SHAPE_RECTANGLE = "Rectangle",
		SPAWN_SHAPE_CYLINDER = "Cylinder",
		SPAWN_SHAPE_ELLIPSE = "Ellipse",
		SPAWN_SHAPE_MESH = "Unweighted Mesh",
		SPAWN_SHAPE_WEIGHT_MESH = "Weighted Mesh";
	private static String[] spawnShapes = new String[]{	SPAWN_SHAPE_POINT, SPAWN_SHAPE_LINE, SPAWN_SHAPE_RECTANGLE,
		SPAWN_SHAPE_ELLIPSE, SPAWN_SHAPE_CYLINDER,
		SPAWN_SHAPE_MESH, SPAWN_SHAPE_WEIGHT_MESH};
	JComboBox shapeCombo;
	JCheckBox edgesCheckbox;
	JLabel edgesLabel;
	JComboBox sideCombo;
	JLabel sideLabel;
	TemplatePickerPanel<Model> meshPanel;
	ScaledNumericPanel widthPanel, heightPanel, depthPanel;
	RangedNumericPanel xPanel, yPanel, zPanel;
	PointSpawnShapeValue pointSpawnShapeValue;
	LineSpawnShapeValue lineSpawnShapeValue;
	RectangleSpawnShapeValue rectangleSpawnShapeValue;
	EllipseSpawnShapeValue ellipseSpawnShapeValue;
	CylinderSpawnShapeValue cylinderSpawnShapeValue;
	UnweightedMeshSpawnShapeValue meshSpawnShapeValue;
	WeightMeshSpawnShapeValue weightMeshSpawnShapeValue;

	public SpawnInfluencerPanel (final FlameMain editor, SpawnInfluencer influencer) {
		super(editor, influencer, "Spawn Influencer", "Define where the particles are spawned.", true, false);
		setValue(influencer);
		setCurrentSpawnData(influencer.spawnShapeValue);
		shapeCombo.setSelectedItem(spawnShapeToString(influencer.spawnShapeValue));
	}

	private void setCurrentSpawnData (SpawnShapeValue spawnShapeValue) {
		SpawnShapeValue local = null;
		if(spawnShapeValue instanceof PointSpawnShapeValue)
			local = pointSpawnShapeValue;
		else if(spawnShapeValue instanceof LineSpawnShapeValue)
			local = lineSpawnShapeValue;
		else if(spawnShapeValue instanceof RectangleSpawnShapeValue)
			local = rectangleSpawnShapeValue;
		else if(spawnShapeValue instanceof EllipseSpawnShapeValue)
			local = ellipseSpawnShapeValue;
		else if(spawnShapeValue instanceof CylinderSpawnShapeValue)
			local = cylinderSpawnShapeValue;
		if(spawnShapeValue instanceof UnweightedMeshSpawnShapeValue)
			local = meshSpawnShapeValue;
		else if(spawnShapeValue instanceof WeightMeshSpawnShapeValue)
			local = weightMeshSpawnShapeValue;
		local.load(spawnShapeValue);
	}

	protected void setSpawnShapeValue(SpawnShapeValue spawnShapeValue){
		xPanel.setValue(spawnShapeValue.xOffsetValue);
		yPanel.setValue(spawnShapeValue.yOffsetValue);
		zPanel.setValue(spawnShapeValue.zOffsetValue);
	}

	protected void setPrimitiveSpawnShape (PrimitiveSpawnShapeValue shape, boolean showEdges, SpawnSide side) {
		setSpawnShapeValue(shape);
		SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
		influencer.spawnShapeValue = shape;
		widthPanel.setValue(shape.getSpawnWidth());
		heightPanel.setValue(shape.getSpawnHeight());
		depthPanel.setValue(shape.getSpawnDepth());
		setEdgesVisible(showEdges);
		if(showEdges)
			edgesCheckbox.setSelected(shape.isEdges());
		if(side != null){
			setSidesVisible(true);
			sideCombo.setSelectedItem(side);
		}
		else {
			setSidesVisible(false);
		}

		widthPanel.setVisible(true);
		heightPanel.setVisible(true);
		depthPanel.setVisible(true);
		meshPanel.setVisible(false);
	}

	protected void setMeshSpawnShape (SpawnShapeValue shape) {
		setSpawnShapeValue(shape);
		value.spawnShapeValue = shape;
		setEdgesVisible(false);
		setSidesVisible(false);
		widthPanel.setVisible(false);
		heightPanel.setVisible(false);
		depthPanel.setVisible(false);
		meshPanel.setVisible(true);
	}

	private Object spawnShapeToString (SpawnShapeValue spawnShapeValue) {
		if(spawnShapeValue instanceof PrimitiveSpawnShapeValue){
			if(spawnShapeValue instanceof PointSpawnShapeValue) return SPAWN_SHAPE_POINT;
			else if(spawnShapeValue instanceof LineSpawnShapeValue) return SPAWN_SHAPE_LINE;
			else if(spawnShapeValue instanceof RectangleSpawnShapeValue) return SPAWN_SHAPE_RECTANGLE;
			else if(spawnShapeValue instanceof EllipseSpawnShapeValue) return SPAWN_SHAPE_ELLIPSE;
			else if(spawnShapeValue instanceof CylinderSpawnShapeValue) return SPAWN_SHAPE_CYLINDER;
		}
		if(spawnShapeValue instanceof WeightMeshSpawnShapeValue){
			return SPAWN_SHAPE_WEIGHT_MESH;
		}
		if(spawnShapeValue instanceof UnweightedMeshSpawnShapeValue){
			return SPAWN_SHAPE_MESH;
		}

		return null;
	}

	public void update (FlameMain editor) {
		SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
		shapeCombo.setSelectedItem( spawnShapeToString(influencer.spawnShapeValue));
	}

	void setEdgesVisible (boolean visible)
	{
		edgesCheckbox.setVisible(visible);
		edgesLabel.setVisible(visible);
	}

	void setSidesVisible(boolean visible)
	{
		sideCombo.setVisible(visible);
		sideLabel.setVisible(visible);
	}

	protected void initializeComponents () {
		super.initializeComponents();

		pointSpawnShapeValue = new PointSpawnShapeValue();
		lineSpawnShapeValue = new LineSpawnShapeValue();
		rectangleSpawnShapeValue = new RectangleSpawnShapeValue();
		ellipseSpawnShapeValue = new EllipseSpawnShapeValue();
		cylinderSpawnShapeValue = new CylinderSpawnShapeValue();
		meshSpawnShapeValue = new UnweightedMeshSpawnShapeValue();
		weightMeshSpawnShapeValue = new WeightMeshSpawnShapeValue();

		lineSpawnShapeValue.setDimensions(6, 6, 6);
		rectangleSpawnShapeValue.setDimensions(6, 6, 6);
		ellipseSpawnShapeValue.setDimensions(6, 6, 6);
		cylinderSpawnShapeValue.setDimensions(6, 6, 6);

		pointSpawnShapeValue.setActive(true);
		lineSpawnShapeValue.setActive(true);
		rectangleSpawnShapeValue.setActive(true);
		ellipseSpawnShapeValue.setActive(true);
		cylinderSpawnShapeValue.setActive(true);
		meshSpawnShapeValue.setActive(true);
		weightMeshSpawnShapeValue.setActive(true);

		Model defaultModel = editor.assetManager.get(FlameMain.DEFAULT_MODEL_PARTICLE);
		Array<Model> models = new Array<Model>();
		models.add(defaultModel);

		int i=0;
		JPanel panel = new JPanel(new GridBagLayout());
		EditorPanel.addContent(panel, i, 0, new JLabel("Shape"), false, GridBagConstraints.WEST, GridBagConstraints.NONE, 0,0);
		EditorPanel.addContent(panel, i++,1, shapeCombo = new JComboBox(new DefaultComboBoxModel(spawnShapes)), false, GridBagConstraints.WEST, GridBagConstraints.NONE, 1,0);
		EditorPanel.addContent(panel, i, 0, edgesLabel = new JLabel("Edges"), false, GridBagConstraints.WEST, GridBagConstraints.NONE, 0,0);
		EditorPanel.addContent(panel, i++, 1, edgesCheckbox = new JCheckBox(), false, GridBagConstraints.WEST, GridBagConstraints.NONE, 0,0);
		EditorPanel.addContent(panel, i, 0, sideLabel = new JLabel("Side"), false, GridBagConstraints.WEST, GridBagConstraints.NONE, 0,0);
		EditorPanel.addContent(panel, i++, 1, sideCombo = new JComboBox(new DefaultComboBoxModel(SpawnSide.values())), false, GridBagConstraints.WEST, GridBagConstraints.NONE, 1, 0);
		edgesCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);

		i=0;
		addContent(i++, 0, panel, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL);
		addContent(i++, 0, meshPanel = new TemplatePickerPanel<Model>(editor, models, this, Model.class, new LoaderButton.ModelLoaderButton(editor), true, false)
																																			, false, GridBagConstraints.WEST, GridBagConstraints.NONE);
		addContent(i++, 0, xPanel = new RangedNumericPanel(editor, pointSpawnShapeValue.xOffsetValue, "X Offset", "Amount to offset a particle's starting X location, in world units.", false));
		addContent(i++, 0, yPanel = new RangedNumericPanel(editor, pointSpawnShapeValue.yOffsetValue, "Y Offset", "Amount to offset a particle's starting Y location, in world units.", false));
		addContent(i++, 0, zPanel = new RangedNumericPanel(editor, pointSpawnShapeValue.zOffsetValue, "Z Offset", "Amount to offset a particle's starting Z location, in world units.", false));
		addContent(i++, 0, widthPanel = new ScaledNumericPanel(editor, pointSpawnShapeValue.getSpawnWidth(), "Duration", "Spawn Width", "Width of the spawn shape, in world units.", true));
		addContent(i++, 0, heightPanel = new ScaledNumericPanel(editor, pointSpawnShapeValue.getSpawnWidth(), "Duration", "Spawn Height", "Height of the spawn shape, in world units.", true));
		addContent(i++, 0, depthPanel = new ScaledNumericPanel(editor, pointSpawnShapeValue.getSpawnWidth(), "Duration", "Spawn Depth", "Depth of the spawn shape, in world units.", true), false);

		meshPanel.setIsAlwayShown(true);
		onTemplateChecked(defaultModel, true);

		shapeCombo.addActionListener(new ActionListener() {
			public void actionPerformed (ActionEvent event) {
				String shape = (String)shapeCombo.getSelectedItem();
				if(shape == SPAWN_SHAPE_POINT){
					setPrimitiveSpawnShape(pointSpawnShapeValue, false, null);
				}
				else if(shape == SPAWN_SHAPE_LINE){
					setPrimitiveSpawnShape(lineSpawnShapeValue, false, null);
				}
				else if(shape == SPAWN_SHAPE_RECTANGLE){
					setPrimitiveSpawnShape(rectangleSpawnShapeValue, true, null);
				}
				else if(shape == SPAWN_SHAPE_ELLIPSE){
					setPrimitiveSpawnShape(ellipseSpawnShapeValue, true, ellipseSpawnShapeValue.getSide());
				}
				else if(shape == SPAWN_SHAPE_CYLINDER){
					setPrimitiveSpawnShape(cylinderSpawnShapeValue, true, null);
				}
				else if(shape == SPAWN_SHAPE_MESH){
					setMeshSpawnShape(meshSpawnShapeValue);
				}
				else if(shape == SPAWN_SHAPE_WEIGHT_MESH){
					setMeshSpawnShape(weightMeshSpawnShapeValue);
				}
				editor.restart();
			}
		});

		edgesCheckbox.addActionListener(new ActionListener() {
			public void actionPerformed (ActionEvent event) {
				SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
				PrimitiveSpawnShapeValue shapeValue = (PrimitiveSpawnShapeValue)influencer.spawnShapeValue;
				shapeValue.setEdges(edgesCheckbox.isSelected());
				setEdgesVisible(true);
			}
		});

		sideCombo.addActionListener(new ActionListener() {
			public void actionPerformed (ActionEvent event) {
				SpawnSide side = (SpawnSide)sideCombo.getSelectedItem();
				SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
				EllipseSpawnShapeValue shapeValue = (EllipseSpawnShapeValue)influencer.spawnShapeValue;
				shapeValue.setSide(side);
			}
		});

	}

	@Override
	public void onTemplateChecked (Model model, boolean isChecked) {
		//Update the shapes
		SpawnShapeValue shapeValue = null;
		Mesh mesh = model.meshes.get(0);
		weightMeshSpawnShapeValue.setMesh(mesh, model);
		meshSpawnShapeValue.setMesh(mesh, model);
		if(shapeCombo.getSelectedItem() == SPAWN_SHAPE_WEIGHT_MESH){
			SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
			influencer.spawnShapeValue = weightMeshSpawnShapeValue;
		}
		else if(shapeCombo.getSelectedItem() == SPAWN_SHAPE_MESH){
			SpawnInfluencer influencer = (SpawnInfluencer)editor.getEmitter().findInfluencer(SpawnInfluencer.class);
			influencer.spawnShapeValue = meshSpawnShapeValue;
		}
		editor.restart();
	}

}


text:
using UnityEngine;
using System.Collections;
using Tacticsoft;
using UnityEngine.UI;
using UnityEngine.Events;

namespace Tacticsoft.Examples
{
    //Inherit from TableViewCell instead of MonoBehavior to use the GameObject
    //containing this component as a cell in a TableView
    public class DynamicHeightCell : TableViewCell
    {
        public Text m_rowNumberText;
        public Slider m_cellHeightSlider;

        public int rowNumber { get; set; }

        [System.Serializable]
        public class CellHeightChangedEvent : UnityEvent<int, float> { }
        public CellHeightChangedEvent onCellHeightChanged;

        void Update() {
            m_rowNumberText.text = "Row " + rowNumber.ToString();
        }

        public void SliderValueChanged(float value) {
            onCellHeightChanged.Invoke(rowNumber, value);
        }

        public float height {
            get { return m_cellHeightSlider.value; }
            set { m_cellHeightSlider.value = value; }
        }

    }
}


text:
package net.happybrackets.core.control;

import java.net.InetAddress;

/**
 * Define the different types of scope we want for our controls
 * Although similar to the send and receive objects in Max in that the name and type
 * parameter of the DynamicControl determines message interconnection,
 * the {@link ControlScope} dictates how far (in
 * a topological sense) the object can reach in order to communicate with other
 * {@link DynamicControl} objects.  The different scopes available are:
 *

 *
{@link ControlScope#UNIQUE} - a new independent control is created and only sends messages to registered listeners
 *
{@link ControlScope#SKETCH} - messages are also sent to other controls with the same name and scope belonging to other instances in the same sketch.
 *
{@link ControlScope#CLASS} - messages are also sent to other controls with the same name and scope belonging to other instances of the same class.
 *
{@link ControlScope#DEVICE} - messages are also sent to other controls with the same name and scope on the same device
 *
{@link ControlScope#GLOBAL} - messages are also sent to other controls with the same name and scope on the entire network.
 *
{@link ControlScope#TARGET} - messages are also sent to other controls with the same name and scope on specific or targeted devices on the network.
 *
 *
 The Default ControlScope is {@link ControlScope#SKETCH}, so if {@link DynamicControlParent#setControlScope(ControlScope)} or {@link DynamicControl#setControlScope(ControlScope)} is not called, controls have {@link ControlScope#SKETCH}
 * For two Controls to match, they must have the same ControlScope, {@link ControlType}, and Name. For example:

    IntegerControl control1 = new IntegerControlSender(this, "ControlName", 0);
    control1.setControlScope(ControlScope.CLASS);

    IntegerTextControl control2 = new IntegerTextControl(this, "ControlName", 0) {
        {@literal @}Override
        public void valueChanged(int control_val) {// Write your DynamicControl code below this line
            System.out.println("Read " + control_val);
            // Write your DynamicControl code above this line
        }
    };// End DynamicControl control2 code
    control2.setControlScope(ControlScope.CLASS);

    control1.setValue(2);

 * The control1 and control2 will match because they both have a matching {@link ControlScope#CLASS} condition, the same name ("ControlName")
 * and are of type {@link ControlType#INT}. The result will be that control2 will receive the value from
 * control1, which will result in Read 2 being printed to standard output.
 *
 */
public enum ControlScope {
    /**
     * An independent control that only sends messages to the GUI and not to other Controls.
     */
    UNIQUE,
    /**
     * Messages are sent to all devices of the same {@link ControlType}, {@link ControlScope} and name to all instances of the same  {@link Object} as the first parameter of the control constructor.

     IntegerControl control1 = new IntegerControlSender(this, "ControlName", 0);
     control1.setControlScope(ControlScope.SKETCH);

     IntegerTextControl control2 = new IntegerTextControl(this, "ControlName", 0) {
        {@literal @}Override
        public void valueChanged(int control_val) {// Write your DynamicControl code below this line
        System.out.println("Read " + control_val);
        // Write your DynamicControl code above this line
        }
     };// End DynamicControl control2 code
     control2.setControlScope(ControlScope.SKETCH);

     control1.setValue(2);

     * The control1 and control2 will match because they both have a matching {@link ControlScope#CLASS} condition and have the same {@link Object} as the first parameter of the control constructor , the same name ("ControlName")
     * and are of type {@link ControlType#INT}. The result will be that control2 will receive the value from
     * control1, which will result in Read 2 being printed to standard output.
     *
{@link ControlScope#SKETCH} is different to {@link ControlScope#CLASS} in that if this code was sent multiple times on identical sketches,
     * control1 and control2 would only match on the same sketch.
     *
The Object used to match {@link ControlScope#SKETCH}  controls can be defined as another object. For example:

     Object controlObject = hb.get("ControlObject");

     IntegerControl control1 = new IntegerControlSender(controlObject, "ControlName", 0);

     IntegerTextControl control2 = new IntegerTextControl(controlObject, "ControlName", 0) {

     control1 and control2 match because they are both using controlObject as the control reference.
     */
    SKETCH,

    /**
     * Messages are sent to all devices of the same {@link ControlType}, {@link ControlScope} and name to all instances of the same {@link Class} as the first parameter of the control constructor.
     * This is the default scope and if {@link DynamicControlParent#setControlScope(ControlScope)} or {@link DynamicControl#setControlScope(ControlScope)} is not called, controls have {@link ControlScope#SKETCH}

     IntegerControl control1 = new IntegerControlSender(this, "ControlName", 0);
     control1.setControlScope(ControlScope.CLASS);

     IntegerTextControl control2 = new IntegerTextControl(this, "ControlName", 0) {
        {@literal @}Override
        public void valueChanged(int control_val) {// Write your DynamicControl code below this line
            System.out.println("Read " + control_val);
        // Write your DynamicControl code above this line
        }
     };// End DynamicControl control2 code
     control2.setControlScope(ControlScope.CLASS);

     control1.setValue(2);

     * The control1 and control2 will match because they both have a matching {@link ControlScope#CLASS} condition and have the same {@link Class} as the first parameter of the control constructor , the same name ("ControlName")
     * and are of type {@link ControlType#INT}. The result will be that control2 will receive the value from
     * control1, which will result in Read 2 being printed to standard output.
     *
{@link ControlScope#CLASS} is different to {@link ControlScope#SKETCH} in that if this code was sent multiple times on identical sketches,
     * control1 and control2 on all the sketches would match on all sketches.
     */
    CLASS,

    /**
     * Messages are sent to all devices of the same {@link ControlType}, {@link ControlScope} and name on the same device. For example:
     *

     IntegerControl control1 = new IntegerControlSender(this, "ControlName", 0);
     control1.setControlScope(ControlScope.DEVICE);

     IntegerTextControl control2 = new IntegerTextControl(this, "ControlName", 0) {
         {@literal @}Override
        public void valueChanged(int control_val) {// Write your DynamicControl code below this line
        System.out.println("Read " + control_val);
        // Write your DynamicControl code above this line
        }
     };// End DynamicControl control2 code
     control2.setControlScope(ControlScope.DEVICE);

     control1.setValue(2);

     The value 2 will be sent to every {@link IntegerControl} or {@link DynamicControl} of {@link ControlType#INT} on this device that has the
     name "ControlName" and has {@link ControlScope#DEVICE}.
     */
    DEVICE,

    /**
     * Messages are sent to all devices of the same {@link ControlType}, {@link ControlScope} and name on the entire network.
     *

     // this is on device 1
     IntegerControl control1 = new IntegerControlSender(this, "ControlName", 0);
     control1.setControlScope(ControlScope.GLOBAL);

     control1.setValue(2);

     // this is on device 2
     IntegerTextControl control2 = new IntegerTextControl(this, "ControlName", 0) {
        {@literal @}Override
        public void valueChanged(int control_val) {// Write your DynamicControl code below this line
            System.out.println("Read " + control_val);
            // Write your DynamicControl code above this line
        }
     };// End DynamicControl control2 code
     control2.setControlScope(ControlScope.GLOBAL);

     The value 2 will be sent to every {@link IntegerControl} or {@link DynamicControl} of {@link ControlType#INT} on the entire network that has the
     name "ControlName" and has {@link ControlScope#GLOBAL}.
     */
    GLOBAL,

    /**
     * Messages are sent to registered listeners with the same scope and specific or targeted devices on the network.
     * See {@link DynamicControlParent#setControlTarget(String...)} and {@link DynamicControlParent#setControlTarget(InetAddress...)} for specific details on
     * sending messages to a specific target address. Consider the following

    IntegerControl control1 = new IntegerControlSender(this, "ControlName", 0);
    control1.setControlScope(ControlScope.TARGET);
    control1.addControlTarget("HB-123456", "HB-654321");
    control1.addControlTarget( "192.168.0.2");

    IntegerTextControl control2 = new IntegerTextControl(this, "ControlName", 0) {
        {@literal @}Override
        public void valueChanged(int control_val) {// Write your DynamicControl code below this line
            System.out.println("Read " + control_val);
            // Write your DynamicControl code above this line
        }
    };// End DynamicControl control2 code
    control2.setControlScope(ControlScope.TARGET);

    control1.setValue(2); // This will not be seen by control2 unless control1 has this device as one of it's targets

    // This is on device "HB-654321"
    IntegerTextControl control3 = new IntegerTextControl(this, "ControlName", 0) {
        {@literal @}Override
        public void valueChanged(int control_val) {// Write your DynamicControl code below this line
            System.out.println("Read " + control_val);
            // Write your DynamicControl code above this line
        }
    };// End DynamicControl receiver code
    control3.setControlScope(ControlScope.TARGET);

     *
     * In this example, control1 will send the value of 2 to devices whose names are HB-123456 or HB-654321, or at
     * address "192.168.0.2". Controls on those devices of {@link ControlType#INT}, name "ControlName"
     * with {@link ControlScope#TARGET} will accept the message. In this case, we see that control3
     * matches this (as it is on device "HB-654321") so it will print "Read 2" to the standard output;
     * however, control2 will not receive the message even though it is on the same device as control1 because
     * control1 did not have it's own device as a target through @link DynamicControlParent#setControlTarget(String...)}
     */
    TARGET

}


text:
/**
 * Created by fvelazquez on 18/03/14.
 */
Ext.define('COMBO.view.RemoteCountrySearch', {
    extend: 'Ext.form.ComboBox',
    alias: 'widget.remoteCountrySearch',
    queryMode: 'remote',
    displayField: 'name',
    valueField: 'code',
    forceSelection: true,
    id: 'countryBox',
    labelWidth: 150,
    fieldLabel: 'Please select a Country',
    size: 50,
    maxLength: 50,
    allowBlank : false,
    name: 'remoteCountry',
    store: 'RemoteCountries',
    minChars: 1,
    hideTrigger:true

});


text:
<!DOCTYPE html >

    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />

    <title>A stacked Bar chart showing income/expenditure</title>

    <meta name="robots" content="noindex,nofollow" />
    <meta name="description" content="A stacked Bar chart showing income/expenditure" />

A stacked Bar chart showing income/expenditure

    <canvas id="cvs" width="600" height="250">[No canvas support]</canvas>

    This goes in the documents header:

<script src="RGraph.common.core.js"></script>
<script src="RGraph.bar.js"></script>

    Put this where you want the chart to show up:

<canvas id="cvs" width="600" height="250">
    [No canvas support]
</canvas>

    This is the code that generates the chart:

<script>
    window.onload = function ()
    {
        var data1 = [[2,5,9],[4,2,6],[6,5,8]];
        var data2 = [-4,-5,-20];

        // Top bar chart
        var bar1 = new RGraph.Bar({
            id: 'cvs',
            data: data1,
            options: {
                shadow: false,
                strokestyle: 'rgba(0,0,0,0)',
                noaxes: true,
                ylabels: false,
                colors: ['blue','pink','aqua'],
                hmargin: 25,
                strokestyle: 'rgba(0,0,0,0)',
                backgroundGrid: false,
                gutterBottom: 125,
                grouping: 'stacked',
                ymax: 20
            }
        }).wave()

        // Bottom bar chart
        var bar2 = new RGraph.Bar({
            id: 'cvs',
            data: data2,
            options: {
                shadow: false,
                colors: ['red'],
                hmargin: 25,
                xaxispos: 'center',
                backgroundGrid: false,
                ymax: 20
            }
        }).wave()
    };
</script>

        « Back


text:
Rails.application.routes.draw do

  unless Rails.env.production?
    match '/emulator(/*path)', :controller => 'emulator', :action => 'index'
  end

end