text:
#include "WelcomeLastPlayerMenu.h"
#include <sstream>

#include "ManageGamesMenu.h"

#include "../GameManager.h"

/** @namespace Symp */
namespace Symp {

extern int g_WindowHeight;
extern int g_WindowWidth;

/**
* @brief WelcomeLastPlayerMenu constructor
* Responsible for the initialization of the private attributes of the #WelcomeLastPlayerMenu class. This function
* is not responsible for drawing the graphical elements that compose the menu, the #init() function is.
* @param pLastPlayer the reference to the last known #Player
* @see Player
* @see MenuManager
* @see State
* @see init()
* @see ~WelcomeLastPlayerMenu()
*/
WelcomeLastPlayerMenu::WelcomeLastPlayerMenu(Player* pLastPlayer)
	: State(), m_pLastPlayer(pLastPlayer)
{
}

/**
* @brief WelcomeLastPlayerMenu elements initialization
* The elements that compose the menu are created in this function.
* @see Player
* @see MenuManager
* @see State
* @see end()
* @see WelcomeLastPlayerMenu()
*/
void WelcomeLastPlayerMenu::init(){

	m_background = new Image("../assets/menu/main-menu-background.png");
	m_background->setWidth(g_WindowWidth);
	m_background->setHeight(g_WindowHeight);
	m_background->setAspectRatio(AspectRatio::IGNORE_ASPECT_RATIO);
	MenuManager::getInstance()->addGuiComponent(m_background, 0);
	m_background->update();

	//Create the layout
	int layoutWidth = g_WindowWidth*0.25;
	int layoutHeight = g_WindowHeight*0.5;
	m_buttonLayout = new Layout(g_WindowWidth/2 - layoutWidth/2, g_WindowHeight/2 - layoutHeight/2, layoutWidth, layoutHeight);

	//Create a new game button
	m_resumeGameButton = new Image("../assets/menu/resume-game.png");
	m_resumeGameButton->setColor(Color::BLUEDINO);
	m_resumeGameButton->enable();
	m_resumeGameButton->setAspectRatio(AspectRatio::IGNORE_ASPECT_RATIO);
	m_buttonLayout->addComponent(m_resumeGameButton, 0, 0);

	//Last Player text
	int textPosX = (m_resumeGameButton->getPosX() + m_resumeGameButton->getWidth()/2);
	int textPosY = (m_resumeGameButton->getPosY() + m_resumeGameButton->getHeight()/2.5);
	m_lastPlayerName = new Text(m_pLastPlayer->getName() + "'s", Color::WHITE, textPosX, textPosY, true);
	MenuManager::getInstance()->addGuiComponent(m_lastPlayerName, 2);

	//Manage games button (disabled)
	m_manageGamesButton = new Image("../assets/menu/manage-games.png");
	m_manageGamesButton->setColor(Color::BLUEDINO);
	m_manageGamesButton->enable();
	m_manageGamesButton->setAspectRatio(AspectRatio::IGNORE_ASPECT_RATIO);
	m_buttonLayout->addComponent(m_manageGamesButton, 0, 1);

	//Quit button
	m_quitButton = new Image("../assets/menu/quit-symptogen.png");
	m_quitButton->setColor(Color::YELLOWDINO);
	m_quitButton->enable();
	m_quitButton->setAspectRatio(AspectRatio::IGNORE_ASPECT_RATIO);
	m_buttonLayout->addComponent(m_quitButton, 0, 2);

	//Settle the layout
	MenuManager::getInstance()->addGuiLayout(m_buttonLayout, 1);

}

/**
* @brief Handle mouse clic events
* @param mouseX the x coordinate of the mouse position
* @param mouseY the y coordinate of the mouse position
* @see MenuManager
* @see State
* @see InputManager
* @see init()
*/
void WelcomeLastPlayerMenu::handleMouseClic(int mouseX, int mouseY) {

	if (m_resumeGameButton->isTargetedByMouse(mouseX, mouseY)) {
		// Launch the correct level for the last known player

		//Convert int to string
		std::ostringstream oss;
		oss << m_pLastPlayer->getCurrentLevel();
		std::string levelNumber = oss.str();

		MenuManager::getInstance()->setLevelToLoad("../assets/map/level" + levelNumber + ".xml");
		MenuManager::getInstance()->setLevelChoosen(true);

	}
	else if(m_manageGamesButton->isTargetedByMouse(mouseX, mouseY)){
		// Display the ManageGamesMenu
		ManageGamesMenu* manageGamesMenu = new ManageGamesMenu();
		MenuManager::getInstance()->setState(manageGamesMenu);
	}
	else if(m_quitButton->isTargetedByMouse(mouseX, mouseY)){
		// Quit the application
		MenuManager::getInstance()->setIsAboutToQuit(true);
	}
}

/**
* @brief Handle key down event
* @see MenuManager
* @see State
* @see InputManager
* @see init()
*/
void WelcomeLastPlayerMenu::keyDownPressed(){
}

/**
* @brief Handle key up event
* @see MenuManager
* @see State
* @see InputManager
* @see init()
*/
void WelcomeLastPlayerMenu::keyUpPressed(){
}

}


text:
require File.expand_path('../boot', __FILE__)

require 'rails/all'

if defined?(Bundler)
  # If you precompile assets before deploying to production, use this line
  Bundler.require(*Rails.groups(:assets => %w(development test)))
  # If you want your assets lazily compiled in production, use this line
  # Bundler.require(:default, :assets, Rails.env)
end

module Explorer2
  class Application < Rails::Application
    #load library that handles application specific settings
    require File.expand_path(File.join(File.dirname(__FILE__), '../lib/app_settings'))
    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Custom directories with classes and modules you want to be autoloadable.
    # config.autoload_paths += %W(#{config.root}/extras)
    config.autoload_paths += Dir["#{config.root}/lib/**/"]

    # Only load the plugins named here, in the order given (default is alphabetical).
    # :all can be used as a placeholder for all plugins not explicitly named.
    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]

    # Activate observers that should always be running.
    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de

    # Configure the default encoding used in templates for Ruby 1.9.
    config.encoding = "utf-8"

    # Configure sensitive parameters which will be filtered from the log file.
    config.filter_parameters += [:password]

    # Enable escaping HTML in JSON.
    config.active_support.escape_html_entities_in_json = true

    # Use SQL instead of Active Record's schema dumper when creating the database.
    # This is necessary if your schema can't be completely dumped by the schema dumper,
    # like if you have constraints or database-specific column types
    # config.active_record.schema_format = :sql

    # Enforce whitelist mode for mass assignment.
    # This will create an empty whitelist of attributes available for mass-assignment for all models
    # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
    # parameters by using an attr_accessible or attr_protected declaration.
    config.active_record.whitelist_attributes = true

    # Enable the asset pipeline
    config.assets.enabled = true

    # Version of your assets, change this if you want to expire all your assets
    config.assets.version = '1.0'
    ActiveRecord::Base.include_root_in_json = false

    #application specific settings
    AppSettings.config = YAML.load_file("config/app_settings.yml")[Rails.env]

    #handlebars file
    #HandlebarsAssets::Config.compiler = 'handlebars-v1.3.0.js'
    #HandlebarsAssets::Config.compiler_path = Rails.root.join('vendor/assets/javascripts')

    #active support cache has problems unmarshalling objects in development which results in
    #undefined class/module errors
    #http://alisdair.mcdiarmid.org/2013/02/02/fixing-rails-auto-loading-for-serialized-objects.html
    # Eager load all value objects, as they may be instantiated from
    # YAML before the symbol is referenced
    config.before_initialize do |app|
      app.config.paths.add 'app/models', :eager_load => true
    end
    # Reload cached/serialized classes before every request (in development
    # mode) or on startup (in production mode)
    config.to_prepare do
      Dir[ File.expand_path(Rails.root.join("app/models/*.rb")) ].each do |file|
        require_dependency file
      end
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
Register

Sign up to Isaac

	    <form class="panel" ng-submit="save('/account')" name="account" novalidate>

					    First Name

		                            Required

				    <input id="account-firstname" name="firstname" type="text" ng-model="user.givenName" required autocomplete="name given-name">

					    Last Name

		                            Required

				    <input id="account-lastname" name="secondname" type="text" ng-model="user.familyName" required autocomplete="name family-name">

	                    Password
						<span class="ru-error-message" ng-if="user.password.length < 6">
                        	Password must be at least 6 characters long

	                <input id="account-password" type="password" ng-model="user.password" placeholder="Enter password" name="password" required autocomplete="new-password">

	                <label for="account-password2" ng-class="{'disabled' : !user.password || user.password.length < 6}">
	                	Confirm password

	                        Passwords do not match

	                <input id="account-password2" type="password" placeholder="Re-enter password"
	                       ng-disabled="!user.password || user.password.length < 6" match="user.password" name="password2" ng-model="password2" required autocomplete="new-password">

					    Your Email Address

	                            Enter a valid email

				    <input id="account-email" name="email" type="email" ng-model="user.email" required autocomplete="username email">

                        Date of Birth

                            <select ng-model="dob.day" ng-options="day for day in datePicker.days">
                            </select>

                            <select ng-model="dob.month" ng-options="month for month in datePicker.months">
                            </select>

                            <select ng-model="dob.year" ng-options="year for year in datePicker.years">
                            </select>

                            I confirm I am at least 13 years old
                            !

	                    <input id="ch00" type="checkbox" ng-model="confirmed_over_thirteen" ng-disabled="user.dateOfBirth" input-animation>

				    <input class="ru-button-big expand" type="submit" value="Register Now">

	    </form>

			        Registration Failed: {{errorMessage}}


text:
<?php

/**
 * This exception class indicates a problem while reading from a
 * <var>ByteBuffer</var> instance, i.e. reading more data than the buffer
 * contains. This may hint at a protocol related problem.
 *
 * @author Sebastian Staudt
 * @package steam-condenser
 * @subpackage exceptions
 * @see ByteBuffer
 */
class BufferUnderflowException extends Exception {}


text:
import importlib
from django.utils import six
from django.core.exceptions import ImproperlyConfigured
from .utils import name_that_thing

class ConsumerRegistry(object):
    """
    Manages the available consumers in the project and which channels they
    listen to.

    Generally this is attached to a backend instance as ".registry"
    """

    def __init__(self, routing=None):
        self.consumers = {}
        # Initialise with any routing that was passed in
        if routing:
            # If the routing was a string, import it
            if isinstance(routing, six.string_types):
                module_name, variable_name = routing.rsplit(".", 1)
                try:
                    routing = getattr(importlib.import_module(module_name), variable_name)
                except (ImportError, AttributeError):
                    raise ImproperlyConfigured("Cannot import channel routing %r" % routing)
            # Load consumers into us
            for channel, handler in routing.items():
                self.add_consumer(handler, [channel])

    def add_consumer(self, consumer, channels):
        # Upconvert if you just pass in a string for channels
        if isinstance(channels, six.string_types):
            channels = [channels]
        # Import any consumer referenced as string
        if isinstance(consumer, six.string_types):
            module_name, variable_name = consumer.rsplit(".", 1)
            try:
                consumer = getattr(importlib.import_module(module_name), variable_name)
            except (ImportError, AttributeError):
                raise ImproperlyConfigured("Cannot import consumer %r" % consumer)
        # Register on each channel, checking it's unique
        for channel in channels:
            if channel in self.consumers:
                raise ValueError("Cannot register consumer %s - channel %r already consumed by %s" % (
                    name_that_thing(consumer),
                    channel,
                    name_that_thing(self.consumers[channel]),
                ))
            self.consumers[channel] = consumer

    def all_channel_names(self):
        return self.consumers.keys()

    def consumer_for_channel(self, channel):
        try:
            return self.consumers[channel]
        except KeyError:
            return None


text:
	module('From JSON Tests');

	test('simple fromJSON test', function () {
		var model,
			o = {
				firstName: 'Darren',
				lastName: 'Schnare',
				skills: ['javascript', 'html', 'css', 'ruby'],
				team: [{
					firstName: 'Alex',
					lastName: 'Grendo'
				}, {
					firstName: 'Sam',
					lastName: 'Hilto'
				}, {
					firstName: 'James',
					lastName: 'Wazzabi'
				}]
			};

		model = binder.fromJSON(o);

		strictEqual(typeof model.firstName, 'function', 'Expect model.firstName to be a function');
		strictEqual(model.firstName(), 'Darren', 'Expect model.firstName() to equal "Darren"');
		strictEqual(typeof model.lastName, 'function', 'Expect model.lastName to be a function');
		strictEqual(model.lastName(), 'Schnare', 'Expect model.lastName() to equal "Schnare"');
		strictEqual(typeof model.skills, 'function', 'Expect model.skills to be a function');
		ok(util.isArray(model.skills()), 'Expect model.skills() to be an Array');
		strictEqual(model.skills().join(','), 'javascript,html,css,ruby', 'Expect model.skills() to equal [javascript, html, css, ruby]');
		strictEqual(typeof model.team, 'function', 'Expect model.team to be a function');
		ok(util.isArray(model.team()), 'Expect model.team() to be an Array');
		strictEqual(model.team()[0].firstName(), 'Alex', 'Expect model.team()[0].firstName() to equal "Alex"');
		strictEqual(model.team()[0].lastName(), 'Grendo', 'Expect model.team()[0].lastName() to equal "Grendo"');
		strictEqual(model.team()[1].firstName(), 'Sam', 'Expect model.team()[1].firstName() to equal "Sam"');
		strictEqual(model.team()[1].lastName(), 'Hilto', 'Expect model.team()[1].lastName() to equal "Hilto"');
		strictEqual(model.team()[2].firstName(), 'James', 'Expect model.team()[2].firstName() to equal "James"');
		strictEqual(model.team()[2].lastName(), 'Wazzabi', 'Expect model.team()[2].lastName() to equal "Wazzabi"');
	});

	test('custom fromJSON test', function () {
		var model,
			o = {
				firstName: 'Darren',
				lastName: 'Schnare',
				skills: ['javascript', 'html', 'css', 'ruby'],
				team: [{
					firstName: 'Alex',
					lastName: 'Grendo'
				}, {
					firstName: 'Sam',
					lastName: 'Hilto'
				}, {
					firstName: 'James',
					lastName: 'Wazzabi'
				}]
			};

		model = binder.fromJSON(o, {
			filter: function (model, json) {
				model.fullName = binder.mkProperty(function () {
					return model.firstName + ' ' + model.lastName;
				});
				return model;
			},
			properties: {
				skills: function (model, json) {
					return json.charAt(0).toUpperCase() + json.substring(1);
				},
				team: {
					exclude: ['firstName', 'lastName'],
					filter: function (model, json) {
						model.name = binder.mkProperty(json.firstName + ' ' + json.lastName);
						return model;
					}
				}
			}
		});

		strictEqual(typeof model.firstName, 'function', 'Expect model.firstName to be a function');
		strictEqual(model.firstName(), 'Darren', 'Expect model.firstName() to equal "Darren"');
		strictEqual(typeof model.lastName, 'function', 'Expect model.lastName to be a function');
		strictEqual(model.lastName(), 'Schnare', 'Expect model.lastName() to equal "Schnare"');
		strictEqual(model.fullName(), 'Darren Schnare', 'Expect model.fullName() to equal "Darren Schnare"');
		strictEqual(typeof model.skills, 'function', 'Expect model.skills to be a function');
		ok(util.isArray(model.skills()), 'Expect model.skills() to be an Array');
		strictEqual(model.skills().join(','), 'Javascript,Html,Css,Ruby', 'Expect model.skills() to equal [Javascript, Html, Css, Ruby]');
		strictEqual(typeof model.team, 'function', 'Expect model.team to be a function');
		ok(util.isArray(model.team()), 'Expect model.team() to be an Array');
		strictEqual(model.team()[0].name(), 'Alex Grendo', 'Expect model.team()[0].name() to equal "Alex Grendo"');
		strictEqual(model.team()[0].firstName, undefined, 'Expect model.team()[0].firstName to equal undefined');
		strictEqual(model.team()[0].lastName, undefined, 'Expect model.team()[0].lastName to equal undefined');
		strictEqual(model.team()[1].name(), 'Sam Hilto', 'Expect model.team()[1].name() to equal "Sam Hilto"');
		strictEqual(model.team()[1].firstName, undefined, 'Expect model.team()[1].firstName to equal undefined');
		strictEqual(model.team()[1].lastName, undefined, 'Expect model.team()[1].lastName to equal undefined');
		strictEqual(model.team()[2].name(), 'James Wazzabi', 'Expect model.team()[2].name() to equal "James Wazzabi"');
		strictEqual(model.team()[2].firstName, undefined, 'Expect model.team()[2].firstName to equal undefined');
		strictEqual(model.team()[2].lastName, undefined, 'Expect model.team()[2].lastName to equal undefined');
	});


text:
package com.android.camera;

import android.app.Application;

public class CameraAppImpl extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        Util.initialize(this);
    }
}


text:
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <winpr/crt.h>

#include <freerdp/types.h>
#include <freerdp/addin.h>
#include <winpr/stream.h>
#include <freerdp/utils/list.h>
#include <freerdp/utils/svc_plugin.h>
#include <freerdp/client/channels.h>

#include "rdpdr_main.h"

#include "devman.h"

DEVMAN* devman_new(rdpSvcPlugin* plugin)
{
	DEVMAN* devman;

	devman = (DEVMAN*) malloc(sizeof(DEVMAN));
	ZeroMemory(devman, sizeof(DEVMAN));

	devman->plugin = plugin;
	devman->id_sequence = 1;
	devman->devices = list_new();

	return devman;
}

void devman_free(DEVMAN* devman)
{
	DEVICE* device;

	while ((device = (DEVICE*) list_dequeue(devman->devices)) != NULL)
		IFCALL(device->Free, device);

	list_free(devman->devices);

	free(devman);
}

static void devman_register_device(DEVMAN* devman, DEVICE* device)
{
	device->id = devman->id_sequence++;
	list_add(devman->devices, device);

	DEBUG_SVC("device %d.%s registered", device->id, device->name);
}

static char DRIVE_SERVICE_NAME[] = "drive";
static char PRINTER_SERVICE_NAME[] = "printer";
static char SMARTCARD_SERVICE_NAME[] = "smartcard";
static char SERIAL_SERVICE_NAME[] = "serial";
static char PARALLEL_SERVICE_NAME[] = "parallel";

BOOL devman_load_device_service(DEVMAN* devman, RDPDR_DEVICE* device)
{
	char* ServiceName = NULL;
	DEVICE_SERVICE_ENTRY_POINTS ep;
	PDEVICE_SERVICE_ENTRY entry = NULL;

	if (device->Type == RDPDR_DTYP_FILESYSTEM)
		ServiceName = DRIVE_SERVICE_NAME;
	else if (device->Type == RDPDR_DTYP_PRINT)
		ServiceName = PRINTER_SERVICE_NAME;
	else if (device->Type == RDPDR_DTYP_SMARTCARD)
		ServiceName = SMARTCARD_SERVICE_NAME;
	else if (device->Type == RDPDR_DTYP_SERIAL)
		ServiceName = SERIAL_SERVICE_NAME;
	else if (device->Type == RDPDR_DTYP_PARALLEL)
		ServiceName = PARALLEL_SERVICE_NAME;

	if (!ServiceName)
		return FALSE;

	printf("Loading device service %s (static)\n", ServiceName);
	entry = (PDEVICE_SERVICE_ENTRY) freerdp_load_channel_addin_entry(ServiceName, NULL, "DeviceServiceEntry", 0);

	if (entry == NULL)
		return FALSE;

	ep.devman = devman;
	ep.RegisterDevice = devman_register_device;
	ep.device = device;

	entry(&ep);

	return TRUE;
}

DEVICE* devman_get_device_by_id(DEVMAN* devman, UINT32 id)
{
	LIST_ITEM* item;
	DEVICE* device;

	for (item = devman->devices->head; item; item = item->next)
	{
		device = (DEVICE*) item->data;

		if (device->id == id)
			return device;
	}

	return NULL;
}


text:
package org.eclipse.php.internal.debug.core.zend.model;

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

import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchesListener;
import org.eclipse.php.internal.debug.core.pathmapper.VirtualPath;

public class ResolveBlackList implements ILaunchesListener {

	public enum Type {
		FILE, FOLDER, RECURSIVE,
	}

	private static Map<ILaunch, Map<VirtualPath, Type>> blackListMap;
	private static ResolveBlackList instance = new ResolveBlackList();

	private ResolveBlackList() {
		blackListMap = new HashMap<ILaunch, Map<VirtualPath, Type>>();

		DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
	}

	public static ResolveBlackList getInstance() {
		return instance;
	}

	private static Map<VirtualPath, Type> getByLaunch(ILaunch launch) {
		if (!blackListMap.containsKey(launch)) {
			blackListMap.put(launch, new HashMap<VirtualPath, Type>());
		}
		return blackListMap.get(launch);
	}

	public void add(ILaunch launch, VirtualPath path, Type type) {
		getByLaunch(launch).put(path, type);
	}

	public boolean containsEntry(ILaunch launch, String file) {
		if (!VirtualPath.isAbsolute(file)) {
			return false;
		}
		Map<VirtualPath, Type> map = getByLaunch(launch);
		for (Entry<VirtualPath, Type> entry : map.entrySet()) {
			VirtualPath tmp = new VirtualPath(file);
			VirtualPath path = entry.getKey();
			Type type = entry.getValue();
			if (type == Type.FILE) {
				if (path.equals(tmp)) {
					return true;
				}
			} else if (type == Type.FOLDER) {
				tmp.removeLastSegment();
				if (path.equals(tmp)) {
					return true;
				}
			} else if (type == Type.RECURSIVE) {
				if (path.isPrefixOf(tmp)) {
					return true;
				}
			}
		}
		return false;
	}

	public void launchesAdded(ILaunch[] launches) {
	}

	public void launchesChanged(ILaunch[] launches) {
	}

	public void launchesRemoved(ILaunch[] launches) {
		for (ILaunch l : launches) {
			blackListMap.remove(l);
		}
	}
}


text:
<title>DesktopMouseY</title>

DesktopMouseY()

Syntax

Result = DesktopMouseY()

Description

Returns the absolute y position of the mouse on the desktop.

Parameters

None.

Return value

Returns the y coordinate (in pixel) of the mouse relative to the top left corner of the primary monitor.
The coordinate is negative if the mouse is on a monitor above the primary monitor.

Example

  If OpenWindow(0, 0, 0, 300, 30, "Desktop mouse monitor", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    TextGadget(0, 10, 6, 200, 20, "")

    Repeat
      Event = WindowEvent()

      If Event = 0 ; No events are in queue anymore, so halt the process for a few milliseconds for multitasking
        SetGadgetText(0, "Desktop mouse position: "+Str(DesktopMouseX())+","+Str(DesktopMouseY()))
        Delay(20)
      EndIf

    Until Event = #PB_Event_CloseWindow
  EndIf

See Also

DesktopMouseX(), DesktopY(), DesktopHeight(), WindowMouseY()

Supported OS
All

<- DesktopMouseX() - Desktop Index - DesktopName() ->


text:
package com.gregorbyte.buildxpages.ant;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;

import com.gregorbyte.buildxpages.task.DeleteDatabase;

public class DeleteNsfTask extends Task {

	private String server;
	private String filename;

	public String getServer() {
		return server;
	}

	public void setServer(String server) {
		this.server = server;
	}

	public String getFilename() {
		return filename;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}

	@Override
	public void execute() throws BuildException {

		DeleteDatabase task = new DeleteDatabase(server, filename);
		task.execute();

	}

}


text:
namespace Bloom.Publish
{
    partial class PublishView
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
			this.components = new System.ComponentModel.Container();
			SIL.Windows.Forms.SuperToolTip.SuperToolTipInfoWrapper superToolTipInfoWrapper5 = new SIL.Windows.Forms.SuperToolTip.SuperToolTipInfoWrapper();
			SIL.Windows.Forms.SuperToolTip.SuperToolTipInfo superToolTipInfo5 = new SIL.Windows.Forms.SuperToolTip.SuperToolTipInfo();
			SIL.Windows.Forms.SuperToolTip.SuperToolTipInfoWrapper superToolTipInfoWrapper1 = new SIL.Windows.Forms.SuperToolTip.SuperToolTipInfoWrapper();
			SIL.Windows.Forms.SuperToolTip.SuperToolTipInfo superToolTipInfo1 = new SIL.Windows.Forms.SuperToolTip.SuperToolTipInfo();
			SIL.Windows.Forms.SuperToolTip.SuperToolTipInfoWrapper superToolTipInfoWrapper4 = new SIL.Windows.Forms.SuperToolTip.SuperToolTipInfoWrapper();
			SIL.Windows.Forms.SuperToolTip.SuperToolTipInfo superToolTipInfo4 = new SIL.Windows.Forms.SuperToolTip.SuperToolTipInfo();
			SIL.Windows.Forms.SuperToolTip.SuperToolTipInfoWrapper superToolTipInfoWrapper2 = new SIL.Windows.Forms.SuperToolTip.SuperToolTipInfoWrapper();
			SIL.Windows.Forms.SuperToolTip.SuperToolTipInfo superToolTipInfo2 = new SIL.Windows.Forms.SuperToolTip.SuperToolTipInfo();
			SIL.Windows.Forms.SuperToolTip.SuperToolTipInfoWrapper superToolTipInfoWrapper3 = new SIL.Windows.Forms.SuperToolTip.SuperToolTipInfoWrapper();
			SIL.Windows.Forms.SuperToolTip.SuperToolTipInfo superToolTipInfo3 = new SIL.Windows.Forms.SuperToolTip.SuperToolTipInfo();
			this._loadTimer = new System.Windows.Forms.Timer(this.components);
			this._makePdfBackgroundWorker = new System.ComponentModel.BackgroundWorker();
			this._workingIndicator = new System.Windows.Forms.Panel();
			this._topBarPanel = new System.Windows.Forms.Panel();
			this._saveButton = new System.Windows.Forms.Button();
			this._printButton = new System.Windows.Forms.Button();
			this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
			this._contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
			this._openinBrowserMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this._openPDF = new System.Windows.Forms.ToolStripMenuItem();
			this._epubRadio = new System.Windows.Forms.RadioButton();
			this._menusToolStrip = new System.Windows.Forms.ToolStrip();
			this._layoutChoices = new System.Windows.Forms.ToolStripDropDownButton();
			this._bookletCoverRadio = new System.Windows.Forms.RadioButton();
			this.label1 = new System.Windows.Forms.Label();
			this._uploadRadio = new System.Windows.Forms.RadioButton();
			this._bookletBodyRadio = new System.Windows.Forms.RadioButton();
			this._simpleAllPagesRadio = new System.Windows.Forms.RadioButton();
			this._L10NSharpExtender = new L10NSharp.UI.L10NSharpExtender(this.components);
			this._pdfViewer = new Bloom.Publish.PdfViewer();
			this._superToolTip = new SIL.Windows.Forms.SuperToolTip.SuperToolTip(this.components);
			this._workingIndicator.SuspendLayout();
			this._topBarPanel.SuspendLayout();
			this.tableLayoutPanel1.SuspendLayout();
			this._contextMenuStrip.SuspendLayout();
			this._menusToolStrip.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this._L10NSharpExtender)).BeginInit();
			this.SuspendLayout();
			//
			// _makePdfBackgroundWorker
			//
			this._makePdfBackgroundWorker.WorkerSupportsCancellation = true;
			this._makePdfBackgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this._makePdfBackgroundWorker_DoWork);
			//
			// _workingIndicator
			//
			this._workingIndicator.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
			this._workingIndicator.BackColor = System.Drawing.Color.White;
			this._workingIndicator.Controls.Add(this._topBarPanel);
			this._workingIndicator.Location = new System.Drawing.Point(114, 24);
			this._workingIndicator.Name = "_workingIndicator";
			this._workingIndicator.Size = new System.Drawing.Size(714, 516);
			this._workingIndicator.TabIndex = 8;
			//
			// _topBarPanel
			//
			this._topBarPanel.AutoSize = true;
			this._topBarPanel.Controls.Add(this._saveButton);
			this._topBarPanel.Controls.Add(this._printButton);
			this._topBarPanel.Location = new System.Drawing.Point(296, 320);
			this._topBarPanel.Name = "_topBarPanel";
			this._topBarPanel.Size = new System.Drawing.Size(327, 70);
			this._topBarPanel.TabIndex = 14;
			//
			// _saveButton
			//
			this._saveButton.AutoSize = true;
			this._saveButton.BackColor = System.Drawing.Color.Transparent;
			this._saveButton.FlatAppearance.BorderSize = 0;
			this._saveButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this._saveButton.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
			this._saveButton.ForeColor = System.Drawing.Color.Black;
			this._saveButton.Image = global::Bloom.Properties.Resources.Usb;
			this._L10NSharpExtender.SetLocalizableToolTip(this._saveButton, null);
			this._L10NSharpExtender.SetLocalizationComment(this._saveButton, null);
			this._L10NSharpExtender.SetLocalizingId(this._saveButton, "PublishView._saveButton");
			this._saveButton.Location = new System.Drawing.Point(139, 0);
			this._saveButton.Name = "_saveButton";
			this._saveButton.Size = new System.Drawing.Size(185, 71);
			this._saveButton.TabIndex = 15;
			this._saveButton.Text = "Save stub";
			this._saveButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
			this._saveButton.UseVisualStyleBackColor = false;
			this._saveButton.Click += new System.EventHandler(this.OnSave_Click);
			//
			// _printButton
			//
			this._printButton.AutoSize = true;
			this._printButton.BackColor = System.Drawing.Color.Transparent;
			this._printButton.FlatAppearance.BorderSize = 0;
			this._printButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this._printButton.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
			this._printButton.ForeColor = System.Drawing.Color.Black;
			this._printButton.Image = global::Bloom.Properties.Resources.print;
			this._L10NSharpExtender.SetLocalizableToolTip(this._printButton, null);
			this._L10NSharpExtender.SetLocalizationComment(this._printButton, null);
			this._L10NSharpExtender.SetLocalizingId(this._printButton, "PublishTab.PrintButton");
			this._printButton.Location = new System.Drawing.Point(0, 0);
			this._printButton.Name = "_printButton";
			this._printButton.Size = new System.Drawing.Size(160, 64);
			this._printButton.TabIndex = 14;
			this._printButton.Text = "&Print...";
			this._printButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
			this._printButton.UseVisualStyleBackColor = false;
			this._printButton.Click += new System.EventHandler(this.OnPrint_Click);
			//
			// tableLayoutPanel1
			//
			this.tableLayoutPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
			this.tableLayoutPanel1.ColumnCount = 1;
			this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
			this.tableLayoutPanel1.ContextMenuStrip = this._contextMenuStrip;
			this.tableLayoutPanel1.Controls.Add(this._menusToolStrip, 0, 0);
			this.tableLayoutPanel1.Controls.Add(this._bookletCoverRadio, 0, 2);
			this.tableLayoutPanel1.Controls.Add(this.label1, 0, 4);
			this.tableLayoutPanel1.Controls.Add(this._bookletBodyRadio, 0, 3);
			this.tableLayoutPanel1.Controls.Add(this._simpleAllPagesRadio, 0, 1);
			this.tableLayoutPanel1.Controls.Add(this._uploadRadio, 0, 6);
			this.tableLayoutPanel1.Controls.Add(this._epubRadio, 0, 5);
			this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Left;
			this.tableLayoutPanel1.ForeColor = System.Drawing.Color.White;
			this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
			this.tableLayoutPanel1.Name = "tableLayoutPanel1";
			this.tableLayoutPanel1.RowCount = 7;
			this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			this.tableLayoutPanel1.Size = new System.Drawing.Size(114, 540);
			this.tableLayoutPanel1.TabIndex = 10;
			this.tableLayoutPanel1.Paint += new System.Windows.Forms.PaintEventHandler(this.tableLayoutPanel1_Paint);
			//
			// _contextMenuStrip
			//
			this._contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this._openinBrowserMenuItem,
            this._openPDF});
			this._L10NSharpExtender.SetLocalizableToolTip(this._contextMenuStrip, null);
			this._L10NSharpExtender.SetLocalizationComment(this._contextMenuStrip, null);
			this._L10NSharpExtender.SetLocalizationPriority(this._contextMenuStrip, L10NSharp.LocalizationPriority.InternalUseOnly);
			this._L10NSharpExtender.SetLocalizingId(this._contextMenuStrip, "_contextMenuStrip._contextMenuStrip");
			this._contextMenuStrip.Name = "_contextMenuStrip";
			this._contextMenuStrip.Size = new System.Drawing.Size(426, 48);
			//
			// _openinBrowserMenuItem
			//
			this._L10NSharpExtender.SetLocalizableToolTip(this._openinBrowserMenuItem, null);
			this._L10NSharpExtender.SetLocalizationComment(this._openinBrowserMenuItem, null);
			this._L10NSharpExtender.SetLocalizationPriority(this._openinBrowserMenuItem, L10NSharp.LocalizationPriority.Low);
			this._L10NSharpExtender.SetLocalizingId(this._openinBrowserMenuItem, "EditTab.BookContextMenu.openHtmlInBrowser");
			this._openinBrowserMenuItem.Name = "_openinBrowserMenuItem";
			this._openinBrowserMenuItem.Size = new System.Drawing.Size(425, 22);
			this._openinBrowserMenuItem.Text = "Open the HTML used to make this PDF, in Firefox (must be on path)";
			this._openinBrowserMenuItem.Click += new System.EventHandler(this._openinBrowserMenuItem_Click);
			//
			// _openPDF
			//
			this._L10NSharpExtender.SetLocalizableToolTip(this._openPDF, null);
			this._L10NSharpExtender.SetLocalizationComment(this._openPDF, null);
			this._L10NSharpExtender.SetLocalizingId(this._openPDF, "PublishTab.OpenThePDFInTheSystemPDFViewer");
			this._openPDF.Name = "_openPDF";
			this._openPDF.Size = new System.Drawing.Size(425, 22);
			this._openPDF.Text = "Open the PDF in the default system PDF viewer";
			this._openPDF.Click += new System.EventHandler(this._openPDF_Click);
			//
			// _epubRadio
			//
			this._epubRadio.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
			this._epubRadio.Image = global::Bloom.Properties.Resources.epubPublishButton;
			this._L10NSharpExtender.SetLocalizableToolTip(this._epubRadio, null);
			this._L10NSharpExtender.SetLocalizationComment(this._epubRadio, null);
			this._L10NSharpExtender.SetLocalizingId(this._epubRadio, "PublishTab.EpubButton");
			this._epubRadio.Location = new System.Drawing.Point(3, 327);
			this._epubRadio.Name = "_epubRadio";
			this._epubRadio.Size = new System.Drawing.Size(105, 82);
			superToolTipInfo5.BackgroundGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
			superToolTipInfo5.BackgroundGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(218)))), ((int)(((byte)(239)))));
			superToolTipInfo5.BackgroundGradientMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(246)))), ((int)(((byte)(251)))));
			superToolTipInfo5.BodyText = "Make an ePUB (electronic book) out of this book, allowing it to be read on variou" +
    "s electronic reading devices.";
			superToolTipInfo5.OffsetForWhereToDisplay = new System.Drawing.Point(120, 0);
			superToolTipInfo5.ShowHeader = false;
			superToolTipInfoWrapper5.SuperToolTipInfo = superToolTipInfo5;
			superToolTipInfoWrapper5.UseSuperToolTip = true;
			this._superToolTip.SetSuperStuff(this._epubRadio, superToolTipInfoWrapper5);
			this._epubRadio.TabIndex = 18;
			this._epubRadio.TabStop = true;
			this._epubRadio.Text = "ePUB";
			this._epubRadio.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			this._epubRadio.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
			this._epubRadio.UseVisualStyleBackColor = true;
			this._epubRadio.CheckedChanged += new System.EventHandler(this.OnBookletRadioChanged);
			//
			// _menusToolStrip
			//
			this._menusToolStrip.AutoSize = false;
			this._menusToolStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
			this._menusToolStrip.CanOverflow = false;
			this._menusToolStrip.Dock = System.Windows.Forms.DockStyle.None;
			this._menusToolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
			this._menusToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this._layoutChoices});
			this._menusToolStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
			this._L10NSharpExtender.SetLocalizableToolTip(this._menusToolStrip, null);
			this._L10NSharpExtender.SetLocalizationComment(this._menusToolStrip, null);
			this._L10NSharpExtender.SetLocalizationPriority(this._menusToolStrip, L10NSharp.LocalizationPriority.NotLocalizable);
			this._L10NSharpExtender.SetLocalizingId(this._menusToolStrip, "EditTab.MenusToolStrip");
			this._menusToolStrip.Location = new System.Drawing.Point(0, 0);
			this._menusToolStrip.Name = "_menusToolStrip";
			this._menusToolStrip.Size = new System.Drawing.Size(100, 24);
			this._menusToolStrip.TabIndex = 13;
			//
			// _layoutChoices
			//
			this._layoutChoices.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
			this._layoutChoices.ForeColor = System.Drawing.Color.White;
			this._layoutChoices.ImageTransparentColor = System.Drawing.Color.Magenta;
			this._L10NSharpExtender.SetLocalizableToolTip(this._layoutChoices, null);
			this._L10NSharpExtender.SetLocalizationComment(this._layoutChoices, null);
			this._L10NSharpExtender.SetLocalizationPriority(this._layoutChoices, L10NSharp.LocalizationPriority.NotLocalizable);
			this._L10NSharpExtender.SetLocalizingId(this._layoutChoices, "LayoutChoices.A5Portrait");
			this._layoutChoices.Name = "_layoutChoices";
			this._layoutChoices.Size = new System.Drawing.Size(85, 19);
			this._layoutChoices.Text = "Page Layout";
			this._layoutChoices.ToolTipText = "Choose a page size and orientation";
			//
			// _bookletCoverRadio
			//
			this._bookletCoverRadio.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
			this._bookletCoverRadio.Image = global::Bloom.Properties.Resources.coverOnly;
			this._L10NSharpExtender.SetLocalizableToolTip(this._bookletCoverRadio, null);
			this._L10NSharpExtender.SetLocalizationComment(this._bookletCoverRadio, null);
			this._L10NSharpExtender.SetLocalizingId(this._bookletCoverRadio, "PublishTab.CoverOnlyRadio");
			this._bookletCoverRadio.Location = new System.Drawing.Point(3, 130);
			this._bookletCoverRadio.Name = "_bookletCoverRadio";
			this._bookletCoverRadio.Size = new System.Drawing.Size(94, 88);
			superToolTipInfo1.BackgroundGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
			superToolTipInfo1.BackgroundGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(218)))), ((int)(((byte)(239)))));
			superToolTipInfo1.BackgroundGradientMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(246)))), ((int)(((byte)(251)))));
			superToolTipInfo1.BodyText = "Make a PDF of just the front and back (both sides), so you can  print on colored " +
    "paper.";
			superToolTipInfo1.HeaderText = "Cover";
			superToolTipInfo1.OffsetForWhereToDisplay = new System.Drawing.Point(120, 0);
			superToolTipInfo1.ShowHeader = false;
			superToolTipInfoWrapper1.SuperToolTipInfo = superToolTipInfo1;
			superToolTipInfoWrapper1.UseSuperToolTip = true;
			this._superToolTip.SetSuperStuff(this._bookletCoverRadio, superToolTipInfoWrapper1);
			this._bookletCoverRadio.TabIndex = 8;
			this._bookletCoverRadio.TabStop = true;
			this._bookletCoverRadio.Text = "Booklet Cover";
			this._bookletCoverRadio.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			this._bookletCoverRadio.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
			this._bookletCoverRadio.UseVisualStyleBackColor = true;
			this._bookletCoverRadio.CheckedChanged += new System.EventHandler(this.OnBookletRadioChanged);
			//
			// label1
			//
			this.label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this._L10NSharpExtender.SetLocalizableToolTip(this.label1, null);
			this._L10NSharpExtender.SetLocalizationComment(this.label1, null);
			this._L10NSharpExtender.SetLocalizingId(this.label1, "label1");
			this.label1.Location = new System.Drawing.Point(3, 323);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(108, 1);
			this.label1.TabIndex = 17;
			//
			// _uploadRadio
			//
			this._uploadRadio.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
			this._uploadRadio.Image = global::Bloom.Properties.Resources.upload;
			this._L10NSharpExtender.SetLocalizableToolTip(this._uploadRadio, null);
			this._L10NSharpExtender.SetLocalizationComment(this._uploadRadio, null);
			this._L10NSharpExtender.SetLocalizingId(this._uploadRadio, "PublishTab.ButtonThatShowsUploadForm");
			this._uploadRadio.Location = new System.Drawing.Point(3, 415);
			this._uploadRadio.Name = "_uploadRadio";
			this._uploadRadio.Size = new System.Drawing.Size(105, 82);
			superToolTipInfo4.BackgroundGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
			superToolTipInfo4.BackgroundGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(218)))), ((int)(((byte)(239)))));
			superToolTipInfo4.BackgroundGradientMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(246)))), ((int)(((byte)(251)))));
			superToolTipInfo4.BodyText = "Upload to BloomLibrary.org, where others can download and localize into their own" +
    " language.";
			superToolTipInfo4.OffsetForWhereToDisplay = new System.Drawing.Point(120, 0);
			superToolTipInfo4.ShowHeader = false;
			superToolTipInfoWrapper4.SuperToolTipInfo = superToolTipInfo4;
			superToolTipInfoWrapper4.UseSuperToolTip = true;
			this._superToolTip.SetSuperStuff(this._uploadRadio, superToolTipInfoWrapper4);
			this._uploadRadio.TabIndex = 16;
			this._uploadRadio.TabStop = true;
			this._uploadRadio.Text = "Upload";
			this._uploadRadio.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			this._uploadRadio.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
			this._uploadRadio.UseVisualStyleBackColor = true;
			this._uploadRadio.CheckedChanged += new System.EventHandler(this.OnBookletRadioChanged);
			//
			// _bookletBodyRadio
			//
			this._bookletBodyRadio.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
			this._bookletBodyRadio.Image = global::Bloom.Properties.Resources.insideBookletPages;
			this._L10NSharpExtender.SetLocalizableToolTip(this._bookletBodyRadio, null);
			this._L10NSharpExtender.SetLocalizationComment(this._bookletBodyRadio, null);
			this._L10NSharpExtender.SetLocalizingId(this._bookletBodyRadio, "PublishTab.BodyOnlyRadio");
			this._bookletBodyRadio.Location = new System.Drawing.Point(3, 224);
			this._bookletBodyRadio.Name = "_bookletBodyRadio";
			this._bookletBodyRadio.Size = new System.Drawing.Size(94, 96);
			superToolTipInfo2.BackgroundGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
			superToolTipInfo2.BackgroundGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(218)))), ((int)(((byte)(239)))));
			superToolTipInfo2.BackgroundGradientMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(246)))), ((int)(((byte)(251)))));
			superToolTipInfo2.BodyText = "Make a booklet from the inside pages of the book.\r Pages will be laid out and reo" +
    "rdered so that when you fold it, you\'ll have a booklet.\r\n";
			superToolTipInfo2.HeaderText = "Booklet Inside Pages";
			superToolTipInfo2.OffsetForWhereToDisplay = new System.Drawing.Point(120, 0);
			superToolTipInfo2.ShowHeader = false;
			superToolTipInfoWrapper2.SuperToolTipInfo = superToolTipInfo2;
			superToolTipInfoWrapper2.UseSuperToolTip = true;
			this._superToolTip.SetSuperStuff(this._bookletBodyRadio, superToolTipInfoWrapper2);
			this._bookletBodyRadio.TabIndex = 14;
			this._bookletBodyRadio.TabStop = true;
			this._bookletBodyRadio.Text = "Booklet Insides";
			this._bookletBodyRadio.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			this._bookletBodyRadio.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
			this._bookletBodyRadio.UseVisualStyleBackColor = true;
			this._bookletBodyRadio.CheckedChanged += new System.EventHandler(this.OnBookletRadioChanged);
			//
			// _simpleAllPagesRadio
			//
			this._simpleAllPagesRadio.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
			this._simpleAllPagesRadio.Image = global::Bloom.Properties.Resources.simplePages;
			this._L10NSharpExtender.SetLocalizableToolTip(this._simpleAllPagesRadio, null);
			this._L10NSharpExtender.SetLocalizationComment(this._simpleAllPagesRadio, "Instead of making a booklet, just make normal pages");
			this._L10NSharpExtender.SetLocalizingId(this._simpleAllPagesRadio, "PublishTab.OnePagePerPaperRadio");
			this._simpleAllPagesRadio.Location = new System.Drawing.Point(3, 27);
			this._simpleAllPagesRadio.Name = "_simpleAllPagesRadio";
			this._simpleAllPagesRadio.Size = new System.Drawing.Size(94, 97);
			superToolTipInfo3.BackgroundGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
			superToolTipInfo3.BackgroundGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(218)))), ((int)(((byte)(239)))));
			superToolTipInfo3.BackgroundGradientMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(246)))), ((int)(((byte)(251)))));
			superToolTipInfo3.BodyText = "Make a PDF of every page of the book, one page per piece of paper.";
			superToolTipInfo3.OffsetForWhereToDisplay = new System.Drawing.Point(120, 0);
			superToolTipInfo3.ShowHeader = false;
			superToolTipInfoWrapper3.SuperToolTipInfo = superToolTipInfo3;
			superToolTipInfoWrapper3.UseSuperToolTip = true;
			this._superToolTip.SetSuperStuff(this._simpleAllPagesRadio, superToolTipInfoWrapper3);
			this._simpleAllPagesRadio.TabIndex = 10;
			this._simpleAllPagesRadio.TabStop = true;
			this._simpleAllPagesRadio.Text = "Simple";
			this._simpleAllPagesRadio.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			this._simpleAllPagesRadio.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
			this._simpleAllPagesRadio.UseVisualStyleBackColor = true;
			this._simpleAllPagesRadio.CheckedChanged += new System.EventHandler(this.OnBookletRadioChanged);
			//
			// _L10NSharpExtender
			//
			this._L10NSharpExtender.LocalizationManagerId = "Bloom";
			this._L10NSharpExtender.PrefixForNewItems = null;
			//
			// _pdfViewer
			//
			this._pdfViewer.BackColor = System.Drawing.Color.White;
			this._pdfViewer.Dock = System.Windows.Forms.DockStyle.Fill;
			this._L10NSharpExtender.SetLocalizableToolTip(this._pdfViewer, null);
			this._L10NSharpExtender.SetLocalizationComment(this._pdfViewer, null);
			this._L10NSharpExtender.SetLocalizingId(this._pdfViewer, "PdfViewer.PdfViewer");
			this._pdfViewer.Location = new System.Drawing.Point(114, 0);
			this._pdfViewer.Name = "_pdfViewer";
			this._pdfViewer.Size = new System.Drawing.Size(719, 540);
			this._pdfViewer.TabIndex = 16;
			//
			// _superToolTip
			//
			this._superToolTip.FadingInterval = 10;
			//
			// PublishView
			//
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
			this.Controls.Add(this._pdfViewer);
			this.Controls.Add(this.tableLayoutPanel1);
			this.Controls.Add(this._workingIndicator);
			this._L10NSharpExtender.SetLocalizableToolTip(this, null);
			this._L10NSharpExtender.SetLocalizationComment(this, null);
			this._L10NSharpExtender.SetLocalizingId(this, "PublishView.PublishView");
			this.Name = "PublishView";
			this.Size = new System.Drawing.Size(833, 540);
			this._workingIndicator.ResumeLayout(false);
			this._topBarPanel.ResumeLayout(false);
			this._topBarPanel.PerformLayout();
			this.tableLayoutPanel1.ResumeLayout(false);
			this._contextMenuStrip.ResumeLayout(false);
			this._menusToolStrip.ResumeLayout(false);
			this._menusToolStrip.PerformLayout();
			((System.ComponentModel.ISupportInitialize)(this._L10NSharpExtender)).EndInit();
			this.ResumeLayout(false);

        }

        #endregion

		private System.Windows.Forms.Timer _loadTimer;

		private System.ComponentModel.BackgroundWorker _makePdfBackgroundWorker;
		private System.Windows.Forms.Panel _workingIndicator;
		private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
		private System.Windows.Forms.Panel _topBarPanel;
		private System.Windows.Forms.Button _saveButton;
		private System.Windows.Forms.Button _printButton;
		private L10NSharp.UI.L10NSharpExtender _L10NSharpExtender;
		private PdfViewer _pdfViewer;
		private System.Windows.Forms.ContextMenuStrip _contextMenuStrip;
		private System.Windows.Forms.ToolStripMenuItem _openinBrowserMenuItem;
		private System.Windows.Forms.RadioButton _simpleAllPagesRadio;
		private System.Windows.Forms.RadioButton _bookletCoverRadio;
		private System.Windows.Forms.RadioButton _bookletBodyRadio;
		private System.Windows.Forms.ToolStrip _menusToolStrip;
		private System.Windows.Forms.ToolStripDropDownButton _layoutChoices;
		private SIL.Windows.Forms.SuperToolTip.SuperToolTip _superToolTip;
		private System.Windows.Forms.RadioButton _uploadRadio;
		private System.Windows.Forms.ToolStripMenuItem _openPDF;
        private System.Windows.Forms.Label label1;
		private System.Windows.Forms.RadioButton _epubRadio;
    }
}


text:
package com.amazonaws.services.ecr.model.transform;

import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.services.ecr.model.*;

import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;

/**
 * LifecyclePolicyPreviewFilterMarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class LifecyclePolicyPreviewFilterMarshaller {

    private static final MarshallingInfo<String> TAGSTATUS_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("tagStatus").build();

    private static final LifecyclePolicyPreviewFilterMarshaller instance = new LifecyclePolicyPreviewFilterMarshaller();

    public static LifecyclePolicyPreviewFilterMarshaller getInstance() {
        return instance;
    }

    /**
     * Marshall the given parameter object.
     */
    public void marshall(LifecyclePolicyPreviewFilter lifecyclePolicyPreviewFilter, ProtocolMarshaller protocolMarshaller) {

        if (lifecyclePolicyPreviewFilter == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        try {
            protocolMarshaller.marshall(lifecyclePolicyPreviewFilter.getTagStatus(), TAGSTATUS_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}


text:
const paths = require('../configs/paths');
const package = require(`${paths.APP}/package.json`);
const createDMG = require('electron-installer-dmg');

function logProccess(error) {
  error && console.log(error);
}

createDMG({
  name: package.name,
  appPath: `${paths.CACHE_BUILD}/${package.name}-darwin-x64/${package.name}.app`,
  out: paths.CACHE_BUILD,
  overwrite: true
}, logProccess);


text:
For pre-1.0.0:

* Targeting two releases a month for minor versions.
* Regression bug fixes will be released ASAP on best effort for maintainers.  For example, a regression in 0.9.0 means 0.9.1 is released ASAP instead of waiting for the next release train.

## Release procedure for Rusoto

### Semantic versioning

Rusoto uses [semantic versioning 2.0.0](http://semver.org/).

### Rusoto dependencies

Rusoto depends on crates such as `rusoto_credential` and `rusoto_codegen`.  These are usually published before publishing
the main Rusoto crate.

### Publishing walkthrough:

1. Bump version numbers and versions required in cargo.toml files for: `rusoto_credential` (if needed), `rusoto_codegen` (if needed) and main `rusoto` crate.
2. For credential and codegen crates, run `cargo publish --dry-run --allow-dirty` to simulate a publish. This will catch errors such as malformed Cargo.toml or missing required fields.
3. If no errors, commit to master.
4. Publish the credential and/or codegen crates with `cargo publish` in their directories.
5. Last check for main crate, run from the root of the Rusoto project: `cargo publish --dry-run`
6. If good, publish new version of Rusoto: `cargo publish`.
7. Tag master, push tags to github.

### Git tags

Due to multiple crates being in the repo, releases for each crate will be in the format `crate-vmajor.minor.patch`.

Examples:

* `rusoto-v0.21.0`
* `credentials-v0.3.0`
* `codegen-v0.5.0`

To release the main `rusoto` crate, version 0.4.0:

1. Use an annotated tag on the commit with the version bump: `git tag -a rusoto-v0.21.0 -m "Rusoto 0.21.0 release."`
2. Push changes, including tags, to Github: `git push --tags origin`.

### Release notes

Add a list of user-facing changes to a new release for the tagged version on GitHub: https://github.com/rusoto/rusoto/releases

#### API docs

API docs are on Github Pages at [https://rusoto.github.io/rusoto](https://rusoto.github.io/rusoto).

TravisCI builds and publishes the `gh-pages` branch automatically when changes are merged into master.

#### Gitbook docs

See [the Rusoto gitbook project](https://github.com/rusoto/rusoto.github.io).


text:
/* @flow */

import * as React from 'react';
import Font from '~/components/font';
import Layout from '~/components/layout';

export default function About() {
  return (
    <Layout title="About - Remote Stories">

Anonymous stories from remote workers

          Remote Stories is a platform where remote workers of all kinds can
          anonymously post their experiences, thoughts, concerns, opinions and,
          of course, general ups / downs.

You can react to others posts with:

              😄
            {' '}
            Agree / Haha me too

              😕
            {' '}
            Shit that is scary / I'm worried about this too

          Remote workers need to know they are not alone with their struggles.
          This platform lets you see what issues (good and bad) others are
          facing.

          Feel free to discuss your thoughts on posts and learn from other
          peoples' experiences. Find out the true ins and outs of a remote life.

          Remote working, especially in tech, has a very positive aura around it
          but often the bad sides of it are overlooked. This is a place to see
          both sides of the story.

    </Layout>
  );
}


text: INSERT INTO user VALUES('Daisy');


text:
package foo;

public interface Top extends Middle { }


text:
import logging
import urllib2
import urlparse
import uuid
import json
from datetime import datetime

import requestresponder
from edge.httputility import HttpUtility

class Writer(requestresponder.RequestResponder):
    def __init__(self, configFilePath):
        super(Writer, self).__init__(configFilePath)

    def options(self, requestHandler):
        super(Writer, self).options(requestHandler)
        self.requestHandler.set_header('Access-Control-Allow-Origin', '*')
        self.requestHandler.set_header('Access-Control-Allow-Methods', 'POST, GET, OPTIONS')
        self.requestHandler.set_header('Access-Control-Allow-Headers', 'Content-Type, X-Requested-With')
        self.requestHandler.set_header('Allow', 'OPTIONS, GET, HEAD, POST')
        self.requestHandler.set_header('Accept', 'application/json')
        self.requestHandler.set_status(200)
        self.requestHandler.finish()

    def post(self, requestHandler):
        super(Writer, self).post(requestHandler)
        data = json.loads(requestHandler.request.body)

        data["id"] = str(uuid.uuid4())
        data["submit_date"] = datetime.utcnow().isoformat() + "Z"

        httpUtility = HttpUtility()
        solrUrl = self._configuration.get('solr', 'url') + "/update/json/docs?commit=true"
        result = httpUtility.getResponse(solrUrl, self.onResponse, body=json.dumps(data), headers={'Content-Type': 'application/json'})

    def onResponse(self, response):
        self.requestHandler.set_header('Access-Control-Allow-Origin', '*')
        if response.error:
            self.requestHandler.set_status(404)
            self.requestHandler.write(str(response.error))
            self.requestHandler.finish()
        else:
            self.requestHandler.write(response.body)
            self.requestHandler.finish()


text:
module Krikri
  class ApplicationController < ActionController::Base
    before_action :authenticate_user!
  end
end


text:
package com.palantir.common.collect;

import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.collect.AbstractIterator;
import com.google.common.collect.ForwardingIterator;
import com.google.common.collect.Iterators;
import com.google.common.collect.PeekingIterator;
import com.google.common.collect.UnmodifiableIterator;
import com.palantir.common.base.Throwables;
import com.palantir.common.base.Visitors;
import com.palantir.common.visitor.Visitor;
import com.palantir.logsafe.Preconditions;
import com.palantir.logsafe.exceptions.SafeIllegalStateException;
import com.palantir.util.Pair;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import javax.annotation.Nullable;

public final class IteratorUtils {

    private static final Random rand = new Random();

    /**
     * Get first element or null if the iterator is empty.
     */
    public static <T> T getFirst(Iterator<? extends T> iter) {
        return getFirst(iter, null);
    }

    public static <T> T getFirst(Iterator<? extends T> iter, @Nullable T defaultValue) {
        if (iter.hasNext()) {
            return iter.next();
        } else {
            return defaultValue;
        }
    }

    public static <T> Collection<T> chooseRandomElements(Iterator<? extends T> it, final int k) {
        Preconditions.checkArgument(k >= 0);
        List<T> ret = new ArrayList<>();

        int i = 0; // i is the element number
        while (it.hasNext()) {
            i++;
            T next = it.next();
            if (ret.size() < k) {
                ret.add(next);
            } else {
                int nextInt = rand.nextInt(i);
                if (nextInt < k) {
                    ret.set(nextInt, next);
                }
            }
            Preconditions.checkState(i != Integer.MAX_VALUE, "i is too big");
        }
        return ret;
    }

    /**
     * Returns the elements of {@code unfiltered} that satisfy a predicate,
     * calling {@code passVisitor.visit()} on all that satisfy the predicate and
     * {@code failVisitor.visit()} on all that do not.
     */
    public static <T> UnmodifiableIterator<T> filterAndVisit(
            final Iterator<? extends T> unfiltered,
            final Predicate<? super T> predicate,
            @Nullable Visitor<? super T> passVisitor,
            @Nullable Visitor<? super T> failVisitor) {
        Preconditions.checkNotNull(unfiltered);
        Preconditions.checkNotNull(predicate);
        final Visitor<? super T> actualPassVisitor;
        if (passVisitor != null) {
            actualPassVisitor = passVisitor;
        } else {
            actualPassVisitor = Visitors.emptyVisitor();
        }
        final Visitor<? super T> actualFailVisitor;
        if (failVisitor != null) {
            actualFailVisitor = failVisitor;
        } else {
            actualFailVisitor = Visitors.emptyVisitor();
        }
        return new AbstractIterator<T>() {
            @Override
            protected T computeNext() {
                try {
                    while (unfiltered.hasNext()) {
                        T element = unfiltered.next();
                        if (predicate.apply(element)) {
                            actualPassVisitor.visit(element);
                            return element;
                        } else {
                            actualFailVisitor.visit(element);
                        }
                    }
                    return endOfData();
                } catch (Exception e) {
                    throw Throwables.throwUncheckedException(e);
                }
            }
        };
    }

    public static <T> Iterator<T> wrap(final Iterator<? extends T> iterator) {
        if (iterator == null) {
            return null;
        }
        return new ForwardingIterator<T>() {
            @SuppressWarnings("unchecked")
            @Override
            protected Iterator<T> delegate() {
                return (Iterator<T>) iterator;
            }
        };
    }

    private IteratorUtils() {
        throw new SafeIllegalStateException("uninstantiable");
    }

    /**
     * The iterators provided to this function have to be sorted and strictly increasing.
     */
    @SuppressWarnings("BadAssert") // performance sensitive assert checks
    public static <T> Iterator<T> mergeIterators(
            Iterator<? extends T> one,
            Iterator<? extends T> two,
            final Comparator<? super T> ordering,
            final Function<? super Pair<T, T>, ? extends T> mergeFunction) {
        Preconditions.checkNotNull(mergeFunction);
        Preconditions.checkNotNull(ordering);
        final PeekingIterator<T> a = Iterators.peekingIterator(one);
        final PeekingIterator<T> b = Iterators.peekingIterator(two);
        return new AbstractIterator<T>() {
            @Override
            protected T computeNext() {
                if (!a.hasNext() && !b.hasNext()) {
                    return endOfData();
                }
                if (!a.hasNext()) {
                    T ret = b.next();
                    assert !b.hasNext() || ordering.compare(ret, b.peek()) < 0;
                    return ret;
                }
                if (!b.hasNext()) {
                    T ret = a.next();
                    assert !a.hasNext() || ordering.compare(ret, a.peek()) < 0;
                    return ret;
                }
                T peekA = a.peek();
                T peekB = b.peek();
                int comp = ordering.compare(peekA, peekB);
                if (comp == 0) {
                    return mergeFunction.apply(Pair.create(a.next(), b.next()));
                } else if (comp < 0) {
                    T ret = a.next();
                    assert !a.hasNext() || ordering.compare(ret, a.peek()) < 0;
                    return ret;
                } else {
                    T ret = b.next();
                    assert !b.hasNext() || ordering.compare(ret, b.peek()) < 0;
                    return ret;
                }
            }
        };
    }

    public static <T, U> Iterator<Pair<T, U>> zip(final Iterator<? extends T> it1, final Iterator<? extends U> it2) {
        return new AbstractIterator<Pair<T, U>>() {
            @Override
            protected Pair<T, U> computeNext() {
                if (!it1.hasNext() && !it2.hasNext()) {
                    return endOfData();
                }
                T v1 = null;
                if (it1.hasNext()) {
                    v1 = it1.next();
                }
                U v2 = null;
                if (it2.hasNext()) {
                    v2 = it2.next();
                }
                return Pair.create(v1, v2);
            }
        };
    }
}


text:
ACCEPTED

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

#### Published in
Revta Mus. La Plata 15: 24 (1908)

#### Original name
Phyllachora ipirangae Speg., 1908

### Remarks
null


text:
package au.com.williamhill.flywheel.edge;

import java.nio.*;
import java.util.*;
import java.util.concurrent.*;

import org.slf4j.*;

import com.obsidiandynamics.socketx.*;
import com.obsidiandynamics.socketx.util.*;

import au.com.williamhill.flywheel.*;
import au.com.williamhill.flywheel.edge.auth.*;
import au.com.williamhill.flywheel.edge.auth.AuthChain.*;
import au.com.williamhill.flywheel.edge.backplane.*;
import au.com.williamhill.flywheel.edge.plugin.*;
import au.com.williamhill.flywheel.frame.*;
import au.com.williamhill.flywheel.frame.Error;
import au.com.williamhill.flywheel.remote.*;

public final class EdgeNode implements AutoCloseable, BackplaneConnector {
  private static final Logger LOG = LoggerFactory.getLogger(RemoteNode.class);

  private final EdgeNexus localNexus = new EdgeNexus(this, LocalPeer.instance());

  private final XServer<?> server;

  private final Wire wire;

  private final Interchange interchange;

  private final AuthChain<PubAuthChain> pubAuthChain;

  private final AuthChain<SubAuthChain> subAuthChain;

  private final Backplane backplane;

  private final List<EdgeNexus> nexuses = new CopyOnWriteArrayList<>();

  private final List<TopicListener> topicListeners = new ArrayList<>();

  private boolean loggingEnabled = true;

  private Plugin[] plugins;

  public <E extends XEndpoint> EdgeNode(XServerFactory<E> serverFactory,
                                        XServerConfig config,
                                        Wire wire,
                                        Interchange interchange,
                                        AuthChain<PubAuthChain> pubAuthChain,
                                        AuthChain<SubAuthChain> subAuthChain,
                                        Backplane backplane,
                                        Plugin[] plugins) throws Exception {
    pubAuthChain.validate();
    subAuthChain.validate();
    this.wire = wire;
    this.interchange = interchange;
    this.pubAuthChain = pubAuthChain;
    this.subAuthChain = subAuthChain;
    this.backplane = backplane;
    this.plugins = plugins;
    server = serverFactory.create(config, new XEndpointListener<E>() {
      @Override public void onConnect(E endpoint) {
        handleOpen(endpoint);
      }

      @Override public void onText(E endpoint, String message) {
        final EdgeNexus nexus = endpoint.getContext();
        try {
          final Frame frame = wire.decode(message);
          switch (frame.getType()) {
            case BIND:
              if (frame instanceof BindFrame) {
                final BindFrame bind = (BindFrame) frame;
                handleBind(nexus, bind);
              } else {
                if (loggingEnabled) LOG.warn("{}: unsupported frame {}", nexus, frame);
              }
              break;

            case PUBLISH:
              final PublishTextFrame pub = (PublishTextFrame) frame;
              handlePublish(nexus, pub);
              break;

            default:
              if (loggingEnabled) LOG.warn("{}: unsupported frame {}", nexus, frame);
              return;
          }
        } catch (Throwable e) {
          if (loggingEnabled) LOG.warn(String.format("%s: error processing frame\n%s", nexus, message), e);
          return;
        }
      }

      @Override public void onBinary(E endpoint, ByteBuffer message) {
        final EdgeNexus nexus = endpoint.getContext();
        try {
          final BinaryEncodedFrame frame = wire.decode(message);
          if (frame.getType() == FrameType.PUBLISH) {
            final PublishBinaryFrame pub = (PublishBinaryFrame) frame;
            handlePublish(nexus, pub);
          } else {
            if (loggingEnabled) LOG.warn("{}: unsupported frame {}", nexus, frame);
          }
        } catch (Throwable e) {
          if (loggingEnabled) LOG.warn(String.format("%s: error processing frame\n%s", nexus, BinaryUtils.dump(message)), e);
          return;
        }
      }

      @Override public void onDisconnect(E endpoint, int statusCode, String reason) {}

      @Override public void onClose(E endpoint) {
        final EdgeNexus nexus = endpoint.getContext();
        nexuses.remove(nexus);
        handleClose(nexus);
      }

      @Override public void onError(E endpoint, Throwable cause) {
        if (loggingEnabled) LOG.warn(String.format("Unexpected error on endpoint %s", endpoint), cause);
      }

      @Override public void onPing(E endpoint, ByteBuffer data) {}

      @Override public void onPong(E endpoint, ByteBuffer data) {}
    });

    initAuthChains();
    initBackplane();
    initPlugins();
  }

  private void initAuthChains() throws Exception {
    final AuthConnector pubConnector = new AuthConnector() {
      @Override public Collection<String> getActiveTopics(EdgeNexus nexus) {
        return Collections.emptyList();
      }
      @Override public void expireTopic(EdgeNexus nexus, String topic) {
        if (LOG.isDebugEnabled()) LOG.debug("{}: expiring {}", nexus, topic);
      }
    };
    for (Authenticator auth : pubAuthChain.getFilters().values()) {
      auth.attach(pubConnector);
    }

    final AuthConnector subConnector = new AuthConnector() {
      @Override public Collection<String> getActiveTopics(EdgeNexus nexus) {
        return nexus.getSession().getSubscription().getTopics();
      }
      @Override public void expireTopic(EdgeNexus nexus, String topic) {
        if (nexus.getSession().getSubscription().getTopics().contains(topic)) {
          if (LOG.isDebugEnabled()) LOG.debug("{}: expiring topic {}", nexus, topic);
          try {
            nexus.close();
          } catch (Exception e) {
            LOG.warn("Error closing nexus", e);
          }
        }
      }
    };
    for (Authenticator auth : subAuthChain.getFilters().values()) {
      auth.attach(subConnector);
    }
  }

  private void initBackplane() throws Exception {
    backplane.attach(this);
    addTopicListener(new TopicLambdaListener() {
      @Override public void onPublish(EdgeNexus nexus, PublishTextFrame pub) {
        if (! nexus.isLocal()) {
          backplane.onPublish(nexus, pub);
        }
      }

      @Override public void onPublish(EdgeNexus nexus, PublishBinaryFrame pub) {
        if (! nexus.isLocal()) {
          backplane.onPublish(nexus, pub);
        }
      }
    });
  }

  private void initPlugins() throws Exception {
    for (Plugin plugin : plugins) {
      plugin.onRun(this);
    }
  }

  public XServer<?> getServer() {
    return server;
  }

  private void handleBind(EdgeNexus nexus, BindFrame bind) {
    if (loggingEnabled && LOG.isDebugEnabled()) LOG.debug("{}: bind {}", nexus, bind);
    final Session session = nexus.getSession();
    if (session == null) {
      if (loggingEnabled) LOG.error("{}: no session", nexus);
      return;
    }

    if (bind.getAuth() != null) {
      session.setCredentials(bind.getAuth());
    }

    final String newSessionId;
    if (bind.getSessionId() != null) {
      if (session.getSessionId() == null) {
        newSessionId = bind.getSessionId();
        session.setSessionId(newSessionId);
      } else if (! session.getSessionId().equals(bind.getSessionId())) {
        if (loggingEnabled) LOG.warn("{}: attempted to change its session ID from {} to {}",
                                     nexus, session.getSessionId(), bind.getSessionId());
        nexus.send(new BindResponseFrame(bind.getMessageId(), new GeneralError("Cannot reassign session ID")));
        return;
      } else {
        newSessionId = null;
      }
    } else {
      newSessionId = null;
    }

    final Set<String> toSubscribe = new HashSet<>();
    final Set<String> existing = session.getSubscription().getTopics();
    for (String topic : bind.getSubscribe()) {
      if (! existing.contains(topic)) {
        toSubscribe.add(topic);
      } else {
        if (loggingEnabled && LOG.isDebugEnabled()) LOG.debug("{}: ignoring duplicate subscription to {}", nexus, topic);
      }
    }
    if (newSessionId != null) {
      toSubscribe.add(Flywheel.getRxTopicPrefix(newSessionId));
      toSubscribe.add(Flywheel.getRxTopicPrefix(newSessionId) + "/#");
    }

    final Set<String> toUnsubscribe = new HashSet<>();
    for (String topic : bind.getUnsubscribe()) {
      if (existing.contains(topic)) {
        toUnsubscribe.add(topic);
      } else {
        if (loggingEnabled && LOG.isDebugEnabled()) LOG.debug("{}: ignoring duplicate unsubscription from {}", nexus, topic);
      }
    }

    authenticateSubTopics(nexus, bind.getMessageId(), toSubscribe, () -> {
      final CompletableFuture<Void> f = interchange.onBind(nexus, toSubscribe, toUnsubscribe);
      f.whenComplete((void_, cause) -> {
        if (cause == null) {
          final BindResponseFrame bindRes = new BindResponseFrame(bind.getMessageId());
          nexus.send(bindRes);
          fireBindEvent(nexus, bind, bindRes);
        } else {
          if (loggingEnabled) LOG.warn("{}: error handling bind {}", nexus, bind);
          if (loggingEnabled) LOG.warn("", cause);
          fireBindEvent(nexus, bind, new BindResponseFrame(bind.getMessageId(), new GeneralError("Internal error")));
        }
      });
    });
  }

  private void authenticateSubTopics(EdgeNexus nexus, UUID messageId, Set<String> topics, Runnable onSuccess) {
    final CombinedMatches combined = subAuthChain.getMatches(topics);
    combined.invokeAll(nexus, errors -> {
      if (errors.isEmpty()) {
        onSuccess.run();
      } else {
        if (loggingEnabled) LOG.warn("{}: subscriber authentication failed with errors {}, auth: {}",
                                     nexus, errors, nexus.getSession().getCredentials());
        nexus.send(new BindResponseFrame(messageId, errors));
      }
    });
  }

  private void handlePublish(EdgeNexus nexus, PublishTextFrame pub) {
    authenticatePubTopic(nexus, pub.getTopic(), () -> {
      interchange.onPublish(nexus, pub);
      firePublishEvent(nexus, pub);
    });
  }

  private void handlePublish(EdgeNexus nexus, PublishBinaryFrame pub) {
    authenticatePubTopic(nexus, pub.getTopic(), () -> {
      interchange.onPublish(nexus, pub);
      firePublishEvent(nexus, pub);
    });
  }

  private void authenticatePubTopic(EdgeNexus nexus, String topic, Runnable onSuccess) {
    final CombinedMatches combined = pubAuthChain.getMatches(topic);
    combined.invokeAll(nexus, errors -> {
      if (errors.isEmpty()) {
        onSuccess.run();
      } else {
        if (loggingEnabled) LOG.warn("{}: publisher authentication failed with errors {}, auth: {}",
                                     nexus, errors, nexus.getSession().getCredentials());
        sendErrors(nexus, errors);
      }
    });
  }

  private void sendErrors(EdgeNexus nexus, Collection<? extends Error> errors) {
    final String sessionId = nexus.getSession().getSessionId();
    final String errorTopic = Flywheel.getRxTopicPrefix(sessionId != null ? sessionId : "anon") + "/errors";
    nexus.send(new TextFrame(errorTopic, wire.encodeJson(new Errors(errors))));
  }

  private void handleOpen(XEndpoint endpoint) {
    final EdgeNexus nexus = new EdgeNexus(this, new XEndpointPeer(endpoint));
    nexuses.add(nexus);
    endpoint.setContext(nexus);
    interchange.onOpen(nexus);
    fireConnectEvent(nexus);
  }

  private void fireConnectEvent(EdgeNexus nexus) {
    for (TopicListener l : topicListeners) {
      l.onOpen(nexus);
    }
  }

  private void fireCloseEvent(EdgeNexus nexus) {
    for (TopicListener l : topicListeners) {
      l.onClose(nexus);
    }
  }

  private void fireBindEvent(EdgeNexus nexus, BindFrame bind, BindResponseFrame bindRes) {
    for (TopicListener l : topicListeners) {
      l.onBind(nexus, bind, bindRes);
    }
  }

  private void firePublishEvent(EdgeNexus nexus, PublishTextFrame pub) {
    for (TopicListener l : topicListeners) {
      l.onPublish(nexus, pub);
    }
  }

  private void firePublishEvent(EdgeNexus nexus, PublishBinaryFrame pub) {
    for (TopicListener l : topicListeners) {
      l.onPublish(nexus, pub);
    }
  }

  private void handleClose(EdgeNexus nexus) {
    interchange.onClose(nexus);
    fireCloseEvent(nexus);
  }

  public void addTopicListener(TopicListener l) {
    topicListeners.add(l);
  }

  public void removeTopicListener(TopicListener l) {
    topicListeners.remove(l);
  }

  public boolean isLoggingEnabled() {
    return loggingEnabled;
  }

  public void setLoggingEnabled(boolean loggingEnabled) {
    this.loggingEnabled = loggingEnabled;
  }

  /**
   *  Obtains the currently connected non-local nexuses.
   *
   *  @return List of nexuses.
   */
  public List<EdgeNexus> getNexuses() {
    return Collections.unmodifiableList(new ArrayList<>(nexuses));
  }

  @Override
  public void publish(String topic, String payload) {
    final PublishTextFrame pub = new PublishTextFrame(topic, payload);
    interchange.onPublish(localNexus, pub);
    firePublishEvent(localNexus, pub);
  }

  @Override
  public void publish(String topic, byte[] payload) {
    final PublishBinaryFrame pub = new PublishBinaryFrame(topic, payload);
    interchange.onPublish(localNexus, pub);
    firePublishEvent(localNexus, pub);
  }

  Wire getWire() {
    return wire;
  }

  @Override
  public void close() throws Exception {
    for (Plugin plugin : plugins) {
      plugin.close();
    }
    backplane.close();
    server.close();
    interchange.close();
    pubAuthChain.close();
    subAuthChain.close();
  }

  public static EdgeNodeBuilder builder() {
    return new EdgeNodeBuilder();
  }
}


text:
require 'test_helper'

class CollectionTest < Test::Unit::TestCase

  context 'GeoCerts::Collection' do

    should 'carry a start_at attribute' do
      collection  = GeoCerts::Collection.new
      time        = Time.now
      assert_respond_to(collection, :start_at=)
      assert_respond_to(collection, :start_at)
      collection.start_at = time
      assert_equal(time, collection.start_at)
    end

    should 'carry an end_at attribute' do
      collection  = GeoCerts::Collection.new
      time        = Time.now
      assert_respond_to(collection, :end_at=)
      assert_respond_to(collection, :end_at)
      collection.end_at = time
      assert_equal(time, collection.end_at)
    end

  end

end


text:
namespace Ui {
class PollCard;
}

class PollItem;

class PollCard : public QWidget
{
    Q_OBJECT

public:
    explicit PollCard(const PollItem& poll_item, QWidget* parent = nullptr);
    ~PollCard();

signals:
    void voteRequested();
    void detailsRequested();

public slots:
    void updateRemainingTime(const QDateTime& now);
    void updateIcons(const QString& theme);

private:
    Ui::PollCard* ui;
    QDateTime m_expiration;
};

#endif // GRIDCOIN_QT_VOTING_POLLCARD_H


text:
<?php

namespace OSS\Result;

use OSS\Core\OssException;

/**
 * Class AppendResult
 * @package OSS\Result
 */
class AppendResult extends Result
{
    /**
     * Get the value of next-append-position from append's response headers
     *
     * @return int
     * @throws OssException
     */
    protected function parseDataFromResponse()
    {
        $header = $this->rawResponse->header;
        if (isset($header["x-oss-next-append-position"])) {
            return intval($header["x-oss-next-append-position"]);
        }
        throw new OssException("cannot get next-append-position");
    }
}


text:
package by.vshkl.bashq.ui.activity;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;

import by.vshkl.bashq.BashqApplication;
import by.vshkl.bashq.R;

public class CopyToClipboardActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        finish();

        ClipboardManager clipboardManager = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);

        Intent intent = getIntent();
        if (intent.hasExtra(Intent.EXTRA_TEXT) && intent.getType().equals("text/plain")) {
            String contentToCopy = intent.getStringExtra(Intent.EXTRA_TEXT);
            ClipData clipData = ClipData.newPlainText("", contentToCopy);
            clipboardManager.setPrimaryClip(clipData);

            Toast.makeText(this, R.string.message_copied_to_clipboard, Toast.LENGTH_SHORT).show();
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        BashqApplication.getRefWatcher(this).watch(this);
    }
}


text:
package org.eclipse.rdf4j.common.app.logging.base;

import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.LogRecord;

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

/**
 * Handler to convert java.util.logging events to SLF4J logging events.
 *
 * @author Herko ter Horst
 */
public class LogConverterHandler extends Handler {

	/**
	 * Constructor
	 */
	public LogConverterHandler() {
		setLevel(Level.ALL);
	}

	@Override
	public void close() throws SecurityException {
		// do nothing
	}

	@Override
	public void flush() {
		// do nothing
	}

	@Override
	public void publish(LogRecord record) {
		Logger logger = LoggerFactory.getLogger(record.getLoggerName());

		int level = record.getLevel().intValue();
		String message = record.getMessage();
		Throwable thrown = record.getThrown();

		if (level >= Level.SEVERE.intValue()) {
			logger.error(message, thrown);
		} else if (level < Level.SEVERE.intValue() && level >= Level.WARNING.intValue()) {
			logger.warn(message, thrown);
		} else if (level < Level.WARNING.intValue() || level >= Level.CONFIG.intValue()) {
			logger.info(message, thrown);
		} else {
			logger.debug(message, thrown);
		}
	}
}


text:
<web-app version="2.4"
	xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
	http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">

	<display-name>Human resfull app</display-name>
    <context-param>
        <param-name>spring.profiles.default</param-name>
        <param-value>memory</param-value>
    </context-param>

    <servlet>
		<servlet-name>mvc-dispatcher</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextClass</param-name>
            <param-value>
                org.springframework.web.context.support.AnnotationConfigWebApplicationContext
            </param-value>
        </init-param>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>humantalks.configs.WebConfig</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>mvc-dispatcher</servlet-name>
		<url-pattern>/</url-pattern>
	</servlet-mapping>

    <welcome-file-list>
        <welcome-file>/index.html</welcome-file>
    </welcome-file-list>
</web-app>


text:
import requests
from bs4 import BeautifulSoup

from exceptions.pymage_exceptions import NotAbleToDownloadException
from models.image import RedditPostImage
from parsers.base_parser import BaseParser
from utils.utils import tidy_up_url

class Instagram(BaseParser):
    def get_images(self, post):
        images = []

        html_source = requests.get(post.url).text
        soup = BeautifulSoup(html_source, "lxml")
        match = soup.select("meta['property=og:image']")

        if not match:
            raise NotAbleToDownloadException("Wasn't able to download %s" % post.url)

        image_url = match[0]["content"]
        image_url = tidy_up_url(image_url)
        image_file = image_url[image_url.rfind('/') + 1:]

        images.append(RedditPostImage(image_url, post, image_file))

        return images


text:
package com.toedter.calendar.demo;

import java.awt.Color;
import java.util.Calendar;
import java.util.Date;

import com.toedter.calendar.IDateEvaluator;

public class TestDateEvaluator implements IDateEvaluator {

    private Calendar calendar = Calendar.getInstance();
    private Calendar calendar2 = Calendar.getInstance();
    private Color darkGreen = new Color(0x007F00);
    private Color lightGreen = new Color(0xbbebc8);
    private Color darkRed = new Color(0xa60007);
    private Color lightRed = new Color(0xffb1b5);

    public boolean isSpecial(Date date) {
        calendar2.setTime(date);
        for (int i = 2; i < 5; i++) {
            if (calendar.get(Calendar.MONTH) == calendar2.get(Calendar.MONTH)
                    && calendar.get(Calendar.DAY_OF_MONTH) == calendar2
                    .get(Calendar.DAY_OF_MONTH) + i) {
                return true;
            }
        }
        return false;
    }

    public Color getSpecialForegroundColor() {
        return darkGreen;
    }

    public Color getSpecialBackroundColor() {
        return lightGreen;
    }

    public String getSpecialTooltip() {
        return "Special Day!";
    }

    public boolean isInvalid(Date date) {
        calendar2.setTime(date);
        for (int i = 4; i < 6; i++) {
            if (calendar.get(Calendar.MONTH) == calendar2.get(Calendar.MONTH)
                    && calendar.get(Calendar.DAY_OF_MONTH) == calendar2
                    .get(Calendar.DAY_OF_MONTH) + i) {
                return true;
            }
        }
        return false;
    }

    public Color getInvalidForegroundColor() {
        return darkRed;
    }

    public Color getInvalidBackroundColor() {
        return null;
    }

    public String getInvalidTooltip() {
        return "You cannot select this date...";
    }

}


text:
module Mutant
  class Mutator
    class Node

      # Mutator for loop control keywords
      class Next < Generic

        handle(:next)

      private

        # Emit mutations
        #
        # @return [undefined]
        def dispatch
          super()
          emit_singletons
          children.each_index(&method(:delete_child))
          emit(s(:break, *children))
        end

      end # Next
    end # Node
  end # Mutator
end # Mutant


text:
layout: page
title: "Danica Trifunovic"
comments: true
description: "blanks"
keywords: "Danica Trifunovic,CU,Boulder"
---
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script>
<!-- <script src="../assets/js/highcharts.js"></script> -->
<style type="text/css">@font-face {
	font-family: "Bebas Neue";
	src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype");
	}
	h1.Bebas {
		font-family: "Bebas Neue", Verdana, Tahoma;
	}
</style>
</head>

#### TEACHING INFORMATION

**College**: College of Arts and Sciences

**Classes taught**: FREN 1010, FREN 1020, FREN 2110, FREN 2500, FREN 3020, FREN 3050, FREN 3600

#### FREN 1010: Beginning French 1

**Terms taught**: Fall 2006, Fall 2006, Fall 2007, Fall 2008, Fall 2009, Fall 2009, Spring 2010, Fall 2012, Fall 2013, Fall 2013, Spring 2014, Fall 2014, Fall 2015, Fall 2016, Spring 2017

**Instructor rating**: 5.61

**Standard deviation in instructor rating**: 0.27

**Average grade** (4.0 scale): 3.22

**Standard deviation in grades** (4.0 scale): 0.3

**Average workload** (raw): 3.18

**Standard deviation in workload** (raw): 0.44

#### FREN 1020: Beginning French 2

**Terms taught**: Spring 2007, Spring 2007, Fall 2007, Fall 2007, Spring 2008, Spring 2009, Spring 2009, Fall 2010, Fall 2011, Fall 2012, Spring 2016

**Instructor rating**: 5.61

**Standard deviation in instructor rating**: 0.23

**Average grade** (4.0 scale): 3.15

**Standard deviation in grades** (4.0 scale): 0.19

**Average workload** (raw): 3.31

**Standard deviation in workload** (raw): 0.21

#### FREN 2110: 2ND YR FREN:GRMMR/READ 1

**Terms taught**: Spring 2007

**Instructor rating**: 5.41

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 3.39

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 2.06

**Standard deviation in workload** (raw): 0.0

#### FREN 2500: CONVERSATION IN FRENCH

**Terms taught**: Spring 2008

**Instructor rating**: 5.33

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 3.81

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 2.25

**Standard deviation in workload** (raw): 0.0

#### FREN 3020: French Phonetics Through Musical Performance

**Terms taught**: Fall 2008, Fall 2009, Fall 2010, Fall 2011, Fall 2013, Fall 2014, Fall 2015

**Instructor rating**: 5.36

**Standard deviation in instructor rating**: 0.3

**Average grade** (4.0 scale): 3.84

**Standard deviation in grades** (4.0 scale): 0.11

**Average workload** (raw): 2.77

**Standard deviation in workload** (raw): 0.53

#### FREN 3050: French Composition 1

**Terms taught**: Spring 2012, Spring 2012

**Instructor rating**: 4.69

**Standard deviation in instructor rating**: 0.31

**Average grade** (4.0 scale): 3.14

**Standard deviation in grades** (4.0 scale): 0.13

**Average workload** (raw): 2.63

**Standard deviation in workload** (raw): 0.01

#### FREN 3600: Business French 1

**Terms taught**: Spring 2010, Spring 2011, Spring 2012, Spring 2013, Spring 2014, Spring 2015, Spring 2016

**Instructor rating**: 4.82

**Standard deviation in instructor rating**: 0.66

**Average grade** (4.0 scale): 3.54

**Standard deviation in grades** (4.0 scale): 0.21

**Average workload** (raw): 2.48

**Standard deviation in workload** (raw): 0.36


text:
set -e
# Start the mock WS server
node ./test/mock-websocket-server.js >/dev/null &
wspid=$!

JASMINE_CONFIG_PATH=./jasmine.json ./node_modules/.bin/jasmine

kill $wspid || :


text:
function addTaxon(taxon) {
  $('#trip_taxa').data('last-taxon', taxon)
  $('#trip_taxa').data('check-last', true)
  $('#trip_taxa_row .add_fields').click()
}
$(document).ready(function() {
  $('#trip_taxa table').dataTable({
    bPaginate: false,
    bFilter: false
  })
  $('#new_species').chooser({
    collectionUrl: 'http://'+window.location.host + '/taxa/search.json?partial=taxon',
    resourceUrl: 'http://'+window.location.host + '/taxa/{{id}}.json?partial=taxon',
    queryParam: 'q',
    afterSelect: function(item) {
      addTaxon(item)
    }
  })
  $('#trip_taxa').bind('cocoon:after-insert', function(e, inserted_item) {
    var taxon = $('#trip_taxa').data('last-taxon'),
        row = $('#trip_taxa tr:last')
    if (!taxon) {
      return
    }
    if (taxon.html) {
      $('td.name', row).html(taxon.html)
    } else {
      var css_class = 'taxon ' + taxon.rank
      if (taxon.iconic_taxon_name) css_class += ' ' + taxon.iconic_taxon_name
      var html = $('').addClass(css_class)
      html.html($('').html(taxon.name))
      $('td.name', row).html(html)
    }
    $(':input[name*=taxon_id]', row).val(taxon.id)
    $(':input[name*=observed]', row).attr('checked', $('#trip_taxa').data('check-last'))
    $('#new_species').chooser('clear')
    $('#trip_taxa').data('last-taxon', null)
    $('#trip_taxa').data('check-last', null)
  })
  $('#location :input[name=location]').latLonSelector({
    mapDiv: $('#location .map').get(0)
  })
  $('#trip_start_time, #trip_stop_time').iNatDatepicker({time:true})
  $('#trip_place_id').chooser({
    collectionUrl: 'http://'+window.location.host + '/places/autocomplete.json',
    resourceUrl: 'http://'+window.location.host + '/places/{{id}}.json?partial=autocomplete_item',
    afterSelect: function(item) {
      $(this.element).parents('form').find('input[name*="latitude"]').val(item.latitude)
      $(this.element).parents('form').find('input[name*="longitude"]').val(item.longitude)

      // set accuracy from bounding box
      if (item.swlat) {
        $(this.element).parents('form').find('input[name*="positional_accuracy"]').val(
          iNaturalist.Map.distanceInMeters(item.latitude, item.longitude, item.swlat, item.swlng)
        )
      }

      // set the map. it might be worth just using an iNat place selector and hiding the input
      $(this.element).parents('form').find('input[name*="longitude"]').change()
      if (item.swlat) {$.fn.latLonSelector.zoomToAccuracy()}
    }
  })

  $('#new_goal_taxon').chooser({
    collectionUrl: 'http://'+window.location.host + '/taxa/search.json?partial=taxon',
    resourceUrl: 'http://'+window.location.host + '/taxa/{{id}}.json?partial=taxon',
    queryParam: 'q',
    afterSelect: function(item) {
      $('#trip_purposes').data('last-taxon', item)
      $('#trip_purposes_row .add_fields').click()
    }
  })
  $('#trip_purposes').bind('cocoon:after-insert', function(e, inserted_item) {
    var taxon = $('#trip_purposes').data('last-taxon'),
        row = $('#trip_purposes .nested-fields:last')
    $(':input[name*=resource_type]', row).val('Taxon')
    $(':input[name*=resource_id]', row).val(taxon.id)
    $('#new_goal_taxon').chooser('clear')
    $('#trip_purposes').data('last-taxon', null)
    row.attr('data-taxon-id', taxon.id)
    if (taxon.html && taxon.html.length > 0) {
      $('.taxonwrapper', row).html(taxon.html)
    }
    if ($('#trip_purposes').data('hide-last')) {
      row.hide()
    }
    $('#trip_purposes').data('hide-last', null)

    if (taxon.rank_level <= 10) {
      // add species and lower to trip taxa
      $('#trip_taxa').data('last-taxon', taxon)
      $('#trip_taxa_row .add_fields').click()
    } else {
      // add complete check box
      var li = $('

').data('taxon-id', taxon.id),
          inputId = taxon.name.toLowerCase()+'_complete',
          label = $('').attr('for', inputId).addClass('checkbox')
          checkbox = $('<input type="checkbox"/>').attr('name', inputId).attr('id', inputId)
      checkbox.data('taxon', taxon)
      label.append(checkbox)
      if (taxon.html) {
        label.append(taxon.html)
      } else {
        label.append(
          ' ',
          $('').addClass('taxon '+taxon.rank+' '+taxon.iconic_taxon_name).append(
            ''+taxon.rank+'',
            ' ',
            ''+taxon.name+''
          )
        )
      }
      li.append(label)
      $('#complete_taxa').append(li)
    }
  })

  $('#trip_purposes').bind('cocoon:after-remove', function(e, item) {
    var taxonId = $(':input[name*=resource_id]', item).val()
    $('#complete_taxa li[data-taxon-id='+taxonId+']').remove()
  })

  $('#goal_taxa :input:checkbox').click(function() {
    if ($(this).attr('checked')) {
      $('#trip_purposes').data('last-taxon', $(this).data('taxon'))
      $('#trip_purposes').data('hide-last', true)
      $('#trip_purposes_row .add_fields').click()
    } else {
      var taxonId = $(this).data('taxon').id
      var existingInput = $('#trip_purposes :input[value='+taxonId+']')
      existingInput.parents('.nested-fields').find('.remove_fields').click()
    }
  })

  $('#complete_taxa :checkbox').live('click', function() {
    var taxonId = $(this).parents('li:first').data('taxon-id')
    if ($(this).attr('checked')) {
      $('.trip-purpose-fields[data-taxon-id='+taxonId+'] :input[name*=complete]').val(true)
    } else {
      $('.trip-purpose-fields[data-taxon-id='+taxonId+'] :input[name*=complete]').val(false)
    }
  })

  $('#addfromobsbutton').bind('ajax:success', function(e, json) {
    $.each(json.saved, function() {
      addTaxon(this.taxon)
      $('#trip_taxa tr:last :input[name*="[id]"]').val(this.id)
    })
    alert(json.msg)
  })

  $('#removetaxabutton').bind('ajax:success', function(e, json) {
    $('.trip-taxa-fields').fadeOut(function() {
      $(this).remove()
      $('#trip_taxa :input').remove()
    })
  })
})


text:
<?php

declare(strict_types=1);

namespace OTPHP;

interface FactoryInterface
{
    /**
     * This method is the unique public method of the class.
     * It can load a provisioning Uri and convert it into an OTP object.
     */
    public static function loadFromProvisioningUri(string $uri): OTPInterface;
}