text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SharpGL.Drawing;
using SharpGL.Components;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
namespace SharpGL.Drawing
{
    /// <summary>
    /// A Canvas allows for easy rendering of Textures, Surfaces and Text to a surface.
    /// </summary>
	public class Canvas
	{
        /// <summary>
        /// The Surface of the Canvas object
        /// </summary>
		public Surface Surface {get; private set;}
        /// <summary>
        /// The width of the canvas
        /// </summary>
		public int Width
		{
			get
			{
				return Surface.Width;
			}
		}
        /// <summary>
        /// The height of the canvas
        /// </summary>
		public int Height
		{
			get
			{
				return Surface.Height;
			}
		}
        /// <summary>
        /// Creates a canvas object
        /// </summary>
        /// <param name="width">Width of the internal Surface</param>
        /// <param name="height">Height of the internal Surface</param>
        /// <param name="transparency">If true an alpha channel is used</param>
		public Canvas(int width, int height, bool transparency)
		{
			Surface = new Surface(width, height, transparency ? SurfaceFormat.Surface2DAlpha : SurfaceFormat.Surface2D);
		}
        /// <summary>
        /// Clears the Canvas with the provided color
        /// </summary>
        /// <param name="r">Red</param>
        /// <param name="g">Green</param>
        /// <param name="b">Blue</param>
        /// <param name="a">Alpha</param>
		public void Clear(float r = 0, float g = 0, float b = 0, float a = 0)
		{
			Surface.Clear(r, g, b, a);
		}
        /// <summary>
        /// Draws a Surface to the Canvas
        /// </summary>
        /// <param name="surface">The Surface to draw</param>
        /// <param name="dstX">X-Location to draw</param>
        /// <param name="dstY">Y-Location to draw</param>
        /// <param name="dstW">Width</param>
        /// <param name="dstH">Height</param>
		public void DrawSurface(Surface surface, int dstX, int dstY, int dstW, int dstH)
		{
			surface.CloneTo(this.Surface, dstX, dstY, dstW, dstH);
			//Modified = true;
		}
        /// <summary>
        /// Draws a Texture to the Canvas
        /// </summary>
        /// <param name="texture">The Texture to draw</param>
        /// <param name="dstX">X-Location to draw</param>
        /// <param name="dstY">Y-Location to draw</param>
        /// <param name="dstW">Width</param>
        /// <param name="dstH">Height</param>
		public void DrawTexture(Texture2D texture, int dstX, int dstY, int dstW, int dstH)
		{
			int fbo = GL.GenFramebuffer();
			GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, fbo);
			GL.FramebufferTexture2D(FramebufferTarget.ReadFramebuffer, FramebufferAttachment.ColorAttachment0Ext, TextureTarget.Texture2D, fbo, 0);
			Surface.BindFramebuffer(FramebufferTarget.DrawFramebuffer);
			GL.BlitFramebuffer(0, 0, texture.Width, texture.Height, dstX, dstY, dstW, dstH, ClearBufferMask.ColorBufferBit, BlitFramebufferFilter.Linear);
			GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, 0);
			GL.BindFramebuffer(FramebufferTarget.DrawFramebuffer, 0);
		}
        /// <summary>
        /// Draws a Material to the Canvas
        /// </summary>
        /// <param name="material">The Material to draw</param>
		public void DrawMaterial(Material material)
		{
			GL.Viewport(0, 0, Surface.Width, Surface.Height);

			Surface.BindFramebuffer();
			material.Use();
			Helper.DrawScreenQuad();
			GL.UseProgram(0);
			GL.BindFramebuffer(FramebufferTarget.Framebuffer, 0);
		}
        /// <summary>
        /// Draws a text string to the Canvas
        /// </summary>
        /// <param name="text">The string to be drawn</param>
        /// <param name="shader">The shader to use for drawing</param>
        /// <param name="font">The font to use for drawing</param>
        /// <param name="charDistance">The distance between characters (can be negative)</param>
        /// <param name="position">The location where the string will be drawn</param>
        /// <param name="color">The color of the text</param>
		public void DrawText(string text, Shader shader, Font font, float charDistance, Vector2 position, Vector4 color)
		{
			font.DrawString(Surface, shader, text, charDistance, position, color);
			//Modified = true;
		}
        /// <summary>
        /// Draws a white text string to the Canvas
        /// </summary>
        /// <param name="text">The string to be drawn</param>
        /// <param name="shader">The shader to use for drawing</param>
        /// <param name="font">The font to use for drawing</param>
        /// <param name="charDistance">The distance between characters (can be negative)</param>
        /// <param name="position">The location where the string will be drawn</param>
		public void DrawText(string text, Shader shader, Font font, float charDistance, Vector2 position)
		{
			font.DrawString(Surface, shader, text, charDistance, position, Vector4.One);
			//Modified = true;
		}
	}
}


text:
package org.elasticsearch.rest.action.admin.cluster;

import org.elasticsearch.action.admin.cluster.state.ClusterStateRequest;
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
import org.elasticsearch.client.Requests;
import org.elasticsearch.client.node.NodeClient;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.ClusterSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.SettingsFilter;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.rest.BaseRestHandler;
import org.elasticsearch.rest.BytesRestResponse;
import org.elasticsearch.rest.RestChannel;
import org.elasticsearch.rest.RestController;
import org.elasticsearch.rest.RestRequest;
import org.elasticsearch.rest.RestResponse;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.rest.action.support.RestBuilderListener;

import java.io.IOException;

public class RestClusterGetSettingsAction extends BaseRestHandler {

    private final ClusterSettings clusterSettings;
    private final SettingsFilter settingsFilter;

    @Inject
    public RestClusterGetSettingsAction(Settings settings, RestController controller, ClusterSettings clusterSettings,
            SettingsFilter settingsFilter) {
        super(settings);
        this.clusterSettings = clusterSettings;
        controller.registerHandler(RestRequest.Method.GET, "/_cluster/settings", this);
        this.settingsFilter = settingsFilter;
    }

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final NodeClient client) {
        ClusterStateRequest clusterStateRequest = Requests.clusterStateRequest()
                .routingTable(false)
                .nodes(false);
        final boolean renderDefaults = request.paramAsBoolean("include_defaults", false);
        clusterStateRequest.local(request.paramAsBoolean("local", clusterStateRequest.local()));
        client.admin().cluster().state(clusterStateRequest, new RestBuilderListener<ClusterStateResponse>(channel) {
            @Override
            public RestResponse buildResponse(ClusterStateResponse response, XContentBuilder builder) throws Exception {
                return new BytesRestResponse(RestStatus.OK, renderResponse(response.getState(), renderDefaults, builder, request));
            }
        });
    }

    @Override
    public boolean canTripCircuitBreaker() {
        return false;
    }

    private XContentBuilder renderResponse(ClusterState state, boolean renderDefaults, XContentBuilder builder, ToXContent.Params params)
            throws IOException {
        builder.startObject();

        builder.startObject("persistent");
        state.metaData().persistentSettings().toXContent(builder, params);
        builder.endObject();

        builder.startObject("transient");
        state.metaData().transientSettings().toXContent(builder, params);
        builder.endObject();

        if (renderDefaults) {
            builder.startObject("defaults");
            settingsFilter.filter(clusterSettings.diff(state.metaData().settings(), this.settings)).toXContent(builder, params);
            builder.endObject();
        }

        builder.endObject();
        return builder;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

declare(strict_types=1);

namespace Sylius\Component\Payment\Model;

use Sylius\Component\Resource\Model\ResourceInterface;

interface PaymentMethodTranslationInterface extends ResourceInterface
{
    /**
     * @return string|null
     */
    public function getName(): ?string;

    /**
     * @param string|null $name
     */
    public function setName(?string $name): void;

    /**
     * @return string|null
     */
    public function getDescription(): ?string;

    /**
     * @param string|null $description
     */
    public function setDescription(?string $description): void;

    /**
     * @return string|null
     */
    public function getInstructions(): ?string;

    /**
     * @param string|null $instructions
     */
    public function setInstructions(?string $instructions): void;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/root_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".activity.SuggestionsPagerActivity">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <android.support.v7.widget.Toolbar
            android:id="@+id/pager_toolbar"
            style="@style/Primary_ToolbarStyle"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
            app:layout_scrollFlags="scroll|enterAlways"/>

    </android.support.design.widget.AppBarLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/suggestions_viewPager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        tools:layout="@layout/fragment_suggestion_detail"/>

</android.support.design.widget.CoordinatorLayout>


text:
About

Lorem ipsum dolor sit amet consectetur.

2009-2011

Our Humble Beginnings

Rooted at the center of the world brain study, BrainCo Inc is dedicated to bring the most advanced brain-machine interface technology to people's daily life. Scientists from Center for Brain Science at Harvard and Mcgovern Institute for Brain Research at MIT strive to break the wall, explore the possible applications of once institute exclusive technologies and see how they can change the world. With the sympathetic insight, BrainCo has found potentials in attention improvement, sleep management, smart home control, brain-to-brain communication, brain disease detection, pain measurement, early nerve disease prevention, and more to come. We believe, your brain controls everything

March 2011

An Agency is Born

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!

December 2012

Transition to Full Service

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!

July 2014

Phase Two Expansion

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!

Be Part

Of Our

Story!


text:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
	version="2.2">

	<application>

		<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>

		<resource-handler>org.omnifaces.resourcehandler.UnmappedResourceHandler</resource-handler>

		<locale-config>
			<default-locale>en</default-locale>
		</locale-config>

		<resource-bundle>
			<base-name>submerge.i18n.text</base-name>
			<var>msg</var>
		</resource-bundle>

	</application>

	<application>

		<action-listener>org.primefaces.application.DialogActionListener</action-listener>
		<navigation-handler>org.primefaces.application.DialogNavigationHandler</navigation-handler>
		<view-handler>org.primefaces.application.DialogViewHandler</view-handler>

	</application>

</faces-config>


text:
using System;
using System.Linq;

using FluentWebUITesting.Controls;

using JetBrains.Annotations;

using OpenQA.Selenium;

namespace FluentWebUITesting.Extensions
{
	public static class ISelectListExtensions
	{
		public static OptionWrapper OptionWithText(this IWebElement dropDownList, [NotNull] string text, IWebDriver browser)
		{
			const string optionWithText = "option with visible text '{0}'";
			var options = dropDownList.FindElements(By.TagName("option"));
			var option = options.FirstOrDefault(x => x.Text == text);
			return new OptionWrapper(option, String.Format(optionWithText, text), dropDownList, browser);
		}

		public static OptionWrapper OptionWithValue(this IWebElement dropDownList, [NotNull] string value, IWebDriver browser)
		{
			const string optionWithValue = "option with value '{0}'";
			var options = dropDownList.FindElements(By.TagName("option"));
			var option = options.FirstOrDefault(x => x.GetAttribute("value") == value);
			return new OptionWrapper(option, String.Format(optionWithValue, value), dropDownList, browser);
		}
	}
}


text:
var _console = ripple('console');

module.exports = {
    show: function (success) {
        return success && success();
    },

    exitApp: function( win, fail, args ) {
        //window.close();
        _console.warn("Application must exit now.");
    },

    overrideBackbutton: function( win, fail, args ) {
        _console.log("Native back button handler was detached.");
    }
};


text:
require 'date'

module AsposeWordsCloud
  # base class containing fundamental method such as to_hash, build_from_hash and more
  class BaseObject

    # build the object from hash
    def build_from_hash(attributes)
      return nil unless attributes.is_a?(Hash)
      self.class.swagger_types.each_pair do |key, type|
        if type =~ /^Array<(.*)>/i
          if attributes[self.class.attribute_map[key]].is_a?(Array)
            self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
          else
            #TODO show warning in debug mode
          end
        elsif !attributes[self.class.attribute_map[key]].nil?
          self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
        else
          # data not found in attributes(hash), not an issue as the data can be optional
        end
      end

      self
    end

    def _deserialize(type, value)
      case type.to_sym
      when :DateTime
        DateTime.parse(value)
      when :Date
        Date.parse(value)
      when :String
        value.to_s
      when :Integer
        value.to_i
      when :Float
        value.to_f
      when :BOOLEAN
        if value =~ /^(true|t|yes|y|1)$/i
          true
        else
          false
        end
      else # model
        _model = AsposeWordsCloud.const_get(type).new
        _model.build_from_hash(value)
      end
    end

    def to_s
      to_hash.to_s
    end

    # to_body is an alias to to_body (backward compatibility))
    def to_body
      to_hash
    end

    # return the object in the form of hash
    def to_hash
      hash = {}
      self.class.attribute_map.each_pair do |attr, param|
        value = self.send(attr)
        next if value.nil?
        if value.is_a?(Array)
          hash[param] = value.compact.map{ |v| _to_hash(v) }
        else
          hash[param] = _to_hash(value)
        end
      end
      hash
    end

    # Method to output non-array value in the form of hash
    # For object, use to_hash. Otherwise, just return the value
    def _to_hash(value)
      if value.respond_to? :to_hash
        value.to_hash
      else
        value
      end
    end

  end
end


text:
"use strict";
/**
 * Input Widget implementation as jQuery Widget
 */
(function(){
  jQuery.widget("bcdui.bcduiInputNg", jQuery.bcdui.bcduiWidget,
    /** @lends bcdui.bcduiInputNg */
    {
    /**
     * TODO migrate to jQuery Widget Event / Callback API
     * custom events fired on the input element
     *
     * @static
     */
    EVENT: {
      /**
       * fired on the input element after a SYNC_WRITE, that is
       * the widget value has been synced to the data model, 'memo' properties passed:
       *
       * - isValueEmpty {boolean}: if value is considered empty
       * - value {String}: the value synced
       * - hasWritten {boolean}: if the value has been written or not, i.e. the value is not written if either invalid or value has not changed
       *
       * @static
       */
      SYNC_WRITE : "bcd:widget.input.sync_write",

      /**
       * fired on the input element after a SYNC_READ, that is
       * the widget value has been loaded from the data model, 'memo' properties passed:
       *
       * - isValueEmpty {boolean}: if value is considered empty
       *
       * @static
       */
      SYNC_READ : "bcd:widget.input.sync_read"
    },

    version : "1",

    /**
     * @private
     */
    _getCreateOptions : function(){
      return Object.assign({}, this.options, bcdui.widgetNg.impl.readParams.input(this.element[0]));
    },
    /**
     * @private
     */
    _validateOptions : function(){
      bcdui.widgetNg.impl.validateParams.input(this.options);
    },

    /**
     * initializes the widget according to the API
     * @private
     */
    _create : function() {
      this._super();

      bcdui.log.isTraceEnabled() && bcdui.log.trace("creating input widget with config ");
      var rootContainer = this.element;

      var args = this.options;

      // init internal config
      // TODO remove / rewrite / communicate via widget-extensions (inheritance) and events
      var extendedConfig=null;
      var config = {
          target: bcdui.factory._extractXPathAndModelId(args.targetModelXPath),
          inputElementId: "input_" + args.id,
          extendedConfig: this.options.extendedConfig||{}
      };
      this.config = config;

      args.type = config.extendedConfig.type||args.type||"text";

      // avoid rendering while attaching children
      this.setVisible(false);

      var uiControl = this._createInputControl(args, config);

      // store args on element
      // TODO rewrite, use jQuery data style
      jQuery(uiControl.control).data("_args_", args);
      jQuery(uiControl.control).data("_config_", config);

      // sync the bound model value once
      bcdui.factory.objectRegistry.withReadyObjects(config.target.modelId, function(){
        if(this.isDestroyed){
          if(window["console"] && bcdui.isDebug){
            console.warn("widget initialization after destroy()",this);
          }
          return;
        }
        // initial sync only when no data was injected yet
        if (jQuery("#" + config.inputElementId).val() == "")
          this._syncValue(config.inputElementId);
      }.bind(this));

      // listen to updates on model
      this._setOnTargetModelChange(function(){
        try{
          if(!this._writingData){
            this._syncValue(config.inputElementId);
          }
        } finally {
          this._writingData = false;
        }
      }.bind(this));

      // handle label creation before appending control
      this._createLabel(uiControl.widget.getAttribute("id"));

      // attach to DOM
      rootContainer.append(uiControl.widget);

      // add custom placeholder if not supported natively
      if(args.placeholder && !bcdui.browserCompatibility._hasFeature("input.placeholder") && !config.extendedConfig.hasCustomPlaceholderHandler){
        this._on(uiControl.control , {
          focus : this._setUnsetPlaceholder.bind(this,config.inputElementId, false),
          blur : this._setUnsetPlaceholder.bind(this,config.inputElementId, true)
        });
      }

      // add listeners
      if(!args.readonly){
        jQuery(uiControl.control).on("keydown", (e) => {
          // cancel validation when receiving keystrokes yet only when input has focus
          if(jQuery(e.target).is(":focus")){
            this._cancelPendingValidation();
          }
        });
        bcdui.log.isTraceEnabled() && bcdui.log.trace("input NOT read-only, set up handlers.");

        if(!config.extendedConfig.hasCustomUpdateHandler){
          // avoid updateValue calls (write to target) which are triggerd by non-user blurs (e.g. pageEffect focus change)
          // before target is ready
          bcdui.factory.objectRegistry.withReadyObjects(config.target.modelId, function(){
            this._on( uiControl.control , {
              blur : this.updateValue.bind(this,config.inputElementId),

              // firefox does not focus the inputfield when clicking on up/down arrows in type=int input field. As a result, the blur event is not fired
              // so focus the input field in any case when clicking
              click: function(event) {jQuery(event.target).focus();}
            });
          }.bind(this));
        }

        if(args.setCursorPositionAtEnd || args.isTextSelectedOnFocus){
          this._on( uiControl.control , {
            blur : this._handleCursorPosition.bind(this,config.inputElementId)
          });
        }

        // create and attach reset control if not disabled
        if(!args.disableResetControl){
          var resetControl = this._createResetControl();
          rootContainer.append(resetControl);
          // add listener
          this._on( resetControl , {
            click : this._clearValue.bind(this,config.inputElementId)
          });
        }

        // attach implicit validators
        if(args.maxlength){
          this._addValidator(config.inputElementId, bcdui.widgetNg.validation.validators.widget.valueLength);
        }
        // attach our pattern validator in case not supported by browser
        if(args.pattern && !bcdui.browserCompatibility._hasFeature("input.pattern")){
          this._addValidator(config.inputElementId, bcdui.widgetNg.validation.validators.widget.patternValidator);
        }
        // check for required validator
        if(args.required && !bcdui.browserCompatibility._hasFeature("input.required")){
          this._addValidator(config.inputElementId, bcdui.widgetNg.validation.validators.widget.notEmptyValidator);
        }
        // check for optional validationFunction
        if(args.validationFunction){
          var func = bcdui.util.isString(args.validationFunction) ? eval(args.validationFunction) : args.validationFunction;
          if(!func){
            throw new Error("custom validation function not found (is null): " + (bcdui.util.isString(args.validationFunction)?"name:" + args.validationFunction : ""));
          }
          this._addValidator(config.inputElementId, func);
        }

        if(args.type=="int"){
          this._addValidator(config.inputElementId, bcdui.widgetNg.validation.validators.widget.TYPE_VALIDATORS["int"]);
        }else if(args.type=="numeric"){
          this._addValidator(config.inputElementId, bcdui.widgetNg.validation.validators.widget.TYPE_VALIDATORS["number"]);
        }else if(args.type=="email"){
          this._addValidator(config.inputElementId, bcdui.widgetNg.validation.validators.widget.TYPE_VALIDATORS["email"]);
        }
      }else{
        bcdui.log.isTraceEnabled() && bcdui.log.trace("input IS read-only, dont attach modification listeners.");
      }

      // attach balloon displaying fly-over + ballon for the widget to display hints and validation
      bcdui.widgetNg.commons.balloon.attach(config.inputElementId, {noTooltip: config.extendedConfig.noTooltip, noBalloon:!args.displayBalloon});

      // apply disabled state
      if(this.options.disabled){
        this.disable();
      }

      // display constructed container
      this.setVisible(true);

      // set autofocus after display
      if(args.autofocus){
        jQuery(uiControl.control).focus();
      }

      if (this.options.enableNavPath) {
        bcdui.widgetNg.input.getNavPath(this.options.id, function(id, value) {
          bcdui.widget._linkNavPath(id, value);
        }.bind(this));
      }
    },

    /**
     * updates the widget with data from bound model., args:
     *
     * - targetModel
     * - targetXPath
     *
     * here we also implement SYNC_WRITE to the data model for
     * invalid- to valid transition, that is once widget becomes valid
     * after invalid state, it persists the value into the model
     *
     * @private
     */
    _syncValue: function(inputElementId){
      var value = this._readDataFromXML(inputElementId).value||"";
      var el = bcdui._migPjs._$(inputElementId);
      // we're settings fields value - reset placeholder
      if(el.prop("bcdIsValuePlaceholder")){
        el.prop("bcdIsValuePlaceholder",false);
        el.removeClass("bcdPlaceholder");
      }
      el.get(0).value = value;
      var isValueEmpty = value == null || !value.trim();

      ! isValueEmpty ? jQuery(el).closest("*[data-bcdui-widget]").addClass("bcdActiveFilter") : jQuery(el).closest("*[data-bcdui-widget]").removeClass("bcdActiveFilter");

      // validate
      bcdui.log.isTraceEnabled() && bcdui.log.trace("validate after sync, value read from model is: " + value + ", is value empty: " + isValueEmpty);
      if (this.options.isSync){
        this._validateElement(inputElementId, true, true);
        if(!el.data("_config_").extendedConfig.hasCustomPlaceholderHandler){
          this._setUnsetPlaceholder(inputElementId, isValueEmpty);
        }
        el.trigger(this.EVENT.SYNC_READ, {isValueEmpty : isValueEmpty});
      }
      else {
        this._validateElement(inputElementId, true)
        .then(() => {
          // check if widget still exists
          if (jQuery("#" + inputElementId).length > 0) {
            if(!el.data("_config_").extendedConfig.hasCustomPlaceholderHandler){
              this._setUnsetPlaceholder(inputElementId, isValueEmpty);
            }
            el.trigger(this.EVENT.SYNC_READ, {isValueEmpty : isValueEmpty});
          }
        });
      }
    },

    /**
     * @return {Object} properties:
     *  widget: is the widget element to append to layout,
     *  control: A-element
     *
     * @private
     */
    _createInputControl: function(args, config){

      var el = jQuery("<input class='form-control'></input>");

      el.attr("id", config.inputElementId);
      // the hints are handled by balloons
      el.attr("bcdHint", args.hint);
      el.attr("tabindex", args.tabindex);
      el.attr("autofocus", args.autofocus);
      el.attr("maxlength", args.maxlength);
      el.attr("max", args.max);
      el.attr("min", args.min);
      el.attr("placeholder", args.placeholder);
      el.attr("pattern", args.pattern);
      el.attr("required", args.required);
      el.attr("readonly", args.readonly);
      el.attr("autocomplete", args.autocomplete || "off");

      // bind native html events, if defined
      this._mapNativeHtmlEvents(el);

      if(args.type){
        if(args.type=="int"){
          el.attr("type", "number");
        }else if(args.type=="numeric"){
          el.attr("type", "number");
          el.attr("step", "any");
        }else{
          el.attr("type", args.type);
        }
      }else{
        el.attr("type", "text");
      }

      var resetControl=null;

      if(args.disabled){
        el
        .prop("disabled","disabled")
        .attr("disabled","disabled")
        .addClass("bcdDisabled")
        ;
      }

      return {
        widget: el.get(0),
        control: el.get(0)
      }
    },

    /**
     * reads from bound model, args:
     *
     * - targetModel
     * - targetXPath
     *
     * @return {Object} with properties:
     *  value: the raw value from model
     * @private
     */
    _readDataFromXML: function(inputElementId){
      bcdui.log.isTraceEnabled() && bcdui.log.trace("_readDataFromXML");
      var config = bcdui._migPjs._$(inputElementId).data("_config_");
      return {
        value: bcdui.widget._getDataFromXML(bcdui.factory.objectRegistry.getObject(config.target.modelId),config.target.xPath)
      }
    },

    /**
     * validates the element and sets validation markers, displays messages to the user,
     * this function implements the validation pattern allowing to validate the value of the
     * widget with custom validators. Additionally, a target-node can also have a validity status
     * which is also checked during SYNC_READ (means data loaded from model to widget) but check is
     * omitted in case of SYNC_WRITE (means data written from widget to model).
     *
     * @param inputElementId
     * @param checkDataModelValidity if true, additionally the model validity is taken into account
     * @param isSync, if set to true, the validation is done synchronously ( attached asyncValidate functions are not called)
     *
     * @return Promise resolving with validation result.
     *
     * @private
     */
    _validateElement: function(inputElementId, checkDataModelValidity, isSync){
      var el = document.getElementById(inputElementId);
      var msg = this._getValidationMessages(inputElementId);
      bcdui.log.isTraceEnabled() && bcdui.log.trace("validation messages: " + msg);

      if(checkDataModelValidity === true){
        // run invalidModelDataValidator if intructed so
        var result = bcdui.widgetNg.validation.validators.widget.invalidModelDataValidator(el);
        if(result){
          if(msg==null){
            msg=[];
          }
          msg.push(result.validationMessage);
        }
      }

      var isValid = bcdui.widgetNg.validation.validateField(inputElementId, msg);

      if (isSync === true) {
        if(msg){ // custom validators reported errors
          return msg;
        } else if (!isValid){ // implicit validator reported error
          return bcdui.widgetNg.validation.addValidityMessage(null, "Error"); // unknown error occurred
        } else {
          return null; // in sync mode, we don't run asyncValidate functions
        }
      }
      else
        return new Promise((resolve, reject) => {
          if(msg){ // custom validators reported errors
            resolve({
              validationMessage : msg
            });
          } else if (!isValid){ // implicit validator reported error
            resolve(bcdui.widgetNg.validation.addValidityMessage(null, "Error")); // unknown error occurred
          } else {
            this._asyncValidate().then(resolve, reject);
          }
        });
    },

    /**
     * re-validates the widget, this API allows jQuery(el).bcduiInput("validate")
     */
    validate : function(){
      this._validateElement(this.config.inputElementId, true);
    },

    /**
     * runs all validators
     *
     * @return {object[]} NULL in case of valid validation or array of validation messages
     * @private
     */
    _getValidationMessages: function(inputElementId){
      var config = bcdui._migPjs._$(inputElementId).data("_config_");
      if(! config)
        return null;

      var validators = config.validators;

      var messages=[];

      if(validators!=null){
        bcdui.log.isTraceEnabled() && bcdui.log.trace("found validators: " + validators.length);
        validators.forEach(function(v){
          var res = v(inputElementId);
          if(res!=null){
            messages.push(res.validationMessage);
          }
        });
      }

      bcdui.log.isTraceEnabled() && bcdui.log.trace("messages produced by validators: " + messages);

      return messages.length==0?null:messages;
    },

    /**
     * manual placeholder handling,
     * in case no value is set:
     *
     * 1) set element value to placeholder
     * 2) tag with CSS bcdPlaceholder class
     * 3) set elements bcdIsValuePlaceholder attribute to true, so that other APIs may detect that the value set is a placeholder
     *
     * this function must be called onfocus() and onblur() in case placeholder is set
     *
     * @param doSet - true if to set, false to remove
     * @private
     */
    _setUnsetPlaceholder: function(inputElementId, doSet){
      // we must not run in case browser supports placeholder
      if(bcdui.browserCompatibility._hasFeature("input.placeholder"))return;

      var el = bcdui._migPjs._$(inputElementId);

      if(doSet && el.is(":focus")){
        // no need to set placeholder on an active (focused) field
        return;
      }

      var args = el.data("_args_");
      // no placeholder configured
      if(!args.placeholder){
        return;
      }

      // we dont handle password fields
      if(args.type=="password")return;

      var isEmptyField = this._isEmptyField(el.get(0));

      if(doSet && isEmptyField){
        // set placeholder, if we have an empty value
        el.prop("bcdIsValuePlaceholder", true);
        el.addClass("bcdPlaceholder");
        el.get(0).value=args.placeholder;
      }else if(!doSet && el.prop("bcdIsValuePlaceholder")){
        // remove placeholder
        el.prop("bcdIsValuePlaceholder",false);
        el.removeClass("bcdPlaceholder");
        el.get(0).value="";
      }
    },

    /**
     * @return {boolean} true if value is empty, also considers the placeholder, value is empty if it is null or empty string
     * @private
     */
    _isEmptyField: function(inputElementId){
      var el = bcdui._migPjs._$(inputElementId);
      return el.get(0).value==null||!el.get(0).value.trim()||el.prop("bcdIsValuePlaceholder");
    },

    /**
     * adds validator to a widget
     *
     * @param inputElementId
     * @param validatorFunc - implementing widget validation api
     *
     * @private
     */
    _addValidator: function(inputElementId, validatorFunc){
      bcdui.log.isTraceEnabled() && bcdui.log.trace("adding validator");
      var config = bcdui._migPjs._$(inputElementId).data("_config_");
      if(config.validators == null){
        config.validators=[];
      }
      config.validators.push(validatorFunc);
    },

    /**
     * implements feature for:
     * - setCursorPositionAtEnd
     * - isTextSelectedOnFocus
     *
     * @private
     */
    _handleCursorPosition: function(inputElementId){
      var el = bcdui._migPjs._$(inputElementId);
      var args = el.data("_args_");
      // we dont have to do anything on empty value, however we expect the _setUnsetPlaceholder() function to be run before
      if(!this._isEmptyField(inputElementId) && (args.setCursorPositionAtEnd || args.isTextSelectedOnFocus)){
        //var pos = typeof newPos != "undefined" ? newPos : el.value.length;
        var pos = el.get(0).value.length;
        var startPos = args.isTextSelectedOnFocus ? 0 : pos;
        if(bcdui.browserCompatibility.isIE && el.get(0).createTextRange){
          var range = el.get(0).createTextRange();
          range.collapse(true);
          range.moveEnd('character', pos);
          range.moveStart('character', startPos);
          range.select();
        }else if(el.get(0).setSelectionRange){// FF, Chrome
          el.get(0).setSelectionRange(startPos,pos);
        }
      }
    },

    /**
     * forces widget to write its current content to targetModelXPath
     */
    manifestValue: function(){
      this.updateValue(this.element.children().first().get(0).id);
    },

    /**
     * this function shall be called in order to accept value from GUI control into the model,
     * also we handle a placeholder here, since this is considered to be the API to sync new GUI input
     *
     */
    updateValue: function(inputElementId){
      bcdui.log.isTraceEnabled() && bcdui.log.trace("updateValue(gui to data)");
      var inputEl = bcdui._migPjs._$(inputElementId);
      var args = inputEl.data("_args_");
      var config = inputEl.data("_config_");

      bcdui.log.isTraceEnabled() && bcdui.log.trace("bcdui.widgetNg.input.updateValue: update via xpath : " + config.target.xPath + ", modelId: " + config.target.modelId);

      var guiValue = inputEl.get(0).value;
      if(this._isEmptyField(inputEl.get(0))){
        // handle non-native placeholder
        guiValue="";
      }
      if(args.doTrimInput && guiValue != null ){
        inputEl.get(0).value = guiValue = guiValue.trim();
      }
      var modelValue = this._readDataFromXML(inputElementId).value||"";
      // tells if current widget value differs from data value
      var hasValueChanged = guiValue != modelValue;

      bcdui.log.isTraceEnabled() && bcdui.log.trace("bcdui.widgetNg.input.updateValue: modelValue: " + modelValue + ", guiValue: " + guiValue);

      // handle placeholder here if we have to
      if(guiValue=="" && !config.extendedConfig.hasCustomPlaceholderHandler){
        this._setUnsetPlaceholder(inputElementId, true);
      }

      var triggerWrite = (hasWritten) => {

        guiValue ? jQuery("#" + inputElementId).closest("*[data-bcdui-widget]").addClass("bcdActiveFilter") : jQuery("#" + inputElementId).closest("*[data-bcdui-widget]").removeClass("bcdActiveFilter");

        inputEl.trigger(this.EVENT.SYNC_WRITE,{
          isValueEmpty : guiValue == "",
          value : guiValue,
          hasWritten: !!hasWritten // default:false
        });
      };

      // if value has changed we revalidate and write it to the model if value was valid
      var doWrite = function(validationResult) {
        var hasWritten = false;
        if(!validationResult){ // write only with valid value
          this._writeDataToXML({
            inputElementId: inputElementId,
            value : guiValue
          });
          hasWritten = true;
        }
        triggerWrite(hasWritten);
      }.bind(this);

      if(hasValueChanged){
        if (this.options.isSync) {
          doWrite(this._validateElement(inputElementId, false, true));
        }
        else {
          this._validateElement(inputElementId, false)
          .then((validationResult) => {
            doWrite(validationResult);
          });
        }
      } else { // value has not changed

        // tidy up, in case of invalidity state
        if(!bcdui.widgetNg.validation.hasValidStatus(inputEl.get(0))){
          bcdui.log.isTraceEnabled() && bcdui.log.trace("force validation in case of invalid field status");
          if (this.options.isSync) {
            this._validateElement(inputElementId, !hasValueChanged, true);
            triggerWrite();
          }
          else {
            this._validateElement(inputElementId, !hasValueChanged).then(() => { triggerWrite() });
          }
        } else {
          triggerWrite();
        }
      }
    },

    /**
     * cleans the bcdInvalid attribute
     * @private
     */
    _invalidModelNodeReset: function(modelId, xPath){
      var node = bcdui.factory.objectRegistry.getObject(modelId).dataDoc.selectSingleNode(xPath);
      if(node != null){
        // is ATTRIBUTE
        if(node.nodeType == 2){
          node = bcdui.util.xml.getParentNode(node);
        }
        node.removeAttribute("bcdInvalid");
      }
    },

    /**
     * writes newValue into bound model, DOES NOT VALIDATE! params:
     *
     * - inputElementId
     * - value
     * - isValid (optional)
     *
     * is -isValid is set to FALSE, the targetNode is tagged with bcdInvalid attribute if set to TRUE the attribute is removed,
     * in case it is unset - there is no effect on that attribute
     *
     * @return {boolean} true in case the target document was changed
     *
     * @private
     */
    _writeDataToXML: function(params){
      bcdui.log.isTraceEnabled() && bcdui.log.trace("_writeDataToXML");
      var el = bcdui._migPjs._$(params.inputElementId);
      var args = el.data("_args_");
      var config = el.data("_config_");
      bcdui.log.isTraceEnabled() && bcdui.log.trace("bcdui.bcduiInputNg._writeDataToXML: writing data...");
      // tag that we're writing data ourself so that XMLUpdateListener
      // ignores and does not propagate this update.
      // the listener resets this flag on its own once it is run
      el._writingData=true;
      var result = bcdui.widget._copyDataFromHTMLElementToTargetModel(
          bcdui.factory.objectRegistry.getObject(config.target.modelId),
          config.target.xPath,
          params.value,
          args.keepEmptyValueExpression,
          false,
          function(modelId, xPath){
            this._invalidModelNodeReset(modelId, xPath);
          }.bind(this,config.target.modelId, config.target.xPath)
      );
      bcdui.log.isTraceEnabled() && bcdui.log.trace("bcdui.widgetNg.input._writeDataToXML: ...data written");
      el.trigger(bcdui.widget.events.writeValueToModel);
      return result;
    },

    /**
     * creates and returns reset control element
     *
     * @private
     */
    _createResetControl: function(){
      return jQuery("<span>[ X ]</span>");
    },

    /**
     * clears the value
     *
     * @private
     */
    _clearValue: function(inputElementId){
      bcdui.log.isTraceEnabled() && bcdui.log.trace("_clearValue(gui)");
      bcdui._migPjs._$(inputElementId).get(0).value="";
      this.updateValue(inputElementId);
    },

    /**
     * @private
     */
    _destroy: function() {
      this._super();
      // actually confusing but listeners check this status to stop
      this.isDestroyed = true;
      var htmlElementId = this.options.id;
      var el = bcdui._migPjs._$(htmlElementId);

      // ## move on with prototypeJS tidy up ##
      if(el.length > 0){
        el.off();
        el.data("_args_",   null);
        el.data("_config_", null);
        this.element.data("_config_", null);
      }
    }
  });
}());

/*
 * TODO convenience init adapter since generateWidgetApi.xslt currrently generates
 * bootstrap code like bcdui.widgetNg.button.init(targetHtmlElement), we have to change
 * it to jQuery Widget init style
 */

/**
 * A namespace for the BCD-UI input widget. For creation @see {@link bcdui.widgetNg.createInput}
 * @namespace bcdui.widgetNg.input
 */
bcdui.widgetNg.input = Object.assign(bcdui.widgetNg.input,
/** @lends bcdui.widgetNg.input */
{
  /**
   * @private
   */
  init: function(htmlElement){
    bcdui.log.isTraceEnabled() && bcdui.log.trace("bcdui input widget adapter init");
    jQuery(htmlElement).bcduiInputNg();
  },

  /**
   * @param {string} id targetHtml of widget
   * @param {function} callback to be called with generated caption
   * @return {string} NavPath information via callback for widget
   */
  getNavPath: function(id, callback) {
    var e = jQuery.bcdFindById(id).get(0);
    if (e) {
      bcdui.widget._getCaptionFromWidgetElement(e, function(value) {
        callback(id, value);
      });
      return;
    }
    callback(id, "");
  }
});


text: Albquerque Voting Locations


text:
import { getToken } from '../actions/authTokenActions';

class UploadApi {
    static uploadFile(file) {
        let data = new FormData()
        data.append('file', file)
        return new Promise((resolve) => {
            fetch('http://localhost:3000/api/uploads', {
                method: 'post',
                headers: {
                    'Authorization': 'Bearer ' + getToken()
                },
                body: data
            }).then(function (response) {
                resolve(response)
            }).catch(function (error) {
                console.log('Request failed', error);
            });
        });
    }
}

export default UploadApi;


text:
<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),
            new Symfony\Bundle\MonologBundle\MonologBundle(),
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
            new Symfony\Bundle\AsseticBundle\AsseticBundle(),
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
            // Integrate Bootstrap 3.0.*
            new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle(),
            // Sonata dependencies and storage
            new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
            new Sonata\CoreBundle\SonataCoreBundle(),
            new Sonata\BlockBundle\SonataBlockBundle(),
            new Sonata\jQueryBundle\SonatajQueryBundle(),
            new Knp\Bundle\MenuBundle\KnpMenuBundle(),
            new Sonata\AdminBundle\SonataAdminBundle(),
            new Sonata\IntlBundle\SonataIntlBundle(),
            // DataFixtures
            new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
            // JSRouting to enable using route in javascript
            new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
            new Enstb\Bundle\VisplatBundle\EnstbVisplatBundle(),
            new Enstb\Bundle\DataManagementBundle\EnstbDataManagementBundle(),
        );

        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
            $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
        }

        return $bundles;
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
    }
}


text:
<?xml version="1.0"?>

<!DOCTYPE document [
  <!ENTITY project SYSTEM "project.xml">
]>
<document url="cluster-listener.html">

  &project;

  <properties>
    <author email="fhanik@apache.org">Filip Hanik</author>
    <title>The ClusterListener object</title>
  </properties>

<toc/>

    The org.apache.catalina.ha.ClusterListener base class
    lets you listen in on messages that are received by the Cluster component.

   When using the DeltaManager, the messages are received by the Cluster object and are propagated to the
   to the manager through this listener.

   Listens for session Id changes. This listener is only used if you are using mod_jk
   along with the jvmRoute attribute where the session Id can change.
   In the event of a change, the JvmRouteBinderValve will broadcast the
   session change and it will get picked up by this listener.

  <subsection name="Common Attributes">

  <attributes>

    <attribute name="className" required="true">

    </attribute>

  </attributes>

  </subsection>

</document>


text:
using System;
using System.Web.Mvc;
using DotNet;

namespace Refiddle.Controllers
{
	public class RegexController : Controller
	{
		[HttpPost]
		[ValidateInput(false)]
		public object Evaluate( string pattern, string corpus_text )
		{
			var fiddleRunner = new FiddleRunner();
			object result;
			try
			{
				var data = fiddleRunner.Match( pattern, corpus_text );
				result = base.Json( data, JsonRequestBehavior.AllowGet );
			}
			catch( Exception ex )
			{
				result = base.Json( new {
				                        	error = ex.Message
				                        }, JsonRequestBehavior.AllowGet );
			}
			return result;
		}

		[HttpPost]
		[ValidateInput(false)]
		public object Replace( string pattern, string corpus_text, string replace_text )
		{
			var fiddleRunner = new FiddleRunner();
			object result;
			try
			{
				var data = fiddleRunner.Replace( pattern, corpus_text, replace_text );
				result = base.Json( data, JsonRequestBehavior.AllowGet );
			}
			catch( Exception ex )
			{
				result = base.Json( new {
				                        	error = ex.Message
				                        }, JsonRequestBehavior.AllowGet );
			}
			return result;
		}
	}
}


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/blue_dark"
    android:orientation="vertical"
    android:layout_alignParentTop="true">

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="textPersonName"
        android:hint="@string/type_name"
        android:ems="10"
        android:id="@+id/username"
        android:layout_gravity="center_horizontal"
        android:background="@drawable/rounded_edges_scop_dark_auto"
        android:layout_margin="20dp"
        android:layout_centerVertical="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:text="@string/initial_text"
        android:id="@+id/initial_text"
        android:textColor="@color/white"
        android:layout_marginBottom="91dp"
        android:layout_above="@+id/username"
        android:layout_centerHorizontal="true" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:text="@string/btn_username"
        android:id="@+id/btn_username"
        android:textColor="@color/white"
        android:background="@android:color/transparent"
        android:layout_below="@+id/username"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="54dp" />
</RelativeLayout>


text:
package edu.latrobe.blaze.modules.jvm

import edu.latrobe._
import edu.latrobe.blaze._
import edu.latrobe.blaze.modules._

final class MultiplyValues_JVM_Baseline(override val builder:        MultiplyValuesBuilder,
                                        override val inputHints:     BuildHints,
                                        override val seed:           InstanceSeed,
                                        override val weightBufferBuilder: ValueTensorBufferBuilder)
  extends MultiplyValues_JVM {

  // ---------------------------------------------------------------------------
  //    Forward propagation related.
  // ---------------------------------------------------------------------------
  override protected def doPredictPerValue(output: RealArrayTensor)
  : Unit = {
    // input:  RGB RGB RGB | RGB RGB RGB
    // values: RGB RGB RGB | RGB RGB RGB
    output.foreachSample((off, length) => {
      ArrayEx.multiply(
        output.values, off, 1,
        values,        off, 1,
        length
      )
    })
  }

  override protected def doPredictPerUnit(output: RealArrayTensor)
  : Unit = {
    // input:  RGB RGB RGB | RGB RGB RGB
    // values: RGB RGB RGB
    output.foreachSample((off, length) => {
      ArrayEx.multiply(
        output.values, off, 1,
        values,        0,   1,
        length
      )
    })
  }

  override protected def doPredictPerChannel(output: RealArrayTensor)
  : Unit = {
    // input:  RGB RGB RGB | RGB RGB RGB
    // values: RGB
    output.foreachChannel((off, stride, length) => {
      ArrayEx.multiply(
        output.values, off, stride,
        values(off),
        length
      )
    })
    /*
    val sampleSize = output.layout.size.noValues
    output.foreachSample(offset0 => {
      var off0 = offset0
      val end0 = offset0 + sampleSize
      while (off0 < end0) {
        ArrayEx.multiply(
          output.values, off0, 1,
          values,        0,    1,
          values.length
        )
        off0 += values.length
      }
    })
    */
  }

  override protected def doPredictPerSample(output: RealArrayTensor)
  : Unit = {
    // input:  RGB RGB RGB | RGB RGB RGB
    // values: R           | R
    output.foreachSamplePair((i, off, length) => {
      ArrayEx.multiply(
        output.values, off, 1,
        values(i),
        length
      )
    })
  }

  override protected def doPredictPerBatch(output: RealArrayTensor)
  : Unit = {
    // input:  RGB RGB RGB | RGB RGB RGB
    // values: R
    output *= values(0)
  }

  override protected def doPredictInvPerValue(input: RealArrayTensor)
  : Unit = {
    // output: RGB RGB RGB | RGB RGB RGB
    // values: RGB RGB RGB | RGB RGB RGB
    input.foreachSample((off, length) => {
      ArrayEx.divide(
        input.values, off, 1,
        values,       off, 1,
        length
      )
    })
  }

  override protected def doPredictInvPerUnit(input: RealArrayTensor)
  : Unit = {
    // output: RGB RGB RGB | RGB RGB RGB
    // values: RGB RGB RGB
    input.foreachSample((off, length) => {
      ArrayEx.divide(
        input.values, off, 1,
        values,       0,   1,
        length
      )
    })
  }

  override protected def doPredictInvPerChannel(input: RealArrayTensor)
  : Unit = {
    // output: RGB RGB RGB | RGB RGB RGB
    // values: RGB
    input.foreachChannel((off, stride, length) => {
      ArrayEx.multiply(
        input.values, off, stride,
        Real.one / values(off),
        length
      )
    })
    /*
    val sampleSize = input.layout.size.noValues
    input.foreachSample(offset0 => {
      var off0 = offset0
      val end0 = offset0 + sampleSize
      while (off0 < end0) {
        ArrayEx.divide(
          input.values, off0, 1,
          values, 0, 1,
          values.length
        )
        off0 += values.length
      }
    })
    */
  }

  override protected def doPredictInvPerSample(input: RealArrayTensor)
  : Unit = {
    // output: RGB RGB RGB | RGB RGB RGB
    // values: R           | R
    input.foreachSamplePair((i, off, length) => {
      ArrayEx.multiply(
        input.values, off, 1,
        Real.one / values(i),
        length
      )
    })
  }

  override protected def doPredictInvPerBatch(input: RealArrayTensor)
  : Unit = {
    // output: RGB RGB RGB | RGB RGB RGB
    // bias:   R
    input *= Real.one / values(0)
  }

  // ---------------------------------------------------------------------------
  //    Back propagation related.
  // ---------------------------------------------------------------------------
  override protected def doDeriveInputErrorPerValue(error: RealArrayTensor)
  : Unit = {
    // error:  RGB RGB RGB | RGB RGB RGB
    // values: RGB RGB RGB | RGB RGB RGB
    error.foreachChannel((off, stride, length) => {
      ArrayEx.multiply(
        error.values, off, stride,
        values,       off, stride,
        length
      )
    })
  }

  override protected def doDeriveInputErrorPerUnit(error: RealArrayTensor)
  : Unit = {
    // error:  RGB RGB RGB | RGB RGB RGB
    // values: RGB RGB RGB
    error.foreachSample((off, length) => {
      ArrayEx.multiply(
        error.values, off, 1,
        values,       0,   1,
        length
      )
    })
  }

  override protected def doDeriveInputErrorPerChannel(error: RealArrayTensor)
  : Unit = {
    // error:  RGB RGB RGB | RGB RGB RGB
    // values: RGB
    error.foreachChannel((off, stride, length) => {
      ArrayEx.multiply(
        error.values, off, stride,
        values(off),
        length
      )
    })
    /*
    val sampleSize = error.layout.size.noValues
    error.foreachSample(offset0 => {
      var off0 = offset0
      val end0 = offset0 + sampleSize
      while (off0 < end0) {
        ArrayEx.multiply(
          error.values, off0, 1,
          values,       0,    1,
          values.length
        )
        off0 += values.length
      }
    })
    */
  }

  override protected def doDeriveInputErrorPerSample(error: RealArrayTensor)
  : Unit = {
    // error:  RGB RGB RGB | RGB RGB RGB
    // values: R           | R
    error.foreachSamplePair((i, off, length) => {
      ArrayEx.multiply(
        error.values, off, 1,
        values(i),
        length
      )
    })
  }

  override protected def doDeriveInputErrorPerBatch(error: RealArrayTensor)
  : Unit = {
    // error:  RGB RGB RGB | RGB RGB RGB
    // values: R
    error *= values(0)
  }

}

object MultiplyValues_JVM_Baseline_Description
  extends ModuleVariant_JVM_Description[MultiplyValuesBuilder] {

  override def build(builder:        MultiplyValuesBuilder,
                     hints:          BuildHints,
                     seed:           InstanceSeed,
                     weightsBuilder: ValueTensorBufferBuilder)
  : MultiplyValues_JVM_Baseline = new MultiplyValues_JVM_Baseline(
    builder, hints, seed, weightsBuilder
  )

}


text:
.. _reference_flows:

Reference node chains for EEG processing
----------------------------------------

In order to have a common basis for computation, certain reference processing chains
have been created. You can find the
corresponding files in the documentation under */examples/specs/node_chains/*.
The revision and improvement of the node chains listed below is part of the
ongoing research. The documentation is updated automatically.

P300 Reference Node Chain
^^^^^^^^^^^^^^^^^^^^^^^^^

This is the node chain for the P300 detection:

.. literalinclude:: specs/node_chains/ref_P300_flow.yaml
    :language: yaml

LRP Reference Node Chain
^^^^^^^^^^^^^^^^^^^^^^^^

This is the node chain for LRP detection:

.. literalinclude:: specs/node_chains/ref_LRP_flow.yaml
    :language: yaml


text:
<?php

namespace Nam\Commander\Inflectors;

/**
 * Interface CommandInflector
 *
 * @author  Nam Hoang Luu <nam@mbearvn.com>
 * @package Mbibi\Core\Commands
 *
 */
interface CommandInflector
{
    /**
     * @param $command
     *
     * @return string
     *
     */
    public function getCommandHandler($command);

    /**
     * @param $command
     *
     * @return mixed
     */
    public function getCommandValidator($command);
}


text:
namespace rx
{
class ImplFactory;
class ProgramImpl;
struct TranslatedAttribute;
}

namespace gl
{
struct Caps;
struct Data;
class ResourceManager;
class Shader;
class InfoLog;
class AttributeBindings;
class Buffer;
class Framebuffer;
struct UniformBlock;
struct LinkedUniform;

extern const char * const g_fakepath;

class AttributeBindings
{
  public:
    AttributeBindings();
    ~AttributeBindings();

    void bindAttributeLocation(GLuint index, const char *name);
    int getAttributeBinding(const std::string &name) const;

  private:
    std::set<std::string> mAttributeBinding[MAX_VERTEX_ATTRIBS];
};

class InfoLog : angle::NonCopyable
{
  public:
    InfoLog();
    ~InfoLog();

    size_t getLength() const;
    void getLog(GLsizei bufSize, GLsizei *length, char *infoLog);

    void appendSanitized(const char *message);
    void reset();

    // This helper class ensures we append a newline after writing a line.
    class StreamHelper : angle::NonCopyable
    {
      public:
        StreamHelper(StreamHelper &&rhs)
            : mStream(rhs.mStream)
        {
            rhs.mStream = nullptr;
        }

        StreamHelper &operator=(StreamHelper &&rhs)
        {
            std::swap(mStream, rhs.mStream);
            return *this;
        }

        ~StreamHelper()
        {
            // Write newline when destroyed on the stack
            if (mStream)
            {
                (*mStream) << std::endl;
            }
        }

        template <typename T>
        StreamHelper &operator<<(const T &value)
        {
            (*mStream) << value;
            return *this;
        }

      private:
        friend class InfoLog;

        StreamHelper(std::stringstream *stream)
            : mStream(stream)
        {
            ASSERT(stream);
        }

        std::stringstream *mStream;
    };

    template <typename T>
    StreamHelper operator<<(const T &value)
    {
        StreamHelper helper(&mStream);
        helper << value;
        return helper;
    }

    std::string str() const { return mStream.str(); }

  private:
    std::stringstream mStream;
};

// Struct used for correlating uniforms/elements of uniform arrays to handles
struct VariableLocation
{
    VariableLocation();
    VariableLocation(const std::string &name, unsigned int element, unsigned int index);

    std::string name;
    unsigned int element;
    unsigned int index;
};

struct LinkedVarying
{
    LinkedVarying();
    LinkedVarying(const std::string &name, GLenum type, GLsizei size, const std::string &semanticName,
        unsigned int semanticIndex, unsigned int semanticIndexCount);

    // Original GL name
    std::string name;

    GLenum type;
    GLsizei size;

    // DirectX semantic information
    std::string semanticName;
    unsigned int semanticIndex;
    unsigned int semanticIndexCount;
};

class Program : angle::NonCopyable
{
  public:
    class Data final : angle::NonCopyable
    {
      public:
        Data();
        ~Data();

        const Shader *getAttachedVertexShader() const { return mAttachedVertexShader; }
        const Shader *getAttachedFragmentShader() const { return mAttachedFragmentShader; }
        const std::vector<std::string> &getTransformFeedbackVaryingNames() const
        {
            return mTransformFeedbackVaryingNames;
        }
        GLint getTransformFeedbackBufferMode() const { return mTransformFeedbackBufferMode; }
        GLuint getUniformBlockBinding(GLuint uniformBlockIndex) const
        {
            ASSERT(uniformBlockIndex < IMPLEMENTATION_MAX_COMBINED_SHADER_UNIFORM_BUFFERS);
            return mUniformBlockBindings[uniformBlockIndex];
        }
        const std::vector<sh::Attribute> &getAttributes() const { return mAttributes; }
        const AttributesMask &getActiveAttribLocationsMask() const
        {
            return mActiveAttribLocationsMask;
        }
        const std::map<int, VariableLocation> &getOutputVariables() const
        {
            return mOutputVariables;
        }
        const std::vector<LinkedUniform> &getUniforms() const { return mUniforms; }
        const std::vector<VariableLocation> &getUniformLocations() const
        {
            return mUniformLocations;
        }
        const std::vector<UniformBlock> &getUniformBlocks() const { return mUniformBlocks; }

        const LinkedUniform *getUniformByName(const std::string &name) const;
        GLint getUniformLocation(const std::string &name) const;
        GLuint getUniformIndex(const std::string &name) const;

      private:
        friend class Program;

        Shader *mAttachedFragmentShader;
        Shader *mAttachedVertexShader;

        std::vector<std::string> mTransformFeedbackVaryingNames;
        std::vector<sh::Varying> mTransformFeedbackVaryingVars;
        GLenum mTransformFeedbackBufferMode;

        GLuint mUniformBlockBindings[IMPLEMENTATION_MAX_COMBINED_SHADER_UNIFORM_BUFFERS];

        std::vector<sh::Attribute> mAttributes;
        std::bitset<MAX_VERTEX_ATTRIBS> mActiveAttribLocationsMask;

        // Uniforms are sorted in order:
        //  1. Non-sampler uniforms
        //  2. Sampler uniforms
        //  3. Uniform block uniforms
        // This makes sampler validation easier, since we don't need a separate list.
        std::vector<LinkedUniform> mUniforms;
        std::vector<VariableLocation> mUniformLocations;
        std::vector<UniformBlock> mUniformBlocks;

        // TODO(jmadill): use unordered/hash map when available
        std::map<int, VariableLocation> mOutputVariables;
    };

    Program(rx::ImplFactory *factory, ResourceManager *manager, GLuint handle);
    ~Program();

    GLuint id() const { return mHandle; }

    rx::ProgramImpl *getImplementation() { return mProgram; }
    const rx::ProgramImpl *getImplementation() const { return mProgram; }

    bool attachShader(Shader *shader);
    bool detachShader(Shader *shader);
    int getAttachedShadersCount() const;

    void bindAttributeLocation(GLuint index, const char *name);

    Error link(const gl::Data &data);
    bool isLinked();

    Error loadBinary(GLenum binaryFormat, const void *binary, GLsizei length);
    Error saveBinary(GLenum *binaryFormat, void *binary, GLsizei bufSize, GLsizei *length) const;
    GLint getBinaryLength() const;

    int getInfoLogLength() const;
    void getInfoLog(GLsizei bufSize, GLsizei *length, char *infoLog);
    void getAttachedShaders(GLsizei maxCount, GLsizei *count, GLuint *shaders);

    GLuint getAttributeLocation(const std::string &name);
    bool isAttribLocationActive(size_t attribLocation) const;

    void getActiveAttribute(GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
    GLint getActiveAttributeCount();
    GLint getActiveAttributeMaxLength();
    const std::vector<sh::Attribute> &getAttributes() const { return mData.mAttributes; }

    GLint getFragDataLocation(const std::string &name) const;

    void getActiveUniform(GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
    GLint getActiveUniformCount();
    GLint getActiveUniformMaxLength();
    GLint getActiveUniformi(GLuint index, GLenum pname) const;
    bool isValidUniformLocation(GLint location) const;
    const LinkedUniform &getUniformByLocation(GLint location) const;

    GLint getUniformLocation(const std::string &name) const;
    GLuint getUniformIndex(const std::string &name) const;
    void setUniform1fv(GLint location, GLsizei count, const GLfloat *v);
    void setUniform2fv(GLint location, GLsizei count, const GLfloat *v);
    void setUniform3fv(GLint location, GLsizei count, const GLfloat *v);
    void setUniform4fv(GLint location, GLsizei count, const GLfloat *v);
    void setUniform1iv(GLint location, GLsizei count, const GLint *v);
    void setUniform2iv(GLint location, GLsizei count, const GLint *v);
    void setUniform3iv(GLint location, GLsizei count, const GLint *v);
    void setUniform4iv(GLint location, GLsizei count, const GLint *v);
    void setUniform1uiv(GLint location, GLsizei count, const GLuint *v);
    void setUniform2uiv(GLint location, GLsizei count, const GLuint *v);
    void setUniform3uiv(GLint location, GLsizei count, const GLuint *v);
    void setUniform4uiv(GLint location, GLsizei count, const GLuint *v);
    void setUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
    void setUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
    void setUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
    void setUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
    void setUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
    void setUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
    void setUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
    void setUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
    void setUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);

    void getUniformfv(GLint location, GLfloat *params);
    void getUniformiv(GLint location, GLint *params);
    void getUniformuiv(GLint location, GLuint *params);

    void getActiveUniformBlockName(GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName) const;
    void getActiveUniformBlockiv(GLuint uniformBlockIndex, GLenum pname, GLint *params) const;
    GLuint getActiveUniformBlockCount();
    GLint getActiveUniformBlockMaxLength();

    GLuint getUniformBlockIndex(const std::string &name);

    void bindUniformBlock(GLuint uniformBlockIndex, GLuint uniformBlockBinding);
    GLuint getUniformBlockBinding(GLuint uniformBlockIndex) const;

    const UniformBlock &getUniformBlockByIndex(GLuint index) const;

    void setTransformFeedbackVaryings(GLsizei count, const GLchar *const *varyings, GLenum bufferMode);
    void getTransformFeedbackVarying(GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) const;
    GLsizei getTransformFeedbackVaryingCount() const;
    GLsizei getTransformFeedbackVaryingMaxLength() const;
    GLenum getTransformFeedbackBufferMode() const;

    static bool linkValidateUniforms(InfoLog &infoLog, const std::string &uniformName, const sh::Uniform &vertexUniform, const sh::Uniform &fragmentUniform);
    static bool linkValidateInterfaceBlockFields(InfoLog &infoLog, const std::string &uniformName, const sh::InterfaceBlockField &vertexUniform, const sh::InterfaceBlockField &fragmentUniform);

    void addRef();
    void release();
    unsigned int getRefCount() const;
    void flagForDeletion();
    bool isFlaggedForDeletion() const;

    void validate(const Caps &caps);
    bool validateSamplers(InfoLog *infoLog, const Caps &caps);
    bool isValidated() const;

    const AttributesMask &getActiveAttribLocationsMask() const
    {
        return mData.mActiveAttribLocationsMask;
    }

  private:
    void unlink(bool destroy = false);
    void resetUniformBlockBindings();

    bool linkAttributes(const gl::Data &data,
                        InfoLog &infoLog,
                        const AttributeBindings &attributeBindings,
                        const Shader *vertexShader);
    bool linkUniformBlocks(InfoLog &infoLog, const Caps &caps);
    static bool linkVaryings(InfoLog &infoLog,
                             const Shader *vertexShader,
                             const Shader *fragmentShader);
    bool linkUniforms(gl::InfoLog &infoLog, const gl::Caps &caps);
    void indexUniforms();
    bool areMatchingInterfaceBlocks(gl::InfoLog &infoLog, const sh::InterfaceBlock &vertexInterfaceBlock,
                                    const sh::InterfaceBlock &fragmentInterfaceBlock);

    static bool linkValidateVariablesBase(InfoLog &infoLog,
                                          const std::string &variableName,
                                          const sh::ShaderVariable &vertexVariable,
                                          const sh::ShaderVariable &fragmentVariable,
                                          bool validatePrecision);

    static bool linkValidateVaryings(InfoLog &infoLog, const std::string &varyingName, const sh::Varying &vertexVarying, const sh::Varying &fragmentVarying);
    bool linkValidateTransformFeedback(InfoLog &infoLog,
                                       const std::vector<const sh::Varying *> &linkedVaryings,
                                       const Caps &caps) const;

    void gatherTransformFeedbackVaryings(const std::vector<const sh::Varying *> &varyings);
    bool assignUniformBlockRegister(InfoLog &infoLog, UniformBlock *uniformBlock, GLenum shader, unsigned int registerIndex, const Caps &caps);
    void defineOutputVariables(Shader *fragmentShader);

    std::vector<const sh::Varying *> getMergedVaryings() const;
    void linkOutputVariables();

    bool flattenUniformsAndCheckCaps(const Caps &caps, InfoLog &infoLog);

    struct VectorAndSamplerCount
    {
        VectorAndSamplerCount() : vectorCount(0), samplerCount(0) {}
        VectorAndSamplerCount(const VectorAndSamplerCount &other) = default;
        VectorAndSamplerCount &operator=(const VectorAndSamplerCount &other) = default;

        VectorAndSamplerCount &operator+=(const VectorAndSamplerCount &other)
        {
            vectorCount += other.vectorCount;
            samplerCount += other.samplerCount;
            return *this;
        }

        unsigned int vectorCount;
        unsigned int samplerCount;
    };

    VectorAndSamplerCount flattenUniform(const sh::ShaderVariable &uniform,
                                         const std::string &fullName,
                                         std::vector<LinkedUniform> *samplerUniforms);

    void gatherInterfaceBlockInfo();
    void defineUniformBlock(const sh::InterfaceBlock &interfaceBlock, GLenum shaderType);

    template <typename T>
    void setUniformInternal(GLint location, GLsizei count, const T *v);

    template <size_t cols, size_t rows, typename T>
    void setMatrixUniformInternal(GLint location, GLsizei count, GLboolean transpose, const T *v);

    template <typename DestT>
    void getUniformInternal(GLint location, DestT *dataOut) const;

    Data mData;
    rx::ProgramImpl *mProgram;

    bool mValidated;

    AttributeBindings mAttributeBindings;

    bool mLinked;
    bool mDeleteStatus;   // Flag to indicate that the program can be deleted when no longer in use

    unsigned int mRefCount;

    ResourceManager *mResourceManager;
    const GLuint mHandle;

    InfoLog mInfoLog;

    // Cache for sampler validation
    Optional<bool> mCachedValidateSamplersResult;
    std::vector<GLenum> mTextureUnitTypesCache;
    RangeUI mSamplerUniformRange;
};
}

#endif   // LIBANGLE_PROGRAM_H_


text:
$(document).ready(function() {

decks = $('#carousel')
nextCard = $('.next')
var deckTotal = $("figure").length;
i = 1

rotateYnthCard = 0
for (n = 1; n < deckTotal; n++) {
  figure = $('#carousel a:nth-child(' + n + ')')
  figure.css('transform', 'rotateY(' + rotateYnthCard + 'deg)')
  rotateYnthCard += (360/deckTotal)
  console.log(rotateYnthCard)
}

nextCard.on('click', function(){
  card = $('#carousel a:nth-child(' + i + ')')
  rotateY = card.css('transform')
  card.animate({left: '70%'}, 2000)
  card.css('transform','rotateY(   0deg ) translateZ( 241px )')
  cardReplace = $('#carousel a:nth-child(' + i + ')')
  i += 1
  card = $('#carousel a:nth-child(' + i + ')')
  cardReplace.mouseleave(function(){
    if (i > deckTotal) {
      i = 1
    }
    cardReplace.animate({left: '0%'}, 2000)
    cardReplace.css('transform', rotateY)
  });
});

});


text:
function ConvertTo-JsDate {
    <#
        .SYNOPSIS
            Converts Datetime input to a Java Script date format

        .DESCRIPTION
            This function acceptes date time input and converts to a Java script compatible format.
            Java Script date time format:
                New date (yyyy, MM, dd, HH, mm, ss)

            This is internal function part of ConvertTo-DbaTimeline

        .PARAMETER InputDate

            The InputDate parameter must be a valid datetime type

        .NOTES
            Tags: Internal
            Author: Marcin Gminski (@marcingminski)

            Dependency: None
            Requirements: None

            Website: https://dbatools.io
            Copyright: (c) 2018 by dbatools, licensed under MIT
-           License: MIT https://opensource.org/licenses/MIT

        .LINK
            --internal function, not exposed to end user

        .EXAMPLE
            ConvertTo-JsDate (Get-Date)

            Returned output: new Date(2018, 7, 14, 07, 40, 42)
    #>

    [CmdletBinding()]
    param (
        [Parameter(Mandatory)]
        [datetime]
        $InputDate
    )
    [string]$out = "new Date($(Get-Date $InputDate -format "yyyy"), $($(Get-Date $InputDate -format "MM")-1), $(Get-Date $InputDate -format "dd"), $(Get-Date $InputDate -format "HH"), $(Get-Date $InputDate -format "mm"), $(Get-Date $InputDate -format "ss"))"
    return $out
}


text:
import Controller from "@ember/controller";
import { get, computed } from "@ember/object";
import { run } from "@ember/runloop";

const reFilter = /^\w+$/;

export default Controller.extend({
	filter: "",

	modelFiltered: computed( "model.[]", "all", "filter", function() {
		const filter = get( this, "filter" ).toLowerCase();
		if ( !reFilter.test( filter ) ) {
			return get( this, "model" );
		}

		return get( this, "all" ).filter(function( item ) {
			return get( item, "settings.id" ).toLowerCase().indexOf( filter ) !== -1;
		});
	}),

	actions: {
		erase( modelItem ) {
			const model = get( this, "model" );
			const settingsRecord = get( modelItem, "settings" );
			if ( get( settingsRecord, "isDeleted" ) ) { return; }

			run( () => settingsRecord.destroyRecord() )
				.then( () => {
					model.removeObject( modelItem );
				});
		}
	}
});


text:
FROM node:latest

RUN npm install -g mie00/scaffolder
ENV NODE_PATH=/usr/local/lib/node_modules


text:
Installation
============

We assume you're familiar with `Composer <http://packagist.org>`_, a dependency manager for PHP.
Use the following command to add the bundle to your ``composer.json`` and download the package.

If you have `Composer installed globally <http://getcomposer.org/doc/00-intro.md#globally>`_.

.. code-block:: bash

    $ composer require sylius/resource-bundle

Otherwise you have to download .phar file.

.. code-block:: bash

    $ curl -sS https://getcomposer.org/installer | php
    $ php composer.phar require sylius/resource-bundle

Adding Required Bundles to The Kernel
-------------------------------------

You need to enable the bundle and its dependencies in the kernel:

.. code-block:: php

    <?php

    // app/AppKernel.php

    public function registerBundles()
    {
        $bundles = array(
            new FOS\RestBundle\FOSRestBundle(),
            new JMS\SerializerBundle\JMSSerializerBundle($this),
            new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
            new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
            new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
        );
    }

That's it! Now you can configure your first resource.


text:
var path = require("path");

var FICSClient = require(path.join(__filename, "..", "..", ".."));
var MockSocket = require("./mock_socket");

exports.testSought = function(test) {
  var mockSocket = new MockSocket(test);
  mockSocket.registerFixture("sought");
  mockSocket.registerMessage("sought");

  var fics = new FICSClient();
  var deferredSought = fics.sought().then(function(games) {
    test.equal(41, games.length)

    mockSocket.close();
  });
};