text:
layout: page
title: Cloud Banner Trade Conference
date: 2016-05-24
author: Johnny Sanchez
tags: weekly links, java
status: published
summary: Aliquam vitae lectus vulputate, tempor urna a, scelerisque tellus. Sed.
banner: images/banner/leisure-03.jpg
booking:
  startDate: 04/30/2016
  endDate: 05/01/2016
  ctyhocn: DALWHHX
  groupCode: CBTC
published: true
---
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Cras eleifend sit amet est vel vulputate. Nunc varius accumsan metus, eu malesuada mi imperdiet id. Proin suscipit, arcu non bibendum bibendum, sem ligula porta ex, quis tristique lorem nulla finibus eros. Maecenas sit amet leo sit amet mi posuere placerat. Aliquam odio massa, semper nec vehicula ut, accumsan quis metus. Cras eget mi a risus elementum scelerisque. Maecenas suscipit pellentesque lacus a pulvinar. Vestibulum euismod nunc eget sodales bibendum. Vivamus ullamcorper luctus turpis nec fringilla. Maecenas pharetra tellus libero, et bibendum sapien mollis sagittis. Cras feugiat vel dui a euismod. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur vulputate turpis diam, sit amet euismod felis volutpat non. Suspendisse ullamcorper tortor quis ante venenatis, eu sodales lorem aliquet.

* Donec sit amet tellus porta, blandit ante a, gravida massa
* Pellentesque vel ligula quis ligula tempor egestas.

Vivamus sapien tellus, pellentesque sit amet libero ac, scelerisque maximus ligula. Nulla ac dolor tellus. Proin quis iaculis ipsum, vel viverra nisi. Praesent consectetur sed libero tempus lobortis. Etiam quis sem nibh. Suspendisse vel luctus neque. Etiam dignissim nunc placerat, consequat dolor id, suscipit mauris. Integer neque est, mollis eu egestas nec, pharetra sit amet tellus. Suspendisse mollis molestie sapien, ac lacinia mi fermentum eu. Integer ultrices metus vel rutrum porttitor.


text:
package ws.web.dto;

/**
 * Created by Gyoo on 26/06/2016.
 */
public class TeamDTO {

    private String name;
    private Integer platformID;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPlatformID() {
        return platformID;
    }

    public void setPlatformID(Integer platformID) {
        this.platformID = platformID;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

	<title>Profiler</title>
	<link rel="stylesheet" type="text/css" href="bootstrap.min.css"/>
	<link rel="stylesheet" type="text/css" href="style.css"/>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">

          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            Toggle navigation

          </button>
          Welcome

Stats

Quests

Well, stranger.

You coming in?


text:
{% extends "base.html" %}
{% load i18n %}
{% block content %}

{% trans "Registration is currently closed." %}

{% endblock %}


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

	<!-- ConfigurationService bean handles institution-specific configuration
		for the Citations Helper -->
	<bean id="org.sakaiproject.citation.api.ConfigurationService"
		class="org.sakaiproject.citation.impl.BaseConfigurationService"
		init-method="init" destroy-method="destroy">

		<property name="adminSiteName">
			<value>citationsAdmin</value>
		</property>
		<property name="configFolder">
			<value>config</value>
		</property>
		<property name="configXmlCache">
			<value>config.xml</value>
		</property>
		<property name="databaseXmlCache">
			<value>database.xml</value>
		</property>

		<!-- enable/disable entire helper -->
		<property name="citationsEnabledByDefault">
			<value>true</value>
		</property>
		<property name="allowSiteBySiteOverride">
			<value>true</value>
		</property>

		<!-- enable/disable helper features -->
		<property name="googleSearchEnabled">
			<value>false</value>
		</property>
		<property name="librarySearchEnabled">
			<value>true</value>
		</property>

		<!-- configuration XML file location -->
		<property name="databaseXml">
			<value>categories.xml</value>
		</property>
		<property name="siteConfigXml">
			<value>config.xml</value>
		</property>

		<!-- metasearch engine parameters -->
		<property name="metasearchUsername">
			<value></value>
		</property>
		<property name="metasearchPassword">
			<value></value>
		</property>
		<property name="metasearchBaseUrl">
			<value></value>
		</property>

		<!-- which osid impl package to use for Sirsi SingleSearch: edu.indiana.lib.osid.base.repository.http
			for Ex Libris MetaLib: org.sakaibrary.osid.repository.xserver -->
		<property name="osidImpl">
			<value></value>
		</property>

		<!-- openURL parameters -->
		<property name="openUrlLabel">
			<value>Get It!</value>
		</property>
		<property name="openUrlResolverAddress">
			<value>http://worldcatlibraries.org/registry/gateway</value>
		</property>

		<!-- google scholar parameters -->
		<property name="googleBaseUrl">
			<value>http://scholar.google.com/schhp</value>
		</property>
		<property name="sakaiServerKey">
			<value>default</value>
		</property>

		<!-- site-specific config/authentication/authorization implementation -->
		<property name="osidConfig">
			<value>org.sakaiproject.citation.impl.SampleSiteOsidConfiguration</value>
		</property>

		<!-- other config services -->
		<property name="sessionManager">
			<ref bean="org.sakaiproject.tool.api.SessionManager" />
		</property>
		<property name="serverConfigurationService">
			<ref bean="org.sakaiproject.component.api.ServerConfigurationService" />
		</property>
	</bean>

	<bean id="org.sakaiproject.citation.api.CitationService" class="org.sakaiproject.citation.impl.DbCitationService"
		init-method="init" destroy-method="destroy">

		<property name="sqlService">
			<ref bean="org.sakaiproject.db.api.SqlService" />
		</property>
		<property name="entityManager">
			<ref bean="org.sakaiproject.entity.api.EntityManager" />
		</property>
		<property name="contentHostingService">
			<ref bean="org.sakaiproject.content.api.ContentHostingService" />
		</property>
		<property name="serverConfigurationService">
			<ref bean="org.sakaiproject.component.api.ServerConfigurationService" />
		</property>
		<property name="configurationService">
			<ref bean="org.sakaiproject.citation.api.ConfigurationService" />
		</property>
		<property name="idManager">
			<ref bean="org.sakaiproject.id.api.IdManager" />
		</property>
		<property name="openURLService">
			<ref bean="org.sakaiproject.citation.impl.openurl.OpenURLServiceImpl" />
		</property>
		<property name="autoDdl">
			<value>${auto.ddl}</value>
		</property>
		<property name="attemptToMatchSchema">
			<value>true</value>
		</property>
		<property name="resourceTypeRegistry">
			<ref bean="org.sakaiproject.content.api.ResourceTypeRegistry" />
		</property>
	</bean>

	<bean id="org.sakaiproject.citation.api.CitationValidator" class="org.sakaiproject.citation.impl.NestedCitationValidator"/>

	<bean id="org.sakaiproject.citation.api.SearchManager" class="org.sakaiproject.citation.impl.BaseSearchManager"
		init-method="init" destroy-method="destroy">

		<property name="memoryService">
			<ref bean="org.sakaiproject.memory.api.MemoryService" />
		</property>
		<property name="sessionManager">
			<ref bean="org.sakaiproject.tool.api.SessionManager" />
		</property>
		<property name="configurationService">
			<ref bean="org.sakaiproject.citation.api.ConfigurationService" />
		</property>
		<property name="serverConfigurationService">
			<ref bean="org.sakaiproject.component.api.ServerConfigurationService" />
		</property>

	</bean>

</beans>


text:
package galaxyspace.core.hooklib.asm;

import java.util.ArrayList;
import java.util.List;

import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;

public class HookInjectorClassVisitor extends ClassVisitor {

    List<AsmHook> hooks;
    List<AsmHook> injectedHooks = new ArrayList<AsmHook>(1);
    boolean visitingHook;
    HookClassTransformer transformer;

    String superName;

    public HookInjectorClassVisitor(HookClassTransformer transformer, ClassWriter cv, List<AsmHook> hooks) {
        super(Opcodes.ASM5, cv);
        this.hooks = hooks;
        this.transformer = transformer;
    }

    @Override public void visit(int version, int access, String name,
                                String signature, String superName, String[] interfaces) {
        this.superName = superName;
        super.visit(version, access, name, signature, superName, interfaces);
    }

    @Override
    public MethodVisitor visitMethod(int access, String name, String desc,
                                     String signature, String[] exceptions) {
        MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
        for (AsmHook hook : hooks) {
            if (isTargetMethod(hook, name, desc) && !injectedHooks.contains(hook)) {
                // добавляет MethodVisitor в цепочку
                mv = hook.getInjectorFactory().createHookInjector(mv, access, name, desc, hook, this);
                injectedHooks.add(hook);
            }
        }
        return mv;
    }

    @Override
    public void visitEnd() {
        for (AsmHook hook : hooks) {
            if (hook.getCreateMethod() && !injectedHooks.contains(hook)) {
                hook.createMethod(this);
            }
        }
        super.visitEnd();
    }

    protected boolean isTargetMethod(AsmHook hook, String name, String desc) {
        return hook.isTargetMethod(name, desc);
    }
}


text:
package io.vertx.db2client;

import org.junit.Test;
import org.junit.runner.RunWith;

import io.vertx.ext.unit.TestContext;
import io.vertx.ext.unit.junit.VertxUnitRunner;
import io.vertx.sqlclient.Row;
import io.vertx.sqlclient.Tuple;

@RunWith(VertxUnitRunner.class)
public class GeneratedKeysTest extends DB2TestBase {

  @Test
  public void testSelectGeneratedKeyPrepared(TestContext ctx) {
    final String msg = "Some data from testSelectGeneratedKeyPrepared";
    connect(ctx.asyncAssertSuccess(conn -> {
      conn.preparedQuery("SELECT * FROM FINAL TABLE ( INSERT INTO Fortune (message) VALUES (?) )")
        .execute(Tuple.of(msg),  ctx.asyncAssertSuccess(rowSet -> {
        ctx.assertEquals(1, rowSet.size());
        Row row = rowSet.iterator().next();
        // Generated ID should be >= 13 because init.sql always adds the first 12 rows
        ctx.assertTrue(row.getInteger(0) >= 13, "Generated row ID should be >= 13 but was: " + row.getInteger(0));
        ctx.assertEquals(msg, row.getString(1));
        conn.close();
      }));
    }));
  }

  @Test
  public void testSelectGeneratedKey(TestContext ctx) {
    final String msg = "Some data from testSelectGeneratedKey";
    connect(ctx.asyncAssertSuccess(conn -> {
      conn.query("SELECT * FROM FINAL TABLE ( INSERT INTO Fortune (message) VALUES ('" + msg +  "') )").execute(
          ctx.asyncAssertSuccess(rowSet -> {
        ctx.assertEquals(1, rowSet.size());
        Row row = rowSet.iterator().next();
        // Generated ID should be >= 13 because init.sql always adds the first 12 rows
        ctx.assertTrue(row.getInteger(0) >= 13, "Generated row ID should be >= 13 but was: " + row.getInteger(0));
        ctx.assertEquals(msg, row.getString(1));
        conn.close();
      }));
    }));
  }

}


text:
package gov.sandia.cognition.learning.algorithm.root;

/**
 * JUnit tests for class RootFinderSecantMethodTest
 * @author Kevin R. Dixon
 */
public class RootFinderSecantMethodTest
    extends RootFinderTestHarness
{

    /**
     * Entry point for JUnit tests for class RootFinderSecantMethodTest
     * @param testName name of this test
     */
    public RootFinderSecantMethodTest(
        String testName)
    {
        super(testName);
    }

    @Override
    public RootFinderSecantMethod createInstance()
    {
        return new RootFinderSecantMethod();
    }

}


text:
//-CRE-

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace Glass.Mapper.Tests
{
    [TestFixture]
    public class ExtensionMethodFixture
    {
        #region Method - Formatted

        [Test]
        [Sequential]
        public void Formatted_ParametersPassedToMethod_ReturnsCorrectlyFormattedString(
            [Values("a", null, "a")] string param1,
            [Values(null, "a", "b")] string param2,
            [Values("{0}", "{1}", "{0} {1}")] string input,
            [Values("a", "a", "a b")] string expected)
        {
            //Act
            string result = input.Formatted(param1, param2);

            //Assert
            Assert.AreEqual(expected, result);
        }

        #endregion

        #region Method - IsNullOrEmpty

        [Test]
        [Sequential]
        public void IsNullOrEmpty_TestSetOfValues_ReturnsExpectedResult(
            [Values(null, "", "ab")] string value,
            [Values(true, true, false)] bool expected)
        {
            //Act
            var result = value.IsNullOrEmpty();

            //Assert
            Assert.AreEqual(expected, result);
        }

        #endregion

        #region Method - IsNotNullOrEmpty

        [Test]
        [Sequential]
        public void IsNotNullOrEmpty_TestSetOfValues_ReturnsExpectedResult(
            [Values(null, "", "ab")] string value,
            [Values(false, false, true)] bool expected)
        {
            //Act
            var result = value.IsNotNullOrEmpty();

            //Assert
            Assert.AreEqual(expected, result);
        }

        #endregion

    }

}


text:
/**
 * @file Defines the class CUI.ChatPresenter
 */

var CUI = CUI || {};

/**
 * Represents the chat UI and binds listeners to pre-existing DOM elements.
 * @class
 * @param {number} chatID           - A unique ID for the chat.
 * @param {string} historyUrl       - A url for loading a user's history.
 * @param {string} progressUrl      - A url for loading a user's progress.
 * @returns {CUI.ChatPresenter}
 */
CUI.ChatPresenter = function(chatID, historyUrl, progressUrl, resourcesUrl){
  // Check arguments
  if(typeof chatID !== 'number') throw new Error('CUI.ChatPresenter(): Invalid chatID.');
  if(!historyUrl) throw new Error('CUI.ChatPresenter(): No historyUrl.');
  if(!progressUrl) throw new Error('CUI.ChatPresenter(): No progressUrl.');
  if(!resourcesUrl) throw new Error('CUI.ChatPresenter(): No resourcesUrl.');

  /* When chat gets doWait parameter it should show messages only first time. This flag is about it.
   * @type {bool}
   * @protected
   */
  this._needShowMsg = true;

  /**
   * The chat's unique ID.
   * @type {number}
   * @protected
   */
  this._chatID = chatID;

  /**
   * An object with references to all messages, media, and breakpoints currently in the chat.
   * @type {Object.<number, CUI.ChatMessagePresenter|CUI.ChatMediaPresenter|CUI.ChatBreakpointPresenter>}
   * @protected
   */
  this._messages = {};

  /**
   * An array with references to all breakpoints currently in the sidebar.
   * @type {Array.<CUI.SidebarBreakpointPresenter>}
   * @protected
   */
  this._sidebarBreakpoints = {};

  /**
   * An array with references to all resources currently in the sidebar.
   * @type {Array.<CUI.SidebarBreakpointPresenter>}
   * @protected
   */
  this._sidebarResources = {};

  /**
   * The url for loading a user's chat history.
   * @type {string}
   * @protected
   */
  this._historyUrl = historyUrl;

  /**
   * The url for loading a user's chat progress.
   * @type {string}
   * @protected
   */
  this._progressUrl = progressUrl;

  /**
   * The url for loading a resources of the unit.
   * @type {string}
   * @protected
   */
  this._resourcesUrl = resourcesUrl;

  /**
   * The currently active input type in the chat. 'text', 'options', or 'custom'.
   * @type {string}
   * @protected
   */
  this._inputType = null;

  /** Input sub type: {multipleChioce,}
   *
   * @type {null}
   * @private
   */
  this._inputSubType = null;

  /**
   * The url for loading the next set of messages and input type.
   * @type {string}
   * @protected
   */
  this._inputUrl = null;

  /**
   * If input is enabled in the chat.
   * @type {boolean}
   * @protected
   */
  this._inputIsEnabled = false;

  /**
   * An array of existing input options.
   * @type {Array.<InputOptionPresenter>}
   * @protected
   */
  this._inputOptions = [];

  /**
   * The current set of message IDs that are searched for values when submitting input.
   * @type {Array.<number>}
   * @protected
   */
  this._includeSelectedValuesFromMessages = [];

  /**
   * True if the sidebar is visible.
   * @type {boolean}
   * @protected
   */
  this._isSidebarVisible = false;

  /**
   * A jQuery reference to the sidebar element.
   * @type {jQuery}
   * @protected
   */
  this._$sidebar = $('.chat-sidebar');

  /**
   * A jQuery reference to the container element for sidebar breakpoints.
   * @type {jQuery}
   * @protected
   */
  this._$sidebarBreakpointsContainer = $('.chat-sidebar-breakpoints');

  /**
   * A jQuery reference to the container element for sidebar breakpoints.
   * @type {jQuery}
   * @protected
   */
  this._$sidebarResourcesContainer = $('.chat-sidebar-resources');

  /**
   * A jQuery reference to the container element for sidebar breakpoints header.
   * @type {jQuery}
   * @protected
   */
  this._$sidebarResourcesHeaderContainer = $('.chat-sidebar-resources-header');

  /**
   * A jQuery reference to the container element for messages.
   * @type {jQuery}
   * @protected
   */
  this._$messagesContainer = $('.chat-messages');

  /**
   * A jQuery reference to the input bar.
   * @type {jQuery}
   * @protected
   */
  this._$inputBar = $('.chat-input-bar');

  /**
   * A jQuery reference to the container element for the various input types.
   * @type {jQuery}
   * @protected
   */
  this._$inputContainer = $('.chat-input');

  /**
   * A jQuery reference to the progress element.
   * @type {jQuery}
   * @protected
   */
  this._$progress = $('.chat-progress');

  /**
   * A jQuery reference to the sidebar toggle element.
   * @type {jQuery}
   * @protected
   */
  this._$sidebarToggle = $('.sidebar-toggle');

  /**
   * A jQuery reference to the fullscreen toggle element.
   * @type {jQuery}
   * @protected
   */
  this._$fullscreenToggle = $('.fullscreen-toggle');

  /**
   * A jQuery reference to the spinner element.
   * @type {jQuery}
   * @protected
   */
  this._$loading = $('.chat-loading');

    /**
     * Equation preview.
     * @type {*|jQuery|HTMLElement}
     */
  this.equationPreview = $('.preview');

  this.sidebarCourseLink = $('aside.chat-sidebar header a');

  // Add event listeners
  this._addEventListeners();

  // Update fullscreen icon if fullscreen is active
  if(screenfull.isFullscreen) this._$fullscreenToggle.addClass('active');

  // Show chat
  this._showChat();

  return this;
};

/**
 * Loads a user's chat history and sends the response to {@link CUI.ChatPresenter#_parseHistory}.
 * @protected
 */
CUI.ChatPresenter.prototype._getHistory = function(){
  // Show spinner
  this._showLoading();

  // Get history json
  $.ajax({
    url: this._historyUrl,
    method: 'GET',
    dataType: 'json',
    data: {chat_id: this._chatID},
    cache: false,
    context: this
  }).done(this._parseHistory).fail(function(){ throw new Error("CUI.ChatPresenter._getHistory(): Failed to load history."); });
};

/**
 * Loads a user's progress and sends the response to {@link CUI.ChatPresenter#_parseProgress}.
 * @protected
 */
CUI.ChatPresenter.prototype._getProgress = function(){
  // Get progress
  $.ajax({
    url: this._progressUrl,
    method: 'GET',
    dataType: 'json',
    data: {chat_id: this._chatID},
    cache: false,
    context: this
  }).done(this._parseProgress).fail(function(){
    throw new Error('CUI.ChatPresenter._getProgress(): Could not load progress.');
  });
};

/**
 * Loads resources of the unit and sends the response to {@link CUI.ChatPresenter#_parseProgress}.
 * @protected
 */
CUI.ChatPresenter.prototype._getResources = function(){
  // Get progress
  $.ajax({
    url: this._resourcesUrl,
    method: 'GET',
    dataType: 'json',
    data: {chat_id: this._chatID},
    cache: false,
    context: this
  }).done(this._parseResources).fail(function(){
    throw new Error('CUI.ChatPresenter._getResources(): Could not load resources.');
  });
};

/**
 * Loads a user's next set of messages and input type.
 * @protected
 * @param {string} url     - A url for loading a user's next set of messages and input type.
 */
CUI.ChatPresenter.prototype._getMessages = function(url){
  // Get messages and input
  $.ajax({
    url: url,
    method: 'GET',
    dataType: 'json',
    data: {chat_id: this._chatID},
    cache: false,
    context: this
  }).done(function(data){
    // Update resources
    this._getResources();
    // Update progress
    this._getProgress();
    // Update the current input type in the chat
    if(data.input) this._setInput(data.input);
    else throw new Error("CUI.ChatPresenter._getMessages(): No data.input.");

    // Update chat with new messages
    if(data.addMessages) this._parseMessages(data, true);
    else throw new Error("CUI.ChatPresenter._getMessages(): No data.addMessages.");

    // Hide spinner
    this._hideLoading();
  }).fail(function(){ throw new Error("CUI.ChatPresenter._getMessages(): Failed to load messages."); });
};

/**
 * Sends the user's input to the server.
 * @protected
 * @param {object} input     - An object containing the user's input.
 */
CUI.ChatPresenter.prototype._postInput = function(input){
  // Check that input is enabled
  if(!this._inputIsEnabled) return;

  // Disable input while validating and sending input
  this._inputIsEnabled = false;

  input.selected = this._findSelectedValues();
  input.chat_id = this._chatID;

  // Add selected elements to input
  // if (this._inputType == 'options' &&
  //     this._includeSelectedValuesFromMessages.length &&
  //     this._inputSubType == 'choices' &&
  //     !Object.keys(input.selected).length
  // ) {
  //     this._inputIsEnabled = true;
  //     this._showNotification("Choose a correct answer!zjhb zkjzbdfmz bmdfjh");
  //     return;
  // }

  if (this._inputSubType === 'canvas') {
    var svgContainer = $('.draw-svg-container:last');
    if(svgContainer.length) {
        svgContainer[0].dispatchEvent(new CustomEvent('disable-canvas'));
    }
  }

  // Show loading
  this._showLoading();

  // Post input to server
  $.ajax({
    url: this._inputUrl,
    method: 'PUT',
    dataType: 'json',
    contentType: 'application/json',
    data: JSON.stringify(input),
    cache: false,
    context: this
  }).done(function(response){
    // Check that nextMessagesUrl is in response
    if(response && response.nextMessagesUrl && response.input && !response.input.doWait){
        // Load next set of messages
        this._getMessages(response.nextMessagesUrl);
        // set flag to true, because we need to show messages
        this._needShowMsg = true;
    }else if(response && response.input && response.input.doWait) {
      if(this._needShowMsg){
       /* parse response to understand should we do more requests or not.
        * this.setInput function will look into response.input.doWait parameter
        * and if doWait is true will call setTimeout function with needed parameters.
        */
        this._getMessages(response.nextMessagesUrl);
        // set to false cause we already shown messages.
        this._needShowMsg = false;
      }else{
        this._setInput(response.input);
      }
    }else if(response.error){
      // Enable input
      this._inputIsEnabled = true;

      // enable canvas
      if (this._inputSubType === 'canvas') {
          $('.draw-svg-container:last')[0].dispatchEvent(new CustomEvent('enable-canvas'));
      }

      // Hide spinner
      this._hideLoading();

      // Show message to try again
      this._showNotification(response.error);
    }else{
      throw new Error('CUI.ChatPresenter._postInput(): No response.nextMessagesUrl or response.error');
    }
  }).fail(function(){
    // Enable input
    this._inputIsEnabled = true;
    // enable canvas
    if (this._inputSubType === 'canvas') {
        $('.draw-svg-container:last')[0].dispatchEvent(new CustomEvent('enable-canvas'));
    }

    // Hide spinner
    this._hideLoading();

    // Show message to try again
    this._showNotification(CUI.text.errorTryAgain);
  });
};

/**
 * Passes text input onto to {@link ChatPresenter#_postInput}.
 * @protected
 */
CUI.ChatPresenter.prototype._postText = function(){
  // Create input object
  var input = {};
  var text;
  switch(this._inputSubType) {
    case 'numbers':
      text = this._$inputContainer.find('.chat-input-text').find('input').val();
      break;
    case 'canvas':
      input.attachment = 'data:image/svg+xml;base64,' + btoa(this._$inputContainer.find('.chat-input-custom').find('input').val());
      text = this._$inputContainer.find('.chat-input-text').find('textarea').val();
      break;
    default:
      // reset text in textarea
      text = this._$inputContainer.find('.chat-input-text').find('textarea').val();
      this._$inputContainer.find('.chat-input-text').find('textarea').val('');
      break;
  }
  // Add text to input object if set
  input.text = text;
  input.chat_id = this._chatID;

  this._postInput(input);
};

/**
 * Pass option input onto to {@link ChatPresenter#_postInput}.
 * @protected
 * @param {string} optionValue     - The selected option's value.
 */
CUI.ChatPresenter.prototype._postOption = function(optionValue){
  // Create input object
  var input = {option: optionValue};
  input.chat_id = this._chatID;

  // Send input to server
  this._postInput(input);
};

/**
 * Sends a user's action to the server.
 * @protected
 * @param {string} actionUrl     - Where to fetch the next set of messages and input type.
 */
CUI.ChatPresenter.prototype._postAction = function(actionUrl){
  // Check that input is enabled
  if(!this._inputIsEnabled) return;

  // Disable input while validating and sending input
  this._inputIsEnabled = false;

  // Show loading
  this._showLoading();

  // Post input to server
  $.ajax({
    url: actionUrl,
    method: 'PUT',
    dataType: 'json',
    cache: false,
    context: this
  }).done(function(response){
    // Check that nextMessagesUrl is in response
    if(response && response.nextMessagesUrl){
        // Load next set of messages
        this._getMessages(response.nextMessagesUrl);
    }else{
      throw new Error('CUI.ChatPresenter._postAction(): No response.nextMessagesUrl');
    }
  }).fail(function(){
    // Enable input
    this._inputIsEnabled = true;

    // Hide spinner
    this._hideLoading();

    // Show message to try again
    this._showNotification(CUI.text.errorTryAgain);
  });
};

/**
 * Gets called when the history has loaded to initialize and show the chat.
 * @protected
 */
CUI.ChatPresenter.prototype._showChat = function(){
  // Fade out preloader
  var timeline = new TimelineMax();

  // Show chat
  this._$messagesContainer.show();
  this._$sidebar.show();
  this._$inputBar.show();
  timeline.fromTo(this._$messagesContainer, 1.2, {opacity: 0}, {opacity: 1, ease: Power1.easeInOut, force3D: 'auto', clearProps: 'transform'});
  timeline.from(this._$inputBar, 0.7, {bottom: -85, ease: Power1.easeInOut, force3D: 'auto', clearProps: 'transform'}, 0.3);

  //Scroll to chat
  var top = this._$messagesContainer.offset().top;
  TweenLite.to(window, this._getScrollSpeed(top), {scrollTo: {y: top, autoKill: false}, ease: Power2.easeInOut, onComplete: $.proxy(function(){
    // Get message history
    this._getHistory();

    // Update progress
    this._getProgress();
    this._getResources();
  }, this)});

  if(CUI.config.is_test || CUI.config.is_preview) {
    this.sidebarCourseLink.attr('href', '');
  };
};

/**
 * Parses progress data and updates the progress bar and the list of breakpoints in the sidebar.
 * @protected
 * @param {object} data               - An object containing the user's progress.
 * @param {number} data.progress      - The user's progress 0 - 1.
 * @param {Array} data.breakpoints    - An array of breakpoints to display in the sidebar.
 */
CUI.ChatPresenter.prototype._parseProgress = function(data){
  var newWidth;
  var breakpoint;
  var timeline;
  var $progressBar;

  // Check that data contains progress
  if(data && typeof data.progress === 'number'){
    // Calculate new progress bar width
    newWidth = this._$progress.width() * data.progress;
    newWidth = (newWidth > 10) ? newWidth : 10;

    // Animate progress bar
    $progressBar = this._$progress.find('span');
    TweenMax.fromTo($progressBar, 0.5, {scale: 1}, {scale: 1.3, repeat: 1, yoyo:true, ease: Power1.easeInOut});
    TweenMax.to($progressBar, 1, {width: newWidth}, {width: newWidth, ease: Back.easeOut}, 0);

    // Add breakpoints to the sidebar
    if(data.breakpoints instanceof Array && data.breakpoints.length > 0){
      // Remove existing breakpoints
      $.each(this._sidebarBreakpoints, $.proxy(function(i, b){
        b.destroy();
      }, this));

      // Reset breakpoints Array
      this._sidebarBreakpoints = [];
      this.isDone = 0
      // Add new breakpoints
      $.each(data.breakpoints, $.proxy(function(i, b){
        // Create breakpoint from template
        breakpoint = new CUI.SidebarBreakpointPresenter(new CUI.SidebarBreakpointModel(b));

        if (b.isDone) {
          this.isDone++;
        }

        // Add reference to breakpoint
        this._sidebarBreakpoints.push(breakpoint);

        // Add breakpoint in sidebar
        this._$sidebarBreakpointsContainer.append(breakpoint.$el);
      }, this));
      if (!data.is_live && this.isDone == this._sidebarBreakpoints.length){
        this._$sidebarToggle.trigger('resources');
      }
    }
  }else{
    throw new Error('CUI.ChatPresenter._parseProgress(): No data.progress');
  }
};

/**
 * Parses resources data and updates the list of breakpoints in the sidebar.
 * @protected
 * @param {object} data               - An object containing the user's progress.
 * @param {number} data.progress      - The user's progress 0 - 1.
 * @param {Array} data.breakpoints    - An array of breakpoints to display in the sidebar.
 */
CUI.ChatPresenter.prototype._parseResources = function(data){
  var breakpoint;

    if(data){
      // Add breakpoints to the sidebar
      if(data.breakpoints instanceof Array && data.breakpoints.length > 0){
        // Remove existing breakpoints
        $.each(this._sidebarResources, $.proxy(function(i, b){
          b.destroy();
        }, this));

        // Show resources header.
        // If no resources - hide resources header. Needed for live chat.
        this._$sidebarResourcesHeaderContainer.show();

        // Reset breakpoints Array
        this._sidebarResources = [];

        // Add new breakpoints
        $.each(data.breakpoints, $.proxy(function(i, b){
          // Create breakpoint from template
          breakpoint = new CUI.SidebarResourcePresenter(new CUI.SidebarResourceModel(b));

          // Add reference to breakpoint
          this._sidebarResources.push(breakpoint);

          // Add breakpoint in sidebar
          this._$sidebarResourcesContainer.append(breakpoint.$el);
        }, this));
      } else {
        // If no resources - hide resources header. Needed for live chat.
        this._$sidebarResourcesHeaderContainer.hide();
      }
    }
  else{
    throw new Error('CUI.ChatPresenter._parseProgress(): No data.progress');
  }
};

/**
 * Parses chat history data.
 * @protected
 * @param {Object} data                   - An object containing the user's history data and what input type to display.
 * @param {Object} data.input             - An object with settings for the input type.
 * @param {Array} data.addMessages        - An array with message objects that will be added to the chat.
 */
CUI.ChatPresenter.prototype._parseHistory = function(data){
  // Update the current input type in the chat
  if(data.input) this._setInput(data.input);
  else throw new Error("CUI.ChatPresenter._parseHistory(): No data.input.");

  // Update chat with new messages
  if(data.addMessages) this._parseMessages(data, false);
  else throw new Error("CUI.ChatPresenter._parseHistory(): No data.addMessages.");

  // Enable input
  this._hideLoading();
};

/**
 * Adds, updates, and removes messages in the chat.
 * @protected
 * @param {Object} data                   - An object containing messages and what input type do display.
 * @param {Array} data.addMessages        - An array with message objects that will be added to the chat.
 * @param {Array} [data.updateMessages]   - An array with message objects that will be updated in the chat.
 * @param {Array} [data.deleteMessages]   - An array of message ids for messages that will be removed from the chat.
 * @param {boolean} scrollTo              - Scrolls to first new message if true.
 */
CUI.ChatPresenter.prototype._parseMessages = function(data, scrollTo){
  var currentScrollTop = $(window).scrollTop();
  var newMessages = [];

  // Add new messages
  if(data.addMessages instanceof Array && data.addMessages.length > 0){
    $.each(data.addMessages, $.proxy(function(i, m){
      var model;

      // Create a model based on type
      if(m.type === 'message') model = new CUI.ChatMessageModel(m);
      else if(m.type === 'media') model = new CUI.ChatMediaModel(m);
      else if(m.type === 'breakpoint') model = new CUI.ChatBreakpointModel(m);
      else throw new Error("CUI.ChatPresenter._parseMessages(): Invalid m.type.");

      // Add message to chat
      newMessages.push(this._addMessage(model));
    }, this));
  }else{
    throw new Error("CUI.ChatPresenter._parseMessages(): No data.addMessages.");
  }

  // Update messages
  if(data.updateMessages instanceof Array && data.updateMessages.length > 0){
    $.each(data.updateMessages, $.proxy(function(i, m){
      var model;

      // Create a model based on type
      if(m.type === 'message') model = new CUI.ChatMessageModel(m);
      else if(m.type === 'media') model = new CUI.ChatMediaModel(m);
      else if(m.type === 'breakpoint') model = new CUI.ChatBreakpointModel(m);
      else throw new Error("CUI.ChatPresenter._parseMessages(): Invalid m.type.");

      //Update messages
      this._updateMessage(model);
    }, this));
  }

  // Delete messages
  if(data.deleteMessages instanceof Array && data.deleteMessages.length > 0){
    $.each(data.deleteMessages, $.proxy(function(i, id){
      this._removeMessage(id);
    }, this));
  }

  // Animate new messages
  TweenMax.from(newMessages, 0.7, {opacity: 0, scale: 0.9, ease: Power1.easeOut, force3D: true, clearProps: 'transform', onComplete: function(){
    // Draw equations after animation has completed
    MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
  }});

  // Scroll to first new message
  if(scrollTo) this._scrollToMessage(data.addMessages[0].id);
};

/**
 * Creates and adds a message to the chat.
 * @protected
 * @param {ChatMessageModel|ChatMediaModel|ChatBreakpointModel} model   - The model for the message.
 * @param {ChatMessageModel|ChatMediaModel|ChatBreakpointModel} model   - The model for the message.
 * @returns {jQuery}
 */
CUI.ChatPresenter.prototype._addMessage = function(model){
  var message;

  // Create a message presenter based on model type
  if(model instanceof CUI.ChatMessageModel) message = new CUI.ChatMessagePresenter(model);
  else if(model instanceof CUI.ChatMediaModel) message = new CUI.ChatMediaPresenter(model);
  else if(model instanceof CUI.ChatBreakpointModel) message = new CUI.ChatBreakpointPresenter(model);
  else throw new Error("CUI.ChatPresenter._addMessage(): Invalid model.");

  // Save a reference to the message
  this._messages[model.id] = message;

  // Add message to chat
  this._$messagesContainer.append(message.$el);

  return message.$el;
};

/**
 * Updates a message in the chat.
 * @protected
 * @param {ChatMessageModel|ChatMediaModel|ChatBreakpointModel} model   - The new model for the message.
 */
CUI.ChatPresenter.prototype._updateMessage = function(model){
  var currentMessage;

  // Select existing message
  currentMessage = this._messages[model.id];

  // Update message
  if(currentMessage) currentMessage.update(model);
  else throw new Error('CUI.ChatPresenter._updateMessage(): Message with id "'+model.id+'" does not exist.');
};

/**
 * Removes a message from the chat.
 * @protected
 * @param {number} id       - The id of the message to remove.
 */
CUI.ChatPresenter.prototype._removeMessage = function(id){
  var currentMessage;
  var breakpoint;

  // Select existing message
  currentMessage = this._messages[id];

  // Check that message exists
  if(currentMessage){
    // Destroy message and remove reference
    currentMessage.destroy();
    this._messages[id] = null;

    // Remove any sidebar breakpoints linking to this message
    breakpoint = this._sidebarBreakpoints[id];

    if(breakpoint) breakpoint.destroy();
  }else{
    // Unneseccary to throw an error here
    // throw new Error('CUI.ChatPresenter._removeMessage(): Message with id "'+id+'" does not exist.');
  }
};

/**
 * Finds selected values within messages.
 * @protected
 * @returns {object}
 */
CUI.ChatPresenter.prototype._findSelectedValues = function(){
  var selected = {};

  // Loop through messages with selectables and look for selected elements
  $.each(this._includeSelectedValuesFromMessages, $.proxy(function(i, messageID){
    var $message;
    var $selectedSelectables;

    // Check that the message exists in the DOM
    if(this._messages[messageID]) {
      $message = this._messages[messageID].$el;

      // Find selected elements in message
      $selectedSelectables = $message.find('.chat-selectable.chat-selectable-selected, .chat-selectable:checked');

      // Add selected values to selected array
      if($selectedSelectables.length){
        $.each($selectedSelectables, function(ii, s){
          var attribute = $(s).data('selectable-attribute');
          var value = $(s).data('selectable-value');

          selected[messageID] = selected[messageID] || {};
          selected[messageID][attribute] = selected[messageID][attribute] || [];
          selected[messageID][attribute].push(value);
        });
      }
    }
  }, this));

  return selected;
};

/**
 * Hides input and displays a spinner.
 * @protected
 */
CUI.ChatPresenter.prototype._showLoading = function(){
  // Hide input
  TweenMax.set(this._$inputContainer, {opacity: 0, display: 'none', overwrite: 'all', force3D: 'auto', clearProps: 'transform'});

  // Fade in spinner
  TweenMax.fromTo(this._$loading, 0.5, {opacity: 0}, {opacity: 1, display: 'block', ease: Sine.easeInOut, force3D: 'auto', clearProps: 'transform'});

  // Animate dots in spinner
  if(!CUI.animation.chatLoadingTimeline) CUI.animation.chatLoadingTimeline = new TimelineMax().staggerTo(this._$loading.find('span'), 0.6, {y: -6, yoyo: true, repeat: -1, repeatDelay: 0.3, ease: Back.easeInOut,  force3D: true, clearProps: 'transform'}, 0.1);
  else CUI.animation.chatLoadingTimeline.play();
};

/**
 * Hides the spinner and displays input.
 * @protected
 */
CUI.ChatPresenter.prototype._hideLoading = function(){
  // Hide spinner
  TweenMax.set(this._$loading, {opacity: 0, display: 'none', overwrite: 'all', force3D: 'auto', clearProps: 'transform'});

  // Pause spinner dots animation
  CUI.animation.chatLoadingTimeline.pause();

  // Show input
  TweenMax.fromTo(this._$inputContainer, 0.5, {opacity: 0}, {opacity: 1, display: 'block', ease: Sine.easeInOut, force3D: 'auto', clearProps: 'transform', onComplete: $.proxy(function(){
      // Focus textarea if inputType is text
      if(this._inputType == 'text') this._$inputContainer.find('.chat-input-text').find('textarea').focus();
  }, this)});
};

/**
 * Toggles the visibility of the sidebar.
 * @protected
 */
CUI.ChatPresenter.prototype._toggleSidebar = function(){
  var timeline = new TimelineMax();

  // Hide sidebar if visible
  if(this._isSidebarVisible){
    timeline.to(this._$sidebar, 0.6, {left: -320, ease: Sine.easeInOut});
    timeline.to($('main, .chat-input-bar'), 0.6, {paddingLeft: 0, ease: Sine.easeInOut}, 0);
    timeline.to(this._$sidebar.find('header .inner, section'), 0.5, {opacity: 0, x: -40, ease: Sine.easeInOut, force3D: 'auto', clearProps: 'transform'}, 0);
    this._isSidebarVisible = false;
  // Show sidebar if not visible
  }else{
    timeline.to(this._$sidebar, 0.6, {left: 0, ease: Sine.easeInOut});
    timeline.to($('main, .chat-input-bar'), 0.6, {paddingLeft: 320, ease: Sine.easeInOut}, 0);
    timeline.fromTo(this._$sidebar.find('header .inner, section'), 0.5, {opacity: 0, x: -40}, {opacity: 1, x: 0, ease: Sine.easeInOut, force3D: 'auto', clearProps: 'transform'}, 0.3);
    this._isSidebarVisible = true;
  }
};

/**
 * Toggles fullscreen.
 * @protected
 */
CUI.ChatPresenter.prototype._toggleFullscreen = function(){
  // Toggle fullscreen if allowed by browser
  if(screenfull.enabled){
   var scrollToPos = $(window).scrollTop();
   $(document).one(screenfull.raw.fullscreenchange, function() {
        $(window).scrollTop(scrollToPos);
    });
   screenfull.toggle();
   if(screenfull.isFullscreen) this._$fullscreenToggle.addClass('active');
   else this._$fullscreenToggle.removeClass('active');
  }else{
   this._showNotification(CUI.text.errorNoFullscreenSupport);
  }
};

/**
 * Displays a notification.
 * @protected
 * @param {string} text   - The text to display in the notification.
 */
CUI.ChatPresenter.prototype._showNotification = function(text){
  $.notify(text, {
    delay: 4000
  });
};

/**
 * Scrolls to a message in the chat.
 * @protected
 * @param {number} id   - The ID of the message to scroll to.
 */
CUI.ChatPresenter.prototype._scrollToMessage = function(id){
  var $message;
  var top;

  // Check that message exists
  if(this._messages[id]){
    $message = this._messages[id].$el;
    top = $message.offset().top - 14;
    TweenLite.to(window, this._getScrollSpeed(top), {scrollTo: top, ease: Power2.easeInOut});
  }
};

CUI.ChatPresenter.prototype._scrollToResourceMessage = function(id, ul){
  var $message;
  var top;
  // Check that message exists
  if(this._messages[id]){
    $message = this._messages[id].$el;
    top = $message.offset().top - 60;
    TweenLite.to(window, this._getScrollSpeed(top), {scrollTo: top, ease: Power2.easeInOut});
  } else {
      this._getMessages(this._resourcesUrl+ul+'/');
  };
};
/**
 * Calculates the scroll animation time for window based on distance.
 * @protected
 * @param {number} scrollTo   - The new scroll position.
 * @returns {number}          - The animation time in seconds.
 */
CUI.ChatPresenter.prototype._getScrollSpeed = function(scrollTo){
  // Calculate distance
  var distance = Math.abs($(window).scrollTop() - scrollTo);
  var minSpeed = 1;
  var maxSpeed = 2;

  // Multiply distance with milliseconds
  var speed = (distance * 2) / 1000;

  // Make sure that speed is within the minSpeed - maxSpeed range
  speed = (speed < minSpeed) ? minSpeed : speed;
  speed = (speed > maxSpeed) ? maxSpeed : speed;

  return speed;
};

/* Inner function for runWaitTimer. This function will be called inside of setTimeout.
 */
CUI.ChatPresenter.prototype._waitTimerInnerFunc = function(input){
  this._inputIsEnabled = true;
  var me = this;
  return function() {
    me._postInput({
     chat_id: input.chat_id,
     url: input.url,
     type: 'options',
     options: [],
     selected: {}
    }); //input)
  };
}

/**
 * This function handles WAIT_* nodes of fsm looking at input.doWait field.
 * If doWait field is true, it will be in cycle until doWait came to be false.
 *
*/
CUI.ChatPresenter.prototype._runWaitTimer = function(input) {
  if(input.url) this._inputUrl = input.url;
   else throw new Error('CUI.ChatPresenter._setInput(): No input.url.');
   var timeout_id = window.setTimeout(this._waitTimerInnerFunc(input), 1000*2); // run after 2 seconds.
};

/**
 * Updates the input type visible in the chat.
 * @protected
 * @param {object} input          - An object with settings for the input type.
 */
CUI.ChatPresenter.prototype._setInput = function(input){
  var $text;
  var $options;
  var $custom;
  var $option;

  //Disable input
  this._inputIsEnabled = false;

  // Find containers for the various input types
  $text = this._$inputContainer.find('.chat-input-text');

  $textarea = $text.find('.input-text');
  $numbers = $text.find('.input-number');

  $options = this._$inputContainer.find('.chat-input-options');
  $custom = this._$inputContainer.find('.chat-input-custom');

  // Hide all input containers
  $text.hide();
  $options.hide();
  $custom.hide();

  // Empty dynamic content in input containers
  $custom.empty();
  if(this._inputOptions.length) $.each(this._inputOptions, function(i, io){
    io.destroy();
  });
  this._inputOptions = [];

  this._inputSubType = input.subType;

  // Disable equations preview by default.
  $textarea.find('textarea').off();
  switch (input.subType) {
    case 'numbers':
      // Hide textarea
      $textarea.hide();
      $numbers.html($(input.html));
      // Show numbers input
      $numbers.show();
      break;
    case 'canvas':
      $numbers.hide();
      $custom.html($(input.html));
      $custom.show();
      break;
    case 'equation':
      // If subtype is equation - enable preview.
      $textarea.find('textarea').writemaths({
          position:'center top',
          previewPosition: 'center top',
          of: this.equationPreview
      });
    default:
      // Show textarea
      $textarea.show();
      // Hide numbers input
      $numbers.hide();
      // Reset textarea size
      $textarea.find('textarea').val('').attr('rows', 1);
      break;
  }

  // Create new input based on type
  if(input.doWait === true) {
   /*
   * Cycle is HERE!
   */
   this._runWaitTimer(input);
   return;
  }

  if(input.type === 'text'){
   // Set input type
   this._inputType = 'text';

   // Set input url
   if(input.url) this._inputUrl = input.url;
   else throw new Error('CUI.ChatPresenter._setInput(): No input.url.');

   // Show text input
   $text.show();

   // Automatically increase the height of the textarea when new rows are added
   $textarea.find('textarea').expandingTextarea({maxRows: 10});
  } else if(input.type === 'options'){
   // Set input type
   this._inputType = 'options';

   // Set input url
   if(input.url) this._inputUrl = input.url;
   else throw new Error('CUI.ChatPresenter._setInput(): No input.url.');

   // Check that we have an options array
   if(!(input.options instanceof Array && input.options.length > 0)) throw new Error('CUI.ChatPresenter._setInput(): No input.options.');

   // Create a button for each option
   $.each(input.options, $.proxy(function(i, o){
     // Create a new input option
     var inputOption = new CUI.InputOptionPresenter(new CUI.InputOptionModel(o));
     this._inputOptions.push(inputOption);

     // Append input option
     $options.append(inputOption.$el);
   }, this));

   // Show input
   $options.show();
  } else if(input.type === 'custom'){
   // Set input type
   this._inputType = 'custom';

   // No input url for custom
   this._inputUrl = null;

   // Add custom HTML to input
   if(input.html){
     $custom.html(input.html);
   }else{
     throw new Error("CUI.ChatPresenter._setInput(): No input.html.");
   }

   // Show input
   $custom.show();
  } else {
   // Throw an error if type is missing or invalid
   throw new Error('CUI.ChatPresenter._setInput(): Invalid input.type');
  }

  // Set the array of ids for messages that contains selectable elements
  if(input.includeSelectedValuesFromMessages) this._includeSelectedValuesFromMessages = input.includeSelectedValuesFromMessages;
  else this._includeSelectedValuesFromMessages = [];

  // Enable input
  this._inputIsEnabled = true;
};

/**
 * Adds event listeners to the chat.
 * @protected
 */
CUI.ChatPresenter.prototype._addEventListeners = function(){
  // Sidebar toggle
  this._$sidebarToggle.on('click', $.proxy(function(e){
    e.preventDefault();
    $(e.currentTarget).toggleClass('active');

    this._toggleSidebar();
  }, this));

  // Sidebar toggle
    this._$sidebarToggle.one('resources', $.proxy(function(e){
      if(!this._isSidebarVisible){
        $(e.currentTarget).toggleClass('active');

        this._toggleSidebar();
      }
  }, this));

  // Fullscreen toggle
  this._$fullscreenToggle.on('click', $.proxy(function(e){
    e.preventDefault();
    this._toggleFullscreen();
  }, this));

  // Delegated event listeners for input options
  this._$inputContainer.find('.chat-input-options').on('click', '.chat-option', $.proxy(function(e){
    e.preventDefault();

    // Post input to server
    this._postOption($(e.currentTarget).data('option-value'));
  }, this));

  // Delegated events for sidebar breakpoint links
  this._$sidebarBreakpointsContainer.on('click', 'li', $.proxy(function(e){
    e.preventDefault();

    // Scroll to message
    this._scrollToMessage($(e.currentTarget).data('href'));
  }, this));

  // Delegated events for sidebar resources links
  this._$sidebarResourcesContainer.on('click', 'li', $.proxy(function(e){
    e.preventDefault();

    // Scroll to message
    if ($.inArray('started', e.currentTarget.classList) > -1 ||
        $.inArray('unlocked', e.currentTarget.classList) > -1 ) {
    this._scrollToResourceMessage($(e.currentTarget).data('href'), $(e.currentTarget).data('ul'));
  }
  }, this));

  // Text input submit
  this._$inputContainer.find('.chat-input-text-form').on('submit', $.proxy(function(e){
    e.preventDefault();

    // Validate and post text to server
    this._postText();
  }, this)).on('keyup', $.proxy(function(e){
    // Enter should add a new line instead of submitting the form
    if(e.which === 13) {
      e.preventDefault()
    }
  }, this));

  // Overflow actions
  this._$messagesContainer.on('click', '.chat-actions li', $.proxy(function(e){
    e.preventDefault();

    // Hide actions
    $(e.currentTarget).closest('ul').stop().fadeToggle();

    // Post action
    var action = $(e.currentTarget).data('action');
    this._postAction(action);
  }, this));
};


text:
package com.github.benmanes.caffeine.cache;

import static com.google.common.truth.Truth8.assertThat;
import static uk.org.lidalia.slf4jext.Level.TRACE;

import org.testng.annotations.Listeners;
import org.testng.annotations.Test;

import com.github.benmanes.caffeine.cache.testing.CacheContext;
import com.github.benmanes.caffeine.cache.testing.CacheProvider;
import com.github.benmanes.caffeine.cache.testing.CacheSpec;
import com.github.benmanes.caffeine.cache.testing.CacheSpec.CacheWeigher;
import com.github.benmanes.caffeine.cache.testing.CacheSpec.Expire;
import com.github.benmanes.caffeine.cache.testing.CacheSpec.Maximum;
import com.github.benmanes.caffeine.cache.testing.CacheSpec.Population;
import com.github.benmanes.caffeine.cache.testing.CacheSpec.ReferenceType;
import com.github.benmanes.caffeine.cache.testing.CacheValidationListener;
import com.github.benmanes.caffeine.cache.testing.CheckMaxLogLevel;

/**
 * The test cases for the implementation details of {@link UnboundedLocalCache}.
 *
 * @author ben.manes@gmail.com (Ben Manes)
 */
@CheckMaxLogLevel(TRACE)
@Listeners(CacheValidationListener.class)
@Test(dataProviderClass = CacheProvider.class)
public final class UnboundedLocalCacheTest {

  @CacheSpec(population = Population.EMPTY, refreshAfterWrite = Expire.DISABLED,
      expireAfterAccess = Expire.DISABLED, expireAfterWrite = Expire.DISABLED,
      maximumSize = Maximum.DISABLED, weigher = CacheWeigher.DISABLED,
      keys = ReferenceType.STRONG, values = ReferenceType.STRONG)
  @Test(dataProvider = "caches")
  public void noPolicy(Cache<Integer, Integer> cache, CacheContext context) {
    assertThat(cache.policy().eviction()).isEmpty();
    assertThat(cache.policy().expireAfterWrite()).isEmpty();
    assertThat(cache.policy().expireAfterAccess()).isEmpty();
    assertThat(cache.policy().refreshAfterWrite()).isEmpty();
  }
}


text:
<TITLE>Review for Showgirls (1995)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Showgirls (1995)

reviewed by
Ryan Ellis

A REVIEW OF "SHOWGIRLS"
A RETRO REVIEW, 1995
by Ryan Ellis

give me a buzz on the ol' e-lines, iluvmick@hotmail.com

Movie reviewers have an obligation to see the good, the bad, and
the despicable. I originally wrote this review for my college
newspaper back in '95, but I wanted to re-write it because not
all retro reviews should be about the classics. We need to be
warned about some truly awful films, too. This picture was so
bad, it inspired the description for my 1/10 rating (see ratings
chart below). The only thing saving it from a 0/10 rating is that
being able to rent a movie like this is slightly less embarassing
than renting a porno. So, it does indeed have some plusses...

In fairness, Elizabeth Berkley is certainly worth seeing in the
buff. And her ability to whine and irritate us, even while nude,
was appropriate in her role as selfish temptress Nomi Malone.
This character is not smart, not interesting, and (deliberately?)
far too annoying far too often. Like in 1998s "Bulworth", when
the movie was over I didn't care one little iota about the main
character. At least Warren Beatty tried to make a statement with
his dreary and overrated film, though. "Showgirls" is too stupid
to make a statement.

Some people claim that the story is based on the legendary "All
About Eve" of all things! If exploitation expert Joe Eszterhas
was half the screenwriter that Joseph L. Mankiewicz was, he'd
be...well, he'd be a good screenwriter. Instead, this project may
have sunk his career. He wrote the (HA HA!) script and the
usually reliable Paul Verhoeven directed. The same team who
created a GOOD sex-film in 1992 ("Basic Instinct") struck out
here with their occasional violence, gratuitous X-rated sex
scenes, and numerous (and quite unnecessary) lesbian overtones.

The predictable storyline revolves around Nomi streaking into Las
Vegas to make it big as a dancer. After the supposed street-smart
young "lady" gets conned out of her suitcase by a slack-jawed
yokel in the opening sequence, she befriends a tailor of the
glamorous stage production at the "Stardust Hotel". Nomi doesn't
take advantage of this contact to break into the big-time of
dirty dancing right away. First, she becomes a lap dancer at a
scummy strip club. She sells her hot little wares at "The
Cheetah" for a short time, turning on the fictitious customers
and the actual theatre audience. Hey, I never said she wasn't a
hot number...

Maybe it's that, her body, which gets her into the big-time when
the star of the "Stardust Hotel", Crystal Connors (Gina Gershon)
stops into the strip club (it certainly isn't her brains or
pleasant disposition!). Crystal requests a private lap dance for
her boyfriend (Kyle MacLachlan). He also happens to be the
pleasure-seeking worm who runs the big show. Crystal gets Nomi
onto the "Stardust" team and, after an interminable amount of
time, Nomi "earns" the role of Crystal's understudy. The slut
then deliberately injures and hospitalizes Crystal.

It was almost laughable that Nomi had the guts to claim that
she's "not a whore". That's a phrase we hear a few different
times and it's completely ludicrous. Of course she is! She sells
her soul to make it big, but in the end we're supposed to believe
that she's a better person than that. We're supposed to root for
her. No way! She's a tramp and a back-stabber who deserved
nothing--least of all vindication in the...ahem...climax. She is
not a good person and they take over two hours to explain that
the audience should think that she is.

The sub-plot with a male dancer (Glenn Plummer) who claims to see
talent in Nomi is just a gratuitous opportunity to let her dance
naked a little bit more. It sure ain't character development!
Plummer also appeared in "Speed" in '94 in a smaller, yet better
role. This sub-plot goes absolutely nowhere except maybe to
deliver an unsubtle hint that fornicators should practice birth
control.

Kyle MacLachlan must have been promised a big pay-day or his
standards have dipped since appearing in "Blue Velvet". That
picture was weird, but some critics claim it's one of the best
movies of the '80s. Now ol' Kyle can say that he acted in one of
the worst of the '90s, too. His sleazy character is important to
"Showgirls", but we don't learn anything about him. He uses
people to get what he wants, but that only means that he fits in
well with the other characters in this movie. Is he a villain?
Who cares!

Ultimately, this movie is as tiresome as it is explicit. Everyone
must know by now about the soft-core acts of copulation,
especially the riotous romp between Berkley and MacLachlan in his
pool. What few reviewers take issue with is how mean-spirited
this movie is. Everyone's either having sex, exacting revenge, or
WISHING they were having sex or exacting revenge. It's just too
hard to take (especially for over two hours). If we must be
exposed to the evils of the Vegas world, why couldn't Verhoeven
have also made a point of highlighting the whispers, grunts, and
other sounds during the dance numbers? It's hard to care about
these people if we can't even appreciate what they're capable of
doing on-stage.

Berkley may have a future in Hollywood because she can dance and
she has a great body. After all, the world of porn is still an
active, dishonourable profession. Perhaps Berkley could join
their ranks and leave the REAL acting to Pauly Shore and Cindy
Crawford. Oops, they're bad actors, too. Well, at least, they're
not selfish and contemptable like good ol' slutty Nomi Malone.

USELESS TRIVIA--Ironically, Elizabeth Berkley played virtuous and
"holier than thou" Jessie on the teeny-bopper TV show, "Saved By
The Bell", before breaking onto the big screen.

This film gets a 1/10.

THE RYAN RATING SYSTEM SAYS...
10/10--absolutely outstanding
 9/10--excellent
 8/10--pretty darn good
 7/10--sure, go on and give it a peek
 6/10--so-so; ye ol' recommendation point
 5/10--not quite worth the dollars
 4/10--only if you have a free pass
 3/10--don't go, PLEASE don't go
 2/10--avoid even if you DO have a free pass
 1/10--"Showgirls" territory; truly crappy
 0/10--bang your head off a wall instead

Get Your Private, Free Email at http://www.hotmail.com

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
jest.mock('child_process');
jest.mock('../../models/meeting.accessors');
jest.mock('../../models/issue.accessors');
jest.mock('../../models/vote.accessors');
jest.mock('../../models/user.accessors');
jest.mock('../../utils/socketAction');
const { execSync } = require('child_process');

execSync.mockImplementation(() => Buffer.from('fake_git_hash'));
const connection = require('../connection');
const { getActiveGenfors } = require('../../models/meeting.accessors');
const { getAnonymousUser, getUsers } = require('../../models/user.accessors');
const { getVotes, getUserVote, getAnonymousUserVote } = require('../../models/vote.accessors');
const { getActiveQuestion, getIssueWithAlternatives, getConcludedIssues, getIssueById } = require('../../models/issue.accessors');
const { waitForAction } = require('../../utils/socketAction');
const { generateSocket, generateGenfors, generateAnonymousUser, generateIssue, generateVote, generateUser } = require('../../utils/generateTestData');
const permissionLevels = require('../../../common/auth/permissions');
const { VOTING_FINISHED } = require('../../../common/actionTypes/issues');

describe('connection', () => {
  beforeEach(() => {
    getActiveGenfors.mockImplementation(async () => generateGenfors());
    getAnonymousUser.mockImplementation(
      async (passwordHash, onlinewebId, meetingId) => generateAnonymousUser({
        passwordHash,
        meetingId,
      },
    ));
    getActiveQuestion.mockImplementation(async () => generateIssue());
    getIssueWithAlternatives.mockImplementation(async () => generateIssue({ id: '2' }));
    getConcludedIssues.mockImplementation(async meetingId => [
      generateIssue({ meetingId, id: '2' }),
      generateIssue({ meetingId, id: '2' }),
      generateIssue({ meetingId, id: '2' }),
      generateIssue({ meetingId, id: '2' }),
    ]);
    getVotes.mockImplementation(async issueId => [
      generateVote({ issueId, id: '1' }),
      generateVote({ issueId, id: '2' }),
      generateVote({ issueId, id: '3' }),
      generateVote({ issueId, id: '4' }),
    ]);
    getUserVote.mockImplementation(
      async () => null,
    );
    getAnonymousUserVote.mockImplementation(
      async () => null,
    );
    getUsers.mockImplementation(async () => [generateUser()]);
    getIssueById.mockImplementation(async id => generateIssue({ id }));
    waitForAction.mockImplementation(async () => ({ passwordHash: 'fake_password_hash' }));
  });

  it('emits correct actions when signed in and active genfors', async () => {
    const socket = generateSocket();
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits correct actions when signed in and no active genfors', async () => {
    getActiveGenfors.mockImplementation(async () => null);
    const socket = generateSocket();
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits correct actions when user has not completed registration and no genfors is active', async () => {
    getActiveGenfors.mockImplementation(async () => null);
    const socket = generateSocket({ completedRegistration: false });
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits correct actions when validation of password hash returns false', async () => {
    getAnonymousUser.mockImplementation(async () => null);
    const socket = generateSocket({ completedRegistration: true });
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits correct actions when validation of password hash returns throws error', async () => {
    getAnonymousUser.mockImplementation(async () => { throw new Error('Failed'); });
    getActiveGenfors.mockImplementation(async () => null);
    const socket = generateSocket({ completedRegistration: false });
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits correct actions when there is no active question', async () => {
    getActiveQuestion.mockImplementation(async () => null);
    const socket = generateSocket();
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits correct actions when retrieving votes fails', async () => {
    getVotes.mockImplementation(async () => { throw new Error('Failed'); });
    const socket = generateSocket();
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits correct actions when active question is secret', async () => {
    getActiveQuestion.mockImplementation(async () => generateIssue({ secret: true }));
    getIssueById.mockImplementation(async id => generateIssue({ id, secret: true }));
    const socket = generateSocket();
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits correct actions when user has already voted', async () => {
    getUserVote.mockImplementation(
      async (issueId, userId) => generateVote({ issueId, userId }),
    );
    const socket = generateSocket();
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits correct actions when retrieving active question fails', async () => {
    getActiveQuestion.mockImplementation(async () => { throw new Error('Failed'); });
    const socket = generateSocket();
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits correct actions when retrieving questions fails', async () => {
    getConcludedIssues.mockImplementation(async () => { throw new Error('Failed'); });
    const socket = generateSocket();
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits sensitive data like meeting pin if user is manager', async () => {
    const socket = generateSocket({ permissions: permissionLevels.IS_MANAGER });
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits final votes for issue if user is manager and voting is finished', async () => {
    getActiveQuestion.mockImplementation(async () => generateIssue({ status: VOTING_FINISHED }));
    const socket = generateSocket({ permissions: permissionLevels.IS_MANAGER });
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits question without final votes if voting is finished and user is not manager', async () => {
    getActiveQuestion.mockImplementation(async () => generateIssue({ status: VOTING_FINISHED }));
    const socket = generateSocket({ permissions: permissionLevels.CAN_VOTE });
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });

  it('emits correct actions when retrieving active genfors fails', async () => {
    getActiveGenfors.mockImplementation(async () => { throw new Error('Failed'); });
    const socket = generateSocket();
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });
});

describe('connection when no meeting', () => {
  it('warns about no active meeting', async () => {
    const socket = generateSocket({ meetingId: null });
    await connection(socket);

    expect(socket.emit.mock.calls).toMatchSnapshot();
    expect(socket.broadcast.emit.mock.calls).toEqual([]);
  });
});


text:
package armappplatform_test

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Get.json
func ExampleDeploymentsClient_Get_deploymentsGet() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Get_CustomContainer.json
func ExampleDeploymentsClient_Get_deploymentsGetCustomContainer() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_CreateOrUpdate.json
func ExampleDeploymentsClient_BeginCreateOrUpdate_deploymentsCreateOrUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{
		Properties: &armappplatform.DeploymentResourceProperties{
			DeploymentSettings: &armappplatform.DeploymentSettings{
				AddonConfigs: map[string]map[string]interface{}{
					"ApplicationConfigurationService": {
						"patterns": []interface{}{
							"mypattern",
						},
					},
				},
				EnvironmentVariables: map[string]*string{
					"env": to.Ptr("test"),
				},
				LivenessProbe: &armappplatform.Probe{
					DisableProbe:        to.Ptr(false),
					FailureThreshold:    to.Ptr[int32](3),
					InitialDelaySeconds: to.Ptr[int32](30),
					PeriodSeconds:       to.Ptr[int32](10),
					ProbeAction: &armappplatform.HTTPGetAction{
						Type:   to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction),
						Path:   to.Ptr("/health"),
						Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP),
					},
				},
				ReadinessProbe: &armappplatform.Probe{
					DisableProbe:        to.Ptr(false),
					FailureThreshold:    to.Ptr[int32](3),
					InitialDelaySeconds: to.Ptr[int32](30),
					PeriodSeconds:       to.Ptr[int32](10),
					ProbeAction: &armappplatform.HTTPGetAction{
						Type:   to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction),
						Path:   to.Ptr("/health"),
						Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP),
					},
				},
				ResourceRequests: &armappplatform.ResourceRequests{
					CPU:    to.Ptr("1000m"),
					Memory: to.Ptr("3Gi"),
				},
				TerminationGracePeriodSeconds: to.Ptr[int32](30),
			},
			Source: &armappplatform.SourceUploadedUserSourceInfo{
				Type:             to.Ptr("Source"),
				Version:          to.Ptr("1.0"),
				RelativePath:     to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"),
				ArtifactSelector: to.Ptr("sub-module-1"),
			},
		},
		SKU: &armappplatform.SKU{
			Name:     to.Ptr("S0"),
			Capacity: to.Ptr[int32](1),
			Tier:     to.Ptr("Standard"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json
func ExampleDeploymentsClient_BeginCreateOrUpdate_deploymentsCreateOrUpdateCustomContainer() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{
		Properties: &armappplatform.DeploymentResourceProperties{
			DeploymentSettings: &armappplatform.DeploymentSettings{
				EnvironmentVariables: map[string]*string{
					"env": to.Ptr("test"),
				},
				LivenessProbe: &armappplatform.Probe{
					DisableProbe:        to.Ptr(false),
					FailureThreshold:    to.Ptr[int32](3),
					InitialDelaySeconds: to.Ptr[int32](30),
					PeriodSeconds:       to.Ptr[int32](10),
					ProbeAction: &armappplatform.HTTPGetAction{
						Type:   to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction),
						Path:   to.Ptr("/health"),
						Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP),
					},
				},
				ReadinessProbe: &armappplatform.Probe{
					DisableProbe:        to.Ptr(false),
					FailureThreshold:    to.Ptr[int32](3),
					InitialDelaySeconds: to.Ptr[int32](30),
					PeriodSeconds:       to.Ptr[int32](10),
					ProbeAction: &armappplatform.HTTPGetAction{
						Type:   to.Ptr(armappplatform.ProbeActionTypeHTTPGetAction),
						Path:   to.Ptr("/health"),
						Scheme: to.Ptr(armappplatform.HTTPSchemeTypeHTTP),
					},
				},
				ResourceRequests: &armappplatform.ResourceRequests{
					CPU:    to.Ptr("1000m"),
					Memory: to.Ptr("3Gi"),
				},
				TerminationGracePeriodSeconds: to.Ptr[int32](30),
			},
			Source: &armappplatform.CustomContainerUserSourceInfo{
				Type: to.Ptr("Container"),
				CustomContainer: &armappplatform.CustomContainer{
					Args: []*string{
						to.Ptr("-c"),
						to.Ptr("while true; do echo hello; sleep 10;done")},
					Command: []*string{
						to.Ptr("/bin/sh")},
					ContainerImage: to.Ptr("myContainerImage:v1"),
					ImageRegistryCredential: &armappplatform.ImageRegistryCredential{
						Password: to.Ptr("myPassword"),
						Username: to.Ptr("myUsername"),
					},
					LanguageFramework: to.Ptr("springboot"),
					Server:            to.Ptr("myacr.azurecr.io"),
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Delete.json
func ExampleDeploymentsClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Update.json
func ExampleDeploymentsClient_BeginUpdate_deploymentsUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{
		Properties: &armappplatform.DeploymentResourceProperties{
			Source: &armappplatform.SourceUploadedUserSourceInfo{
				Type:             to.Ptr("Source"),
				Version:          to.Ptr("1.0"),
				RelativePath:     to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"),
				ArtifactSelector: to.Ptr("sub-module-1"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Update_CustomContainer.json
func ExampleDeploymentsClient_BeginUpdate_deploymentsUpdateCustomContainer() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{
		Properties: &armappplatform.DeploymentResourceProperties{
			Source: &armappplatform.CustomContainerUserSourceInfo{
				Type: to.Ptr("Container"),
				CustomContainer: &armappplatform.CustomContainer{
					Args: []*string{
						to.Ptr("-c"),
						to.Ptr("while true; do echo hello; sleep 10;done")},
					Command: []*string{
						to.Ptr("/bin/sh")},
					ContainerImage: to.Ptr("myNewContainerImage:v1"),
					ImageRegistryCredential: &armappplatform.ImageRegistryCredential{
						Password: to.Ptr("<myNewPassword>"),
						Username: to.Ptr("myNewUsername"),
					},
					Server: to.Ptr("mynewacr.azurecr.io"),
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_List.json
func ExampleDeploymentsClient_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("myResourceGroup", "myservice", "myapp", &armappplatform.DeploymentsClientListOptions{Version: []string{}})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_ListForCluster.json
func ExampleDeploymentsClient_NewListForClusterPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListForClusterPager("myResourceGroup", "myservice", &armappplatform.DeploymentsClientListForClusterOptions{Version: []string{}})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Start.json
func ExampleDeploymentsClient_BeginStart() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStart(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Stop.json
func ExampleDeploymentsClient_BeginStop() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStop(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_Restart.json
func ExampleDeploymentsClient_BeginRestart() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginRestart(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_EnableRemoteDebugging.json
func ExampleDeploymentsClient_BeginEnableRemoteDebugging() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginEnableRemoteDebugging(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", &armappplatform.DeploymentsClientBeginEnableRemoteDebuggingOptions{RemoteDebuggingPayload: &armappplatform.RemoteDebuggingPayload{}})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_DisableRemoteDebugging.json
func ExampleDeploymentsClient_BeginDisableRemoteDebugging() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDisableRemoteDebugging(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GetRemoteDebuggingConfig.json
func ExampleDeploymentsClient_GetRemoteDebuggingConfig() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetRemoteDebuggingConfig(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GetLogFileUrl.json
func ExampleDeploymentsClient_GetLogFileURL() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetLogFileURL(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GenerateHeapDump.json
func ExampleDeploymentsClient_BeginGenerateHeapDump() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginGenerateHeapDump(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{
		AppInstance: to.Ptr("myappinstance"),
		FilePath:    to.Ptr("/byos/diagnose"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_GenerateThreadDump.json
func ExampleDeploymentsClient_BeginGenerateThreadDump() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginGenerateThreadDump(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{
		AppInstance: to.Ptr("myappinstance"),
		FilePath:    to.Ptr("/byos/diagnose"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2022-11-01-preview/examples/Deployments_StartJFR.json
func ExampleDeploymentsClient_BeginStartJFR() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armappplatform.NewDeploymentsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginStartJFR(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{
		AppInstance: to.Ptr("myappinstance"),
		Duration:    to.Ptr("60s"),
		FilePath:    to.Ptr("/byos/diagnose"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}


text:
package org.apache.cassandra.cql3;

import org.junit.Test;

/**
 * Type-casting is mostly using for functions and their use with functions is
 * tested in UFTest. This is a few additional "sanity" tests.
 */
public class TypeCastTest extends CQLTester
{
    @Test
    public void testTypeCasts() throws Throwable
    {
        createTable("CREATE TABLE %s (k int PRIMARY KEY, t text, a ascii, d double, i int)");

        // The followings is fine
        execute("UPDATE %s SET t = 'foo' WHERE k = ?", 0);
        execute("UPDATE %s SET t = (ascii)'foo' WHERE k = ?", 0);
        execute("UPDATE %s SET t = (text)(ascii)'foo' WHERE k = ?", 0);
        execute("UPDATE %s SET a = 'foo' WHERE k = ?", 0);
        execute("UPDATE %s SET a = (ascii)'foo' WHERE k = ?", 0);

        // But trying to put some explicitely type-casted text into an ascii
        // column should be rejected (even though the text is actually ascci)
        assertInvalid("UPDATE %s SET a = (text)'foo' WHERE k = ?", 0);

        // This is also fine because integer constants works for both integer and float types
        execute("UPDATE %s SET i = 3 WHERE k = ?", 0);
        execute("UPDATE %s SET i = (int)3 WHERE k = ?", 0);
        execute("UPDATE %s SET d = 3 WHERE k = ?", 0);
        execute("UPDATE %s SET d = (double)3 WHERE k = ?", 0);

        // But values for ints and doubles are not truly compatible (their binary representation differs)
        assertInvalid("UPDATE %s SET d = (int)3 WHERE k = ?", 0);
        assertInvalid("UPDATE %s SET i = (double)3 WHERE k = ?", 0);
    }
}


text:
title: "NEXTUP"
layout: "function"
isPage: "true"
link: "/warpscript/functions"
desc: "Returns the DOUBLE  adjacent to the argument in the direction of positive infinity"
categoryTree: ["reference","functions"]
oldPath: ["30-functions","12-math","9170-function_NEXTUP.html.md"]
category: "reference"
---

The `NEXTUP` function consumes a numeric parameter from the top of the stack and pushes back the next DOUBLE in the direction of positive infinity.

## Example ##

Initial stack:

    TOP:  42.42

WarpScript commands:

    NEXTUP

Stack:

    TOP: 42.42000000000001

{% raw %}
<warp10-warpscript-widget backend="{{backend}}"  exec-endpoint="{{execEndpoint}}">42.42
NEXTUP
42
NEXTUP
</warp10-warpscript-widget>
{% endraw %}

## Unit test ##

{% raw %}
<warp10-warpscript-widget backend="{{backend}}"  exec-endpoint="{{execEndpoint}}">42.42
NEXTUP
42.42000000000001 == ASSERT
42
NEXTUP
42.00000000000001 == ASSERT
'unit test successful'
</warp10-warpscript-widget>
{% endraw %}


text:
var system;
var canvas;
var vertMargin = determineVerticalMargin();

function setup() {
  // canvas = createCanvas(500, 500); // for screenshots
  canvas = createCanvas(windowWidth, windowHeight-vertMargin);
  P5JsSettings.init();
  colorMode(HSB, 100);

  let rect = new Rect(0, 0, width, height);
  system = new System(rect);
}

function draw(){
  background(20);
  system.tick();
  system.render();
}

function mousePressed(){
  system.handleMousePressed();
}

function mouseDragged(){
  system.handleMouseDragged();
}

function mouseReleased(){
  system.handleMouseReleased();
}

function determineVerticalMargin(){
  let fullUrl = window.location.href;
  return (fullUrl.indexOf(".html") > 0) ? 0 : 37;
}

function keyTyped(){
  console.log(`key: ${key}`);
  switch (key) {
    case 'P':
      saveCanvas(canvas, 'screenshot', 'png');
      break;
    case 'D':
      system.toggleShapeDragging();
      break;
    case 'r':
      system.resetShapes();
      break;
  }
}


text:
require_relative '../../../../spec_helper'
require 'net/http'
require "stringio"
require_relative 'fixtures/http_server'

describe "Net::HTTP#set_debug_output when passed io" do
  before :each do
    NetHTTPSpecs.start_server
    @http = Net::HTTP.new("localhost", NetHTTPSpecs.port)
  end

  after :each do
    @http.finish if @http.started?
    NetHTTPSpecs.stop_server
  end

  it "sets the passed io as output stream for debugging" do
    io = StringIO.new

    @http.set_debug_output(io)
    @http.start
    io.string.should_not be_empty
    size = io.string.size

    @http.get("/")
    io.string.size.should > size
  end

  it "outputs a warning when the connection has already been started" do
    @http.start
    -> { @http.set_debug_output(StringIO.new) }.should complain(/Net::HTTP#set_debug_output called after HTTP started/)
  end
end


text:
var HelpScreen = (function(exports) {
	var BUTTON_SIZE = Size.make(150, 100);

	exports.init = function(canvas, prevScreen, prevState, termSignal) {
		var world = Entity.accumulator()
		.add(TextHelper.makeLines([
			'Welcome to Twinkle',
			'This is a game about making connections.',
			'In fact you will be connecting not only worlds',
			'but whole star systems!!!',
			'',
			'Drag a line between two stars to connect them',
			'The more connections the better, but...',
			'NEVER MAKE TRIANGLES!',
			'Triangles formed by intersecting lines are ok, though.'
		]))
		.add(Button.make('start', Point.make(400, 530), BUTTON_SIZE, 'OK, I got it', function() {
			return Query.event('term', termSignal);
		}))
		.apply(Entity.initSystem('pos', 'geometry', 'color', 'highlighted', 'highlightable',
			'target', 'z', 'button', 'animation'));

		return {
			screen: DefaultScreen.make([
					AnimationSystem,
					HighlightSystem,
					ButtonSystem,
					MovementSystem
				]),
			state: world
		};
	};

	return exports;
})(HelpScreen || {});