text:
const char* vshaderSrc =
"#version 400\n"
"layout(location = 0) in vec4 inPosition;"
"layout(location = 1) in vec4 inNormal;"
"layout(location = 2) in vec4 inColor;"
"out vec4 color;"
"void main () {"
"  color = inColor;"
"  gl_Position = inPosition;"
"}";

const char* fshaderSrc =
"#version 400\n"
"in vec4 color;"
"out vec4 fragmentColor;"
"void main () {"
"  fragmentColor = color;"
"}";

struct Vec4f
{
	explicit Vec4f(GLfloat initX = 0.0f, GLfloat initY = 0.0f, GLfloat initZ = 0.0f, GLfloat initW = 1.0f) : x(initX), y(initY), z(initZ), w(initW) {
	}
	Vec4f(const Vec4f& ref):x(ref.x), y(ref.y), z(ref.z), w(ref.w) {
	}

	Vec4f& operator =(const Vec4f& ref) {
		x = ref.x;
		y = ref.y;
		z = ref.z;
		w = ref.w;
		return *this;
	}

	bool operator ==(const Vec4f& ref) const {
		return x == ref.x && y == ref.y && z == ref.z && w == ref.w;
	}

	bool operator !=(const Vec4f& ref) const {
		return x != ref.x || y != ref.y || z != ref.z || w != ref.w;
	}

	GLfloat x, y, z, w;
};

struct Vec4d
{
	explicit Vec4d(GLdouble initX = 0.0, GLdouble initY = 0.0, GLdouble initZ = 0.0, GLdouble initW = 1.0) : x(initX), y(initY), z(initZ), w(initW) {
	}
	Vec4d(const Vec4d& ref) :x(ref.x), y(ref.y), z(ref.z), w(ref.w) {
	}

	Vec4d& operator =(const Vec4d& ref) {
		x = ref.x;
		y = ref.y;
		z = ref.z;
		w = ref.w;
		return *this;
	}

	bool operator ==(const Vec4d& ref) const {
		return x == ref.x && y == ref.y && z == ref.z && w == ref.w;
	}

	bool operator !=(const Vec4d& ref) const {
		return x != ref.x || y != ref.y || z != ref.z || w != ref.w;
	}

	GLdouble x, y, z, w;
};

struct Index {
	explicit Index(GLuint initA, GLuint initB, GLuint initC): a(initA), b(initB), c(initC) {
	}
	Index(const Index& ref): a(ref.a), b(ref.b), c(ref.c) {
	}

	Index& operator =(const Index& ref) {
		a = ref.a;
		b = ref.b;
		c = ref.c;
		return *this;
	}

	bool operator ==(const Index& ref) const {
		return a == ref.a && b == ref.b && c == ref.c;
	}

	bool operator !=(const Index& ref) const {
		return a != ref.a || b != ref.b || c != ref.c;
	}

	GLuint a, b, c;
};

struct Vertex {
	explicit Vertex(const Vec4d& initPosition = Vec4d(), const Vec4d& initNormal = Vec4d(), const Vec4d& initColor = Vec4d()) :position(initPosition), normal(initNormal), color(initColor) {
	}
	Vertex(const Vertex& ref):position(ref.position), normal(ref.position), color(ref.color) {
	}

	Vertex& operator =(const Vertex& ref) {
		this->position = ref.position;
		this->normal = ref.normal;
		this->color = ref.color;
		return *this;
	}

	Vec4d position, normal, color;
};

class WorkbenchWindow : public OpenGLWindow
{
	std::string glVender;
	std::string glRenderer;
	std::string glVersion;

	std::vector<Vertex> vertexBuffer;
	std::vector<Index> indexBuffer;

	GLuint vao, vbo, ibo, vshader, gshader, fshader, program;
public:
	explicit WorkbenchWindow(Window* initParent = 0) : OpenGLWindow(initParent)
	{
	}
	~WorkbenchWindow()
	{
	}
protected:
	void initialize()
	{
		glewInit();

		vertexBuffer.push_back(Vertex(Vec4d(0.0, 0.5, 0.0), Vec4d(), Vec4d(1.0, 0.0, 0.0)));
		vertexBuffer.push_back(Vertex(Vec4d(0.5, -0.5, 0.0), Vec4d(), Vec4d(0.0, 1.0, 0.0)));
		vertexBuffer.push_back(Vertex(Vec4d(-0.5, -0.5, 0.0), Vec4d(), Vec4d(0.0, 0.0, 1.0)));

		indexBuffer.push_back(Index(0, 1, 2));

		glVender = reinterpret_cast<const char*>(glGetString(GL_VENDOR));
		glRenderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER));
		glVersion = reinterpret_cast<const char*>(glGetString(GL_VERSION));

		GLenum error = glGetError();

		glGenVertexArrays(1, &vao);
		glGenBuffers(1, &vbo);
		glGenBuffers(1, &ibo);

		error = glGetError();

		glBindBuffer(GL_ARRAY_BUFFER, vbo);
		glBufferData(GL_ARRAY_BUFFER, vertexBuffer.size()*sizeof(Vertex), vertexBuffer.data(), GL_STATIC_DRAW);

		error = glGetError();

		glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo);
		glBufferData(GL_ELEMENT_ARRAY_BUFFER, indexBuffer.size()*sizeof(Index), indexBuffer.data(), GL_STATIC_DRAW);

		error = glGetError();

		glBindVertexArray(vao);

		glEnableVertexAttribArray(0);
		glEnableVertexAttribArray(1);
		glEnableVertexAttribArray(2);

		glBindBuffer(GL_ARRAY_BUFFER, vbo);

		glVertexAttribPointer(0, 4, GL_DOUBLE, GL_FALSE, sizeof(Vertex), reinterpret_cast<GLvoid*>(offsetof(Vertex, position)));
		glVertexAttribPointer(1, 4, GL_DOUBLE, GL_FALSE, sizeof(Vertex), reinterpret_cast<GLvoid*>(offsetof(Vertex, normal)));
		glVertexAttribPointer(2, 4, GL_DOUBLE, GL_FALSE, sizeof(Vertex), reinterpret_cast<GLvoid*>(offsetof(Vertex, color)));

		error = glGetError();

		vshader = glCreateShader(GL_VERTEX_SHADER);
		fshader = glCreateShader(GL_FRAGMENT_SHADER);

		glShaderSource(vshader, 1, &vshaderSrc, NULL);
		glCompileShader(vshader);

		error = glGetError();

		glShaderSource(fshader, 1, &fshaderSrc, NULL);
		glCompileShader(fshader);

		error = glGetError();

		program = glCreateProgram();
		glAttachShader(program, vshader);
		glAttachShader(program, fshader);
		glLinkProgram(program);

		error = glGetError();

		glClearColor(0.0, 0.0, 0.0, 1.0);
		glEnable(GL_DEPTH_TEST);
	}

	void render()
	{
		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
		glUseProgram(program);

		glBindVertexArray(vao);
		glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo);
		glDrawElements(GL_TRIANGLES, indexBuffer.size()*3, GL_UNSIGNED_INT, reinterpret_cast<GLvoid*>(0));

		GLenum error = glGetError();
	}
};

int CALLBACK WinMain(
	_In_  HINSTANCE hInstance,
	_In_  HINSTANCE hPrevInstance,
	_In_  LPSTR lpCmdLine,
	_In_  int nCmdShow
	) {
	Application application;
	WorkbenchWindow window;
	window.show();
	return application.execute();
}


text:
#include "config.h"
#include "AXObjectCache.h"

#if HAVE(ACCESSIBILITY)

#include "AccessibilityObject.h"
#include "AccessibilityRenderObject.h"
#include "Document.h"
#include "Element.h"
#include "HTMLSelectElement.h"
#include "Range.h"
#include "TextIterator.h"
#include "WebKitAccessibleWrapperAtk.h"
#include <wtf/NeverDestroyed.h>
#include <wtf/glib/GRefPtr.h>
#include <wtf/text/CString.h>

namespace WebCore {

void AXObjectCache::detachWrapper(AccessibilityObject* obj, AccessibilityDetachmentType detachmentType)
{
    AtkObject* wrapper = obj->wrapper();
    ASSERT(wrapper);

    // If an object is being detached NOT because of the AXObjectCache being destroyed,
    // then it's being removed from the accessibility tree and we should emit a signal.
    if (detachmentType != CacheDestroyed) {
        if (obj->document()) {
            // Look for the right object to emit the signal from, but using the implementation
            // of atk_object_get_parent from AtkObject class (which uses a cached pointer if set)
            // since the accessibility hierarchy in WebCore will no longer be navigable.
            gpointer webkitAccessibleClass = g_type_class_peek_parent(WEBKIT_ACCESSIBLE_GET_CLASS(wrapper));
            gpointer atkObjectClass = g_type_class_peek_parent(webkitAccessibleClass);
            AtkObject* atkParent = ATK_OBJECT_CLASS(atkObjectClass)->get_parent(ATK_OBJECT(wrapper));

            // We don't want to emit any signal from an object outside WebKit's world.
            if (WEBKIT_IS_ACCESSIBLE(atkParent)) {
                // The accessibility hierarchy is already invalid, so the parent-children relationships
                // in the AccessibilityObject tree are not there anymore, so we can't know the offset.
                g_signal_emit_by_name(atkParent, "children-changed::remove", -1, wrapper);
            }
        }
    }

    webkitAccessibleDetach(WEBKIT_ACCESSIBLE(wrapper));
}

void AXObjectCache::attachWrapper(AccessibilityObject* obj)
{
    AtkObject* atkObj = ATK_OBJECT(webkitAccessibleNew(obj));
    obj->setWrapper(atkObj);
    g_object_unref(atkObj);

    // If an object is being attached and we are not in the middle of a layout update, then
    // we should report ATs by emitting the children-changed::add signal from the parent.
    Document* document = obj->document();
    if (!document || document->childNeedsStyleRecalc())
        return;

    // Don't emit the signal when the actual object being added is not going to be exposed.
    if (obj->accessibilityIsIgnoredByDefault())
        return;

    // Don't emit the signal if the object being added is not -- or not yet -- rendered,
    // which can occur in nested iframes. In these instances we don't want to ignore the
    // child. But if an assistive technology is listening, AT-SPI2 will attempt to create
    // and cache the state set for the child upon emission of the signal. If the object
    // has not yet been rendered, this will result in a crash.
    if (!obj->renderer())
        return;

    // Don't emit the signal for objects whose parents won't be exposed directly.
    AccessibilityObject* coreParent = obj->parentObjectUnignored();
    if (!coreParent || coreParent->accessibilityIsIgnoredByDefault())
        return;

    // Look for the right object to emit the signal from.
    AtkObject* atkParent = coreParent->wrapper();
    if (!atkParent)
        return;

    size_t index = coreParent->children(false).find(obj);
    g_signal_emit_by_name(atkParent, "children-changed::add", index, atkObj);
}

static AccessibilityObject* getListObject(AccessibilityObject* object)
{
    // Only list boxes and menu lists supported so far.
    if (!object->isListBox() && !object->isMenuList())
        return 0;

    // For list boxes the list object is just itself.
    if (object->isListBox())
        return object;

    // For menu lists we need to return the first accessible child,
    // with role MenuListPopupRole, since that's the one holding the list
    // of items with role MenuListOptionRole.
    const AccessibilityObject::AccessibilityChildrenVector& children = object->children();
    if (!children.size())
        return 0;

    AccessibilityObject* listObject = children.at(0).get();
    if (!listObject->isMenuListPopup())
        return 0;

    return listObject;
}

static void notifyChildrenSelectionChange(AccessibilityObject* object)
{
    // This static variables are needed to keep track of the old
    // focused object and its associated list object, as per previous
    // calls to this function, in order to properly decide whether to
    // emit some signals or not.
    static NeverDestroyed<RefPtr<AccessibilityObject>> oldListObject;
    static NeverDestroyed<RefPtr<AccessibilityObject>> oldFocusedObject;

    // Only list boxes and menu lists supported so far.
    if (!object || !(object->isListBox() || object->isMenuList()))
        return;

    // Only support HTML select elements so far (ARIA selectors not supported).
    Node* node = object->node();
    if (!is<HTMLSelectElement>(node))
        return;

    // Emit signal from the listbox's point of view first.
    g_signal_emit_by_name(object->wrapper(), "selection-changed");

    // Find the item where the selection change was triggered from.
    HTMLSelectElement& select = downcast<HTMLSelectElement>(*node);
    int changedItemIndex = select.activeSelectionStartListIndex();

    AccessibilityObject* listObject = getListObject(object);
    if (!listObject) {
        oldListObject.get() = nullptr;
        return;
    }

    const AccessibilityObject::AccessibilityChildrenVector& items = listObject->children();
    if (changedItemIndex < 0 || changedItemIndex >= static_cast<int>(items.size()))
        return;
    AccessibilityObject* item = items.at(changedItemIndex).get();

    // Ensure the current list object is the same than the old one so
    // further comparisons make sense. Otherwise, just reset
    // oldFocusedObject so it won't be taken into account.
    if (oldListObject.get() != listObject)
        oldFocusedObject.get() = nullptr;

    AtkObject* axItem = item ? item->wrapper() : nullptr;
    AtkObject* axOldFocusedObject = oldFocusedObject.get() ? oldFocusedObject.get()->wrapper() : nullptr;

    // Old focused object just lost focus, so emit the events.
    if (axOldFocusedObject && axItem != axOldFocusedObject) {
        g_signal_emit_by_name(axOldFocusedObject, "focus-event", false);
        atk_object_notify_state_change(axOldFocusedObject, ATK_STATE_FOCUSED, false);
    }

    // Emit needed events for the currently (un)selected item.
    if (axItem) {
        bool isSelected = item->isSelected();
        atk_object_notify_state_change(axItem, ATK_STATE_SELECTED, isSelected);
        // When the selection changes in a collapsed widget such as a combo box
        // whose child menu is not showing, that collapsed widget retains focus.
        if (!object->isCollapsed()) {
            g_signal_emit_by_name(axItem, "focus-event", isSelected);
            atk_object_notify_state_change(axItem, ATK_STATE_FOCUSED, isSelected);
        }
    }

    // Update pointers to the previously involved objects.
    oldListObject.get() = listObject;
    oldFocusedObject.get() = item;
}

void AXObjectCache::postPlatformNotification(AccessibilityObject* coreObject, AXNotification notification)
{
    AtkObject* axObject = coreObject->wrapper();
    if (!axObject)
        return;

    switch (notification) {
    case AXCheckedStateChanged:
        if (!coreObject->isCheckboxOrRadio() && !coreObject->isSwitch())
            return;
        atk_object_notify_state_change(axObject, ATK_STATE_CHECKED, coreObject->isChecked());
        break;

    case AXSelectedChildrenChanged:
    case AXMenuListValueChanged:
        // Accessible focus claims should not be made if the associated widget is not focused.
        if (notification == AXMenuListValueChanged && coreObject->isMenuList() && coreObject->isFocused()) {
            g_signal_emit_by_name(axObject, "focus-event", true);
            atk_object_notify_state_change(axObject, ATK_STATE_FOCUSED, true);
        }
        notifyChildrenSelectionChange(coreObject);
        break;

    case AXValueChanged:
        if (ATK_IS_VALUE(axObject)) {
            AtkPropertyValues propertyValues;
            propertyValues.property_name = "accessible-value";

            memset(&propertyValues.new_value,  0, sizeof(GValue));
#if ATK_CHECK_VERSION(2,11,92)
            double value;
            atk_value_get_value_and_text(ATK_VALUE(axObject), &value, nullptr);
            g_value_set_double(g_value_init(&propertyValues.new_value, G_TYPE_DOUBLE), value);
#else
            atk_value_get_current_value(ATK_VALUE(axObject), &propertyValues.new_value);
#endif

            g_signal_emit_by_name(ATK_OBJECT(axObject), "property-change::accessible-value", &propertyValues, NULL);
        }
        break;

    case AXInvalidStatusChanged:
        atk_object_notify_state_change(axObject, ATK_STATE_INVALID_ENTRY, coreObject->invalidStatus() != "false");
        break;

    default:
        break;
    }
}

void AXObjectCache::nodeTextChangePlatformNotification(AccessibilityObject* object, AXTextChange textChange, unsigned offset, const String& text)
{
    if (!object || text.isEmpty())
        return;

    AccessibilityObject* parentObject = object->isNonNativeTextControl() ? object : object->parentObjectUnignored();
    if (!parentObject)
        return;

    AtkObject* wrapper = parentObject->wrapper();
    if (!wrapper || !ATK_IS_TEXT(wrapper))
        return;

    Node* node = object->node();
    if (!node)
        return;

    // Ensure document's layout is up-to-date before using TextIterator.
    Document& document = node->document();
    document.updateLayout();

    // Select the right signal to be emitted
    CString detail;
    switch (textChange) {
    case AXTextInserted:
        detail = "text-insert";
        break;
    case AXTextDeleted:
        detail = "text-remove";
        break;
    case AXTextAttributesChanged:
        detail = "text-attributes-changed";
        break;
    }

    String textToEmit = text;
    unsigned offsetToEmit = offset;

    // If the object we're emitting the signal from represents a
    // password field, we will emit the masked text.
    if (parentObject->isPasswordField()) {
        String maskedText = parentObject->passwordFieldValue();
        textToEmit = maskedText.substring(offset, text.length());
    } else {
        // Consider previous text objects that might be present for
        // the current accessibility object to ensure we emit the
        // right offset (e.g. multiline text areas).
        RefPtr<Range> range = Range::create(document, node->parentNode(), 0, node, 0);
        offsetToEmit = offset + TextIterator::rangeLength(range.get());
    }

    g_signal_emit_by_name(wrapper, detail.data(), offsetToEmit, textToEmit.length(), textToEmit.utf8().data());
}

void AXObjectCache::frameLoadingEventPlatformNotification(AccessibilityObject* object, AXLoadingEvent loadingEvent)
{
    if (!object)
        return;

    AtkObject* axObject = object->wrapper();
    if (!axObject || !ATK_IS_DOCUMENT(axObject))
        return;

    switch (loadingEvent) {
    case AXObjectCache::AXLoadingStarted:
        atk_object_notify_state_change(axObject, ATK_STATE_BUSY, true);
        break;
    case AXObjectCache::AXLoadingReloaded:
        atk_object_notify_state_change(axObject, ATK_STATE_BUSY, true);
        g_signal_emit_by_name(axObject, "reload");
        break;
    case AXObjectCache::AXLoadingFailed:
        g_signal_emit_by_name(axObject, "load-stopped");
        atk_object_notify_state_change(axObject, ATK_STATE_BUSY, false);
        break;
    case AXObjectCache::AXLoadingFinished:
        g_signal_emit_by_name(axObject, "load-complete");
        atk_object_notify_state_change(axObject, ATK_STATE_BUSY, false);
        break;
    }
}

void AXObjectCache::platformHandleFocusedUIElementChanged(Node* oldFocusedNode, Node* newFocusedNode)
{
    RefPtr<AccessibilityObject> oldObject = getOrCreate(oldFocusedNode);
    if (oldObject) {
        g_signal_emit_by_name(oldObject->wrapper(), "focus-event", false);
        atk_object_notify_state_change(oldObject->wrapper(), ATK_STATE_FOCUSED, false);
    }
    RefPtr<AccessibilityObject> newObject = getOrCreate(newFocusedNode);
    if (newObject) {
        g_signal_emit_by_name(newObject->wrapper(), "focus-event", true);
        atk_object_notify_state_change(newObject->wrapper(), ATK_STATE_FOCUSED, true);
    }
}

void AXObjectCache::handleScrolledToAnchor(const Node*)
{
}

} // namespace WebCore

#endif

redpajama_set_name: RedPajamaGithub


text:
layout: page
title: Schick mir eine Mail
permalink: /contact/
---

<div class="py2">
  {% if site.ajaxify_contact_form %}
    <form class="form-stacked">
      <input type="text" name="email" class="field-light" placeholder="Deine Email Addresse">
      <textarea type="text" name="content" class="field-light" rows="5" placeholder="Was würdest Du gerne sagen?"></textarea>
      <input type="hidden" name="_subject" value="New submission!" />
      <input type="text" name="_gotcha" style="display:none" />
      <button type='submit' class="button button-blue button-big mobile-block">Absenden</button>
    </form>
  {% else %}
    <form action="https://formspree.io/{{ site.email }}" method="POST" class="form-stacked">
      <input type="text" name="email" class="field-light" placeholder="Deine Email Addresse">
      <textarea type="text" name="content" class="field-light" rows="5" placeholder="Was würdest Du gerne sagen?"></textarea>
      <input type="hidden" name="_next" value="{{ site.baseurl }}/thanks/" />
      <input type="hidden" name="_subject" value="New submission!" />
      <input type="text" name="_gotcha" style="display:none" />
      <input type="submit" class="button button-blue button-big mobile-block" value="Absenden">
    </form>
  {% endif %}
</div>

{% if site.ajaxify_contact_form %}
  {% include ajaxify_content_form.html %}
{% endif %}


text:
Okada is an *work in progress* to try to implement a Game Boy emulator in Ruby.

I was inspired listening to "[The Ultimate Game Boy Talk](https://media.ccc.de/v/33c3-8029-the_ultimate_game_boy_talk)" by Michael Steil.

Checkout the [Game Boy Opcodes](https://github.com/lmmendes/game-boy-opcodes) repository if you are searching for an automated way to obtain the GameBoy opcodes.

NOTE: Work in progress this code doesn't run yet.

# Tasks

- [ ] Cartridge
  - [ ] Support other cartridge types (other than 0x00h / 08h / 09h)
- [ ] MMU
- [ ] CPU
  - [ ] Flags
  - [ ] Opcodes
  - [ ] Interrupts
- [ ] Input
- [ ] Sound
- [ ] Video
 - [ ] SDL / r2d

## Reference documentation

- http://gameboy.mongenel.com/dmg/lesson1.html
- http://gbdev.gg8.se/files/
- https://media.ccc.de/v/33c3-8029-the_ultimate_game_boy_talk
- http://gbdev.gg8.se/wiki/articles/The_Cartridge_Header#014D_-_Header_Checksum
- https://realboyemulator.files.wordpress.com/2013/01/gbcpuman.pdf
- http://imrannazar.com/GameBoy-Emulation-in-JavaScript:-The-CPU
- http://www.pastraiser.com/cpu/gameboy/gameboy_opcodes.html
- https://realboyemulator.wordpress.com/2013/01/03/a-look-at-the-game-boy-bootstrap-let-the-fun-begin/
- http://gameboy.mongenel.com/dmg/gbc_memorymap.txt
- http://gbdev.gg8.se/wiki/articles/Gameboy_Bootstrap_ROM
- https://calleerlandsson.com/rubys-bitwise-operators/
- http://problemkaputt.de/pandocs.htm#cpuregistersandflags
- http://www.pastraiser.com/cpu/gameboy/gameboy_opcodes.html
- http://problemkaputt.de/gmb.htm#DOWNLOAD
- https://cturt.github.io/cinoop.html
- https://emu-docs.org/?page=Game%20Boy
- https://www.scribd.com/doc/94546/Study-of-the-techniques-for-emulation-programming-by-Victor-Moya-del-Barrio
- http://gbdev.gg8.se/wiki/articles/Memory_Map
- http://www.codeslinger.co.uk/pages/projects/gameboy/dma.html
- http://www.hardwarebook.info/Game_Boy_Link
- https://github.com/avivace/awesome-gbdev

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/lmmendes/okada. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).


text:
/*
 * Internal utilities for models
 */
var crypto = require('crypto');
var assert = require('assert');

/**
 * Get the model class
 * @param {Function} cls The sub class
 * @param {Function} base The base class
 * @returns {Function} The resolved class
 */
function getModel(cls, base) {
  if (!cls) {
    return base;
  }
  return (cls.prototype instanceof base)? cls: base;
}

/**
 * Generate a key
 * @param {String} hmacKey The hmac key, default to 'loopback'
 * @param {String} algorithm The algorithm, default to 'sha1'
 * @param {String} encoding The string encoding, default to 'hex'
 * @returns {String} The generated key
 */
function generateKey(hmacKey, algorithm, encoding) {
  assert(hmacKey, 'HMAC key is required');
  algorithm = algorithm || 'sha1';
  encoding = encoding || 'hex';
  var hmac = crypto.createHmac(algorithm, hmacKey);
  var buf = crypto.randomBytes(32);
  hmac.update(buf);
  var key = hmac.digest(encoding);
  return key;
}

var querystring = require('querystring');

function gravatar (email, parameters) {
    var baseUrl = '//gravatar.com/avatar/';
    var result = "";
    var convertedQueryString = querystring.stringify(parameters);

    if (convertedQueryString !== ""){
        result = "?" + convertedQueryString;
    }

    return baseUrl + crypto.createHash('md5').update(email.toLowerCase().trim()).digest('hex') + result;
}

exports.gravatar = gravatar;
exports.getModel = getModel;
exports.generateKey = generateKey;


text:
<?xml version="1.0" encoding="UTF-8"?>

		<item value="1025" key="dialogWidth"/>
		<item value="525" key="dialogHeight"/>
		<list key="orderedProviders">
		</list>
		<list key="textArray">
		</list>
		<list key="orderedElements">
		</list>
		<list key="textEntries">
		</list>

		<item value="8" key="DIALOG_Y_ORIGIN"/>
		<item value="374" key="DIALOG_X_ORIGIN"/>


text:
// Template Source: BaseMethodParameterSet.java.tt
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All Rights Reserved.  Licensed under the MIT License.  See License in the project root for license information.
// ------------------------------------------------------------------------------

package com.microsoft.graph.models;

import com.microsoft.graph.models.WorkbookFunctionResult;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.gson.JsonObject;
import java.util.EnumSet;
import java.util.ArrayList;

// **NOTE** This file was generated by a tool and any changes will be overwritten.

/**
 * The class for the Workbook Functions Standardize Parameter Set.
 */
public class WorkbookFunctionsStandardizeParameterSet {
    /**
     * The x.
     *
     */
    @SerializedName(value = "x", alternate = {"X"})
    @Expose
	@Nullable
    public com.google.gson.JsonElement x;

    /**
     * The mean.
     *
     */
    @SerializedName(value = "mean", alternate = {"Mean"})
    @Expose
	@Nullable
    public com.google.gson.JsonElement mean;

    /**
     * The standard Dev.
     *
     */
    @SerializedName(value = "standardDev", alternate = {"StandardDev"})
    @Expose
	@Nullable
    public com.google.gson.JsonElement standardDev;

    /**
     * Instiaciates a new WorkbookFunctionsStandardizeParameterSet
     */
    public WorkbookFunctionsStandardizeParameterSet() {}
    /**
     * Instiaciates a new WorkbookFunctionsStandardizeParameterSet
     * @param builder builder bearing the parameters to initialize from
     */
    protected WorkbookFunctionsStandardizeParameterSet(@Nonnull final WorkbookFunctionsStandardizeParameterSetBuilder builder) {
        this.x = builder.x;
        this.mean = builder.mean;
        this.standardDev = builder.standardDev;
    }
    /**
     * Gets a new builder for the body
     * @return a new builder
     */
    @Nonnull
    public static WorkbookFunctionsStandardizeParameterSetBuilder newBuilder() {
        return new WorkbookFunctionsStandardizeParameterSetBuilder();
    }
    /**
     * Fluent builder for the WorkbookFunctionsStandardizeParameterSet
     */
    public static final class WorkbookFunctionsStandardizeParameterSetBuilder {
        /**
         * The x parameter value
         */
        @Nullable
        protected com.google.gson.JsonElement x;
        /**
         * Sets the X
         * @param val the value to set it to
         * @return the current builder object
         */
        @Nonnull
        public WorkbookFunctionsStandardizeParameterSetBuilder withX(@Nullable final com.google.gson.JsonElement val) {
            this.x = val;
            return this;
        }
        /**
         * The mean parameter value
         */
        @Nullable
        protected com.google.gson.JsonElement mean;
        /**
         * Sets the Mean
         * @param val the value to set it to
         * @return the current builder object
         */
        @Nonnull
        public WorkbookFunctionsStandardizeParameterSetBuilder withMean(@Nullable final com.google.gson.JsonElement val) {
            this.mean = val;
            return this;
        }
        /**
         * The standardDev parameter value
         */
        @Nullable
        protected com.google.gson.JsonElement standardDev;
        /**
         * Sets the StandardDev
         * @param val the value to set it to
         * @return the current builder object
         */
        @Nonnull
        public WorkbookFunctionsStandardizeParameterSetBuilder withStandardDev(@Nullable final com.google.gson.JsonElement val) {
            this.standardDev = val;
            return this;
        }
        /**
         * Instanciates a new WorkbookFunctionsStandardizeParameterSetBuilder
         */
        @Nullable
        protected WorkbookFunctionsStandardizeParameterSetBuilder(){}
        /**
         * Buils the resulting body object to be passed to the request
         * @return the body object to pass to the request
         */
        @Nonnull
        public WorkbookFunctionsStandardizeParameterSet build() {
            return new WorkbookFunctionsStandardizeParameterSet(this);
        }
    }
    /**
     * Gets the functions options from the properties that have been set
     * @return a list of function options for the request
     */
    @Nonnull
    public java.util.List<com.microsoft.graph.options.FunctionOption> getFunctionOptions() {
        final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>();
        if(this.x != null) {
            result.add(new com.microsoft.graph.options.FunctionOption("x", x));
        }
        if(this.mean != null) {
            result.add(new com.microsoft.graph.options.FunctionOption("mean", mean));
        }
        if(this.standardDev != null) {
            result.add(new com.microsoft.graph.options.FunctionOption("standardDev", standardDev));
        }
        return result;
    }
}


text:
type: post110
title:  The Space Interface
categories: XAP110NET
weight: 500
parent: none
---

In this section we will show you how to create and configure a Space and how to interact with it with the Space API.

<br>

{{%fpanel%}}

[Overview](./the-gigaspace-interface.html){{<wbr>}}
A Space is a logical in-memory service, which can store entries of information.

[Configuration](./the-space-configuration.html){{<wbr>}}
Describes the Space URL and properties to configure a Space

[Operations](./the-space-operations.html){{<wbr>}}
Describes the basic XAP API for interacting with the space

[Change API](./change-api-overview.html){{<wbr>}}
This page covers the Change API, its usage and behavior.

[Counters](./the-space-counters.html){{<wbr>}}
Real Time atomic counter using the XAP.change API

[Aggregators](./aggregators.html){{<wbr>}}
XAP provides the common functionality to perform aggregations across the Space.

[Notifications](./the-space-notifications.html){{<wbr>}}
Space notifications

[Lease Time](./leases-automatic-expiration.html){{<wbr>}}
Lease basics and explains how Leases can be managed.

[Filters](./the-space-filters.html){{<wbr>}}
Space Filters are interceptors inside the GigaSpaces space engine.

{{%/fpanel%}}


text:
.thumbnail > img,
.thumbnail a > img,
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
  display: block;
  max-width: 100%;
  height: auto;
}
.btn-group-lg > .btn {
  padding: 18px 27px;
  font-size: 17px;
  line-height: 1.33;
  border-radius: 6px;
}
.btn-group-sm > .btn {
  padding: 6px 9px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 3px;
}
.btn-group-xs > .btn {
  padding: 1px 5px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 3px;
}
.dl-horizontal dd:before,
.dl-horizontal dd:after,
.container:before,
.container:after,
.container-fluid:before,
.container-fluid:after,
.row:before,
.row:after,
.form-horizontal .form-group:before,
.form-horizontal .form-group:after,
.btn-toolbar:before,
.btn-toolbar:after,
.btn-group-vertical > .btn-group:before,
.btn-group-vertical > .btn-group:after,
.nav:before,
.nav:after,
.navbar:before,
.navbar:after,
.navbar-header:before,
.navbar-header:after,
.navbar-collapse:before,
.navbar-collapse:after,
.pager:before,
.pager:after,
.panel-body:before,
.panel-body:after,
.modal-footer:before,
.modal-footer:after,
.config:before,
.config:after {
  content: " ";
  display: table;
}
.dl-horizontal dd:after,
.container:after,
.container-fluid:after,
.row:after,
.form-horizontal .form-group:after,
.btn-toolbar:after,
.btn-group-vertical > .btn-group:after,
.nav:after,
.navbar:after,
.navbar-header:after,
.navbar-collapse:after,
.pager:after,
.panel-body:after,
.modal-footer:after,
.config:after {
  clear: both;
}
.vis-wizard h1 {
  margin-top: 45px;
}
.wizard-vis-type {
  position: relative;
  display: block;
  padding: 10px 15px;
  margin-bottom: -1px;
  background-color: #ffffff;
  border: 1px solid #dddddd;
}
.wizard-vis-type:first-child {
  border-top-right-radius: 4px;
  border-top-left-radius: 4px;
}
.wizard-vis-type:last-child {
  margin-bottom: 0;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 4px;
}
.wizard-vis-type.disabled,
.wizard-vis-type.disabled:hover,
.wizard-vis-type.disabled:focus {
  background-color: #ecf0f1;
  color: #b4bcc2;
  cursor: not-allowed;
}
.wizard-vis-type.disabled .list-group-item-heading,
.wizard-vis-type.disabled:hover .list-group-item-heading,
.wizard-vis-type.disabled:focus .list-group-item-heading {
  color: inherit;
}
.wizard-vis-type.disabled .list-group-item-text,
.wizard-vis-type.disabled:hover .list-group-item-text,
.wizard-vis-type.disabled:focus .list-group-item-text {
  color: #b4bcc2;
}
.wizard-vis-type.active,
.wizard-vis-type.active:hover,
.wizard-vis-type.active:focus {
  z-index: 2;
  color: #444444;
  background-color: #444444;
  border-color: #444444;
}
.wizard-vis-type.active .list-group-item-heading,
.wizard-vis-type.active:hover .list-group-item-heading,
.wizard-vis-type.active:focus .list-group-item-heading,
.wizard-vis-type.active .list-group-item-heading > small,
.wizard-vis-type.active:hover .list-group-item-heading > small,
.wizard-vis-type.active:focus .list-group-item-heading > small,
.wizard-vis-type.active .list-group-item-heading > .small,
.wizard-vis-type.active:hover .list-group-item-heading > .small,
.wizard-vis-type.active:focus .list-group-item-heading > .small {
  color: inherit;
}
.wizard-vis-type.active .list-group-item-text,
.wizard-vis-type.active:hover .list-group-item-text,
.wizard-vis-type.active:focus .list-group-item-text {
  color: #aaaaaa;
}
.wizard-vis-type.active {
  font-weight: bold;
  background-color: #ecf0f1;
}
.wizard-vis-type:hover {
  background-color: #ecf0f1;
}
.wizard-vis-type li {
  list-style: none;
  color: #1f6b7a;
}
@media (min-width: 992px) {
  .wizard-vis-type {
    display: -webkit-box;
    display: -moz-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -moz-box-align: start;
    -webkit-align-items: flex-start;
    -ms-flex-align: start;
    align-items: flex-start;
  }
}
.wizard-vis-type-heading {
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 0 200px;
  -ms-flex: 0 0 200px;
  flex: 0 0 200px;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -moz-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  font-size: 1.2em;
}
.wizard-vis-type-heading .fa {
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 0 auto;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-right: 15px;
  font-size: 1.5em;
  width: 1em;
  text-align: center;
}
.wizard-vis-type-heading h4 {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 0 auto;
  -ms-flex: 1 0 auto;
  flex: 1 0 auto;
}
.wizard-vis-type-description {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  color: #444444;
}
.visualize-info {
  align-self: flex-end;
}
.visualize-info-tab {
  background-color: #ecf0f1;
  padding: 5px 10px;
  margin-left: 15px;
  border-bottom-left-radius: 4px;
  text-align: right;
  font-weight: bold;
}
.vis-editor {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}
.vis-editor > * {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.vis-editor navbar .bitty-modal-container {
  position: relative;
}
.vis-editor navbar .bitty-modal-container .bitty-modal {
  position: absolute;
  cursor: pointer;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  z-index: 10;
  background: rgba(101, 106, 118, 0.9);
  color: white;
  text-align: center;
  padding-top: 6px;
  padding-left: 20px;
  padding-right: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.vis-editor navbar .bitty-modal-container a {
  color: white;
}
.vis-editor-content {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}
.vis-editor-content > * {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
@media (min-width: 992px) {
  .vis-editor-content {
    -webkit-box-direction: normal;
    -moz-box-direction: normal;
    -webkit-box-orient: horizontal;
    -moz-box-orient: horizontal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
  }
}
.vis-editor-sidebar {
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 0 auto;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}
.vis-editor-sidebar > * {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
@media (min-width: 992px) {
  .vis-editor-sidebar {
    -webkit-flex-basis: 16.666666666666668%;
    flex-basis: 16.666666666666668%;
    min-width: 350px;
    max-width: 350px;
  }
}
.vis-editor-sidebar .sidebar-item {
  border-top: 0 !important;
}
.vis-editor-sidebar .sidebar-container {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  background-color: #ffffff;
  border-right-color: #ecf0f1;
}
.vis-editor-sidebar .sidebar-container > * {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.vis-editor-sidebar .sidebar-container form {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}
.vis-editor-sidebar .sidebar-container form > * {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.vis-editor-sidebar .sidebar-container form > ul {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  overflow-y: auto;
}
.vis-editor-sidebar .sidebar-container form > .vis-edit-sidebar-buttons {
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 0 auto;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}
.vis-editor-sidebar .sidebar-item-title {
  background: #ecf0f1;
}
.vis-editor-sidebar .sidebar-item-title:hover {
  color: #444444 !important;
  background-color: #ecf0f1 !important;
}
.vis-editor .visualization-options {
  padding: 5px;
}
.vis-editor .visualization-options .form-group {
  margin-bottom: 5px;
}
.vis-editor nesting-indicator {
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 0 auto;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}
.vis-editor nesting-indicator > span {
  width: 8px;
  background-color: #31c471;
}
.vis-editor-agg {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  padding: 5px;
  border-bottom: 1px solid #ecf0f1;
}
.vis-editor-agg > * {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.vis-editor-agg-wrapper {
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}
.vis-editor-agg-group {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  color: #444444;
}
.vis-editor-agg-group > * {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.vis-editor-agg-header {
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -moz-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 0 auto;
  -ms-flex: 1 0 auto;
  flex: 1 0 auto;
  margin-bottom: 5px;
}
.vis-editor-agg-header-toggle {
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 0 auto;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-right: 5px;
}
.vis-editor-agg-header-subagg-icon {
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 1 auto;
  -ms-flex: 0 1 auto;
  flex: 0 1 auto;
  padding-right: 5px;
}
.vis-editor-agg-header-title {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-weight: bold;
}
.vis-editor-agg-header-description {
  font-weight: normal;
  padding-right: 5px;
}
.vis-editor-agg-header-description.danger {
  color: #ffffff;
  color: #e74c3c;
  font-weight: bold;
}
a.vis-editor-agg-header-description.danger:hover {
  color: #e6e6e6;
}
.vis-editor-agg-header-controls {
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 0 auto;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}
.vis-editor-agg-error {
  margin: 5px 0;
  padding: 5px;
  text-align: center;
  background: #e74c3c;
  color: #ffffff;
}
.vis-editor-agg-editor-ranges td {
  padding: 0 5px 5px 0;
}
.vis-editor-agg-editor-ranges td:last-child {
  padding-right: 0;
}
.vis-editor-agg-editor .regex .flags .docs {
  text-align: right;
}
.vis-editor-agg-editor .regex .flags a {
  color: #1f6b7a;
}
.vis-editor-agg-editor-advanced-toggle {
  text-align: right;
}
.vis-editor-agg-form-row {
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}
.vis-editor-agg-form-row > * {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  margin-right: 5px;
}
.vis-editor-agg-form-row > *:last-child {
  margin-right: 0px;
}
.vis-editor-agg-form-row > .btn {
  -webkit-align-self: center;
  -ms-flex-item-align: center;
  align-self: center;
}
.vis-editor-agg-form-value {
  -webkit-align-self: center;
  -ms-flex-item-align: center;
  align-self: center;
  margin: 0 0 0 5px;
  font-size: 1.2em;
}
.vis-editor-agg-wide-btn {
  -webkit-border-radius: 0;
  -webkit-background-clip: padding-box;
  -moz-border-radius: 0;
  -moz-background-clip: padding;
  border-radius: 0;
  background-clip: padding-box;
}
.vis-editor-agg-add {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}
.vis-editor-agg-add > * {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.vis-editor-agg-add-subagg {
  margin-bottom: -6px;
  margin-right: -5px;
  margin-left: -5px;
}
.vis-editor-agg-add-schemas {
  margin: 15px;
}
.vis-editor-agg-order-agg {
  border: 2px solid #ecf0f1;
  border-radius: 4px;
  margin: 5px;
  padding: 5px;
}
.vis-editor-canvas {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 0 975.3333333333334px;
  -ms-flex: 1 0 975.3333333333334px;
  flex: 1 0 975.3333333333334px;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  overflow: auto;
}
.vis-editor-canvas.embedded {
  -webkit-flex-shrink: 1;
  flex-shrink: 1;
  -webkit-flex-basis: 100%;
  flex-basis: 100%;
}
@media (min-width: 992px) {
  .vis-editor-canvas {
    -webkit-flex-shrink: 1;
    flex-shrink: 1;
    -webkit-flex-basis: 100%;
    flex-basis: 100%;
  }
}
.vis-editor-canvas-title {
  text-align: center;
  margin: 10px 0 0;
}
.vis-editor-canvas visualize {
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 100%;
  -ms-flex: 1 1 100%;
  flex: 1 1 100%;
}
.vis-editor-canvas visualize > * {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.vis-editor-canvas .visualize-chart {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 100%;
  -ms-flex: 1 1 100%;
  flex: 1 1 100%;
  position: relative;
}
vis-editor,
vis-editor-agg-group,
vis-editor-agg,
vis-editor-agg-params,
vis-editor-agg-param,
vis-editor-vis-options {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}
vis-editor > *,
vis-editor-agg-group > *,
vis-editor-agg > *,
vis-editor-agg-params > *,
vis-editor-agg-param > *,
vis-editor-vis-options > * {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
form.vis-share div.form-control {
  height: inherit;
}


text:
'use strict'

const Hapi = require('hapi')

function getServer(config) {
    const server = new Hapi.Server({
        connections: {
            router: {
                stripTrailingSlash: true
            }
        },
        app: {
            config: config
        }
    })

    server.connection({
        host: config.server.host,
        port: config.server.port,
        routes: {
            cors: true
        }
    })

    return server
}

module.exports = getServer


text:
<html>
  <body>
    <p>
        Easy way to load values from .properties files into a JNDI system.
    </p>
</body>
</html>