text:
/*global OpenJsCad */
/*eslint no-console: 0*/

/**
 * Merge deep two objects, simplified version for config
 * @param   {object} dst destionation object
 * @param   {object} src source object
 * @returns {object} modified destination object
 */
function deepMerge(dst, patch) {
  for (var key in patch) {
    // special check for color strings, we'll parse those strings and put into rgba object
    if (
      patch[key] !== undefined && patch[key].constructor && patch[key].constructor === String &&
      dst[key] !== undefined && patch[key].constructor && patch[key].constructor === Object &&
      'r' in dst[key] && 'g' in dst[key] && 'b' in dst[key]
    ) {
      // ok
    } else if (patch[key] !== undefined && patch[key].constructor && patch[key].constructor === Object) {
      dst[key] = dst[key] || {};
      arguments.callee(dst[key], patch[key]);
    } else {
      dst[key] = patch[key];
    }
  }
  return dst;
}

/**
 * Convert legacy options `drawLines`, `drawFaces`, `color` and `bgColor`
 * @param {object} options modern options object
 * @param {object} custom  legacy options object
 */
function applyLegacyOptions(options, custom) {
  console.trace('applyLegacyOptions', options, custom);
  // if ('drawGrid' in custom) options.grid.draw = custom.drawGrid;
  //
  // if ('drawLines' in custom) {
  //   options.solid.lines = custom.drawLines;
  // }
  // if ('drawFaces' in custom) {
  //   options.solid.faces = custom.drawFaces;
  // }
  // if ('color' in custom) {
  //   options.solid.faceColor = {
  //     r: custom.color[0],
  //     g: custom.color[1],
  //     b: custom.color[2],
  //     a: custom.color[3] || 1,
  //   };
  // }
  // if ('bgColor' in custom) {
  //   options.background.color = {
  //     r: custom.bgColor[0],
  //     g: custom.bgColor[1],
  //     b: custom.bgColor[2],
  //     a: custom.bgColor[3] || 1,
  //   };
  // }
}

/**
 * A viewer is a WebGL canvas that lets the user view a mesh.
 * The user can tumble it around by dragging the mouse.
 * @param {DOMElement} containerelement container element
 * @param {object}     size             viewer size
 * @param {object}     options          options for renderer
 */
OpenJsCad.Viewer = function (containerelement, size, customization) {
  // see the various methods below on how to change these
  var options = OpenJsCad.Viewer.defaults();
  deepMerge(options, customization || {});
  // console.log('OpenJsCad.Viewer', options);
  //
  //
  // applyLegacyOptions(options, customization || {});
  //
  var engine;

  // select drawing engine from options
  if (options.engine && OpenJsCad.Viewer[options.engine]) {
    engine = OpenJsCad.Viewer[options.engine];
  }

  // get one of two exising
  if (!engine) {
    engine = OpenJsCad.Viewer.LightGLEngine || OpenJsCad.Viewer.ThreeEngine;
  }

  if (!engine) {
    throw new Error('Cannot find drawing engine, please define one via "engine" option');
  }

  // mixin methods
  for (var method in OpenJsCad.Viewer.prototype) {
    if (!(method in engine.prototype)) {
      engine.prototype[method] = OpenJsCad.Viewer.prototype[method];
    }
  }

  var e = new engine(containerelement, size, options);
  e.init();
  return e;
};

OpenJsCad.Viewer.prototype = {
  parseSizeParams: function () {
    // window.addEventListener('resize', this.handleResize.bind(this));
  },
  resizeCanvas: function (canvas, callback) {
    var container = this.containerEl;
    var w = container.clientWidth;
    var h = container.clientHeight;
    // set style and element width/height different if
    // the devicePixelRatio is not 1.  See https://www.khronos.org/webgl/wiki/HandlingHighDPI
    var devicePixelRatio = window.devicePixelRatio || 1;
    canvas.style.width = w + 'px';
    canvas.style.height = h + 'px';
    canvas.width = w * devicePixelRatio;
    canvas.height = h * devicePixelRatio;
    if (callback) callback();
  },

  setCameraOptions: function (options) {
    options = options || {};
    // apply all options found
    for (var x in this.options.camera) {
      if (x in options) this.options.camera[x] = options[x];
    }
  },

  setGridOptions: function (options) {
    options = options || {};
    // apply all options found
    for (var x in this.options.grid) {
      if (x in options) this.options.grid[x] = options[x];
    }
  },

  setAxesOptions: function (options) {
    options = options || {};
    // apply all options found
    for (var x in this.options.axes) {
      if (x in options) this.options.axes[x] = options[x];
    }
  },

  setSolidOptions: function (options) {
    options = options || {};
    // apply all options found
    for (var x in this.options.solid) {
      if (x in options) this.options.solid[x] = options[x];
    }
  },
};

/**
 * return defaults which can be mutated later
 * @returns {object} [[Description]]
 */
OpenJsCad.Viewer.defaults = function () {
  return {
    camera: {
      fov: 45, // field of view
      angle: {
        x: -60,
        y: 0,
        z: -45
      }, // view angle about XYZ axis
      position: {
        x: 0,
        y: 0,
        z: 100
      }, // initial position at XYZ
      clip: {
        min: 0.5,
        max: 1000
      }, // rendering outside this range is clipped
    },
    grid: {
      draw: true, // draw or not
      size: 200, // plate size (X and Y)
      // minor grid settings
      m: {
        i: 1, // number of units between minor grid lines
        color: {
          r: .8,
          g: .8,
          b: .8,
          a: .5
        }, // color
      },
      // major grid settings
      M: {
        i: 10, // number of units between major grid lines
        color: {
          r: .5,
          g: .5,
          b: .5,
          a: .5
        }, // color
      },
    },
    axes: {
      draw: true, // draw or not
      x: {
        neg: {
          r: 1.,
          g: .5,
          b: .5,
          a: .5
        }, // color in negative direction
        pos: {
          r: 1.,
          g: 0,
          b: 0,
          a: .8
        }, // color in positive direction
      },
      y: {
        neg: {
          r: .5,
          g: 1.,
          b: .5,
          a: .5
        }, // color in negative direction
        pos: {
          r: 0,
          g: 1.,
          b: 0,
          a: .8
        }, // color in positive direction
      },
      z: {
        neg: {
          r: .5,
          g: .5,
          b: 1.,
          a: .5
        }, // color in negative direction
        pos: {
          r: 0,
          g: 0,
          b: 1.,
          a: .8
        }, // color in positive direction
      },
    },
    solid: {
      draw: true, // draw or not
      lines: false, // draw outlines or not
      faces: true,
      overlay: false, // use overlay when drawing lines or not
      smooth: false, // use smoothing or not
      faceColor: {
        r: .1,
        g: .7,
        b: .5,
        a: 1.
      }, // default face color
      lineColor: {
        r: .2,
        g: .2,
        b: .2,
        a: .9
      }, // default line color
    },
    background: {
      color: {
        r: .3,
        g: .3,
        b: .3,
        a: 1.
      }
    }
  };
};


text:
package com.plivo.api.models.powerpack;

import com.plivo.api.models.base.Getter;
import com.plivo.api.models.base.ListResponse;
import com.plivo.api.models.number.PhoneNumber;
import retrofit2.Call;

public class BuyAddNumbers extends Getter<Numbers> {

  private String number;
  private String uuid;
  private String country_Iso2;
  private String service;
  private Boolean rent;

  public BuyAddNumbers(String uuid) {
    super(uuid);
    if (uuid == null) {
      throw new IllegalArgumentException("numberpool uuid cannot be null");
    }
    this.uuid = uuid;
    this.rent = Boolean.TRUE;
  }

  public BuyAddNumbers country_Iso2(String country_Iso2) {
    this.country_Iso2 = country_Iso2;
    return this;
  }

  public BuyAddNumbers rent() {
    this.rent = Boolean.TRUE;
    return this;
  }

  public BuyAddNumbers number(String number) {
    this.number = number;
    return this;
  }

  public BuyAddNumbers service(String service) {
    this.service = service;
    return this;
  }

  @Override
  protected Call<Numbers> obtainCall() {
    if (number == null) {
      try {
        ListResponse<PhoneNumber> numbers = PhoneNumber.lister(country_Iso2).list();
        if (numbers.getObjects().size() > 0) {
          number = numbers.getObjects().get(0).getNumber();
        }
      } catch (Exception e) {
      }
    }
    return client().getApiService().powerpackBuyAddNumberCreate(client().getAuthId(), uuid, number, this);
  }
}

redpajama_set_name: RedPajamaGithub


text:
using System.Net;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Warehouse.Core.Commands;
using static Microsoft.AspNetCore.Http.Results;

namespace Warehouse.Products.RegisteringProduct;

public record RegisterProductRequest(
    string? SKU,
    string? Name,
    string? Description
);

internal static class Route
{
    internal static IEndpointRouteBuilder UseRegisterProductEndpoint(this IEndpointRouteBuilder endpoints)
    {
        endpoints.MapPost("api/products/", async (HttpContext context, RegisterProductRequest request) =>
        {
            var (sku, name, description) = request;
            var productId = Guid.NewGuid();

            var command = RegisterProduct.Create(productId, sku, name, description);

            await context.SendCommand(command);

            return Created($"/api/products/{productId}", productId);
        });

        return endpoints;
    }
}


text:
namespace {

std::unique_ptr<views::Textfield> MakePinTextField(
    views::TextfieldController* controller,
    views::View* label) {
  constexpr int kMinWidthInChars = 6;
  constexpr int kDefaultWidthInChars = 20;
  constexpr int kBottomBorderThickness = 2;

  auto field = std::make_unique<views::Textfield>();
  field->SetTextInputType(ui::TextInputType::TEXT_INPUT_TYPE_PASSWORD);
  field->SetMinimumWidthInChars(kMinWidthInChars);
  field->SetDefaultWidthInChars(kDefaultWidthInChars);
  field->SetBorder(views::CreateSolidSidedBorder(0, 0, kBottomBorderThickness,
                                                 0, gfx::kGoogleBlue500));
  field->set_controller(controller);
  field->SetAssociatedLabel(label);
  return field;
}

}  // namespace

AuthenticatorClientPinEntryView::AuthenticatorClientPinEntryView(
    Delegate* delegate,
    bool show_confirmation_text_field)
    : delegate_(delegate),
      show_confirmation_text_field_(show_confirmation_text_field) {
  views::GridLayout* layout =
      SetLayoutManager(std::make_unique<views::GridLayout>());
  views::ColumnSet* columns = layout->AddColumnSet(0);

  columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING,
                     views::GridLayout::kFixedSize,
                     views::GridLayout::ColumnSize::kUsePreferred, 0, 0);
  columns->AddPaddingColumn(views::GridLayout::kFixedSize, 10);
  columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING,
                     views::GridLayout::kFixedSize,
                     views::GridLayout::ColumnSize::kUsePreferred, 0, 0);

  layout->StartRow(views::GridLayout::kFixedSize, 0);

  auto pin_label = std::make_unique<views::Label>(
      l10n_util::GetStringUTF16(IDS_WEBAUTHN_PIN_ENTRY_PIN_LABEL),
      views::style::CONTEXT_LABEL, views::style::STYLE_PRIMARY);
  pin_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
  pin_label->SetEnabledColor(gfx::kGoogleBlue500);
  auto* pin_label_ptr = layout->AddView(std::move(pin_label));

  views::View* confirmation_label_ptr = nullptr;
  if (show_confirmation_text_field_) {
    auto confirmation_label = std::make_unique<views::Label>(
        l10n_util::GetStringUTF16(IDS_WEBAUTHN_PIN_SETUP_CONFIRMATION_LABEL),
        views::style::CONTEXT_LABEL, views::style::STYLE_PRIMARY);
    confirmation_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
    confirmation_label->SetEnabledColor(gfx::kGoogleBlue500);
    confirmation_label_ptr = confirmation_label.get();
    layout->AddView(std::move(confirmation_label));
  }

  layout->StartRow(views::GridLayout::kFixedSize, 0);

  pin_text_field_ = layout->AddView(MakePinTextField(this, pin_label_ptr));

  if (show_confirmation_text_field_) {
    DCHECK(confirmation_label_ptr);
    auto confirmation_text_field =
        MakePinTextField(this, confirmation_label_ptr);
    confirmation_text_field_ = confirmation_text_field.get();
    layout->AddView(std::move(confirmation_text_field));
  }

  layout->StartRow(views::GridLayout::kFixedSize, 0);
}

AuthenticatorClientPinEntryView::~AuthenticatorClientPinEntryView() = default;

void AuthenticatorClientPinEntryView::RequestFocus() {
  pin_text_field_->RequestFocus();
}

void AuthenticatorClientPinEntryView::ContentsChanged(
    views::Textfield* sender,
    const base::string16& new_contents) {
  DCHECK(sender == pin_text_field_ || sender == confirmation_text_field_);

  if (sender == pin_text_field_) {
    delegate_->OnPincodeChanged(new_contents);
  } else {
    delegate_->OnConfirmationChanged(new_contents);
  }
}

bool AuthenticatorClientPinEntryView::HandleKeyEvent(
    views::Textfield* sender,
    const ui::KeyEvent& key_event) {
  // As WebAuthN UI views do not intercept any key events, the key event must
  // be further processed.
  return false;
}


text:
package at.jku.sea.cloud.rest.server.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;

import at.jku.sea.cloud.exceptions.ToolDoesNotExistException;
import at.jku.sea.cloud.rest.pojo.PojoArtifact;
import at.jku.sea.cloud.rest.pojo.PojoTool;
import at.jku.sea.cloud.rest.server.handler.ToolHandler;

/**
 * @author Dominik Muttenthaler
 * @author Florian Weger
 */
@Controller
@RequestMapping("/designspace/tools")
public class ToolController {

	@Autowired ToolHandler handler;

	@RequestMapping(value = "/id={id}/artifacts", method = RequestMethod.GET)
	public ResponseEntity<PojoArtifact[]> getArtifacts(
			@PathVariable long id)
			throws ToolDoesNotExistException {
		PojoArtifact[] result = handler.getArtifacts(id);
		return new ResponseEntity<PojoArtifact[]>(result, HttpStatus.OK);
	}

	@RequestMapping(value = "", method = RequestMethod.GET)
	public ResponseEntity<PojoTool[]> getTools() {
		PojoTool[] result = handler.getTools();
		return new ResponseEntity<PojoTool[]>(result, HttpStatus.OK);
	}

	@RequestMapping(value = {"", "/func/create"}, method = RequestMethod.POST)
	public ResponseEntity<PojoTool> createTool(@RequestBody PojoTool pojo) {
		PojoTool tool = handler.createTool(pojo);

		HttpHeaders headers = new HttpHeaders();
		headers.set("Content-Location", "./id=" + tool.getId());

		return new ResponseEntity<>(tool, headers, HttpStatus.CREATED);
	}

//	@RequestMapping(value = "/id={id}", method = RequestMethod.PUT)
//	@ResponseStatus(HttpStatus.NO_CONTENT)
//	public void updateTool(@PathVariable long id,
//			@RequestBody PojoTool tool)
//			throws ToolDoesNotExistException {
//		handler.updateTool(tool);
//	}

	@RequestMapping(value = "/id={id}", method = RequestMethod.DELETE)
	@ResponseStatus(HttpStatus.OK)
	public void deleteTool(@PathVariable long id)
			throws ToolDoesNotExistException {
		handler.deleteTool(id);
	}

	@RequestMapping(value = "/id={id}", method = RequestMethod.GET)
	public ResponseEntity<PojoTool> getTool(
			@PathVariable long id)
			throws ToolDoesNotExistException {
		PojoTool result = handler.getTool(id);
		return new ResponseEntity<PojoTool>(result, HttpStatus.OK);
	}

	// ------------------------------------
	// Exception handling
	// ------------------------------------

	@ExceptionHandler(ToolDoesNotExistException.class)
	@ResponseStatus(value = HttpStatus.NOT_FOUND)
	@ResponseBody
	public String handleToolDoesNotExistException() {
		return ToolDoesNotExistException.class.getSimpleName();
	}
}


text:
A draft design for [kube-aws plugins](https://github.com/kubernetes-incubator/kube-aws/issues/509). Plugins are initially defined as additions to a kube-aws generated
cluster that are not part of the core feature set of providing an easy to use, highly available,
best practice cluster on AWS. Plugins can also later be used for built-in functionality to provide a more modular deployment and ability to test.

# Initial Use Cases

1. A user wishes to deploy a component by default to their cluster instances outside of Kubernetes, e.g. a
monitoring agent.
1. A user wishes to deploy a component into their cluster by default that is not part of core
Kubernetes such as cluster wide services, addons, ingress controller or even persistent volumes.
Reasons can vary from company restrictions to always having this component form part of every
cluster. e.g. [the rescheduler](https://github.com/kubernetes-incubator/kube-aws/issues/118)
1. A user wishes to add [customised parts to the CloudFormation template](https://github.com/kubernetes-incubator/kube-aws/issues/96#issuecomment-263835808)
produced by kube-aws. Anything they add would need access to the same parameters and template
engine that already exists.
1. A user wishes to customise existing parts of the CloudFormation template produced by kube-aws
without necessarily having to diff all the files for changes with there sometimes being large
conflicts or huge updates due to kube-aws changes that can be difficult to digest while
being able to merge in the simple changes they need. Examples
[here](https://github.com/kubernetes-incubator/kube-aws/issues/340) and
[here](https://github.com/kubernetes-incubator/kube-aws/issues/338)

# Specific Examples

* Deployment outside of Kubernetes - Dex uses some additional API server parameter, Datadog agent still has more functionality if not using the containerised version
* Deployment to Kubernetes - rescheduler, kube2iam
* Add new parts to CloudFormation - bastion host
* Customisations to existing parts of CloudFormation - IAM roles/groups

# Plugin Principles

1. Plugin functionality should first be added in places where kube-aws needs it most, i.e. where
kube-aws receives more feature requests which do not fit with the core feature set.
1. kube-aws should dogfood the plugins system, i.e. use the plugins system where possible on existing functionality
1. Everything that is pluggable should be kept as modular as possible, from lists of IAM roles to kube API server parameters.
1. Where possible, checks will be added to kube-aws to ensure the integrity of the cluster via validation or disallowing particular changes. e.g. disallow overriding node pool init metadata
   * Note, this could be gradually added rather than forming part of the first implementation
   * Some of this will likely be provided by CloudFormation but kube-aws could possibly replicas the checks to save time for the stack create/update to fail

# Design

## Plugin Types

* Built-in plugins versus ad-hoc user specific plugins
  * Some plugins will be provided by kube-aws and some will be specific to a user
  * Both will use the same mechanisms to hook into kube-aws/deploy etc
  * Both types of plugins will be enabled and configured in the same way
* Built-in plugins versus contrib plugins
  * kube-aws will accept contrib plugins for features considered to be applicable to many users
  * Contrib plugins will be enabled in a similar way but specifically marked as not fully
  battle tested; they will still be configured in the same way
* Plugins will be allowed to act across the whole cluster or act on a specific set of node pools, this should form part of the base configuration for which plugins to run

## Stages

The workflow for kube-aws should consist of the following stages, each of which will be called on the plugins in turn. Each stage will complete across all plugins prior to proceeding to the next stage. All plugins will receive input based on the whole setup, not just their own. This will allow them to hook into parameters from other plugins or core logic. The stages are not intended to become kube-aws commands and should mostly be transparent to a kube-aws user.

1. initialise
   * Perform any prerequisite setup required such as calls to external system. Configuration, presence of files etc can be validated.
   * Input - configuration
   * Output - configuration with any initialised values, internal kube-aws model with primary constructs for CloudFormation, Kubernetes YAML/JSON, Helm charts, systemd units, kube API server parameters and any other key areas that allow customisation. Some of these will be file references but some will be full kube-aws internal models. The available list of constructs will be added to in further implementations.
1. render
   * Stack files are gathered and rendered locally, most plugins will perform a no-op here but some may choose to output additional CloudFormation stacks or perform additional validation. A core plugin could grab all the primary constructs and create the main CloudFormation or a kube API server plugin could validate none of the parameters it has set are conflicting.
   * Input - output of `initialise` stage
   * Output - CloudFormation file(s), other file reference(s) such as Helm Charts
1. deploy
   * Take the CloudFormation and file(s), upload the files to S3 and deploy the template(s) to CloudFormation. This is an opportunity for plugins to perform waiting tasks and/or actions that need to be done on deploy/install, for example post to an endpoint created during deploy.
   * Input - output of `render` stage, stack name
   * Output - stack details such as stack name, endpoints, certs
1. validate
   * Plugins can check they are functioning as expected which may depend on the configuration
   * Input - output of `deploy` stage, configuration
   * Output - validation errors

Validation errors can also be returned at any stage and can be:
1. fatal, kube-aws will stop processing further and log the problem
1. warning, kube-aws will continue processing but log a warning, can be used for deprecation

The output of the `initialise` stage is similar to `render stack` in kube-aws as of today with templates and a few other files. The output of the `render` stage is the fully formed CloudFormation without templating. Both of these could be stored as the user wishes and potentially version controlled.

## Examples

### Deployment Outside of Kubernetes

An example is a non-containerised monitoring agent or healthcheck. systemd units and other commands
could be output from plugins during the `initialise` stage and hence get included in the generated cluster.

### Dex / Rescheduler / Add-on Installation

Dex installation requires changes to the kube API server parameters plus a deployment into a running Kubernetes cluster.
kube API server parameters will be one of the constructs available as an output from `initialise` and so can be added to from the Dex plugin.
The deployment can be performed either via Kubernetes YAML or Helm Chart both of which would be a file/directory reference.

### Additional Worker IAM Permissions / kube2iam

Additional worker IAM permissions requires either additions to the existing IAM policies or new IAM policies
being attached to the worker instance role. This could be done in a few ways, for example `initialise` could
output the additional CloudFormation template snippet needed along with name/ref of the IAM policy.
The policies and policy document for the workers would be primarily managed by a core plugin that deals
with the worker permissions. It would take the output of `initialise` and render the final CloudFormation required.

The kube2iam add-on requires Kubernetes YAML or a Helm Chart to be installed which is covered by the Dex
example above plus changes to the worker IAM permissions.

### Bastion Host

A bastion host requires additional CloudFormation to deploy the instance into the correct part of the
VPC. It therefore requires knowledge of the VPC/network setup as input. This plugin would take the
configuration in `initialise` and output the additional CloudFormation based on the VPC settings.

### CloudFormation Renderer

During the `initialise` stage a core CloudFormation render plugin could output the basic CloudFormation templates for the cluster. Then during the `render` stage the same core plugin could choose to take all the output across all plugins from `initialise` and render the final CloudFormation.

### Kube API Server

A Kubernetes API server plugin could be responsible for main piece of cloud config that sets up the API server. It could then also perform additional validation during the `render` stage to ensure any plugins that have added to the kube API server parameters primary construct have not made the final state invalid.

# Implementation

* [Helm](https://github.com/kubernetes/helm) should be the main method for deploying additional components into the Kubernetes cluster
* How can kube-aws deal with plugin ordering? The ordering could be defined in a fixed YAML file and anything not present is always run last.
* What is the process to include and compile plugins?
   * One idea is to use [go-plugin](https://github.com/hashicorp/go-plugin) since the native 1.8 plugins is not mature yet
* We need to protect sensitive information if uploading files, some Helm charts have secrets as config values so how will these be input?

## Configuration

All plugins will be enabled and configured via the `cluster.yaml` plus a set of plugin specific
configuration files. However, as above, the whole configuration model will be passed to all plugins
so they can access parameters from another plugin if necessary.

## Plugin Locations

* Built-in plugins can either be part of the kube-aws binary or downloadable from a secure source
if/when the user enables that plugin. The second is recommended.
* Built-in plugins will live under `kubernetes-incubator/kube-aws/plugins/<PLUGIN_NAME>`
  * This location can be thought of as the built-in plugin repository
* User contributed plugins will live under `kubernetes-incubator/kube-aws/contrib/plugins/<PLUGIN_NAME>`
until they are considered core or deprecated.
  * This location can be thought of as the contrib plugin repository kube-aws plugins
* User provided will live under `<USER_DIRECTORY>/plugins/<PLUGIN_NAME>`
  * This location can be thought of as user provided repository
  * A user can specify a set of directories for plugins to be read from, likely as a CLI argument


text:
package reborncore.client.gui.builder;

import net.minecraft.client.render.item.ItemRenderer;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;
import reborncore.client.ClientNetworkManager;
import reborncore.client.RenderUtil;
import reborncore.client.gui.guibuilder.GuiBuilder;
import reborncore.common.blockentity.RedstoneConfiguration;
import reborncore.common.network.IdentifiedPacket;
import reborncore.common.network.ServerBoundPackets;

import java.util.Locale;

public class RedstoneConfigGui {

	public static void draw(MatrixStack matrixStack, GuiBase<?> guiBase, int mouseX, int mouseY) {
		if (guiBase.getMachine() == null) return;
		RedstoneConfiguration configuration = guiBase.getMachine().getRedstoneConfiguration();
		GuiBuilder builder = guiBase.builder;
		ItemRenderer itemRenderer = guiBase.getMinecraft().getItemRenderer();

		int x = 10;
		int y = 100;

		int i = 0;
		int spread = configuration.getElements().size() == 3 ? 27 : 18;
		for (RedstoneConfiguration.Element element : configuration.getElements()) {
			itemRenderer.renderInGuiWithOverrides(element.getIcon(), x - 3, y + (i * spread) - 5);

			guiBase.getTextRenderer().draw(matrixStack, Text.translatable("reborncore.gui.fluidconfig." + element.getName()), x + 15, y + (i * spread), -1);

			boolean hovered = withinBounds(guiBase, mouseX, mouseY, x + 92, y + (i * spread) - 2, 63, 15);
			int color = hovered ? 0xFF8b8b8b : 0x668b8b8b;
			RenderUtil.drawGradientRect(matrixStack, 0, x + 91, y + (i * spread) - 2, x + 93 + 65, y + (i * spread) + 10, color, color);

			Text name = Text.translatable("reborncore.gui.fluidconfig." + configuration.getState(element).name().toLowerCase(Locale.ROOT));
			guiBase.drawCentredText(matrixStack, name, y + (i * spread), -1, x + 37, GuiBase.Layer.FOREGROUND);
			//guiBase.getTextRenderer().drawWithShadow(name, x + 92, y + (i * spread), -1);
			i++;
		}

	}

	public static boolean mouseClicked(GuiBase<?> guiBase, double mouseX, double mouseY, int mouseButton) {
		if (guiBase.getMachine() == null) return false;
		RedstoneConfiguration configuration = guiBase.getMachine().getRedstoneConfiguration();

		int x = 10;
		int y = 100;

		int i = 0;
		int spread = configuration.getElements().size() == 3 ? 27 : 18;
		for (RedstoneConfiguration.Element element : configuration.getElements()) {
			if (withinBounds(guiBase, (int) mouseX, (int) mouseY, x + 91, y + (i * spread) - 2, 63, 15)) {
				RedstoneConfiguration.State currentState = configuration.getState(element);
				int ns = currentState.ordinal() + 1;
				if (ns >= RedstoneConfiguration.State.values().length) {
					ns = 0;
				}
				RedstoneConfiguration.State nextState = RedstoneConfiguration.State.values()[ns];
				IdentifiedPacket packet = ServerBoundPackets.createPacketSetRedstoneSate(guiBase.getMachine().getPos(), element, nextState);
				ClientNetworkManager.sendToServer(packet);
				return true;
			}
			i++;
		}
		return false;
	}

	private static boolean withinBounds(GuiBase<?> guiBase, int mouseX, int mouseY, int x, int y, int width, int height) {
		mouseX -= guiBase.getGuiLeft();
		mouseY -= guiBase.getGuiTop();
		return (mouseX > x && mouseX < x + width) && (mouseY > y && mouseY < y + height);
	}

}


text:
package com.ocs.dynamo.functional.util;

import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.junit.jupiter.api.Assertions.assertEquals;

import java.util.HashSet;
import java.util.Locale;
import java.util.Set;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mock;

import com.google.common.collect.Sets;
import com.ocs.dynamo.functional.domain.Country;
import com.ocs.dynamo.functional.domain.Currency;
import com.ocs.dynamo.functional.domain.Domain;
import com.ocs.dynamo.functional.domain.Region;
import com.ocs.dynamo.service.BaseService;
import com.ocs.dynamo.service.MessageService;
import com.ocs.dynamo.test.BaseMockitoTest;
import com.ocs.dynamo.test.MockUtil;

public class DomainUtilsTest extends BaseMockitoTest {

    @Mock
    private MessageService messageService;

    @Mock
    private BaseService<Integer, Country> service;

    private Set<Domain> domains;

    @BeforeEach
    public void setUp() {

        Currency c1 = new Currency("EUR", "Euro");
        Currency c2 = new Currency("USD", "Dollar");
        Country coun1 = new Country("NL", "Netherlands");

        domains = new HashSet<>();
        domains.add(c1);
        domains.add(c2);
        domains.add(coun1);
    }

    @Test
    public void testFilterDomains() {

        Set<Currency> cs = DomainUtil.filterDomains(Currency.class, null);
        assertEquals(0, cs.size());

        cs = DomainUtil.filterDomains(Currency.class, domains);
        assertEquals(2, cs.size());

        Set<Country> countries = DomainUtil.filterDomains(Country.class, domains);
        assertEquals(1, countries.size());

        Set<Region> regions = DomainUtil.filterDomains(Region.class, domains);
        assertEquals(0, regions.size());
    }

    @Test
    public void testUpdateDomains() {

        // replace currencies with new one
        DomainUtil.updateDomains(Currency.class, domains, Sets.newHashSet(new Currency("GBP", "English Pound")));
        assertEquals(2, domains.size());

        // remove all currencies
        DomainUtil.updateDomains(Currency.class, domains, new HashSet<>());
        assertEquals(1, domains.size());

        // remove all currencies
        DomainUtil.updateDomains(Country.class, domains, Sets.newHashSet(new Country("USA", "United States Of America")));
        assertEquals(1, domains.size());
    }

    @Test
    public void testGetDomainDescriptions() {

        String res = DomainUtil.getDomainDescriptions(messageService, DomainUtil.filterDomains(Currency.class, domains), new Locale("en"));
        assertEquals("Dollar, Euro", res);

        domains.add(new Currency("SEK", "Swedish Crown"));
        domains.add(new Currency("NEK", "Norwegian Crown"));
        domains.add(new Currency("DEK", "Danish Crown"));

        when(messageService.getMessage(eq("ocs.and.others"), any(Locale.class), anyInt()))
                .thenAnswer(invocation -> " and " + invocation.getArguments()[2] + " others");

        res = DomainUtil.getDomainDescriptions(messageService, DomainUtil.filterDomains(Currency.class, domains), new Locale("nl"));

        assertEquals("Danish Crown, Dollar, Euro and 2 others", res);
    }

    @Test
    public void testCreateIfNotExists_Create() {
        MockUtil.mockServiceSave(service, Country.class);

        Country country = DomainUtil.createIfNotExists(service, Country.class, "SomeName", true);
        assertNotNull(country);

        // verify that a country is saved
        verify(service).save(any(Country.class));
    }

    @Test
    public void testCreateIfNotExists_DoNotCreate() {
        Country existing = new Country();
        existing.setName("SomeName");
        existing.setId(44);
        when(service.findByUniqueProperty(Domain.ATTRIBUTE_NAME, "SomeName", true)).thenReturn(existing);

        Country country = DomainUtil.createIfNotExists(service, Country.class, "SomeName", true);
        assertNotNull(country);
        assertEquals(existing.getId(), country.getId());

        // verify that a country is saved
        verify(service, times(0)).save(any(Country.class));
    }

}


text:
  <form name="productForm" class="form-horizontal col-md-12" role="form" data-ng-submit="create(productForm.$valid)" novalidate>

			Name

			  <input name="name" type="text" class="form-control" data-ng-model="name" id="name" placeholder="Product Name" required>

Name is required

			Price

$

			  <input name="price" type="text" class="form-control" data-ng-model="price.dollars" id="price" placeholder="00" required>

.

			  <input name="price" type="text" class="form-control" data-ng-model="price.cents" id="price" placeholder="00" required>

			Description

			  <textarea name="description" data-ng-model="description" id="description" cols="30" rows="6" placeholder="Description" class="form-control" required></textarea>

Description is required

	        <button mean-token="'create-submit'" type="submit" class="btn btn-primary btn-lg btn-block">Submit</button>

  </form>


text:
'''
Author    : sckn <seckinalan@gmail.com>
Desription: panel module
'''
from flask import Blueprint, render_template, request
from flask import redirect, url_for, flash, jsonify, g
from flask.ext.login import login_required, current_user
from flask.ext.wtf import Form
from wtforms import SelectField
from wtforms.ext.sqlalchemy.orm import model_form
import requests
from datetime import datetime
db=db
import app
import psutil
from app import model as m

api = Blueprint('api', __name__, url_prefix='/api')
@api.before_request
def client_info():
    try:
        hostname = request.headers.get('HostName')
        key = request.headers.get('ApiKey')
        client = m.Client.query.filter_by(hostname=hostname,apikey=key).first()
        if client is None:
            raise

        g.id = client.id
    except:
        return jsonify(status=401, message='Unauthorized'),401

@api.route('/set-task/<task_id>/<status>')
def set_task(task_id, status):
    '''
    '''
    task = m.TaskQueue.query.filter_by(id=task_id).first()
    if g.id != task.client:
        return jsonify(status=401, message='Unauthorized'),401

    task.status = status
    db.session.commit()
    return jsonify(status=200, message='OK')


text:
import django

from oscar.core.loading import is_model_registered
from oscar.apps.address.abstract_models import AbstractPartnerAddress
from oscar.apps.partner.abstract_models import (
    AbstractPartner, AbstractStockRecord, AbstractStockAlert)

if not is_model_registered('partner', 'Partner'):
    class Partner(AbstractPartner):
        pass

if not is_model_registered('partner', 'PartnerAddress'):
    class PartnerAddress(AbstractPartnerAddress):
        pass

if not is_model_registered('partner', 'StockRecord'):
    class StockRecord(AbstractStockRecord):
        pass

if not is_model_registered('partner', 'StockAlert'):
    class StockAlert(AbstractStockAlert):
        pass

if django.VERSION < (1, 7):
    from . import receivers  # noqa


text:
package com.wci.umls.server.jpa.algo.action;

import com.wci.umls.server.ValidationResult;
import com.wci.umls.server.helpers.LocalException;
import com.wci.umls.server.jpa.ValidationResultJpa;
import com.wci.umls.server.model.content.Attribute;
import com.wci.umls.server.model.workflow.WorkflowStatus;

/**
 * A molecular action for adding an attribute.
 */
public class AddAttributeMolecularAction extends AbstractMolecularAction {

  /** The attribute. */
  private Attribute attribute;

  /**
   * Instantiates an empty {@link AddAttributeMolecularAction}.
   *
   * @throws Exception the exception
   */
  public AddAttributeMolecularAction() throws Exception {
    super();
    // n/a
  }

  /**
   * Returns the attribute.
   *
   * @return the attribute
   */
  public Attribute getAttribute() {
    return attribute;
  }

  /**
   * Sets the attribute.
   *
   * @param attribute the attribute
   */
  public void setAttribute(Attribute attribute) {
    this.attribute = attribute;
  }

  /* see superclass */
  @Override
  public ValidationResult checkPreconditions() throws Exception {
    final ValidationResult validationResult = new ValidationResultJpa();
    // Perform action specific validation - n/a

    // Metadata referential integrity checking
    if (getAttributeName(attribute.getName(), getConcept().getTerminology(),
        getConcept().getVersion()) == null) {
      rollback();
      throw new LocalException(
          "Cannot add invalid attribute - " + attribute.getName());
    }
    if (getTerminology(attribute.getTerminology(),
        attribute.getVersion()) == null) {
      rollback();
      throw new LocalException(
          "Cannot add attribute with invalid terminology - "
              + attribute.getTerminology() + ", version: "
              + attribute.getVersion());
    }

    // Duplicate check
    for (final Attribute a : getConcept().getAttributes()) {
      if (a.getName().equals(attribute.getName())
          && a.getValue().equals(attribute.getValue())) {
        rollback();
        throw new LocalException("Duplicate attribute - " + attribute.getName()
            + ", with value " + attribute.getValue());
      }
    }

    validationResult.merge(super.checkPreconditions());
    return validationResult;
  }

  /* see superclass */
  @Override
  public void compute() throws Exception {
    //
    // Perform the action (contentService will create atomic actions for CRUD
    // operations)
    //

    // Add the attribute
    attribute = addAttribute(attribute, getConcept());

    // Change status of the concept
    if (getChangeStatusFlag()) {
      getConcept().setWorkflowStatus(WorkflowStatus.NEEDS_REVIEW);
    }

    // Add the attribute to concept
    getConcept().getAttributes().add(attribute);

    // update the concept
    updateConcept(getConcept());
  }

  /* see superclass */
  @Override
  public void logAction() throws Exception {

    // log the REST call
    addLogEntry(getLastModifiedBy(), getProject().getId(), getConcept().getId(),
        getActivityId(), getWorkId(),
        getName() + " to concept " + getConcept().getId() + " " + attribute);

    // Log for the molecular action report
    addLogEntry(getLastModifiedBy(), getProject().getId(),
        getMolecularAction().getId(), getActivityId(), getWorkId(),
        "\nACTION  " + getName() + "\n  concept = " + getConcept().getId() + " "
            + getConcept().getName() + "\n  attribute = "
            + getAttribute().getName() + ", " + attribute.getValue());

  }

}


text:
using System;
using System.Collections.Generic;
using System.Text;
using FlatRedBall;
using FlatRedBall.Input;
using FlatRedBall.Instructions;
using FlatRedBall.AI.Pathfinding;
using FlatRedBall.Graphics.Animation;
using FlatRedBall.Graphics.Particle;
using FlatRedBall.Math.Geometry;
using Microsoft.Xna.Framework.Input;

namespace HandballWars.Entities
{
	public partial class Player2
	{
        /// <summary>
        /// Initialization logic which is execute only one time for this Entity (unless the Entity is pooled).
        /// This method is called when the Entity is added to managers. Entities which are instantiated but not
        /// added to managers will not have this method called.
        /// </summary>
		private void CustomInitialize()
		{

		}

        protected override void InitializeInput()
        {
            var horizontalInput = new Multiple1DInputs();
            var throwTrajectoryInput = new Multiple2DInputs();
            var throwInput = new MultiplePressableInputs();
            var jumpInput = new MultiplePressableInputs();
            var fallThroughInput = new MultiplePressableInputs();

            this.HorizontalInput = horizontalInput;
            this.ThrowTrajectoryInput = throwTrajectoryInput;
            this.ThrowInput = throwInput;
            this.JumpInput = jumpInput;
            this.FallThroughInput = fallThroughInput;

            if (InputManager.Xbox360GamePads[0].IsConnected)
            {
                jumpInput.Inputs.Add(InputManager.Xbox360GamePads[0].GetButton(FlatRedBall.Input.Xbox360GamePad.Button.A));
                horizontalInput.Inputs.Add(InputManager.Xbox360GamePads[0].LeftStick.Horizontal);
                horizontalInput.Inputs.Add(InputManager.Xbox360GamePads[0].DPadHorizontal);
                fallThroughInput.Inputs.Add(InputManager.Xbox360GamePads[0].GetButton(Xbox360GamePad.Button.DPadDown));
            }

            jumpInput.Inputs.Add(InputManager.Keyboard.GetKey(Keys.Up));
            horizontalInput.Inputs.Add(InputManager.Keyboard.Get1DInput(Keys.Left, Keys.Right));
            fallThroughInput.Inputs.Add(InputManager.Keyboard.GetKey(Keys.Down));
            throwTrajectoryInput.Inputs.Add(InputManager.Keyboard.Get2DInput(Keys.F, Keys.H, Keys.T, Keys.G));
            throwInput.Inputs.Add(InputManager.Keyboard.GetKey(Keys.RightControl));

            InputEnabled = true;
        }

        private void CustomActivity()
		{

        }

		private void CustomDestroy()
		{

		}

        private static void CustomLoadStaticContent(string contentManagerName)
        {

        }
	}
}


text:
using System;
using System.Collections.Generic;

namespace SharpMath.Statistics
{
	[Serializable]
	public class RootMeanSquareStatistics
	{
		private MeanStatistics squares;

		public RootMeanSquareStatistics()
		{
			squares = new MeanStatistics();
		}

		public RootMeanSquareStatistics(IEnumerable<double> values)
			: this()
		{
			foreach (double value in values)
			{
				Add(value);
			}
		}

		public void Add(double x)
		{
			squares.Add(x * x);
		}

		public int Samples
		{
			get
			{
				return squares.Samples;
			}
		}

		public double RootMeanSquare
		{
			get
			{
				return Math.Sqrt(squares.Mean);
			}
		}
	}
}


text:
[![GoDoc](https://godoc.org/github.com/RadhiFadlillah/go-sastrawi?status.png)](https://godoc.org/github.com/RadhiFadlillah/go-sastrawi) [![Build Status](https://travis-ci.org/RadhiFadlillah/go-sastrawi.svg?branch=master)](https://travis-ci.org/RadhiFadlillah/go-sastrawi)

Go-Sastrawi is a Go package for doing stemming in Indonesian language. It is based from [Sastrawi](https://github.com/sastrawi/sastrawi) for PHP by [Andy Librian](https://github.com/andylibrian). For more information in English, see [readme](https://github.com/RadhiFadlillah/go-sastrawi/blob/master/README.en.md).

Go-Sastrawi adalah package Go untuk melakukan _stemming_ pada bahasa Indonesia. Dikembangkan dari [Sastrawi](https://github.com/sastrawi/sastrawi) untuk PHP yang dibuat oleh [Andy Librian](https://github.com/andylibrian).

## Stemming

Dari [Wikipedia](https://en.wikipedia.org/wiki/Stemming), _stemming_ adalah proses untuk mengubah kata berimbuhan menjadi kata dasar. Contohnya :

- menahan => tahan
- pewarna => warna

## Contoh Penggunaan

Penggunaan yang paling sederhana adalah dengan menggunakan kamus kata dasar default yang telah disediakan :

```go
import (
	"fmt"
	"github.com/RadhiFadlillah/go-sastrawi"
)

func main() {
	// Kalimat asal
	sentence := "Rakyat memenuhi halaman gedung untuk menyuarakan isi hatinya. Baca berita selengkapnya di http://www.kompas.com."

	// Ubah kata berimbuhan menjadi kata dasar
	dictionary := sastrawi.DefaultDictionary()
	stemmer := sastrawi.NewStemmer(dictionary)
	for _, word := range sastrawi.Tokenize(sentence) {
		fmt.Printf("%s => %s\n", word, stemmer.Stem(word))
	}
}
```

Selain menggunakan kamus kata dasar default, user juga dapat membuat kamus kata dasar sendiri :

```go
import (
	"fmt"
	"github.com/RadhiFadlillah/go-sastrawi"
)

func main() {
	// Buat kamus baru
	dictionary := sastrawi.NewDictionary("lapar")
	dictionary.Print("")

	// Tambah kata dasar ke kamus
	dictionary.Add("ingin", "makan", "gizi", "enak", "lezat")
	dictionary.Print("")

	// Hapus kata dasar dari kamus
	dictionary.Remove("enak", "lezat")
	dictionary.Print("")

	// Gunakan kamus yang telah dibuat untuk stemming
	sentence := "Aku kelaparan dan menginginkan makanan yang bergizi."
	stemmer := sastrawi.NewStemmer(dictionary)
	for _, word := range sastrawi.Tokenize(sentence) {
		fmt.Printf("%s => %s\n", word, stemmer.Stem(word))
	}
}
```

Sastrawi juga menyediakan daftar stop word bahasa Indonesia yang bisa digunakan untuk menghapus kata-kata umum. Daftar stop word ini adalah [`Dictionary`](https://godoc.org/github.com/RadhiFadlillah/go-sastrawi#Dictionary) biasa, jadi user bisa menambah atau mengurangi stop word sesuai keperluan :

```go
package main

import (
	"fmt"
	"github.com/RadhiFadlillah/go-sastrawi"
)

func main() {
	stopwords := sastrawi.DefaultStopword()
	dictionary := sastrawi.DefaultDictionary()
	stemmer := sastrawi.NewStemmer(dictionary)
	sentence := "Perekonomian Indonesia sedang dalam pertumbuhan yang membanggakan"

	for _, word := range sastrawi.Tokenize(sentence) {
		if stopwords.Contains(word) {
			continue
		}

		fmt.Printf("%s => %s\n", word, stemmer.Stem(word))
	}
}
```

## Pustaka

#### Algoritma

1. Algoritma Nazief dan Adriani
2. Asian J. 2007. ___Effective Techniques for Indonesian Text Retrieval___. PhD thesis School of Computer Science and Information Technology RMIT University Australia. ([PDF](http://researchbank.rmit.edu.au/eserv/rmit:6312/Asian.pdf) dan [Amazon](https://www.amazon.com/Effective-Techniques-Indonesian-Text-Retrieval/dp/3639021649))
3. Arifin, A.Z., I.P.A.K. Mahendra dan H.T. Ciptaningtyas. 2009. ___Enhanced Confix Stripping Stemmer and Ants Algorithm for Classifying News Document in Indonesian Language___, Proceeding of International Conference on Information & Communication Technology and Systems (ICTS). ([PDF](http://personal.its.ac.id/files/pub/2623-agusza-baru%2021%20d%20VIP%20enhanced-confix-stripping-stem.pdf))
4. A. D. Tahitoe, D. Purwitasari. 2010. ___Implementasi Modifikasi Enhanced Confix Stripping Stemmer Untuk Bahasa Indonesia dengan Metode Corpus Based Stemming___, Institut Teknologi Sepuluh Nopember (ITS) – Surabaya, 60111, Indonesia. ([PDF](http://digilib.its.ac.id/public/ITS-Undergraduate-14255-paperpdf.pdf))
5. Tambahan aturan _stemming_ dari [kontributor Sastrawi](https://github.com/sastrawi/sastrawi/graphs/contributors).

#### Kamus Kata Dasar

Proses stemming oleh Sastrawi sangat bergantung pada kamus kata dasar. Sastrawi menggunakan kamus kata dasar dari [kateglo.com](http://kateglo.com) dengan sedikit perubahan.

## Lisensi

Sebagaimana [Sastrawi](https://github.com/sastrawi/sastrawi) untuk PHP, Go-Sastrawi juga disebarkan dengan lisensi [MIT](http://choosealicense.com/licenses/mit/). Untuk lisensi kamus kata dasar dari Kateglo adalah [CC-BY-NC-SA 3.0](https://github.com/ivanlanin/kateglo#lisensi-isi).

## Di Bahasa Pemrograman Lain

- [Sastrawi](https://github.com/sastrawi/sastrawi) - PHP
- [JSastrawi](https://github.com/jsastrawi/jsastrawi) - Java
- [cSastrawi](https://github.com/mohangk/c_sastrawi) - C
- [PySastrawi](https://github.com/har07/PySastrawi) - Python
- [Sastrawi-Ruby](https://github.com/meisyal/sastrawi-ruby) - Ruby


text:
id

# Production vs. local: if php.ini file exists then it is production
PHP_CONFIG_FILE_PRODUCTION_ENV="/home/antdelno/php_extensions/php.ini"
if [ -f $PHP_CONFIG_FILE_PRODUCTION_ENV ];
then
   PHP_NAME="php-cli"
else
   PHP_NAME="php"
fi
export PHP_NAME

echo -e "\n NORMALIZE: Started: $(date +%Y-%m-%d:%H:%M:%S)"

# Run entrance.sh scripts of ./projects/{project_name} subdirectories

UNIQUE_ID_ASSIGNED_FOR_A_QUEUE=$("$PHP_NAME" -r "echo uniqid('main_', true);")
# If UNIQUE_ID_ASSIGNED_FOR_A_QUEUE is empty then throw the error, log and do not continue. It is the serious error..
if [ -z $UNIQUE_ID_ASSIGNED_FOR_A_QUEUE ];
    then
        echo "Error! Unique id is not assigned to the queue. This is serious error. Is PHP working? Cannot continue." 1>&2
        exit 2
fi

# - Get dir of this script
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

# - Get entrance.sh scripts of available projects
DIRS_FOR_CONTENT=$("$PHP_NAME" -r "
    \$separator = ':';
    \$settings = json_decode(file_get_contents('$DIR' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'settings.json'), true);
    \$projectsOn = \$settings['projects-on'];
    \$dirsToSearchIn = array();
     foreach(\$projectsOn as \$projectsOnData) {

         // Skip the project that does not have the directory for downloaded posts set
         if(!isset(\$projectsOnData['dir_downloaded_posts'])) {
            continue;
         }

         // Skip the project that does not have the directory for downloaded posts set in filesystem
         \$dir = '$DIR' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . \$projectsOnData['dir_downloaded_posts'];
         if(!is_dir(\$dir)) {
            continue;
         }

         // Skip the project that does not have the entrance.sh script defined
         if(!isset(\$projectsOnData['entrance_sh_normalize'])) {
            continue;
         }

         // Skip the project that does not have the entrance.sh script in filesystem
         \$fileEntranceSh = '$DIR' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . \$projectsOnData['entrance_sh_normalize'];
         if(!is_file(\$fileEntranceSh)) {
            continue;
         }

         \$dirsToSearchIn[] = \$fileEntranceSh . \$separator . \$dir;

     }
     echo implode(\"\\\n\", \$dirsToSearchIn);
    ");

MARKER_FILENAME_BEGIN=$("$PHP_NAME" -r "
        \$settings = json_decode(file_get_contents('$DIR' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'settings.json'), true);
        echo \$settings['markers']['begin']['file-name'];
")
MARKER_FILENAME_CONTENT=$("$PHP_NAME" -r "
        \$settings = json_decode(file_get_contents('$DIR' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'settings.json'), true);
        echo \$settings['markers']['content']['file-name'];
")
MARKER_FILENAME_END=$("$PHP_NAME" -r "
        \$settings = json_decode(file_get_contents('$DIR' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'settings.json'), true);
        echo \$settings['markers']['end']['file-name'];
")

export MARKER_FILENAME_BEGIN
export MARKER_FILENAME_CONTENT
export MARKER_FILENAME_END

# Find all sub-dirs within dirs & run index script on every sub-dir
echo -e $DIRS_FOR_CONTENT |
while IFS= read -r ENTRANCE_SH_FILE__POSTS_DIR__DELIMITED; do

    ENTRANCE_SH_FILE=$(echo $ENTRANCE_SH_FILE__POSTS_DIR__DELIMITED | cut -f1 -d ":")
    # If ENTRANCE_SH_FILE is empty then read next ENTRANCE_SH_FILE__POSTS_DIR__DELIMITED
    if [ -z $ENTRANCE_SH_FILE ];
        then
            echo -e "Error! ENTRANCE_SH_FILE is empty. This entry is being skipped.\n More info: POSTS_DIR: \"$POSTS_DIR\", UNIQUE_ID_ASSIGNED_FOR_A_QUEUE: \"$UNIQUE_ID_ASSIGNED_FOR_A_QUEUE\", ENTRANCE_SH_FILE: \"$ENTRANCE_SH_FILE\"" 1>&2
            continue
    fi

    POSTS_DIR=$(echo $ENTRANCE_SH_FILE__POSTS_DIR__DELIMITED | cut -f2 -d ":")
    # If POSTS_DIR is empty then read next ENTRANCE_SH_FILE__POSTS_DIR__DELIMITED
    if [ -z $POSTS_DIR ];
        then
            echo -e "POSTS_DIR is empty. This entry is being skipped.\n More info: POSTS_DIR: \"$POSTS_DIR\", UNIQUE_ID_ASSIGNED_FOR_A_QUEUE: \"$UNIQUE_ID_ASSIGNED_FOR_A_QUEUE\", ENTRANCE_SH_FILE: \"$ENTRANCE_SH_FILE\"" 1>&2
            continue
    fi

    PROJECT_DIRS_TO_NORMALIZE=$(find $POSTS_DIR -maxdepth 1 -type d -exec bash -c '[[ -e $1/$MARKER_FILENAME_BEGIN && -e $1/$MARKER_FILENAME_CONTENT && -e $1/$MARKER_FILENAME_END && $(head -n 1 $1/$MARKER_FILENAME_BEGIN) == $(head -n 1 $1/$MARKER_FILENAME_END) ]]' bash {} \; -printf '%T@ %p\n' | sort -k1 -n -z | awk '{ print $2 "\\n" }')

    # Read DataIntegrity.log found in each directory.
    echo -e $PROJECT_DIRS_TO_NORMALIZE |
    while IFS="\\n" read -r PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE; do

        # Trim the variable
        PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE=${PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE//[[:space:]]/}
        if [[ -z "${PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE// }" ]]
        then
            # Skip any empty value...
            continue
        fi

        if [ -z "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE/DataIntegrity.log" ];
        then
            echo -e "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE/DataIntegrity.log is not found." 1>&2
            continue
        fi

        # Removing the START marker has been moved up to the beginning of reading each result line (directory found)
        #    This way some kind of security appear - if something would go wrong at reading (removing what is red) then second run all previous set would be ignored
        #    Create new START file from END file if needed to test on, to develop on, etc. START and END files with exact content are required to proceed further with the normalization
        # Remove $MARKER_FILENAME_BEGIN file
        if [ -f "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE"/"$MARKER_FILENAME_BEGIN" ] ; then
            rm "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE"/"$MARKER_FILENAME_BEGIN"
        fi

        # Read each result line (directory found)
        while IFS='' read -r PROJECT_DIR_TO_NORMALIZE || [[ -n "$PROJECT_DIR_TO_NORMALIZE" ]]; do
            if [ -z "$PROJECT_DIR_TO_NORMALIZE" ];
            then
                echo -e "$PROJECT_DIR_TO_NORMALIZE is not found." 1>&2
                continue
            fi

            # Apply (PHP) action
            chmod 774 $ENTRANCE_SH_FILE
            bash "$ENTRANCE_SH_FILE" "$PROJECT_DIR_TO_NORMALIZE" "$UNIQUE_ID_ASSIGNED_FOR_A_QUEUE"

        done < "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE"/"$MARKER_FILENAME_CONTENT"

        # Remove $MARKER_FILENAME_END file
        if [ -f "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE"/"$MARKER_FILENAME_END" ] && [ $(ls "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE" -1 | wc -l) == 2 ] ; then
            rm "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE"/"$MARKER_FILENAME_END"
        fi

        # Remove $MARKER_FILENAME_CONTENT file as we red it already
        if [ -f "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE"/"$MARKER_FILENAME_CONTENT" ] && [ $(ls "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE" -1 | wc -l) == 1 ] ; then
            rm "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE"/"$MARKER_FILENAME_CONTENT"
        fi

        # Remove directory containing once downloaded data as we red it already
        if [ -d "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE" ] ; then
            rmdir "$PROJECT_DIRS_TO_NORMALIZE_WITH_LIST_FILE"
        fi

        echo -e ""

    done

done

unset MARKER_FILENAME_BEGIN
unset MARKER_FILENAME_CONTENT
unset MARKER_FILENAME_END

unset PHP_NAME

# Apply (PHP) action - Publicize
PUBLICIZE_MAIN_SH_FILE="$DIR"/../publicize/main.sh
chmod 774 "$PUBLICIZE_MAIN_SH_FILE"
bash "$PUBLICIZE_MAIN_SH_FILE"
# END. Apply (PHP) action - Publicize

echo -e "\n NORMALIZE: Finished: $(date +%Y-%m-%d:%H:%M:%S)"


text:
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}

{-|
Module:      TextShow.Data.Functor.Product
Copyright:   (C) 2014-2017 Ryan Scott
License:     BSD-style (see the file LICENSE)
Maintainer:  Ryan Scott
Stability:   Provisional
Portability: GHC

'TextShow' instance for 'Product'.

/Since: 3/
-}
module TextShow.Data.Functor.Product () where

import Data.Functor.Product (Product(..))

import TextShow.Classes (TextShow(..), TextShow1(..), showbPrec1)
import TextShow.TH.Internal (deriveTextShow1)

-- | /Since: 3/
$(deriveTextShow1 ''Product)

-- | /Since: 3/
instance (TextShow1 f, TextShow1 g, TextShow a) => TextShow (Product f g a) where
    showbPrec = showbPrec1
    {-# INLINE showbPrec #-}


text:
package logic

import (
	"testing"

	"github.com/golang/mock/gomock"
	"github.com/quintilesims/layer0/api/backend/ecs/id"
	"github.com/quintilesims/layer0/api/logic/mock_logic"
	"github.com/quintilesims/layer0/common/models"
	"github.com/quintilesims/layer0/common/testutils"
	"github.com/quintilesims/layer0/common/types"
)

func TestJobSelectByID(t *testing.T) {
	testLogic, ctrl := NewTestLogic(t)
	defer ctrl.Finish()

	testLogic.AddJobs(t, []*models.Job{
		{JobID: "j1"},
	})

	jobLogic := NewL0JobLogic(testLogic.Logic(), nil, nil)
	job, err := jobLogic.GetJob("j1")
	if err != nil {
		t.Fatal(err)
	}

	testutils.AssertEqual(t, job.JobID, "j1")
}

func TestJobSelectAll(t *testing.T) {
	testLogic, ctrl := NewTestLogic(t)
	defer ctrl.Finish()

	testLogic.AddJobs(t, []*models.Job{
		{JobID: "j1"},
		{JobID: "j2"},
	})

	jobLogic := NewL0JobLogic(testLogic.Logic(), nil, nil)
	jobs, err := jobLogic.ListJobs()
	if err != nil {
		t.Fatal(err)
	}

	testutils.AssertEqual(t, len(jobs), 2)
	testutils.AssertEqual(t, jobs[0].JobID, "j1")
	testutils.AssertEqual(t, jobs[1].JobID, "j2")
}

func TestJobDelete(t *testing.T) {
	testLogic, ctrl := NewTestLogic(t)
	taskLogic := mock_logic.NewMockTaskLogic(ctrl)
	deployLogic := mock_logic.NewMockDeployLogic(ctrl)
	defer ctrl.Finish()

	testLogic.AddJobs(t, []*models.Job{
		{JobID: "j1", TaskID: "t1"},
		{JobID: "extra"},
	})

	testLogic.AddTags(t, []*models.Tag{
		{EntityID: "j1", EntityType: "job", Key: "task_id", Value: "t1"},
		{EntityID: "extra", EntityType: "job", Key: "name", Value: "extra"},
	})

	taskLogic.EXPECT().
		DeleteTask("t1").
		Return(nil)

	jobLogic := NewL0JobLogic(testLogic.Logic(), taskLogic, deployLogic)
	if err := jobLogic.Delete("j1"); err != nil {
		t.Fatal(err)
	}

	tags, err := testLogic.TagStore.SelectByType("job")
	if err != nil {
		t.Fatal(err)
	}

	// make sure the 'extra' tag is the only one left
	testutils.AssertEqual(t, len(tags), 1)

	jobs, err := testLogic.JobStore.SelectAll()
	if err != nil {
		t.Fatal(err)
	}

	// make sure the 'extra' job is the only one left
	testutils.AssertEqual(t, len(jobs), 1)
}

func TestCreateJob(t *testing.T) {
	tmp := id.GenerateHashedEntityID
	id.GenerateHashedEntityID = func(name string) string { return "j1" }
	defer func() { id.GenerateHashedEntityID = tmp }()

	testLogic, ctrl := NewTestLogic(t)
	taskLogic := mock_logic.NewMockTaskLogic(ctrl)
	deployLogic := mock_logic.NewMockDeployLogic(ctrl)
	defer ctrl.Finish()

	deployLogic.EXPECT().
		CreateDeploy(gomock.Any()).
		Return(&models.Deploy{DeployID: "d1"}, nil)

	taskLogic.EXPECT().
		CreateTask(gomock.Any()).
		Return("t1", nil)

	jobLogic := NewL0JobLogic(testLogic.Logic(), taskLogic, deployLogic)
	job, err := jobLogic.CreateJob(types.DeleteEnvironmentJob, "e1")
	if err != nil {
		t.Fatal(err)
	}

	testutils.AssertEqual(t, job.TaskID, "t1")
	testLogic.AssertTagExists(t, models.Tag{EntityID: "j1", EntityType: "job", Key: "task_id", Value: "t1"})

	if _, err := testLogic.JobStore.SelectByID("j1"); err != nil {
		t.Fatal(err)
	}
}


text:
/* reset styling (prevent conflicts with bootstrap, materialize.css, etc.) */

div.jsoneditor .jsoneditor-search input {
  height: auto;
  border: inherit;
}

div.jsoneditor .jsoneditor-search input:focus {
  border: none !important;
  box-shadow: none !important;
}

div.jsoneditor table {
  border-collapse: collapse;
  width: auto;
}

div.jsoneditor td,
div.jsoneditor th {
  padding: 0;
  display: table-cell;
  text-align: left;
  vertical-align: inherit;
  border-radius: inherit;
}

div.jsoneditor-field,
div.jsoneditor-value,
div.jsoneditor-readonly {
  border: 1px solid transparent;
  min-height: 16px;
  min-width: 32px;
  padding: 2px;
  margin: 1px;
  word-wrap: break-word;
  float: left;
}

/* adjust margin of p elements inside editable divs, needed for Opera, IE */

div.jsoneditor-field p,
div.jsoneditor-value p {
  margin: 0;
}

div.jsoneditor-value {
  word-break: break-word;
}

div.jsoneditor-readonly {
  min-width: 16px;
  color: #808080;
}

div.jsoneditor-empty {
  border-color: #d3d3d3;
  border-style: dashed;
  border-radius: 2px;
}

div.jsoneditor-field.jsoneditor-empty::after,
div.jsoneditor-value.jsoneditor-empty::after {
  pointer-events: none;
  color: #d3d3d3;
  font-size: 8pt;
}

div.jsoneditor-field.jsoneditor-empty::after {
  content: "field";
}

div.jsoneditor-value.jsoneditor-empty::after {
  content: "value";
}

div.jsoneditor-value.jsoneditor-url,
a.jsoneditor-value.jsoneditor-url {
  color: green;
  text-decoration: underline;
}

a.jsoneditor-value.jsoneditor-url {
  display: inline-block;
  padding: 2px;
  margin: 2px;
}

a.jsoneditor-value.jsoneditor-url:hover,
a.jsoneditor-value.jsoneditor-url:focus {
  color: #ee422e;
}

div.jsoneditor td.jsoneditor-separator {
  padding: 3px 0;
  vertical-align: top;
  color: #808080;
}

div.jsoneditor-field[contenteditable=true]:focus,
div.jsoneditor-field[contenteditable=true]:hover,
div.jsoneditor-value[contenteditable=true]:focus,
div.jsoneditor-value[contenteditable=true]:hover,
div.jsoneditor-field.jsoneditor-highlight,
div.jsoneditor-value.jsoneditor-highlight {
  background-color: #FFFFAB;
  border: 1px solid yellow;
  border-radius: 2px;
}

div.jsoneditor-field.jsoneditor-highlight-active,
div.jsoneditor-field.jsoneditor-highlight-active:focus,
div.jsoneditor-field.jsoneditor-highlight-active:hover,
div.jsoneditor-value.jsoneditor-highlight-active,
div.jsoneditor-value.jsoneditor-highlight-active:focus,
div.jsoneditor-value.jsoneditor-highlight-active:hover {
  background-color: #ffee00;
  border: 1px solid #ffc700;
  border-radius: 2px;
}

div.jsoneditor-value.jsoneditor-string {
  color: #008000;
}

div.jsoneditor-value.jsoneditor-object,
div.jsoneditor-value.jsoneditor-array {
  min-width: 16px;
  color: #808080;
}

div.jsoneditor-value.jsoneditor-number {
  color: #ee422e;
}

div.jsoneditor-value.jsoneditor-boolean {
  color: #ff8c00;
}

div.jsoneditor-value.jsoneditor-null {
  color: #004ED0;
}

div.jsoneditor-value.jsoneditor-invalid {
  color: #000000;
}

div.jsoneditor-tree button {
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
  border: none;
  cursor: pointer;
  background: transparent url("img/jsoneditor-icons.svg");
}

div.jsoneditor-mode-view tr.jsoneditor-expandable td.jsoneditor-tree,
div.jsoneditor-mode-form tr.jsoneditor-expandable td.jsoneditor-tree {
  cursor: pointer;
}

div.jsoneditor-tree button.jsoneditor-collapsed {
  background-position: 0 -48px;
}

div.jsoneditor-tree button.jsoneditor-expanded {
  background-position: 0 -72px;
}

div.jsoneditor-tree button.jsoneditor-contextmenu {
  background-position: -48px -72px;
}

div.jsoneditor-tree button.jsoneditor-contextmenu:hover,
div.jsoneditor-tree button.jsoneditor-contextmenu:focus,
div.jsoneditor-tree button.jsoneditor-contextmenu.jsoneditor-selected,
tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu {
  background-position: -48px -48px;
}

div.jsoneditor-tree *:focus {
  outline: none;
}

div.jsoneditor-tree button:focus {
  /* TODO: nice outline for buttons with focus
  outline: #97B0F8 solid 2px;
  box-shadow: 0 0 8px #97B0F8;
  */
  background-color: #f5f5f5;
  outline: #e5e5e5 solid 1px;
}

div.jsoneditor-tree button.jsoneditor-invisible {
  visibility: hidden;
  background: none;
}

div.jsoneditor-tree div.jsoneditor-show-more {
  display: inline-block;
  padding: 3px 4px;
  margin: 2px 0;
  background-color: #e5e5e5;
  border-radius: 3px;
  color: #808080;
  font-family: arial, sans-serif;
  font-size: 10pt;
}

div.jsoneditor-tree div.jsoneditor-show-more a {
  display: inline-block;
  color: #808080;
}

div.jsoneditor-tree div.jsoneditor-show-more a:hover,
div.jsoneditor-tree div.jsoneditor-show-more a:focus {
  color: #ee422e;
}

div.jsoneditor {
  color: #1A1A1A;
  border: 1px solid #3883fa;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  position: relative;
  padding: 0;
  line-height: 100%;
}

div.jsoneditor-tree table.jsoneditor-tree {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

div.jsoneditor-tree div.jsoneditor-tree-inner {
  padding-bottom: 300px;
}

div.jsoneditor-outer {
  position: static;
  width: 100%;
  height: 100%;
  margin: -35px 0 0 0;
  padding: 35px 0 0 0;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

div.jsoneditor-outer.has-nav-bar {
  margin: -61px 0 0 0;
  padding: 61px 0 0 0;
}

div.jsoneditor-outer.has-status-bar {
  margin: -35px 0 -26px 0;
  padding: 35px 0 26px 0;
}

textarea.jsoneditor-text,
.ace-jsoneditor {
  min-height: 150px;
}

div.jsoneditor-tree {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: auto;
}

textarea.jsoneditor-text {
  width: 100%;
  height: 100%;
  margin: 0;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  outline-width: 0;
  border: none;
  background-color: white;
  resize: none;
}

tr.jsoneditor-highlight,
tr.jsoneditor-selected {
  background-color: #d3d3d3;
}

tr.jsoneditor-selected button.jsoneditor-dragarea,
tr.jsoneditor-selected button.jsoneditor-contextmenu {
  visibility: hidden;
}

tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea,
tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu {
  visibility: visible;
}

div.jsoneditor-tree button.jsoneditor-dragarea {
  background: url("img/jsoneditor-icons.svg") -72px -72px;
  cursor: move;
}

div.jsoneditor-tree button.jsoneditor-dragarea:hover,
div.jsoneditor-tree button.jsoneditor-dragarea:focus,
tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea {
  background-position: -72px -48px;
}

div.jsoneditor tr,
div.jsoneditor th,
div.jsoneditor td {
  padding: 0;
  margin: 0;
}

div.jsoneditor td {
  vertical-align: top;
}

div.jsoneditor td.jsoneditor-tree {
  vertical-align: top;
}

div.jsoneditor-field,
div.jsoneditor-value,
div.jsoneditor td,
div.jsoneditor th,
div.jsoneditor textarea,
.jsoneditor-schema-error {
  font-family: "dejavu sans mono", "droid sans mono", consolas, monaco, "lucida console", "courier new", courier, monospace, sans-serif;
  font-size: 10pt;
  color: #1A1A1A;
}

/* popover */

.jsoneditor-schema-error {
  cursor: default;
  display: inline-block;
  /*font-family: arial, sans-serif;*/
  height: 24px;
  line-height: 24px;
  position: relative;
  text-align: center;
  width: 24px;
}

div.jsoneditor-tree .jsoneditor-schema-error {
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0 4px 0 0;
  background: url("img/jsoneditor-icons.svg")  -168px -48px;
}

.jsoneditor-schema-error .jsoneditor-popover {
  background-color: #4c4c4c;
  border-radius: 3px;
  box-shadow: 0 0 5px rgba(0,0,0,0.4);
  color: #fff;
  display: none;
  padding: 7px 10px;
  position: absolute;
  width: 200px;
  z-index: 4;
}

.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-above {
  bottom: 32px;
  left: -98px;
}

.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-below {
  top: 32px;
  left: -98px;
}

.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-left {
  top: -7px;
  right: 32px;
}

.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-right {
  top: -7px;
  left: 32px;
}

.jsoneditor-schema-error .jsoneditor-popover:before {
  border-right: 7px solid transparent;
  border-left: 7px solid transparent;
  content: '';
  display: block;
  left: 50%;
  margin-left: -7px;
  position: absolute;
}

.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-above:before {
  border-top: 7px solid #4c4c4c;
  bottom: -7px;
}

.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-below:before {
  border-bottom: 7px solid #4c4c4c;
  top: -7px;
}

.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-left:before {
  border-left: 7px solid #4c4c4c;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  content: '';
  top: 19px;
  right: -14px;
  left: inherit;
  margin-left: inherit;
  margin-top: -7px;
  position: absolute;
}

.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-right:before {
  border-right: 7px solid #4c4c4c;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  content: '';
  top: 19px;
  left: -14px;
  margin-left: inherit;
  margin-top: -7px;
  position: absolute;
}

.jsoneditor-schema-error:hover .jsoneditor-popover,
.jsoneditor-schema-error:focus .jsoneditor-popover {
  display: block;
  -webkit-animation: fade-in .3s linear 1, move-up .3s linear 1;
  -moz-animation: fade-in .3s linear 1, move-up .3s linear 1;
  -ms-animation: fade-in .3s linear 1, move-up .3s linear 1;
}

@-webkit-keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@-moz-keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@-ms-keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/*@-webkit-keyframes move-up {*/

/*from   { bottom: 24px; }*/

/*to { bottom: 32px; }*/

/*}*/

/*@-moz-keyframes move-up {*/

/*from   { bottom: 24px; }*/

/*to { bottom: 32px; }*/

/*}*/

/*@-ms-keyframes move-up {*/

/*from   { bottom: 24px; }*/

/*to { bottom: 32px; }*/

/*}*/

/* JSON schema errors displayed at the bottom of the editor in mode text and code */

.jsoneditor .jsoneditor-text-errors {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffef8b;
  border-top: 1px solid #ffd700;
}

.jsoneditor .jsoneditor-text-errors td {
  padding: 3px 6px;
  vertical-align: middle;
}

.jsoneditor-text-errors .jsoneditor-schema-error {
  border: none;
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0 4px 0 0;
  background: url("img/jsoneditor-icons.svg")  -168px -48px;
}
/* ContextMenu - main menu */

div.jsoneditor-contextmenu-root {
  position: relative;
  width: 0;
  height: 0;
}

div.jsoneditor-contextmenu {
  position: absolute;
  box-sizing: content-box;
  z-index: 99999;
}

div.jsoneditor-contextmenu ul,
div.jsoneditor-contextmenu li {
  box-sizing: content-box;
  position: relative;
}

div.jsoneditor-contextmenu ul {
  position: relative;
  left: 0;
  top: 0;
  width: 128px;
  background: white;
  border: 1px solid #d3d3d3;
  box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3);
  list-style: none;
  margin: 0;
  padding: 0;
}

div.jsoneditor-contextmenu ul li button {
  position: relative;
  padding: 0 4px 0 0;
  margin: 0;
  width: 128px;
  height: auto;
  border: none;
  cursor: pointer;
  color: #4d4d4d;
  background: transparent;
  font-size: 10pt;
  font-family: arial, sans-serif;
  box-sizing: border-box;
  text-align: left;
}

/* Fix button padding in firefox */

div.jsoneditor-contextmenu ul li button::-moz-focus-inner {
  padding: 0;
  border: 0;
}

div.jsoneditor-contextmenu ul li button:hover,
div.jsoneditor-contextmenu ul li button:focus {
  color: #1a1a1a;
  background-color: #f5f5f5;
  outline: none;
}

div.jsoneditor-contextmenu ul li button.jsoneditor-default {
  width: 96px;
  /* 128px - 32px */
}

div.jsoneditor-contextmenu ul li button.jsoneditor-expand {
  float: right;
  width: 32px;
  height: 24px;
  border-left: 1px solid #e5e5e5;
}

div.jsoneditor-contextmenu div.jsoneditor-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border: none;
  padding: 0;
  margin: 0;
  background-image: url("img/jsoneditor-icons.svg");
}

div.jsoneditor-contextmenu ul li ul div.jsoneditor-icon {
  margin-left: 24px;
}

div.jsoneditor-contextmenu div.jsoneditor-text {
  padding: 4px 0 4px 24px;
  word-wrap: break-word;
}

div.jsoneditor-contextmenu div.jsoneditor-text.jsoneditor-right-margin {
  padding-right: 24px;
}

div.jsoneditor-contextmenu ul li button div.jsoneditor-expand {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0 4px 0 0;
  background: url("img/jsoneditor-icons.svg") 0 -72px;
}

div.jsoneditor-contextmenu div.jsoneditor-separator {
  height: 0;
  border-top: 1px solid #e5e5e5;
  padding-top: 5px;
  margin-top: 5px;
}

div.jsoneditor-contextmenu button.jsoneditor-remove > div.jsoneditor-icon {
  background-position: -24px 0;
}

div.jsoneditor-contextmenu button.jsoneditor-append > div.jsoneditor-icon {
  background-position: 0 0;
}

div.jsoneditor-contextmenu button.jsoneditor-insert > div.jsoneditor-icon {
  background-position: 0 0;
}

div.jsoneditor-contextmenu button.jsoneditor-duplicate > div.jsoneditor-icon {
  background-position: -48px 0;
}

div.jsoneditor-contextmenu button.jsoneditor-sort-asc > div.jsoneditor-icon {
  background-position: -168px 0;
}

div.jsoneditor-contextmenu button.jsoneditor-sort-desc > div.jsoneditor-icon {
  background-position: -192px 0;
}

div.jsoneditor-contextmenu button.jsoneditor-transform > div.jsoneditor-icon {
  background-position: -216px 0;
}

/* ContextMenu - sub menu */

div.jsoneditor-contextmenu ul li button.jsoneditor-selected,
div.jsoneditor-contextmenu ul li button.jsoneditor-selected:hover,
div.jsoneditor-contextmenu ul li button.jsoneditor-selected:focus {
  color: white;
  background-color: #ee422e;
}

div.jsoneditor-contextmenu ul li {
  overflow: hidden;
}

div.jsoneditor-contextmenu ul li ul {
  display: none;
  position: relative;
  left: -10px;
  top: 0;
  border: none;
  box-shadow: inset 0 0 10px rgba(128, 128, 128, 0.5);
  padding: 0 10px;
  /* TODO: transition is not supported on IE8-9 */
  -webkit-transition: all 0.3s ease-out;
  -moz-transition: all 0.3s ease-out;
  -o-transition: all 0.3s ease-out;
  transition: all 0.3s ease-out;
}

div.jsoneditor-contextmenu ul li ul li button {
  padding-left: 24px;
  animation: all ease-in-out 1s;
}

div.jsoneditor-contextmenu ul li ul li button:hover,
div.jsoneditor-contextmenu ul li ul li button:focus {
  background-color: #f5f5f5;
}

div.jsoneditor-contextmenu button.jsoneditor-type-string > div.jsoneditor-icon {
  background-position: -144px 0;
}

div.jsoneditor-contextmenu button.jsoneditor-type-auto > div.jsoneditor-icon {
  background-position: -120px 0;
}

div.jsoneditor-contextmenu button.jsoneditor-type-object > div.jsoneditor-icon {
  background-position: -72px 0;
}

div.jsoneditor-contextmenu button.jsoneditor-type-array > div.jsoneditor-icon {
  background-position: -96px 0;
}

div.jsoneditor-contextmenu button.jsoneditor-type-modes > div.jsoneditor-icon {
  background-image: none;
  width: 6px;
}

/* pico modal styling */

.jsoneditor-modal-overlay {
  position: absolute !important;
  background: rgb(1,1,1) !important;
  opacity: 0.3 !important;
}

.jsoneditor-modal {
  position: absolute !important;
  max-width: 95% !important;
  width: auto !important;
  border-radius: 2px !important;
  padding: 45px 15px 15px 15px !important;
  box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3) !important;
  color: #4d4d4d;
  line-height: 1.3em;
}

.jsoneditor-modal.jsoneditor-modal-transform {
  width: 600px !important;
}

.jsoneditor-modal .pico-modal-header {
  position: absolute;
  box-sizing: border-box;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0 10px;
  height: 30px;
  line-height: 30px;
  font-family: arial, sans-serif;
  font-size: 11pt;
  background: #3883fa;
  color: white;
}

.jsoneditor-modal table {
  width: 100%;
}

.jsoneditor-modal table th,
.jsoneditor-modal table td {
  padding: 5px 20px 5px 0;
  text-align: left;
  vertical-align: top;
  font-weight: normal;
  color: #4d4d4d;
  line-height: 32px;
}

.jsoneditor-modal p:first-child {
  margin-top: 0;
}

.jsoneditor-modal a {
  color: #3883fa;
}

.jsoneditor-modal table td.jsoneditor-modal-input {
  text-align: right;
  padding-right: 0;
  white-space: nowrap;
}

.jsoneditor-modal table td.jsoneditor-modal-actions {
  padding-top: 15px;
}

.jsoneditor-modal .pico-close {
  background: none !important;
  font-size: 24px !important;
  top: 7px !important;
  right: 7px !important;
  color: white;
}

.jsoneditor-modal select,
.jsoneditor-modal textarea,
.jsoneditor-modal input,
.jsoneditor-modal #query {
  background: #ffffff;
  border: 1px solid #d3d3d3;
  color: #4d4d4d;
  border-radius: 3px;
  padding: 4px;
}

.jsoneditor-modal,
.jsoneditor-modal table td,
.jsoneditor-modal table th,
.jsoneditor-modal select,
.jsoneditor-modal option,
.jsoneditor-modal textarea,
.jsoneditor-modal input,
.jsoneditor-modal #query {
  font-size: 10.5pt;
  font-family: arial, sans-serif;
}

.jsoneditor-modal #query,
.jsoneditor-modal .jsoneditor-transform-preview {
  font-family: "dejavu sans mono", "droid sans mono", consolas, monaco, "lucida console", "courier new", courier, monospace, sans-serif;
  font-size: 10pt;
}

.jsoneditor-modal input[type="button"],
.jsoneditor-modal input[type="submit"] {
  background: #f5f5f5;
  padding: 4px 20px;
}

.jsoneditor-modal select,
.jsoneditor-modal input {
  cursor: pointer;
}

.jsoneditor-modal input {
  padding: 4px;
}

.jsoneditor-modal input[type="text"] {
  cursor: inherit;
}

.jsoneditor-modal input[disabled] {
  background: #d3d3d3;
  color: #808080;
}

.jsoneditor-modal .jsoneditor-select-wrapper {
  position: relative;
  display: inline-block;
}

.jsoneditor-modal .jsoneditor-select-wrapper:after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #666;
  position: absolute;
  right: 8px;
  top: 14px;
  pointer-events: none;
}

.jsoneditor-modal select {
  padding: 3px 24px 3px 10px;
  min-width: 180px;
  max-width: 350px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  text-indent: 0;
  text-overflow: "";
  font-size: 10pt;
  line-height: 1.5em;
}

.jsoneditor-modal select::-ms-expand {
  display: none;
}

.jsoneditor-modal .jsoneditor-button-group input {
  padding: 4px 10px;
  margin: 0;
  border-radius: 0;
  border-left-style: none;
}

.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-first {
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
  border-left-style: solid;
}

.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-last {
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}

.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-asc input.jsoneditor-button-asc,
.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-desc input.jsoneditor-button-desc {
  background: #3883fa;
  border-color: #3883fa;
  color: white;
}

.jsoneditor-modal #query,
.jsoneditor-modal .jsoneditor-transform-preview {
  width: 100%;
  box-sizing: border-box;
}

.jsoneditor-modal .jsoneditor-transform-preview {
  background: #f5f5f5;
  height: 200px;
}

.jsoneditor-modal .jsoneditor-transform-preview.jsoneditor-error {
  color: #ee422e;
}

.jsoneditor-modal .jsoneditor-jmespath-wizard {
  line-height: 1.2em;
  width: 100%;
  background: #ffffe0;
  border: 1px solid #ffe99a;
  padding: 0 10px 10px;
  border-radius: 3px;
}

.jsoneditor-modal .jsoneditor-jmespath-wizard-label {
  font-style: italic;
  margin: 4px 0 2px 0;
}

.jsoneditor-modal .jsoneditor-inline {
  position: relative;
  display: inline-block;
  width: 100%;
  padding: 2px;
}

.jsoneditor-modal .jsoneditor-jmespath-filter {
  display: flex;
  flex-wrap: wrap;
}

.jsoneditor-modal .jsoneditor-jmespath-filter-field {
  width: 170px;
}

.jsoneditor-modal .jsoneditor-jmespath-filter-relation {
  width: 100px;
}

.jsoneditor-modal .jsoneditor-jmespath-filter-value {
  min-width: 100px;
  flex: 1;
}

.jsoneditor-modal .jsoneditor-jmespath-sort-field {
  width: 170px;
}

.jsoneditor-modal .jsoneditor-jmespath-sort-order {
  width: 150px;
}

.jsoneditor-modal .jsoneditor-jmespath-select-fields {
  width: 100%;
}

.jsoneditor-modal .selectr-selected {
  border-color: #d3d3d3;
  padding: 4px 28px 4px 8px;
}

.jsoneditor-modal .selectr-selected .selectr-tag {
  background-color: #3883fa;
  border-radius: 5px;
}
div.jsoneditor-menu {
  width: 100%;
  height: 35px;
  padding: 2px;
  margin: 0;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: white;
  background-color: #3883fa;
  border-bottom: 1px solid #3883fa;
}

div.jsoneditor-menu > button,
div.jsoneditor-menu > div.jsoneditor-modes > button {
  width: 26px;
  height: 26px;
  margin: 2px;
  padding: 0;
  border-radius: 2px;
  border: 1px solid transparent;
  background: transparent url("img/jsoneditor-icons.svg");
  color: white;
  opacity: 0.8;
  font-family: arial, sans-serif;
  font-size: 10pt;
  float: left;
}

div.jsoneditor-menu > button:hover,
div.jsoneditor-menu > div.jsoneditor-modes > button:hover {
  background-color: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
}

div.jsoneditor-menu > button:focus,
div.jsoneditor-menu > button:active,
div.jsoneditor-menu > div.jsoneditor-modes > button:focus,
div.jsoneditor-menu > div.jsoneditor-modes > button:active {
  background-color: rgba(255,255,255,0.3);
}

div.jsoneditor-menu > button:disabled,
div.jsoneditor-menu > div.jsoneditor-modes > button:disabled {
  opacity: 0.5;
}

div.jsoneditor-menu > button.jsoneditor-collapse-all {
  background-position: 0 -96px;
}

div.jsoneditor-menu > button.jsoneditor-expand-all {
  background-position: 0 -120px;
}

div.jsoneditor-menu > button.jsoneditor-sort {
  background-position: -120px -96px;
}

div.jsoneditor-menu > button.jsoneditor-transform {
  background-position: -144px -96px;
}

div.jsoneditor-menu > button.jsoneditor-undo {
  background-position: -24px -96px;
}

div.jsoneditor-menu > button.jsoneditor-undo:disabled {
  background-position: -24px -120px;
}

div.jsoneditor-menu > button.jsoneditor-redo {
  background-position: -48px -96px;
}

div.jsoneditor-menu > button.jsoneditor-redo:disabled {
  background-position: -48px -120px;
}

div.jsoneditor-menu > button.jsoneditor-compact {
  background-position: -72px -96px;
}

div.jsoneditor-menu > button.jsoneditor-format {
  background-position: -72px -120px;
}

div.jsoneditor-menu > button.jsoneditor-repair {
  background-position: -96px -96px;
}

div.jsoneditor-menu > div.jsoneditor-modes {
  display: inline-block;
  float: left;
}

div.jsoneditor-menu > div.jsoneditor-modes > button {
  background-image: none;
  width: auto;
  padding-left: 6px;
  padding-right: 6px;
}

div.jsoneditor-menu > button.jsoneditor-separator,
div.jsoneditor-menu > div.jsoneditor-modes > button.jsoneditor-separator {
  margin-left: 10px;
}

div.jsoneditor-menu a {
  font-family: arial, sans-serif;
  font-size: 10pt;
  color: white;
  opacity: 0.8;
  vertical-align: middle;
}

div.jsoneditor-menu a:hover {
  opacity: 1;
}

div.jsoneditor-menu a.jsoneditor-poweredBy {
  font-size: 8pt;
  position: absolute;
  right: 0;
  top: 0;
  padding: 10px;
}
table.jsoneditor-search input,
table.jsoneditor-search div.jsoneditor-results {
  font-family: arial, sans-serif;
  font-size: 10pt;
  color: #1A1A1A;
  background: transparent;
  /* For Firefox */
}

table.jsoneditor-search div.jsoneditor-results {
  color: white;
  padding-right: 5px;
  line-height: 24px;
}

table.jsoneditor-search {
  position: absolute;
  right: 4px;
  top: 4px;
  border-collapse: collapse;
  border-spacing: 0;
}

table.jsoneditor-search div.jsoneditor-frame {
  border: 1px solid transparent;
  background-color: white;
  padding: 0 2px;
  margin: 0;
}

table.jsoneditor-search div.jsoneditor-frame table {
  border-collapse: collapse;
}

table.jsoneditor-search input {
  width: 120px;
  border: none;
  outline: none;
  margin: 1px;
  line-height: 20px;
}

table.jsoneditor-search button {
  width: 16px;
  height: 24px;
  padding: 0;
  margin: 0;
  border: none;
  background: url("img/jsoneditor-icons.svg");
  vertical-align: top;
}

table.jsoneditor-search button:hover {
  background-color: transparent;
}

table.jsoneditor-search button.jsoneditor-refresh {
  width: 18px;
  background-position: -99px -73px;
}

table.jsoneditor-search button.jsoneditor-next {
  cursor: pointer;
  background-position: -124px -73px;
}

table.jsoneditor-search button.jsoneditor-next:hover {
  background-position: -124px -49px;
}

table.jsoneditor-search button.jsoneditor-previous {
  cursor: pointer;
  background-position: -148px -73px;
  margin-right: 2px;
}

table.jsoneditor-search button.jsoneditor-previous:hover {
  background-position: -148px -49px;
}
div.jsoneditor div.autocomplete.dropdown {
  position: absolute;
  background: white;
  box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3);
  border: 1px solid #d3d3d3;
  z-index: 100;
  overflow-x: hidden;
  overflow-y: auto;
  cursor: default;
  margin: 0;
  padding-left: 2pt;
  padding-right: 5pt;
  text-align: left;
  outline: 0;
  font-family: "dejavu sans mono", "droid sans mono", consolas, monaco, "lucida console", "courier new", courier, monospace, sans-serif;
  font-size: 10pt;
}

div.jsoneditor div.autocomplete.dropdown .item {
  color: #333;
}

div.jsoneditor div.autocomplete.dropdown .item.hover {
  background-color: #ddd;
}

div.jsoneditor div.autocomplete.hint {
  color: #aaa;
  top: 4px;
  left: 4px;
}
div.jsoneditor-treepath {
  padding: 0 5px;
  overflow: hidden;
}

div.jsoneditor-treepath div.jsoneditor-contextmenu-root {
  position: absolute;
  left: 0;
}

div.jsoneditor-treepath span.jsoneditor-treepath-element {
  margin: 1px;
  font-family: arial, sans-serif;
  font-size: 10pt;
}

div.jsoneditor-treepath span.jsoneditor-treepath-seperator {
  margin: 2px;
  font-size: 9pt;
  font-family: arial, sans-serif;
}

div.jsoneditor-treepath span.jsoneditor-treepath-element:hover,
div.jsoneditor-treepath span.jsoneditor-treepath-seperator:hover {
  cursor: pointer;
  text-decoration: underline;
}
div.jsoneditor-statusbar {
  line-height: 26px;
  height: 26px;
  margin-top: -1px;
  color: #808080;
  background-color: #ebebeb;
  border-top: 1px solid #d3d3d3;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  font-size: 10pt;
}

div.jsoneditor-statusbar > .jsoneditor-curserinfo-label {
  margin: 0 2px 0 4px;
}

div.jsoneditor-statusbar > .jsoneditor-curserinfo-val {
  margin-right: 12px;
}

div.jsoneditor-statusbar > .jsoneditor-curserinfo-count {
  margin-left: 4px;
}
div.jsoneditor-navigation-bar {
  width: 100%;
  height: 26px;
  line-height: 26px;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid #d3d3d3;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: #808080;
  background-color: #ebebeb;
  overflow: hidden;
  font-family: arial, sans-serif;
  font-size: 10pt;
}
/*!
 * Selectr 2.4.0
 * https://github.com/Mobius1/Selectr
 *
 * Released under the MIT license
 */

.selectr-container {
  position: relative;
}

.selectr-container li {
  list-style: none;
}

.selectr-hidden {
  position: absolute;
  overflow: hidden;
  clip: rect(0px, 0px, 0px, 0px);
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0 none;
}

.selectr-visible {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 11;
}

.selectr-desktop.multiple .selectr-visible {
  display: none;
}

.selectr-desktop.multiple.native-open .selectr-visible {
  top: 100%;
  min-height: 200px !important;
  height: auto;
  opacity: 1;
  display: block;
}

.selectr-container.multiple.selectr-mobile .selectr-selected {
  z-index: 0;
}

.selectr-selected {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  padding: 7px 28px 7px 14px;
  cursor: pointer;
  border: 1px solid #999;
  border-radius: 3px;
  background-color: #fff;
}

.selectr-selected::before {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 0;
  height: 0;
  content: '';
  -o-transform: rotate(0deg) translate3d(0px, -50%, 0px);
  -ms-transform: rotate(0deg) translate3d(0px, -50%, 0px);
  -moz-transform: rotate(0deg) translate3d(0px, -50%, 0px);
  -webkit-transform: rotate(0deg) translate3d(0px, -50%, 0px);
  transform: rotate(0deg) translate3d(0px, -50%, 0px);
  border-width: 4px 4px 0 4px;
  border-style: solid;
  border-color: #6c7a86 transparent transparent;
}

.selectr-container.open .selectr-selected::before,
.selectr-container.native-open .selectr-selected::before {
  border-width: 0 4px 4px 4px;
  border-style: solid;
  border-color: transparent transparent #6c7a86;
}

.selectr-label {
  display: none;
  overflow: hidden;
  width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.selectr-placeholder {
  color: #6c7a86;
}

.selectr-tags {
  margin: 0;
  padding: 0;
  white-space: normal;
}

.has-selected .selectr-tags {
  margin: 0 0 -2px;
}

.selectr-tag {
  list-style: none;
  position: relative;
  float: left;
  padding: 2px 25px 2px 8px;
  margin: 0 2px 2px 0;
  cursor: default;
  color: #fff;
  border: medium none;
  border-radius: 10px;
  background: #acb7bf none repeat scroll 0 0;
}

.selectr-container.multiple.has-selected .selectr-selected {
  padding: 5px 28px 5px 5px;
}

.selectr-options-container {
  position: absolute;
  z-index: 10000;
  top: calc(100% - 1px);
  left: 0;
  display: none;
  box-sizing: border-box;
  width: 100%;
  border-width: 0 1px 1px;
  border-style: solid;
  border-color: transparent #999 #999;
  border-radius: 0 0 3px 3px;
  background-color: #fff;
}

.selectr-container.open .selectr-options-container {
  display: block;
}

.selectr-input-container {
  position: relative;
  display: none;
}

.selectr-clear,
.selectr-input-clear,
.selectr-tag-remove {
  position: absolute;
  top: 50%;
  right: 22px;
  width: 20px;
  height: 20px;
  padding: 0;
  cursor: pointer;
  -o-transform: translate3d(0px, -50%, 0px);
  -ms-transform: translate3d(0px, -50%, 0px);
  -moz-transform: translate3d(0px, -50%, 0px);
  -webkit-transform: translate3d(0px, -50%, 0px);
  transform: translate3d(0px, -50%, 0px);
  border: medium none;
  background-color: transparent;
  z-index: 11;
}

.selectr-clear,
.selectr-input-clear {
  display: none;
}

.selectr-container.has-selected .selectr-clear,
.selectr-input-container.active .selectr-input-clear {
  display: block;
}

.selectr-selected .selectr-tag-remove {
  right: 2px;
}

.selectr-clear::before,
.selectr-clear::after,
.selectr-input-clear::before,
.selectr-input-clear::after,
.selectr-tag-remove::before,
.selectr-tag-remove::after {
  position: absolute;
  top: 5px;
  left: 9px;
  width: 2px;
  height: 10px;
  content: ' ';
  background-color: #6c7a86;
}

.selectr-tag-remove::before,
.selectr-tag-remove::after {
  top: 4px;
  width: 3px;
  height: 12px;
  background-color: #fff;
}

.selectr-clear:before,
.selectr-input-clear::before,
.selectr-tag-remove::before {
  -o-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

.selectr-clear:after,
.selectr-input-clear::after,
.selectr-tag-remove::after {
  -o-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.selectr-input-container.active,
.selectr-input-container.active .selectr-clear {
  display: block;
}

.selectr-input {
  top: 5px;
  left: 5px;
  box-sizing: border-box;
  width: calc(100% - 30px);
  margin: 10px 15px;
  padding: 7px 30px 7px 9px;
  border: 1px solid #999;
  border-radius: 3px;
}

.selectr-notice {
  display: none;
  box-sizing: border-box;
  width: 100%;
  padding: 8px 16px;
  border-top: 1px solid #999;
  border-radius: 0 0 3px 3px;
  background-color: #fff;
}

.selectr-container.notice .selectr-notice {
  display: block;
}

.selectr-container.notice .selectr-selected {
  border-radius: 3px 3px 0 0;
}

.selectr-options {
  position: relative;
  top: calc(100% + 2px);
  display: none;
  overflow-x: auto;
  overflow-y: scroll;
  max-height: 200px;
  margin: 0;
  padding: 0;
}

.selectr-container.open .selectr-options,
.selectr-container.open .selectr-input-container,
.selectr-container.notice .selectr-options-container {
  display: block;
}

.selectr-option {
  position: relative;
  display: block;
  padding: 5px 20px;
  list-style: outside none none;
  cursor: pointer;
  font-weight: normal;
}

.selectr-options.optgroups > .selectr-option {
  padding-left: 25px;
}

.selectr-optgroup {
  font-weight: bold;
  padding: 0;
}

.selectr-optgroup--label {
  font-weight: bold;
  margin-top: 10px;
  padding: 5px 15px;
}

.selectr-match {
  text-decoration: underline;
}

.selectr-option.selected {
  background-color: #ddd;
}

.selectr-option.active {
  color: #fff;
  background-color: #5897fb;
}

.selectr-option.disabled {
  opacity: 0.4;
}

.selectr-option.excluded {
  display: none;
}

.selectr-container.open .selectr-selected {
  border-color: #999 #999 transparent #999;
  border-radius: 3px 3px 0 0;
}

.selectr-container.open .selectr-selected::after {
  -o-transform: rotate(180deg) translate3d(0px, 50%, 0px);
  -ms-transform: rotate(180deg) translate3d(0px, 50%, 0px);
  -moz-transform: rotate(180deg) translate3d(0px, 50%, 0px);
  -webkit-transform: rotate(180deg) translate3d(0px, 50%, 0px);
  transform: rotate(180deg) translate3d(0px, 50%, 0px);
}

.selectr-disabled {
  opacity: .6;
}

.selectr-empty,
.has-selected .selectr-placeholder {
  display: none;
}

.has-selected .selectr-label {
  display: block;
}

/* TAGGABLE */

.taggable .selectr-selected {
  padding: 4px 28px 4px 4px;
}

.taggable .selectr-selected::after {
  display: table;
  content: " ";
  clear: both;
}

.taggable .selectr-label {
  width: auto;
}

.taggable .selectr-tags {
  float: left;
  display: block;
}

.taggable .selectr-placeholder {
  display: none;
}

.input-tag {
  float: left;
  min-width: 90px;
  width: auto;
}

.selectr-tag-input {
  border: medium none;
  padding: 3px 10px;
  width: 100%;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
}

.selectr-input-container.loading::after {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 20px;
  height: 20px;
  content: '';
  -o-transform: translate3d(0px, -50%, 0px);
  -ms-transform: translate3d(0px, -50%, 0px);
  -moz-transform: translate3d(0px, -50%, 0px);
  -webkit-transform: translate3d(0px, -50%, 0px);
  transform: translate3d(0px, -50%, 0px);
  -o-transform-origin: 50% 0 0;
  -ms-transform-origin: 50% 0 0;
  -moz-transform-origin: 50% 0 0;
  -webkit-transform-origin: 50% 0 0;
  transform-origin: 50% 0 0;
  -moz-animation: 500ms linear 0s normal forwards infinite running spin;
  -webkit-animation: 500ms linear 0s normal forwards infinite running spin;
  animation: 500ms linear 0s normal forwards infinite running spin;
  border-width: 3px;
  border-style: solid;
  border-color: #aaa #ddd #ddd;
  border-radius: 50%;
}

@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg) translate3d(0px, -50%, 0px);
    transform: rotate(0deg) translate3d(0px, -50%, 0px);
  }

  100% {
    -webkit-transform: rotate(360deg) translate3d(0px, -50%, 0px);
    transform: rotate(360deg) translate3d(0px, -50%, 0px);
  }
}

@keyframes spin {
  0% {
    -webkit-transform: rotate(0deg) translate3d(0px, -50%, 0px);
    transform: rotate(0deg) translate3d(0px, -50%, 0px);
  }

  100% {
    -webkit-transform: rotate(360deg) translate3d(0px, -50%, 0px);
    transform: rotate(360deg) translate3d(0px, -50%, 0px);
  }
}

.selectr-container.open.inverted .selectr-selected {
  border-color: transparent #999 #999;
  border-radius: 0 0 3px 3px;
}

.selectr-container.inverted .selectr-options-container {
  border-width: 1px 1px 0;
  border-color: #999 #999 transparent;
  border-radius: 3px 3px 0 0;
  background-color: #fff;
}

.selectr-container.inverted .selectr-options-container {
  top: auto;
  bottom: calc(100% - 1px);
}

.selectr-container ::-webkit-input-placeholder {
  color: #6c7a86;
  opacity: 1;
}

.selectr-container ::-moz-placeholder {
  color: #6c7a86;
  opacity: 1;
}

.selectr-container :-ms-input-placeholder {
  color: #6c7a86;
  opacity: 1;
}

.selectr-container ::placeholder {
  color: #6c7a86;
  opacity: 1;
}


text:
"use strict";

 angular.module('constantes', [])

.constant('ENV', {name:'production',APIEndPoint:'http://api.catchai.cl/'})

;


text:
require 'gengiscan'
require 'webmock/rspec'


text:
/*
 * ProjectEuler/src/c/Problem194.c
 *
 * Coloured Configurations
 * =======================
 * Published on Saturday, 17th May 2008, 10:00 am
 *
 * Consider graphs built with the units A:   and B: , where the units are glued
 * along  the vertical edges as in the graph . A configuration of type (a,b,c)
 * is a graph thus built of a units A and b units B, where the graph's vertices
 * are coloured using up to c colours, so that no two adjacent vertices have the
 * same colour.  The compound graph above is an example of a configuration of
 * type (2,2,6), in fact of type (2,2,c) for all c  4. Let N(a,b,c) be the
 * number of configurations of type (a,b,c).  For example, N(1,0,3) = 24,
 * N(0,2,4) = 92928 and N(2,2,3) = 20736. Find the last 8 digits of
 * N(25,75,1984).
 */

#include <stdio.h>
#include "ProjectEuler/ProjectEuler.h"
#include "ProjectEuler/Problem194.h"

int main(int argc, char** argv) {

    return 0;
}


text:
/**
 * @fileoverview
 * @suppress {checkTypes}
 */

// TODO: the type below should be emitted as `outer.debugger.Foo`. However
// TypeScript does not take the re-export in the outer namespace into account,
// and thus produces not quite the right result.
// See https://github.com/Microsoft/TypeScript/issues/29459

const x: outer.debugger.Foo|null = null;

export {};


text:
namespace CompanyHierarchy
{
    public interface ICustomer : IPerson
    {
        decimal NetPurchaseAmount { get; set; }
    }
}