text:
+++
Talk_date = ""
Talk_start_time = ""
Talk_end_time = ""
Title = "Organizing for Your Ethical Principles"
Type = "talk"
Speakers = ["liz-fong-jones"]
+++

Our job as engineers does not stop with eliminating technical defects and ensuring high reliability. Engineers of all kinds must ensure their work serves the public good. A service that reliably harms, exacerbates injustices, or excludes marginalized groups is not a service worth building and maintaining. Learn how to effectively accomplish change in your working conditions or your employer's products through grassroots employee advocacy, from an employee advocate who has successfully lobbied their employer to change both product policies and working conditions for the better.


text:
package net.kuujo.vertigo.network.builder;

/**
 * Input builder.
 *
 * @author Jordan Halterman
 */
public interface InputBuilder extends ComponentLikeBuilder<InputBuilder> {

  /**
   * Returns an input port builder for the given port.
   *
   * @param name The port name.
   * @return The input port builder.
   */
  InputPortBuilder port(String name);

}

redpajama_set_name: RedPajamaGithub


text:
package 'libcap2-bin'
package 'bridge-utils'
package 'kvm'
package 'libvirt-bin'
package 'libvirt-dev'
package 'ubuntu-vm-builder'

gem_package 'hpricot'

# Setup vmbuilder templates and post install scripts.
directory "/usr/local/share/kvm" do
  owner "root"
  group "libvirtd"
  mode 0750
end

%w(files scripts templates).each do |type|
  remote_directory "/usr/local/share/kvm/#{type}" do
    source type
    owner "root"
    group "libvirtd"
    mode 0755
    files_mode 0755
    files_backup false
  end
end

template "/usr/local/share/kvm/scripts/bootstrap-chef.sh" do
  source "bootstrap-chef.sh.erb"
  owner "root"
  group "libvirtd"
  mode 0755
  backup false
end

# Grant special powers to QEMU
file "/usr/bin/qemu-system-x86_64" do
  owner "root"
  group "admin"
  mode 04750
end

# Setup network bridging
service "networking"
cookbook_file "/etc/network/interfaces" do
  source "interfaces"
  notifies(:restart, resources(:service => "networking"))
end

# Install the Ruby libvirt gem
libvirt_gem = "ruby-libvirt-0.1.0.gem"
execute "install ruby-libvirt gem" do
  cwd "/tmp"
  command "wget #{node[:pkg_url]}/gems/#{libvirt_gem} && gem install #{libvirt_gem} --no-rdoc --no-ri"
  not_if "gem list ruby-libvirt | grep 0.1.0"
end

search(:slices, "host:#{node[:hostname]}").each do |slice|
  defaults ||= search(:slices, "id:default").first
  slice = defaults.merge(slice)

  # Install VMs
  virtual_machine slice[:id] do
    path slice[:path]
    vcpus slice[:vcpus]
    memory slice[:memory]
    run_list slice[:run_list]

    suite slice[:suite]
    flavor slice[:flavor]
    arch slice[:arch]
    root_size slice[:root_size]
    swap_size slice[:swap_size]

    external_ip slice[:external_ip]
    storage_ip slice[:storage_ip]
    root_password slice[:root_password]
  end
end


text:
<!DOCTYPE html>

    <meta charset="UTF-8" />
    <meta name="robots" content="index, follow, all" />
    <title>Thelia\Core\Template\Smarty\Assets\SmartyAssetsManager | Thelia 2 API</title>

            <link rel="stylesheet" type="text/css" href="../../../../../css/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="../../../../../css/bootstrap-theme.min.css">
        <link rel="stylesheet" type="text/css" href="../../../../../css/sami.css">

        <meta name="MobileOptimized" content="width">
        <meta name="HandheldFriendly" content="true">
        <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">

                <form id="search-form" action="../../../../../search.html" method="GET">

            <input name="search"
                   class="typeahead form-control"
                   type="search"
                   placeholder="Search">
        </form>

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
                    Toggle navigation

                </button>
                Thelia 2 API

Classes

Namespaces

Interfaces

Traits

Index

Search

class

Thelia

Core

Template

Smarty

Assets

SmartyAssetsManager

SmartyAssetsManager

    class
    SmartyAssetsManager

Constants

                ASSET_TYPE_AUTO

Methods

                    __construct(
    AssetManagerInterface $assetsManager,
    string $web_root,
    string $path_relative_to_web_root)

Creates a new SmartyAssetsManager instance

                    prepareAssets($assets_directory,
    Smarty_Internal_Template $template)

No description

    string

                    computeAssetUrl(
    string $assetType,
    array $params,
    Smarty_Internal_Template $template)

Retrieve asset URL

                    processSmartyPluginCall($assetType, $params, $content,
    Smarty_Internal_Template $template, $repeat)

No description

Details

at line 41

    __construct(
    AssetManagerInterface $assetsManager,
    string $web_root,
    string $path_relative_to_web_root)

Creates a new SmartyAssetsManager instance

Parameters

    AssetManagerInterface
                $assetsManager
                an asset manager instance

    string
                $web_root
                the disk path to the web root (with final /)

    string
                $path_relative_to_web_root
                the path (relative to web root) where the assets will be generated

at line 49

    prepareAssets($assets_directory,
    Smarty_Internal_Template $template)

Parameters

                $assets_directory

    Smarty_Internal_Template
                $template

at line 97

    string
    computeAssetUrl(
    string $assetType,
    array $params,
    Smarty_Internal_Template $template)

Retrieve asset URL

Parameters

    string
                $assetType
                js|css|image

    array
                $params
                Parameters
                                            - file File path in the default template
                                            - source module asset
                                            - filters filter to apply
                                            - debug
                                            - template if you want to load asset from another template

    Smarty_Internal_Template
                $template
                Smarty Template

Return Value

    string

Exceptions

                Exception

at line 246

    processSmartyPluginCall($assetType, $params, $content,
    Smarty_Internal_Template $template, $repeat)

Parameters

                $assetType

                $params

                $content

    Smarty_Internal_Template
                $template

                $repeat

        Generated by Sami, the API Documentation Generator.


text:
using Newtonsoft.Json;
using Reevoo.Model;
using System.Collections.Generic;

namespace Reevoo.Message
{
    public class ReviewableShortFormatListResponse
    {
        [JsonProperty(PropertyName = "summary")]
        public Summary Summary { get; set; }

        [JsonProperty(PropertyName = "reviewables")]
        public List<ReviewableCondensed> Reviewables { get; set; }
    }
}


text:
package controlP5;

/**
 * controlP5 is a processing gui library.
 *
 *  2006-2012 by Andreas Schlegel
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1
 * of the License, or (at your option) any later version.
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General
 * Public License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307 USA
 *
 * @author 		Andreas Schlegel (http://www.sojamo.de)
 * @modified	05/30/2012
 * @version		0.7.5
 *
 */

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;

import processing.core.PApplet;
import processing.core.PVector;

/**
 * The ControlP5Base supports the ControlP5 class and implements all adder methods to add
 * controllers to controlP5.
 */
public class ControlP5Base implements ControlP5Constants {

	private ControlP5 cp5;

	ControllerProperties _myProperties;

	private ControllerAutomator _myAutomator;

	protected Map<Object, ArrayList<ControllerInterface<?>>> _myObjectToControllerMap = new HashMap<Object, ArrayList<ControllerInterface<?>>>();

	protected Map<String, FieldChangedListener> _myFieldChangedListenerMap = new HashMap<String, FieldChangedListener>();

	public Tab getDefaultTab() {
		return (Tab) cp5.controlWindow.getTabs().get(1);
	}

	protected void init(ControlP5 theControlP5) {
		cp5 = theControlP5;
		_myProperties = new ControllerProperties(cp5);
		_myAutomator = new ControllerAutomator(cp5);
		currentGroupPointer = cp5.controlWindow.getTab("default");
	}

	public ControllerLayout getLayout() {
		return new ControllerLayout(cp5);
	}

	public Tab addTab(String theName) {
		return addTab(cp5.controlWindow, theName);
	}

	public Tab addTab(PApplet theWindow, String theName) {
		return addTab(cp5.controlWindow, theName);
	}

	public Tab addTab(ControlWindow theWindow, String theName) {
		for (int i = 0; i < theWindow.getTabs().size(); i++) {
			if (theWindow.getTabs().get(i).getName().equals(theName)) {
				return (Tab) theWindow.getTabs().get(i);
			}
		}
		Tab myTab = new Tab(cp5, theWindow, theName);
		theWindow.getTabs().add(myTab);
		return myTab;
	}

	public Button addButton(final Object theObject, String theIndex, final String theName, final float theValue, final int theX, final int theY, final int theW, final int theH) {
		Button myController = new Button(cp5, (ControllerGroup<?>) cp5.controlWindow.getTabs().get(1), theName, theValue, theX, theY, theW, theH);
		cp5.register(theObject, theIndex, myController);
		myController.registerProperty("value");
		myController.getProperty("value").disable();
		return myController;
	}

	public Button addButton(final String theName, final float theValue, final int theX, final int theY, final int theW, final int theH) {
		return addButton(null, "", theName, theValue, theX, theY, theW, theH);
	}

	public Bang addBang(final Object theObject, String theIndex, final String theName, final int theX, final int theY, final int theWidth, final int theHeight) {
		Bang myController = new Bang(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theX, theY, theWidth, theHeight);
		cp5.register(theObject, theIndex, myController);
		myController.registerProperty("value");
		myController.getProperty("value").disable();
		return myController;
	}

	public Bang addBang(final String theName, final int theX, final int theY) {
		return addBang(null, "", theName, theX, theY, 20, 20);
	}

	public Bang addBang(final String theName) {
		return addBang(null, "", theName);
	}

	public Bang addBang(final String theName, final int theX, final int theY, final int theWidth, final int theHeight) {
		return addBang(null, "", theName, theX, theY, theWidth, theHeight);
	}

	public Toggle addToggle(final Object theObject, String theIndex, final String theName, final boolean theDefaultValue, final float theX, final float theY, final int theWidth, final int theHeight) {
		Toggle myController = new Toggle(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, (theDefaultValue == true) ? 1f : 0f, theX, theY, theWidth, theHeight);
		cp5.register(theObject, theIndex, myController);
		myController.registerProperty("value");
		return myController;
	}

	public Toggle addToggle(final String theName, final boolean theDefaultValue, final float theX, final float theY, final int theWidth, final int theHeight) {
		return addToggle(null, "", theName, theDefaultValue, theX, theY, theWidth, theHeight);
	}

	public Toggle addToggle(final String theName, final float theX, final float theY, final int theWidth, final int theHeight) {
		return addToggle(null, "", theName, false, theX, theY, theWidth, theHeight);
	}

	public Toggle addToggle(final Object theObject, final String theIndex, final String theName, final float theX, final float theY, final int theWidth, final int theHeight) {
		return addToggle(theObject, theIndex, theName, false, theX, theY, theWidth, theHeight);
	}

	public Tooltip addTooltip() {
		return null;
	}

	/**
	 * Matrix is a 2-D matrix controller using toggle controllers in a rows and a columns setup.
	 * useful for software drum machines.
	 */

	public Matrix addMatrix(final Object theObject, final String theIndex, final String theName, final int theCellX, final int theCellY, final int theX, final int theY, final int theWidth, final int theHeight) {
		Matrix myController = new Matrix(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theCellX, theCellY, theX, theY, theWidth, theHeight);
		cp5.register(theObject, theIndex, myController);
		myController.registerProperty("cells").registerProperty("interval");
		return myController;
	}

	public Matrix addMatrix(final String theName) {
		return addMatrix(theName, 10, 10, 0, 0, 100, 100);
	}

	public Matrix addMatrix(final String theName, final int theCellX, final int theCellY, final int theX, final int theY, final int theWidth, final int theHeight) {
		return addMatrix(null, "", theName, theCellX, theCellY, theX, theY, theWidth, theHeight);
	}

	public Slider2D addSlider2D(final String theName) {
		return addSlider2D(theName, 0, 0, 99, 99);
	}

	/**
	 * Adds a 2D slider to controlP5. A 2D slider is a 2D area with 1 cursor returning its xy
	 * coordinates.
	 */
	public Slider2D addSlider2D(Object theObject, final String theIndex, final String theName, float theMinX, float theMaxX, float theMinY, float theMaxY, float theDefaultValueX, float theDefaultValueY, int theX, int theY, int theW, int theH) {
		Slider2D myController = new Slider2D(cp5, (ControllerGroup<?>) cp5.controlWindow.getTabs().get(1), theName, theX, theY, theW, theH);
		cp5.register(theObject, theIndex, myController);
		myController.setMinX(theMinX);
		myController.setMaxX(theMaxX);
		myController.setMinY(theMinY);
		myController.setMaxY(theMaxY);
		myController.setArrayValue(new float[] { theDefaultValueX, theDefaultValueY });
		myController.updateValue();
		myController.registerProperty("arrayValue").registerProperty("minX").registerProperty("maxX").registerProperty("minY").registerProperty("maxY");
		return myController;
	}

	public Slider2D addSlider2D(String theName, int theX, int theY, int theW, int theH) {
		return addSlider2D(null, "", theName, 0, theW, 0, theH, 0, 0, theX, theY, theW, theH);
	}

	public Slider2D addSlider2D(Object theObject, final String theIndex, final String theName, int theX, int theY, int theW, int theH) {
		return addSlider2D(theObject, theIndex, theName, 0, theW, 0, theH, 0, 0, theX, theY, theW, theH);
	}

	public Slider2D addSlider2D(String theName, float theMinX, float theMaxX, float theMinY, float theMaxY, float theDefaultValueX, float theDefaultValueY, int theX, int theY, int theW, int theH) {
		return addSlider2D(null, "", theName, theMinX, theMaxX, theMinY, theMaxY, theDefaultValueX, theDefaultValueY, theX, theY, theW, theH);
	}

	/**
	 * Adds a slider to controlP5. by default it will be added to the default tab of the main
	 * window. Sliders can be arranged vertically and horizontally depending on their width and
	 * height. The look of a sliders control can either be a bar or a handle. you can add tickmarks
	 * to a slider or use the default free-control setting. A slider can be controller by mouse
	 * click, drag or mouse-wheel.
	 */
	public Slider addSlider(Object theObject, final String theIndex, final String theName, float theMin, float theMax, float theDefaultValue, int theX, int theY, int theW, int theH) {
		Slider myController = new Slider(cp5, (ControllerGroup<?>) cp5.controlWindow.getTabs().get(1), theName, theMin, theMax, theDefaultValue, theX, theY, theW, theH);
		cp5.register(theObject, theIndex, myController);
		myController.registerProperty("value").registerProperty("min").registerProperty("max");
		return myController;
	}

	public Slider addSlider(String theName, float theMin, float theMax, float theDefaultValue, int theX, int theY, int theW, int theH) {
		return addSlider(null, "", theName, theMin, theMax, theDefaultValue, theX, theY, theW, theH);
	}

	public Slider addSlider(final String theName, final float theMin, final float theMax, final int theX, final int theY, final int theWidth, final int theHeight) {
		return addSlider(null, "", theName, theMin, theMax, theMin, theX, theY, theWidth, theHeight);
	}

	public Slider addSlider(Object theObject, final String theIndex, final String theName, float theMin, float theMax, int theX, int theY, int theW, int theH) {
		return addSlider(theObject, theIndex, theName, theMin, theMax, theMin, theX, theY, theW, theH);
	}

	public Range addRange(final String theName) {
		return addRange(theName, 0, 100, 0, 100, 0, 0, 99, 9);
	}

	/**
	 * A range controller, a slider that allows control on both ends of the slider.
	 */
	public Range addRange(Object theObject, final String theIndex, String theName, float theMin, float theMax, float theDefaultMinValue, float theDefaultMaxValue, int theX, int theY, int theW, int theH) {
		Range myController = new Range(cp5, (ControllerGroup<?>) cp5.controlWindow.getTabs().get(1), theName, theMin, theMax, theDefaultMinValue, theDefaultMaxValue, theX, theY, theW, theH);
		cp5.register(theObject, theIndex, myController);
		myController.registerProperty("lowValue").registerProperty("highValue");
		return myController;
	}

	public Range addRange(String theName, float theMin, float theMax, float theDefaultMinValue, float theDefaultMaxValue, int theX, int theY, int theW, int theH) {
		return addRange(null, "", theName, theMin, theMax, theDefaultMinValue, theDefaultMaxValue, theX, theY, theW, theH);
	}

	public Range addRange(final String theName, final float theMin, final float theMax, final int theX, final int theY, final int theWidth, final int theHeight) {
		return addRange(null, "", theName, theMin, theMax, theMin, theMax, theX, theY, theWidth, theHeight);
	}

	public Range addRange(final Object theObject, final String theIndex, final String theName, final float theMin, final float theMax, final int theX, final int theY, final int theWidth, final int theHeight) {
		return addRange(theObject, theIndex, theName, theMin, theMax, theMin, theMax, theX, theY, theWidth, theHeight);
	}

	public Numberbox addNumberbox(final Object theObject, final String theIndex, final String theName, final float theDefaultValue, final int theX, final int theY, final int theWidth, final int theHeight) {
		Numberbox myController = new Numberbox(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theDefaultValue, theX, theY, theWidth, theHeight);
		cp5.register(theObject, theIndex, myController);
		myController.registerProperty("value");
		return myController;
	}

	public Numberbox addNumberbox(final String theName, final int theX, final int theY, final int theWidth, final int theHeight) {
		return addNumberbox(null, "", theName, Float.NaN, theX, theY, theWidth, theHeight);
	}

	public Numberbox addNumberbox(final Object theObject, final String theIndex, final String theName, final int theX, final int theY, final int theWidth, final int theHeight) {
		return addNumberbox(theObject, theIndex, theName, Float.NaN, theX, theY, theWidth, theHeight);
	}

	public Numberbox addNumberbox(final String theName, final float theDefaultValue, final int theX, final int theY, final int theWidth, final int theHeight) {
		return addNumberbox(null, "", theName, theDefaultValue, theX, theY, theWidth, theHeight);
	}

	/**
	 * Knobs can use limited and endless revolutions, custom angles and starting points. There are 2
	 * control areas for a knob, an area closer to the edge allows 'click-and-adjust' control, a
	 * click and drag action at the inside allows to gradually change the value of a know when
	 * dragged. A knob can be controller by mouse click, drag or mouse-wheel.
	 */
	public Knob addKnob(final Object theObject, final String theIndex, final String theName, final float theMin, final float theMax, final float theDefaultValue, final int theX, final int theY, final int theDiameter) {
		Knob myController = new Knob(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theMin, theMax, theDefaultValue, theX, theY, theDiameter);
		cp5.register(theObject, theIndex, myController);
		myController.registerProperty("value");
		return myController;
	}

	public Knob addKnob(final String theName, final float theMin, final float theMax, final int theX, final int theY, final int theDiameter) {
		return addKnob(null, "", theName, theMin, theMax, theMin, theX, theY, theDiameter);
	}

	public Knob addKnob(final Object theObject, final String theIndex, final String theName, final float theMin, final float theMax, final int theX, final int theY, final int theDiameter) {
		return addKnob(theObject, theIndex, theName, theMin, theMax, theX, theY, theDiameter);
	}

	public Knob addKnob(final String theName, final float theMin, final float theMax, final float theDefaultValue, final int theX, final int theY, final int theDiameter) {
		return addKnob(null, "", theName, theMin, theMax, theDefaultValue, theX, theY, theDiameter);
	}

	/**
	 * Multilist is a tree like menu.
	 */
	public MultiList addMultiList(final Object theObject, final String theIndex, final String theName, final int theX, final int theY, final int theWidth, final int theHeight) {
		MultiList myController = new MultiList(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theX, theY, theWidth, theHeight);
		cp5.register(theObject, theIndex, myController);
		myController.registerProperty("value");
		return myController;
	}

	public MultiList addMultiList(final String theName, final int theX, final int theY, final int theWidth, final int theHeight) {
		return addMultiList(null, "", theName, theX, theY, theWidth, theHeight);
	}

	public Textlabel addTextlabel(final String theName) {
		return addTextlabel(theName, "", 0, 0);
	}

	public Textlabel addTextlabel(final Object theObject, final String theIndex, final String theName, final String theText, final int theX, final int theY) {
		Textlabel myController = new Textlabel(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theText, theX, theY);
		cp5.register(theObject, theIndex, myController);
		myController.registerProperty("value").registerProperty("stringValue");
		return myController;
	}

	public Textlabel addTextlabel(final String theName, final String theText, final int theX, final int theY) {
		return addTextlabel(null, "", theName, theText, theX, theY);
	}

	public Textlabel addTextlabel(final Object theObject, final String theIndex, final String theName, final String theText) {
		return addTextlabel(theObject, theIndex, theName, theText, 0, 0);
	}

	public Textlabel addTextlabel(final String theName, final String theText) {
		return addTextlabel(null, "", theName, theText, 0, 0);
	}

	public Textarea addTextarea(final String theName) {
		return addTextarea(theName, "", 0, 0, 199, 99);
	}

	/**
	 * A Textarea is a label without any controller functionality and can be used to leave notes,
	 * headlines, etc when extending the dedicated area of the Textrea, a scrollbar is added on the
	 * right.
	 */
	public Textarea addTextarea(final String theName, final String theText, final int theX, final int theY, final int theW, final int theH) {
		Textarea myController = new Textarea(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theText, theX, theY, theW, theH);
		cp5.register(null, "", myController);
		myController.registerProperty("text");
		return myController;
	}

	public Textfield addTextfield(final String theIndex) {
		return addTextfield(theIndex, 0, 0, 199, 19);
	}

	/**
	 * A Textfield allows single line text input. If text goes beyond the edges of a Textfield box,
	 * the text will automatically scroll. Use Arrow keys to navigate back and forth.
	 */
	public Textfield addTextfield(final Object theObject, final String theIndex, final String theName, final int theX, final int theY, final int theW, final int theH) {
		Textfield myController = new Textfield(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, "", theX, theY, theW, theH);
		cp5.register(theObject, theIndex, myController);
		myController.registerProperty("text");
		return myController;
	}

	public Textfield addTextfield(final String theName, final int theX, final int theY, final int theW, final int theH) {
		return addTextfield(null, "", theName, theX, theY, theW, theH);
	}

	public Textfield addTextfield(final Object theObject, final String theIndex, final String theName) {
		return addTextfield(theObject, theIndex, theName, 0, 0, 99, 19);
	}

	// TODO
	// addTextarea theObject

	public Accordion addAccordion(String theName) {
		Accordion myController = new Accordion(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, 0, 0, 200);
		cp5.register(null, "", myController);
		return myController;
	}

	public Accordion addAccordion(String theName, int theX, int theY, int theWidth) {
		Accordion myController = new Accordion(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theX, theY, theWidth);
		cp5.register(null, "", myController);
		return myController;
	}

	/**
	 * Use radio buttons for multiple choice options.
	 */
	public RadioButton addRadioButton(final String theName) {
		return addRadioButton(theName, 0, 0);
	}

	public RadioButton addRadioButton(final String theName, final int theX, final int theY) {
		RadioButton myController = new RadioButton(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theX, theY);
		cp5.register(null, "", myController);
		myController.registerProperty("arrayValue");
		return myController;
	}

	/**
	 * Use radio buttons for multiple choice options.
	 */
	public RadioButton addRadio(final String theName) {
		return addRadioButton(theName, 0, 0);
	}

	public RadioButton addRadio(final String theName, final int theX, final int theY) {
		RadioButton myController = new RadioButton(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theX, theY);
		cp5.register(null, "", myController);
		myController.registerProperty("arrayValue");
		return myController;
	}

	// TODO
	// addRadioButton theObject

	/**
	 * Use a checkbox for single choice options
	 */
	public CheckBox addCheckBox(final String theName) {
		return addCheckBox(theName, 0, 0);
	}

	public CheckBox addCheckBox(final String theName, final int theX, final int theY) {
		CheckBox myController = new CheckBox(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theX, theY);
		cp5.register(null, "", myController);
		myController.registerProperty("arrayValue");
		return myController;
	}

	// TODO
	// addCheckBox theObject

	public ListBox addListBox(final String theName) {
		return addListBox(theName, 0, 0, 99, 199);
	}

	/**
	 * A list box is a list of items a user can choose from. When items exceed the dedicated area of
	 * a list box, a scrollbar is added to the right of the box. the Box can be navigated using
	 * mouse click, drag and the mouse-wheel.
	 */
	public ListBox addListBox(final String theName, final int theX, final int theY, final int theW, final int theH) {
		ListBox myController = new ListBox(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theX, theY, theW, theH);
		cp5.register(null, "", myController);
		myController.registerProperty("listBoxItems").registerProperty("value");
		return myController;
	}

	// TODO
	// addListBox theObject

	public DropdownList addDropdownList(final String theName) {
		return addDropdownList(theName, 0, 0, 99, 99);
	}

	public DropdownList addDropdownList(final String theName, final int theX, final int theY, final int theW, final int theH) {
		DropdownList myController = new DropdownList(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theX, theY, theW, theH);
		cp5.register(null, "", myController);
		myController.registerProperty("listBoxItems").registerProperty("value");
		return myController;
	}

	// TODO
	// addDropdownList theObject

	public ColorPicker addColorPicker(final String theName) {
		return addColorPicker(theName, 0, 0, 255, 10);
	}

	/**
	 * adds a simple RGBA colorpicker.
	 */
	public ColorPicker addColorPicker(final String theName, final int theX, final int theY, final int theW, final int theH) {
		ColorPicker myController = new ColorPicker(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theX, theY, theW, theH);
		cp5.register(null, "", myController);
		myController.registerProperty("arrayValue");
		return myController;
	}

	// TODO
	// addColorPicker theObject

	public Chart addChart(String theName) {
		return addChart(theName, 0, 0, 200, 100);
	}

	/**
	 * adds chart support to display float array based data.
	 */
	public Chart addChart(String theName, int theX, int theY, int theW, int theH) {
		Chart myController = new Chart(cp5, (Tab) cp5.controlWindow.getTabs().get(1), theName, theX, theY, theW, theH);
		cp5.register(null, "", myController);
		return myController;
	}

	/**
	 * A controller group can be used to group controllers for a better organization of single
	 * controllers.
	 */
	public Group addGroup(Object theObject, final String theIndex, String theName, int theX, int theY, int theW) {
		Group myController = new Group(cp5, (ControllerGroup<?>) cp5.controlWindow.getTabs().get(1), theName, theX, theY, theW, 9);
		cp5.register(theObject, theIndex, myController);
		return myController;
	}

	public Group addGroup(String theName, int theX, int theY, int theW) {
		return addGroup(null, "", theName, theX, theY, theW);
	}

	public Group addGroup(String theName) {
		return addGroup(theName, 0, 0);
	}

	public Group addGroup(String theName, int theX, int theY) {
		return addGroup(null, "", theName, theX, theY, 99);
	}

	/**
	 * create an additional ControlWindow in a separate window frame.
	 */
	public ControlWindow addControlWindow(final String theWindowName, final int theX, final int theY, final int theWidth, final int theHeight, String theRenderer, int theFrameRate) {
		for (int i = 0; i < cp5.controlWindowList.size(); i++) {
			if (((ControlWindow) cp5.controlWindowList.get(i)).name().equals(theWindowName)) {
				ControlP5.logger().warning("ControlWindow with name " + theWindowName + " already exists. overwriting now.");
			}
		}
		PAppletWindow myPAppletWindow = new PAppletWindow(cp5, theWindowName, theX, theY, theWidth, theHeight, theRenderer, theFrameRate);
		myPAppletWindow.setParent(cp5);
		myPAppletWindow.setMode(PAppletWindow.ECONOMIC);
		ControlWindow myControlWindow = new ControlWindow(cp5, myPAppletWindow);
		cp5.controlWindowList.add(myControlWindow);
		return myControlWindow;
	}

	public ControlWindow addControlWindow(final String theWindowName, final int theWidth, final int theHeight) {
		return addControlWindow(theWindowName, 100, 100, theWidth, theHeight, "", 30);
	}

	public ControlWindow addControlWindow(final String theWindowName, final int theX, final int theY, final int theWidth, final int theHeight) {
		return addControlWindow(theWindowName, theX, theY, theWidth, theHeight, "", 30);
	}

	public ControlWindow addControlWindow(final String theWindowName, final int theX, final int theY, final int theWidth, final int theHeight, final int theFrameRate) {
		return addControlWindow(theWindowName, theX, theY, theWidth, theHeight, "", theFrameRate);
	}

	public Textlabel getTextlabel(String theText, int theX, int theY) {
		return new Textlabel(cp5, theText, theX, theY);
	}

	public Textlabel getTextlabel() {
		return getTextlabel("", 0, 0);
	}

	protected ControllerGroup<?> currentGroupPointer;

	protected boolean isCurrentGroupPointerClosed = true;

	protected int autoDirection = HORIZONTAL;

	protected void setCurrentPointer(ControllerGroup<?> theGroup) {
		currentGroupPointer = theGroup;
		isCurrentGroupPointerClosed = false;
	}

	protected void releaseCurrentPointer(ControllerGroup<?> theGroup) {
		if (isCurrentGroupPointerClosed == false) {
			currentGroupPointer = theGroup;
			isCurrentGroupPointerClosed = true;
		} else {
			ControlP5.logger().warning("use .end() first before using .begin() again.");
		}
	}

	public void setAutoAddDirection(int theDirection) {
		if (theDirection == HORIZONTAL) {
			autoDirection = HORIZONTAL;
			return;
		}
		autoDirection = VERTICAL;
	}

	public void setAutoSpacing() {
		Controller.autoSpacing.x = 10;
		Controller.autoSpacing.y = 10;
		Controller.autoSpacing.z = 0;
	}

	public void setAutoSpacing(float theX) {
		Controller.autoSpacing.x = theX;
	}

	public void setAutoSpacing(float theX, float theY) {
		Controller.autoSpacing.x = theX;
		Controller.autoSpacing.y = theY;
	}

	public void setAutoSpacing(float theX, float theY, float theZ) {
		Controller.autoSpacing.x = theX;
		Controller.autoSpacing.y = theY;
		Controller.autoSpacing.z = theZ;
	}

	@SuppressWarnings("static-access") protected void linebreak(Controller<?> theController, boolean theFlag, int theW, int theH, PVector theSpacing) {
		if (currentGroupPointer.autoPosition.x + theController.autoSpacing.x + theW > cp5.papplet.width) {
			currentGroupPointer.autoPosition.y += currentGroupPointer.tempAutoPositionHeight;
			currentGroupPointer.autoPosition.x = currentGroupPointer.autoPositionOffsetX;
			currentGroupPointer.tempAutoPositionHeight = 0;
			theController.position.x = currentGroupPointer.autoPosition.x;
			theController.position.y = currentGroupPointer.autoPosition.y;
			theFlag = false;
		}

		if (theFlag == true) {
			currentGroupPointer.autoPosition.y += currentGroupPointer.tempAutoPositionHeight;
			currentGroupPointer.autoPosition.x = currentGroupPointer.autoPositionOffsetX;
			currentGroupPointer.tempAutoPositionHeight = 0;
		} else {
			if (theController instanceof Slider) {
				currentGroupPointer.autoPosition.x += theController.getCaptionLabel().getWidth();
			}
			currentGroupPointer.autoPosition.x += theController.autoSpacing.x + theW;
			if ((theH + theSpacing.y) > currentGroupPointer.tempAutoPositionHeight) {
				currentGroupPointer.tempAutoPositionHeight = theH + theSpacing.y;
			}
		}
	}

	/**
	 * Adds a default slider with a default width of 100 and height of 10. the default value range
	 * is from 0-100.
	 */
	public Slider addSlider(String theName) {
		return addSlider(theName, 0, 100);
	}

	public Slider addSlider(Object theObject, final String theIndex, String theName) {
		return addSlider(theObject, theIndex, theName, 0, 100);
	}

	public Slider addSlider(String theName, float theMin, float theMax) {
		return addSlider(null, "", theName, theMin, theMax);
	}

	public Slider addSlider(Object theObject, final String theIndex, String theName, float theMin, float theMax) {
		int x = (int) currentGroupPointer.autoPosition.x;
		int y = (int) currentGroupPointer.autoPosition.y;
		Slider s = addSlider(theObject, theIndex, theName, theMin, theMax, theMin, x, y, Slider.autoWidth, Slider.autoHeight);
		linebreak(s, false, Slider.autoWidth, Slider.autoHeight, Slider.autoSpacing);
		s.moveTo(currentGroupPointer);
		if (autoDirection == VERTICAL)
			s.linebreak();
		return s;
	}

	/**
	 * Adds a default Button, the default value is 1, width and height are set to the default values
	 * of Button.autoWidth and Button.autoHeight
	 */
	public Button addButton(String theName) {
		return addButton(null, "", theName, 1);
	}

	public Button addButton(Object theObject, final String theIndex, String theName) {
		return addButton(theObject, theIndex, theName, 1);
	}

	public Button addButton(String theName, float theValue) {
		return addButton(null, "", theName, theValue);
	}

	public Button addButton(Object theObject, final String theIndex, String theName, float theValue) {
		int x = (int) currentGroupPointer.autoPosition.x;
		int y = (int) currentGroupPointer.autoPosition.y;
		Button b = addButton(theObject, theIndex, theName, theValue, x, y, Button.autoWidth, Button.autoHeight);
		linebreak(b, false, Button.autoWidth, Button.autoHeight, Button.autoSpacing);
		b.moveTo(currentGroupPointer);
		return b;
	}

	public Bang addBang(Object theObject, final String theIndex, String theName) {
		int x = (int) currentGroupPointer.autoPosition.x;
		int y = (int) currentGroupPointer.autoPosition.y;
		Bang b = addBang(theObject, theIndex, theName, x, y, Bang.autoWidth, Bang.autoHeight);
		linebreak(b, false, Bang.autoWidth, Bang.autoHeight, Bang.autoSpacing);
		b.moveTo(currentGroupPointer);
		return b;
	}

	/**
	 * Adds a default Toggle, the default value is false, width and height are set to the default
	 * values of Toggle.autoWidth and Toggle.autoHeight
	 */
	public Toggle addToggle(String theName) {
		return addToggle(null, "", theName);
	}

	public Toggle addToggle(String theName, boolean theValue) {
		return addToggle(null, "", theName, theValue);
	}

	public Toggle addToggle(Object theObject, final String theIndex, String theName) {
		return addToggle(theObject, theIndex, theName, false);
	}

	public Toggle addToggle(Object theObject, final String theIndex, String theName, boolean theValue) {
		Toggle t = addToggle(theObject, theIndex, theName, theValue, currentGroupPointer.autoPosition.x, currentGroupPointer.autoPosition.y, Toggle.autoWidth, Toggle.autoHeight);
		linebreak(t, false, Toggle.autoWidth, Toggle.autoHeight, t.autoSpacing);
		t.moveTo(currentGroupPointer);
		return t;
	}

	public Numberbox addNumberbox(Object theObject, final String theIndex, String theName) {
		int x = (int) currentGroupPointer.autoPosition.x;
		int y = (int) currentGroupPointer.autoPosition.y;
		Numberbox n = addNumberbox(theObject, theIndex, theName, x, y, Numberbox.autoWidth, Numberbox.autoHeight);
		linebreak(n, false, Numberbox.autoWidth, Numberbox.autoHeight, n.autoSpacing);
		n.moveTo(currentGroupPointer);
		return n;
	}

	public Numberbox addNumberbox(String theName) {
		return addNumberbox(null, "", theName);
	}

	public Knob addKnob(Object theObject, final String theIndex, String theName, int theMin, int theMax) {
		Knob n = addKnob(theObject, theIndex, theName, theMin, theMax, theMin, (int) currentGroupPointer.autoPosition.x, (int) currentGroupPointer.autoPosition.y, Knob.autoWidth);
		linebreak(n, false, Knob.autoWidth, Knob.autoHeight, n.autoSpacing);
		n.moveTo(currentGroupPointer);
		return n;
	}

	public Knob addKnob(String theName) {
		return addKnob(theName, 0, 100);

	}

	public Knob addKnob(Object theObject, final String theIndex, String theName) {
		return addKnob(theObject, theIndex, theName, 0, 100);
	}

	public Knob addKnob(String theName, int theMin, int theMax) {
		return addKnob(null, "", theName, theMin, theMax);
	}

	public ControlWindow addControlWindow(String theName) {
		return addControlWindow(theName, 20, 20, 300, 400);
	}

	/**
	 * Adds Controllers by Object reference, currently supports Slider, Bang, Button, Knob,
	 * Numberbox, Toggle, Textlabel, Textfield, Range, Slider2D. For internal use rather than on
	 * application level.
	 */
	public <C> C addController(final Object theObject, final String theIndex, final String theName, final Class<C> theClass, int theX, int theY) {
		Controller<?> c = null;
		if (theClass.equals(Slider.class)) {
			c = addSlider(theObject, theIndex, theName, 0, 100, 0, 0, 0, 99, 9);
		} else if (theClass.equals(Bang.class)) {
			c = addBang(theObject, theIndex, theName, 0, 0, 19, 19);
		} else if (theClass.equals(Button.class)) {
			c = addButton(theObject, theIndex, theName, 0, 0, 0, 49, 19);
		} else if (theClass.equals(Knob.class)) {
			c = addKnob(theObject, theIndex, theName, 0, 100, 0, 0, 0, 49);
		} else if (theClass.equals(Numberbox.class)) {
			c = addNumberbox(theObject, theIndex, theName, 0, 0, 0, 99, 19);
		} else if (theClass.equals(Toggle.class)) {
			c = addToggle(theObject, theIndex, theName, false, 0, 0, 49, 19);
		} else if (theClass.equals(Textfield.class)) {
			c = addTextfield(theObject, theIndex, theName, 0, 0, 99, 19);
		} else if (theClass.equals(Range.class)) {
			c = addRange(theObject, theIndex, theName, 0, 100, 0, 100, 0, 0, 99, 9);
		} else if (theClass.equals(Slider2D.class)) {
			c = addSlider2D(theObject, theIndex, theName, 0, 100, 0, 100, 0, 0, 0, 0, 99, 99);
		} else if (theClass.equals(Textlabel.class)) {
			c = addTextlabel(theName, "<empty>");
		}
		// TODO MultiList, Matrix
		c.setPosition(theX, theY);
		return (C) c;
	}

	/**
	 * Use with caution, only for internal use.
	 *
	 * @exclude
	 */
	@ControlP5.Invisible public <C> C addGroup(final Object theObject, final String theIndex, final String theName, final Class<C> theClass, int theX, int theY, int theW, int theH) {
		ControlGroup<?> c = null;
		if (theClass.equals(DropdownList.class)) {
			c = addDropdownList(theName, theX, theY, theW, theH);
		} else if (theClass.equals(ListBox.class)) {
			c = addListBox(theName, theX, theY, theW, theH);
		} else if (theClass.equals(ListBox.class)) {
			c = addListBox(theName, theX, theY, theW, theH);
		} else if (theClass.equals(RadioButton.class)) {
			c = addRadioButton(theName, theX, theY);
		} else if (theClass.equals(CheckBox.class)) {
			c = addCheckBox(theName, theX, theY);
		} else if (theClass.equals(ControlGroup.class)) {
			c = addGroup(theName, theX, theY);
		} else if (theClass.equals(Group.class)) {
			c = addGroup(theName, theX, theY);
		}
		c.setPosition(theX, theY);
		c.setWidth(theW);
		c.setHeight(theH);
		return (C) c;
	}

	public <C> C addController(String theName, Class<C> theClass, int theX, int theY) {
		return addController(null, "", theName, theClass, theX, theY);
	}

	public ControlP5Base addControllersFor(PApplet theApplet) {
		addControllersFor("", theApplet);
		return this;
	}

	/**
	 * Adds controllers for a specific object using annotations.
	 * <p>
	 * Uses a forward slash delimited address, for example:
	 * </p>
	 * <p>
	 * lets say the theAddressSpace parameter is set to "hello", and the Object (second parameter)
	 * contains an annotated field "x", addControllersFor("hello", o); will add a controller for
	 * field x with address /hello/x This address can be used with getController("/hello/x") to
	 * access the controller of that particular Object and field.
	 * </p>
	 */
	public ControlP5Base addControllersFor(final String theAddressSpace, Object t) {
		_myAutomator.addControllersFor(theAddressSpace, t);
		return this;
	}

	public Controller<?> getController(String theName, Object theObject) {
		if (_myObjectToControllerMap.containsKey(theObject)) {
			ArrayList<ControllerInterface<?>> cs = _myObjectToControllerMap.get(theObject);
			for (ControllerInterface<?> c : cs) {
				if (c.getName().equals(theName)) {
					return (Controller<?>) c;
				}
			}
		}
		return null;
	}

	@SuppressWarnings("unchecked") public Object getObjectForController(ControllerInterface theController) {
		for (Iterator it = _myObjectToControllerMap.entrySet().iterator(); it.hasNext();) {
			Map.Entry entry = (Map.Entry) it.next();
			Object key = entry.getKey();
			ArrayList<ControllerInterface> value = (ArrayList<ControllerInterface>) entry.getValue();
			for (ControllerInterface c : value) {
				if (c.equals(theController)) {
					return key;
				}
			}
		}
		return null;
	}

	public ControlP5Base setPosition(int theX, int theY, Object o) {
		if (o != null && _myObjectToControllerMap.containsKey(o)) {
			ArrayList<ControllerInterface<?>> cs = _myObjectToControllerMap.get(o);
			for (ControllerInterface<?> c : cs) {
				int x = (int) c.getPosition().x + theX;
				int y = (int) c.getPosition().y + theY;
				c.setPosition(x, y);
			}
		}
		return this;
	}

	public ControlP5Base hide(Object theObject) {
		if (theObject != null && _myObjectToControllerMap.containsKey(theObject)) {
			ArrayList<ControllerInterface<?>> cs = _myObjectToControllerMap.get(theObject);
			for (ControllerInterface<?> c : cs) {
				c.hide();
			}
		}
		return this;
	}

	public ControlP5Base show(Object theObject) {
		if (theObject != null && _myObjectToControllerMap.containsKey(theObject)) {
			ArrayList<ControllerInterface<?>> cs = _myObjectToControllerMap.get(theObject);
			for (ControllerInterface<?> c : cs) {
				c.show();
			}
		}
		return this;
	}

	public ControlP5Base remove(Object theObject) {
		if (theObject != null && _myObjectToControllerMap.containsKey(theObject)) {
			ArrayList<ControllerInterface<?>> cs = _myObjectToControllerMap.get(theObject);
			for (ControllerInterface<?> c : cs) {
				c.remove();
			}
		}
		return this;
	}

	public ControlP5Base setColor(CColor theColor, Object theObject) {
		if (_myObjectToControllerMap.containsKey(theObject)) {
			ArrayList<ControllerInterface<?>> cs = _myObjectToControllerMap.get(theObject);
			for (ControllerInterface<?> c : cs) {
				c.setColor(theColor);
			}
		}
		return this;
	}

	public ControlP5Base listenTo(String theFieldName, Object theObject) {
		String key = theObject.hashCode() + "" + theFieldName.hashCode();
		FieldChangedListener value = new FieldChangedListener(cp5);
		value.listenTo(theObject, theFieldName);
		_myFieldChangedListenerMap.put(key, value);
		return this;
	}

	public ControlP5Base stopListeningTo(String theFieldName, Object theObject) {
		String key = theObject.hashCode() + "" + theFieldName.hashCode();
		_myFieldChangedListenerMap.remove(key);
		return this;
	}

	public ControlP5Base moveTo(ControllerGroup<?> theController, Object theObject) {
		if (_myObjectToControllerMap.containsKey(theObject)) {
			ArrayList<ControllerInterface<?>> cs = _myObjectToControllerMap.get(theObject);
			for (ControllerInterface<?> c : cs) {
				c.moveTo(theController);
			}
		}
		return this;
	}

	/* Properties */

	public ControllerProperties getProperties() {
		return _myProperties;
	}

	public void removeProperty(ControllerInterface<?> theController) {
		_myProperties.remove(theController);
	}

	/**
	 * prints a list of public methods of requested class into the console. You can specify patterns
	 * that will print methods found with only these particular patterns in their name.
	 * <p>
	 * printed Format: returnType methodName(parameter type)
	 */
	public static void printPublicMethodsFor(Class<?> theClass, String... thePattern) {
		Set<String> set = getPublicMethodsFor(theClass, true, thePattern);
		String str = "";

		str += "/**\n";
		str += "* ControlP5 " + theClass.getSimpleName() + "\n";
		str += "*\n";
		str += "*\n";
		str += "* find a list of public methods available for the " + theClass.getSimpleName() + " Controller\n";
		str += "* at the bottom of this sketch.\n";
		str += "*\n";
		str += "* by Andreas Schlegel, 2012\n";
		str += "* www.sojamo.de/libraries/controlp5\n";
		str += "*\n";
		str += "*/\n\n";
		str += "/*\n";
		str += "a list of all methods available for the " + theClass.getSimpleName() + " Controller\n";
		str += "use ControlP5.printPublicMethodsFor(" + theClass.getSimpleName() + ".class);\n";
		str += "to print the following list into the console.\n\n";
		str += "You can find further details about class " + theClass.getSimpleName() + " in the javadoc.\n\n";
		str += "Format:\n";
		str += "ClassName : returnType methodName(parameter type)\n\n\n";
		for (String s : set) {
			str += s + "\n";
		}
		str += "\n\n*/\n\n";
		System.out.println(str);
	}

	public static void printPublicMethodsFor(Class<?> theClass) {
		printPublicMethodsFor(theClass, "");
	}

	public static Set<String> getPublicMethodsFor(Class<?> theClass) {
		return getPublicMethodsFor(theClass, true, "");
	}

	public static Set<String> getPublicMethodsFor(Class<?> theClass, String... thePattern) {
		return getPublicMethodsFor(theClass, true, thePattern);
	}

	public static Set<String> getPublicMethodsFor(Class<?> theClass, boolean theFlag) {
		return getPublicMethodsFor(theClass, true, "");
	}

	public static Set<String> getPublicMethodsFor(Class<?> theClass, boolean isSuperclass, String... thePattern) {
		Set<String> s = new TreeSet<String>();

		Class<?> c = theClass;
		while (c != null) {
			for (Method method : c.getDeclaredMethods()) {
				if (!method.isAnnotationPresent(Deprecated.class) && !method.isAnnotationPresent(ControlP5.Invisible.class) && method.getModifiers() == Modifier.PUBLIC) {
					for (String p : thePattern) {
						if (p.length() > 0) {
							if (!method.getName().toLowerCase().contains(p.toLowerCase())) {
								continue;
							}
						}
						String params = "";
						for (Class<?> t : method.getParameterTypes()) {
							params += t.getSimpleName() + ", ";
						}
						if (params.length() > 0) {
							params = params.substring(0, params.length() - 2);
						}
						s.add(c.getCanonicalName() + " : " + method.getReturnType().getSimpleName().replace("Object", theClass.getSimpleName()) + " " + method.getName() + "(" + params + ") ");
					}
				}
			}

			if (isSuperclass) {
				c = c.getSuperclass();
			} else {
				c = null;
			}
		}
		return s;
	}

	public ControlP5 mapKeyFor(ControlKey theKey, int... theChar) {
		char[] n = fromIntToChar(theChar);
		cp5.keyHandler.mapKeyFor(theKey, n);
		cp5.enableShortcuts();
		return cp5;
	}

	private char[] fromIntToChar(int... theChar) {
		char[] n = new char[theChar.length];
		for (int i = 0; i < n.length; i++) {
			if (theChar[i] >= 'a' && theChar[i] <= 'z') {
				theChar[i] -= 32;
			}
			n[i] = (char) theChar[i];
		}
		return n;
	}

	public ControlP5 removeKeyFor(ControlKey theKey, int... theChar) {
		cp5.keyHandler.removeKeyFor(theKey, fromIntToChar(theChar));
		return cp5;
	}

	public ControlP5 removeKeysFor(int... theChar) {
		cp5.keyHandler.removeKeysFor(fromIntToChar(theChar));
		return cp5;
	}
}


text:
<?php
/**
 * Theme related functions.
 *
 */

/**
 * Get title for the webpage by concatenating page specific title with site-wide title.
 *
 * @param string $title for this page.
 * @return string/null wether the favicon is defined or not.
 */
function get_title($title) {
  global $webbtemp;
  return $title . (isset($webbtemp['title_append']) ? $webbtemp['title_append'] : null);
}

function get_navbar($menu) {
  $html = "\n";
  foreach($menu['items'] as $item) {
   // check if menu file exist if not don't add it to menu
	if (file_exists(WEBBTEMP_INSTALL_PATH . '/' . $item['url']))
	{$html .= "{$item['text']}\n";}
  }
  $html .= "\n";
  return $html;
}


text:
@protocol OAPhrasesParserDelegate <NSObject>

@required
- (void)parserFinished;

@optional
- (void)encounteredError:(NSError *)error;

@end

@interface OAPhrasesParser : NSObject

@property(nonatomic) NSDictionary *phrases;
@property(nonatomic) BOOL error;
@property(nonatomic, weak) id<OAPhrasesParserDelegate> delegate;
@property(nonatomic) NSString *fileName;

- (void)getPhrasesSync:(NSString*)fileName;
- (void)getPhrasesAsync:(NSString*)fileName;

@end


text:
<!DOCTYPE html>

<title>Classe KToolBarPopupAction</title>

Classe KToolBarPopupAction

Derivada de QWidgetAction

Classes derivadas:

Módulo kwidgetsaddons

Versão do Qt: 5,0,0

Construtor: KToolBarPopupAction():new(QIcon, QString, QObject * )

Método: KToolBarPopupAction():delayed( ) -> bool

Método: KToolBarPopupAction():setDelayed(bool ) -> void

Método: KToolBarPopupAction():stickyMenu( ) -> bool

Método: KToolBarPopupAction():setStickyMenu(bool ) -> void

Método: KToolBarPopupAction():createWidget(QWidget * ) -> QWidget *


text:
<?php

/**
 * Installer for the analytics module
 *
 * @author Annelies Van Extergem <annelies.vanextergem@netlash.com>
 */
class AnalyticsInstaller extends ModuleInstaller
{
	/**
	 * Insert an empty admin dashboard sequence
	 */
	private function insertWidgets()
	{
		$trafficSources = array(
			'column' => 'middle',
			'position' => 1,
			'hidden' => false,
			'present' => true
		);

		$visitors = array(
			'column' => 'middle',
			'position' => 2,
			'hidden' => false,
			'present' => true
		);

		// insert widgets
		$this->insertDashboardWidget('analytics', 'traffic_sources', $trafficSources);
		$this->insertDashboardWidget('analytics', 'visitors', $visitors);
	}

	/**
	 * Install the module
	 */
	public function install()
	{
		// load install.sql
		$this->importSQL(dirname(__FILE__) . '/data/install.sql');

		// add 'analytics' as a module
		$this->addModule('analytics');

		// import locale
		$this->importLocale(dirname(__FILE__) . '/data/locale.xml');

		// module rights
		$this->setModuleRights(1, 'analytics');

		// action rights
		$this->setActionRights(1, 'analytics', 'add_landing_page');
		$this->setActionRights(1, 'analytics', 'all_pages');
		$this->setActionRights(1, 'analytics', 'check_status');
		$this->setActionRights(1, 'analytics', 'content');
		$this->setActionRights(1, 'analytics', 'delete_landing_page');
		$this->setActionRights(1, 'analytics', 'detail_page');
		$this->setActionRights(1, 'analytics', 'exit_pages');
		$this->setActionRights(1, 'analytics', 'get_traffic_sources');
		$this->setActionRights(1, 'analytics', 'index');
		$this->setActionRights(1, 'analytics', 'landing_pages');
		$this->setActionRights(1, 'analytics', 'loading');
		$this->setActionRights(1, 'analytics', 'mass_landing_page_action');
		$this->setActionRights(1, 'analytics', 'refresh_traffic_sources');
		$this->setActionRights(1, 'analytics', 'settings');
		$this->setActionRights(1, 'analytics', 'traffic_sources');
		$this->setActionRights(1, 'analytics', 'visitors');

		// set navigation
		$navigationMarketingId = $this->setNavigation(null, 'Marketing', 'analytics/index', null, 4);
		$navigationAnalyticsId = $this->setNavigation($navigationMarketingId, 'Analytics', 'analytics/index', array('analytics/loading'));
		$this->setNavigation($navigationAnalyticsId, 'Content', 'analytics/content');
		$this->setNavigation($navigationAnalyticsId, 'AllPages', 'analytics/all_pages');
		$this->setNavigation($navigationAnalyticsId, 'ExitPages', 'analytics/exit_pages');
		$this->setNavigation($navigationAnalyticsId, 'LandingPages', 'analytics/landing_pages', array(
			'analytics/add_landing_page',
			'analytics/edit_landing_page',
			'analytics/detail_page'
		));

		// settings navigation
		$navigationSettingsId = $this->setNavigation(null, 'Settings');
		$navigationModulesId = $this->setNavigation($navigationSettingsId, 'Modules');
		$this->setNavigation($navigationModulesId, 'Analytics', 'analytics/settings');

		// insert dashboard widgets
		$this->insertWidgets();
	}
}


text:
package org.apache.xml.security.stax.impl.algorithms;

import java.io.IOException;
import java.security.interfaces.ECPublicKey;
import java.security.spec.*;

@Deprecated
public final class ECDSAUtils {

    private ECDSAUtils() {
        // complete
    }

    /**
     * Converts an ASN.1 ECDSA value to a XML Signature ECDSA Value.
     *

     * The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r,s) value
     * pairs; the XML Signature requires the core BigInteger values.
     *
     * @param asn1Bytes
     * @return the decode bytes
     * @throws IOException
     * @see 6.4.1 DSA
     * @see 3.3. ECDSA Signatures
     */
    public static byte[] convertASN1toXMLDSIG(byte asn1Bytes[]) throws IOException {
        return org.apache.xml.security.algorithms.implementations.ECDSAUtils.convertASN1toXMLDSIG(asn1Bytes);
    }

    /**
     * Converts a XML Signature ECDSA Value to an ASN.1 DSA value.
     *

     * The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r,s) value
     * pairs; the XML Signature requires the core BigInteger values.
     *
     * @param xmldsigBytes
     * @return the encoded ASN.1 bytes
     * @throws IOException
     * @see 6.4.1 DSA
     * @see 3.3. ECDSA Signatures
     */
    public static byte[] convertXMLDSIGtoASN1(byte xmldsigBytes[]) throws IOException {
        return org.apache.xml.security.algorithms.implementations.ECDSAUtils.convertXMLDSIGtoASN1(xmldsigBytes);
    }

    public static String getOIDFromPublicKey(ECPublicKey ecPublicKey) {
        return org.apache.xml.security.algorithms.implementations.ECDSAUtils.getOIDFromPublicKey(ecPublicKey);
    }

    public static ECCurveDefinition getECCurveDefinition(String oid) {
        org.apache.xml.security.algorithms.implementations.ECDSAUtils.ECCurveDefinition curveDef =
            org.apache.xml.security.algorithms.implementations.ECDSAUtils.getECCurveDefinition(oid);
        if (curveDef != null) {
            return new ECCurveDefinition(curveDef.getName(), curveDef.getOid(), curveDef.getField(), curveDef.getA(),
                                         curveDef.getB(), curveDef.getX(), curveDef.getY(), curveDef.getN(),
                                         curveDef.getH());
        }
        return null;
    }

    public static class ECCurveDefinition
        extends org.apache.xml.security.algorithms.implementations.ECDSAUtils.ECCurveDefinition {

        public ECCurveDefinition(String name, String oid, String field, String a, String b, String x, String y, String n, int h) {
            super(name, oid, field, a, b, x, y, n, h);
        }
    }

    public static byte[] encodePoint(ECPoint ecPoint, EllipticCurve ellipticCurve) {
        return org.apache.xml.security.algorithms.implementations.ECDSAUtils.encodePoint(ecPoint, ellipticCurve);
    }

    public static ECPoint decodePoint(byte[] encodedBytes, EllipticCurve ellipticCurve) {
        return org.apache.xml.security.algorithms.implementations.ECDSAUtils.decodePoint(encodedBytes, ellipticCurve);
    }

    public static byte[] stripLeadingZeros(byte[] bytes) {
        return org.apache.xml.security.algorithms.implementations.ECDSAUtils.stripLeadingZeros(bytes);
    }
}


text:
import numpy as np
import unittest

from ray import tune
from ray.tune.suggest.variant_generator import generate_variants

def _mock_objective(config):
    tune.report(**config)

class SearchSpaceTest(unittest.TestCase):
    def setUp(self):
        pass

    def tearDown(self):
        pass

    def testTuneSampleAPI(self):
        config = {
            "func": tune.sample_from(lambda spec: spec.config.uniform * 0.01),
            "uniform": tune.uniform(-5, -1),
            "quniform": tune.quniform(3.2, 5.4, 0.2),
            "loguniform": tune.loguniform(1e-4, 1e-2),
            "qloguniform": tune.qloguniform(1e-4, 1e-1, 5e-5),
            "choice": tune.choice([2, 3, 4]),
            "randint": tune.randint(-9, 15),
            "qrandint": tune.qrandint(-21, 12, 3),
            "randn": tune.randn(10, 2),
            "qrandn": tune.qrandn(10, 2, 0.2),
        }
        for _, (_, generated) in zip(
                range(1000), generate_variants({
                    "config": config
                })):
            out = generated["config"]

            self.assertAlmostEqual(out["func"], out["uniform"] * 0.01)

            self.assertGreaterEqual(out["uniform"], -5)
            self.assertLess(out["uniform"], -1)

            self.assertGreaterEqual(out["quniform"], 3.2)
            self.assertLessEqual(out["quniform"], 5.4)
            self.assertAlmostEqual(out["quniform"] / 0.2,
                                   round(out["quniform"] / 0.2))

            self.assertGreaterEqual(out["loguniform"], 1e-4)
            self.assertLess(out["loguniform"], 1e-2)

            self.assertGreaterEqual(out["qloguniform"], 1e-4)
            self.assertLessEqual(out["qloguniform"], 1e-1)
            self.assertAlmostEqual(out["qloguniform"] / 5e-5,
                                   round(out["qloguniform"] / 5e-5))

            self.assertIn(out["choice"], [2, 3, 4])

            self.assertGreaterEqual(out["randint"], -9)
            self.assertLess(out["randint"], 15)

            self.assertGreaterEqual(out["qrandint"], -21)
            self.assertLessEqual(out["qrandint"], 12)
            self.assertEqual(out["qrandint"] % 3, 0)

            # Very improbable
            self.assertGreater(out["randn"], 0)
            self.assertLess(out["randn"], 20)

            self.assertGreater(out["qrandn"], 0)
            self.assertLess(out["qrandn"], 20)
            self.assertAlmostEqual(out["qrandn"] / 0.2,
                                   round(out["qrandn"] / 0.2))

    def testBoundedFloat(self):
        bounded = tune.sample.Float(-4.2, 8.3)

        # Don't allow to specify more than one sampler
        with self.assertRaises(ValueError):
            bounded.normal().uniform()

        # Uniform
        samples = bounded.uniform().sample(size=1000)
        self.assertTrue(any(-4.2 < s < 8.3 for s in samples))
        self.assertFalse(np.mean(samples) < -2)

        # Loguniform
        with self.assertRaises(ValueError):
            bounded.loguniform().sample(size=1000)

        bounded_positive = tune.sample.Float(1e-4, 1e-1)
        samples = bounded_positive.loguniform().sample(size=1000)
        self.assertTrue(any(1e-4 < s < 1e-1 for s in samples))

    def testUnboundedFloat(self):
        unbounded = tune.sample.Float(None, None)

        # Require min and max bounds for loguniform
        with self.assertRaises(ValueError):
            unbounded.loguniform()

        # Normal
        samples = tune.sample.Float(None, None).normal().sample(size=1000)
        self.assertTrue(any(-5 < s < 5 for s in samples))
        self.assertTrue(-1 < np.mean(samples) < 1)

    def testBoundedInt(self):
        bounded = tune.sample.Integer(-3, 12)

        samples = bounded.uniform().sample(size=1000)
        self.assertTrue(any(-3 <= s < 12 for s in samples))
        self.assertFalse(np.mean(samples) < 2)

    def testCategorical(self):
        categories = [-2, -1, 0, 1, 2]
        cat = tune.sample.Categorical(categories)

        samples = cat.uniform().sample(size=1000)
        self.assertTrue(any(-2 <= s <= 2 for s in samples))
        self.assertTrue(all(c in samples for c in categories))

    def testFunction(self):
        def sample(spec):
            return np.random.uniform(-4, 4)

        fnc = tune.sample.Function(sample)

        samples = fnc.sample(size=1000)
        self.assertTrue(any(-4 < s < 4 for s in samples))
        self.assertTrue(-2 < np.mean(samples) < 2)

    def testQuantized(self):
        bounded_positive = tune.sample.Float(1e-4, 1e-1)

        bounded = tune.sample.Float(1e-4, 1e-1)
        with self.assertRaises(ValueError):
            # Granularity too high
            bounded.quantized(5e-4)

        with self.assertRaises(ValueError):
            tune.sample.Float(-1e-1, -1e-4).quantized(5e-4)

        samples = bounded_positive.loguniform().quantized(5e-5).sample(
            size=1000)

        for sample in samples:
            factor = sample / 5e-5
            assert 1e-4 <= sample <= 1e-1
            self.assertAlmostEqual(factor, round(factor), places=10)

        with self.assertRaises(ValueError):
            tune.sample.Float(0, 32).quantized(3)

        samples = tune.sample.Float(0, 33).quantized(3).sample(size=1000)
        self.assertTrue(all(0 <= s <= 33 for s in samples))

    def testConvertAx(self):
        from ray.tune.suggest.ax import AxSearch
        from ax.service.ax_client import AxClient

        config = {
            "a": tune.sample.Categorical([2, 3, 4]).uniform(),
            "b": {
                "x": tune.sample.Integer(0, 5).quantized(2),
                "y": 4,
                "z": tune.sample.Float(1e-4, 1e-2).loguniform()
            }
        }
        converted_config = AxSearch.convert_search_space(config)
        ax_config = [
            {
                "name": "a",
                "type": "choice",
                "values": [2, 3, 4]
            },
            {
                "name": "b/x",
                "type": "range",
                "bounds": [0, 5],
                "value_type": "int"
            },
            {
                "name": "b/y",
                "type": "fixed",
                "value": 4
            },
            {
                "name": "b/z",
                "type": "range",
                "bounds": [1e-4, 1e-2],
                "value_type": "float",
                "log_scale": True
            },
        ]

        client1 = AxClient(random_seed=1234)
        client1.create_experiment(parameters=converted_config)
        searcher1 = AxSearch(ax_client=client1, metric="a", mode="max")

        client2 = AxClient(random_seed=1234)
        client2.create_experiment(parameters=ax_config)
        searcher2 = AxSearch(ax_client=client2, metric="a", mode="max")

        config1 = searcher1.suggest("0")
        config2 = searcher2.suggest("0")

        self.assertEqual(config1, config2)
        self.assertIn(config1["a"], [2, 3, 4])
        self.assertIn(config1["b"]["x"], list(range(5)))
        self.assertEqual(config1["b"]["y"], 4)
        self.assertLess(1e-4, config1["b"]["z"])
        self.assertLess(config1["b"]["z"], 1e-2)

        searcher = AxSearch(metric="a", mode="max")
        analysis = tune.run(
            _mock_objective, config=config, search_alg=searcher, num_samples=1)
        trial = analysis.trials[0]
        assert trial.config["a"] in [2, 3, 4]

        mixed_config = {"a": tune.uniform(5, 6), "b": tune.uniform(8, 9)}
        searcher = AxSearch(space=mixed_config, metric="a", mode="max")
        config = searcher.suggest("0")
        self.assertTrue(5 <= config["a"] <= 6)
        self.assertTrue(8 <= config["b"] <= 9)

    def testConvertBayesOpt(self):
        from ray.tune.suggest.bayesopt import BayesOptSearch

        config = {
            "a": tune.sample.Categorical([2, 3, 4]).uniform(),
            "b": {
                "x": tune.sample.Integer(0, 5).quantized(2),
                "y": 4,
                "z": tune.sample.Float(1e-4, 1e-2).loguniform()
            }
        }
        with self.assertRaises(ValueError):
            converted_config = BayesOptSearch.convert_search_space(config)

        config = {"b": {"z": tune.sample.Float(1e-4, 1e-2).loguniform()}}
        bayesopt_config = {"b/z": (1e-4, 1e-2)}
        converted_config = BayesOptSearch.convert_search_space(config)

        searcher1 = BayesOptSearch(
            space=converted_config, metric="none", mode="max")
        searcher2 = BayesOptSearch(
            space=bayesopt_config, metric="none", mode="max")

        config1 = searcher1.suggest("0")
        config2 = searcher2.suggest("0")

        self.assertEqual(config1, config2)
        self.assertLess(1e-4, config1["b"]["z"])
        self.assertLess(config1["b"]["z"], 1e-2)

        searcher = BayesOptSearch()
        invalid_config = {"a/b": tune.uniform(4.0, 8.0)}
        with self.assertRaises(ValueError):
            searcher.set_search_properties("none", "max", invalid_config)
        invalid_config = {"a": {"b/c": tune.uniform(4.0, 8.0)}}
        with self.assertRaises(ValueError):
            searcher.set_search_properties("none", "max", invalid_config)

        searcher = BayesOptSearch(metric="b", mode="max")
        analysis = tune.run(
            _mock_objective, config=config, search_alg=searcher, num_samples=1)
        trial = analysis.trials[0]
        self.assertLess(trial.config["b"]["z"], 1e-2)

        mixed_config = {"a": tune.uniform(5, 6), "b": (8., 9.)}
        searcher = BayesOptSearch(space=mixed_config, metric="a", mode="max")
        config = searcher.suggest("0")
        self.assertTrue(5 <= config["a"] <= 6)
        self.assertTrue(8 <= config["b"] <= 9)

    def testConvertBOHB(self):
        from ray.tune.suggest.bohb import TuneBOHB
        import ConfigSpace

        config = {
            "a": tune.sample.Categorical([2, 3, 4]).uniform(),
            "b": {
                "x": tune.sample.Integer(0, 5).quantized(2),
                "y": 4,
                "z": tune.sample.Float(1e-4, 1e-2).loguniform()
            }
        }
        converted_config = TuneBOHB.convert_search_space(config)
        bohb_config = ConfigSpace.ConfigurationSpace()
        bohb_config.add_hyperparameters([
            ConfigSpace.CategoricalHyperparameter("a", [2, 3, 4]),
            ConfigSpace.UniformIntegerHyperparameter(
                "b/x", lower=0, upper=4, q=2),
            ConfigSpace.UniformFloatHyperparameter(
                "b/z", lower=1e-4, upper=1e-2, log=True)
        ])

        converted_config.seed(1234)
        bohb_config.seed(1234)

        searcher1 = TuneBOHB(space=converted_config, metric="a", mode="max")
        searcher2 = TuneBOHB(space=bohb_config, metric="a", mode="max")

        config1 = searcher1.suggest("0")
        config2 = searcher2.suggest("0")

        self.assertEqual(config1, config2)
        self.assertIn(config1["a"], [2, 3, 4])
        self.assertIn(config1["b"]["x"], list(range(5)))
        self.assertLess(1e-4, config1["b"]["z"])
        self.assertLess(config1["b"]["z"], 1e-2)

        searcher = TuneBOHB(metric="a", mode="max")
        analysis = tune.run(
            _mock_objective, config=config, search_alg=searcher, num_samples=1)
        trial = analysis.trials[0]
        self.assertIn(trial.config["a"], [2, 3, 4])
        self.assertEqual(trial.config["b"]["y"], 4)

        mixed_config = {
            "a": tune.uniform(5, 6),
            "b": tune.uniform(8, 9)  # Cannot mix ConfigSpace and Dict
        }
        searcher = TuneBOHB(space=mixed_config, metric="a", mode="max")
        config = searcher.suggest("0")
        self.assertTrue(5 <= config["a"] <= 6)
        self.assertTrue(8 <= config["b"] <= 9)

    def testConvertDragonfly(self):
        from ray.tune.suggest.dragonfly import DragonflySearch

        config = {
            "a": tune.sample.Categorical([2, 3, 4]).uniform(),
            "b": {
                "x": tune.sample.Integer(0, 5).quantized(2),
                "y": 4,
                "z": tune.sample.Float(1e-4, 1e-2).loguniform()
            }
        }
        with self.assertRaises(ValueError):
            converted_config = DragonflySearch.convert_search_space(config)

        config = {
            "a": 4,
            "b": {
                "z": tune.sample.Float(1e-4, 1e-2).loguniform()
            }
        }
        dragonfly_config = [{
            "name": "b/z",
            "type": "float",
            "min": 1e-4,
            "max": 1e-2
        }]
        converted_config = DragonflySearch.convert_search_space(config)

        np.random.seed(1234)
        searcher1 = DragonflySearch(
            optimizer="bandit",
            domain="euclidean",
            space=converted_config,
            metric="none",
            mode="max")

        config1 = searcher1.suggest("0")

        np.random.seed(1234)
        searcher2 = DragonflySearch(
            optimizer="bandit",
            domain="euclidean",
            space=dragonfly_config,
            metric="none",
            mode="max")
        config2 = searcher2.suggest("0")

        self.assertEqual(config1, config2)
        self.assertLess(config2["point"], 1e-2)

        searcher = DragonflySearch()
        invalid_config = {"a/b": tune.uniform(4.0, 8.0)}
        with self.assertRaises(ValueError):
            searcher.set_search_properties("none", "max", invalid_config)
        invalid_config = {"a": {"b/c": tune.uniform(4.0, 8.0)}}
        with self.assertRaises(ValueError):
            searcher.set_search_properties("none", "max", invalid_config)

        searcher = DragonflySearch(
            optimizer="bandit", domain="euclidean", metric="a", mode="max")
        analysis = tune.run(
            _mock_objective, config=config, search_alg=searcher, num_samples=1)
        trial = analysis.trials[0]
        self.assertLess(trial.config["point"], 1e-2)

        mixed_config = {
            "a": tune.uniform(5, 6),
            "b": tune.uniform(8, 9)  # Cannot mix List and Dict
        }
        searcher = DragonflySearch(
            space=mixed_config,
            optimizer="bandit",
            domain="euclidean",
            metric="a",
            mode="max")
        config = searcher.suggest("0")

        self.assertTrue(5 <= config["point"][0] <= 6)
        self.assertTrue(8 <= config["point"][1] <= 9)

    def testConvertHyperOpt(self):
        from ray.tune.suggest.hyperopt import HyperOptSearch
        from hyperopt import hp

        config = {
            "a": tune.sample.Categorical([2, 3, 4]).uniform(),
            "b": {
                "x": tune.sample.Integer(-15, -10).quantized(2),
                "y": 4,
                "z": tune.sample.Float(1e-4, 1e-2).loguniform()
            }
        }
        converted_config = HyperOptSearch.convert_search_space(config)
        hyperopt_config = {
            "a": hp.choice("a", [2, 3, 4]),
            "b": {
                "x": hp.randint("x", -15, -10),
                "y": 4,
                "z": hp.loguniform("z", np.log(1e-4), np.log(1e-2))
            }
        }

        searcher1 = HyperOptSearch(
            space=converted_config,
            random_state_seed=1234,
            metric="a",
            mode="max")
        searcher2 = HyperOptSearch(
            space=hyperopt_config,
            random_state_seed=1234,
            metric="a",
            mode="max")

        config1 = searcher1.suggest("0")
        config2 = searcher2.suggest("0")

        self.assertEqual(config1, config2)
        self.assertIn(config1["a"], [2, 3, 4])
        self.assertIn(config1["b"]["x"], list(range(-15, -10)))
        self.assertEqual(config1["b"]["y"], 4)
        self.assertLess(1e-4, config1["b"]["z"])
        self.assertLess(config1["b"]["z"], 1e-2)

        searcher = HyperOptSearch(metric="a", mode="max")
        analysis = tune.run(
            _mock_objective, config=config, search_alg=searcher, num_samples=1)
        trial = analysis.trials[0]
        assert trial.config["a"] in [2, 3, 4]

        mixed_config = {"a": tune.uniform(5, 6), "b": hp.uniform("b", 8, 9)}
        searcher = HyperOptSearch(space=mixed_config, metric="a", mode="max")
        config = searcher.suggest("0")
        self.assertTrue(5 <= config["a"] <= 6)
        self.assertTrue(8 <= config["b"] <= 9)

    def testConvertHyperOptNested(self):
        from ray.tune.suggest.hyperopt import HyperOptSearch

        config = {
            "a": 1,
            "dict_nested": tune.sample.Categorical([{
                "a": tune.sample.Categorical(["M", "N"]),
                "b": tune.sample.Categorical(["O", "P"])
            }]).uniform(),
            "list_nested": tune.sample.Categorical([
                [
                    tune.sample.Categorical(["M", "N"]),
                    tune.sample.Categorical(["O", "P"])
                ],
                [
                    tune.sample.Categorical(["Q", "R"]),
                    tune.sample.Categorical(["S", "T"])
                ],
            ]).uniform(),
            "domain_nested": tune.sample.Categorical([
                tune.sample.Categorical(["M", "N"]),
                tune.sample.Categorical(["O", "P"])
            ]).uniform(),
        }

        searcher = HyperOptSearch(metric="a", mode="max")
        analysis = tune.run(
            _mock_objective,
            config=config,
            search_alg=searcher,
            num_samples=10)

        for trial in analysis.trials:
            config = trial.config

            self.assertIn(config["dict_nested"]["a"], ["M", "N"])
            self.assertIn(config["dict_nested"]["b"], ["O", "P"])

            if config["list_nested"][0] in ["M", "N"]:
                self.assertIn(config["list_nested"][1], ["O", "P"])
            else:
                self.assertIn(config["list_nested"][0], ["Q", "R"])
                self.assertIn(config["list_nested"][1], ["S", "T"])

            self.assertIn(config["domain_nested"], ["M", "N", "O", "P"])

    def testConvertNevergrad(self):
        from ray.tune.suggest.nevergrad import NevergradSearch
        import nevergrad as ng

        config = {
            "a": tune.sample.Categorical([2, 3, 4]).uniform(),
            "b": {
                "x": tune.sample.Integer(0, 5).quantized(2),
                "y": 4,
                "z": tune.sample.Float(1e-4, 1e-2).loguniform()
            }
        }
        converted_config = NevergradSearch.convert_search_space(config)
        nevergrad_config = ng.p.Dict(
            a=ng.p.Choice([2, 3, 4]),
            b=ng.p.Dict(
                x=ng.p.Scalar(lower=0, upper=5).set_integer_casting(),
                z=ng.p.Log(lower=1e-4, upper=1e-2)))

        searcher1 = NevergradSearch(
            optimizer=ng.optimizers.OnePlusOne,
            space=converted_config,
            metric="a",
            mode="max")
        searcher2 = NevergradSearch(
            optimizer=ng.optimizers.OnePlusOne,
            space=nevergrad_config,
            metric="a",
            mode="max")

        np.random.seed(1234)
        config1 = searcher1.suggest("0")
        np.random.seed(1234)
        config2 = searcher2.suggest("0")

        self.assertEqual(config1, config2)
        self.assertIn(config1["a"], [2, 3, 4])
        self.assertIn(config1["b"]["x"], list(range(5)))
        self.assertLess(1e-4, config1["b"]["z"])
        self.assertLess(config1["b"]["z"], 1e-2)

        searcher = NevergradSearch(
            optimizer=ng.optimizers.OnePlusOne, metric="a", mode="max")
        analysis = tune.run(
            _mock_objective, config=config, search_alg=searcher, num_samples=1)
        trial = analysis.trials[0]
        assert trial.config["a"] in [2, 3, 4]

        mixed_config = {
            "a": tune.uniform(5, 6),
            "b": tune.uniform(8, 9)  # Cannot mix Nevergrad cfg and tune
        }
        searcher = NevergradSearch(
            space=mixed_config,
            optimizer=ng.optimizers.OnePlusOne,
            metric="a",
            mode="max")
        config = searcher.suggest("0")
        self.assertTrue(5 <= config["a"] <= 6)
        self.assertTrue(8 <= config["b"] <= 9)

    def testNevergradBestParams(self):
        from ray.tune.suggest.nevergrad import NevergradSearch
        import nevergrad as ng

        config = {
            "metric": tune.sample.Categorical([1, 2, 3, 4]).uniform(),
            "a": tune.sample.Categorical(["t1", "t2", "t3", "t4"]).uniform(),
            "b": tune.sample.Integer(0, 5),
            "c": tune.sample.Float(1e-4, 1e-1).loguniform()
        }

        best_params = [{
            "metric": 1,
            "a": "t1",
            "b": 1,
            "c": 1e-1
        }, {
            "metric": 2,
            "a": "t2",
            "b": 2,
            "c": 1e-2
        }]

        searcher = NevergradSearch(
            optimizer=ng.optimizers.OnePlusOne, points_to_evaluate=best_params)
        analysis = tune.run(
            _mock_objective,
            config=config,
            metric="metric",
            mode="max",
            search_alg=searcher,
            num_samples=5)

        for i in range(len(best_params)):
            trial_config = analysis.trials[i].config
            trial_config_dict = {
                "metric": trial_config["metric"],
                "a": trial_config["a"],
                "b": trial_config["b"],
                "c": trial_config["c"]
            }
            self.assertDictEqual(trial_config_dict, best_params[i])

    def testConvertOptuna(self):
        from ray.tune.suggest.optuna import OptunaSearch, param
        from optuna.samplers import RandomSampler

        config = {
            "a": tune.sample.Categorical([2, 3, 4]).uniform(),
            "b": {
                "x": tune.sample.Integer(0, 5).quantized(2),
                "y": 4,
                "z": tune.sample.Float(1e-4, 1e-2).loguniform()
            }
        }
        converted_config = OptunaSearch.convert_search_space(config)
        optuna_config = [
            param.suggest_categorical("a", [2, 3, 4]),
            param.suggest_int("b/x", 0, 5, 2),
            param.suggest_loguniform("b/z", 1e-4, 1e-2)
        ]

        sampler1 = RandomSampler(seed=1234)
        searcher1 = OptunaSearch(
            space=converted_config, sampler=sampler1, metric="a", mode="max")

        sampler2 = RandomSampler(seed=1234)
        searcher2 = OptunaSearch(
            space=optuna_config, sampler=sampler2, metric="a", mode="max")

        config1 = searcher1.suggest("0")
        config2 = searcher2.suggest("0")

        self.assertEqual(config1, config2)
        self.assertIn(config1["a"], [2, 3, 4])
        self.assertIn(config1["b"]["x"], list(range(5)))
        self.assertLess(1e-4, config1["b"]["z"])
        self.assertLess(config1["b"]["z"], 1e-2)

        searcher = OptunaSearch(metric="a", mode="max")
        analysis = tune.run(
            _mock_objective, config=config, search_alg=searcher, num_samples=1)
        trial = analysis.trials[0]
        assert trial.config["a"] in [2, 3, 4]

        mixed_config = {
            "a": tune.uniform(5, 6),
            "b": tune.uniform(8, 9)  # Cannot mix List and Dict
        }
        searcher = OptunaSearch(space=mixed_config, metric="a", mode="max")
        config = searcher.suggest("0")
        self.assertTrue(5 <= config["a"] <= 6)
        self.assertTrue(8 <= config["b"] <= 9)

    def testConvertSkOpt(self):
        from ray.tune.suggest.skopt import SkOptSearch

        config = {
            "a": tune.sample.Categorical([2, 3, 4]).uniform(),
            "b": {
                "x": tune.sample.Integer(0, 5).quantized(2),
                "y": 4,
                "z": tune.sample.Float(1e-4, 1e-2).loguniform()
            }
        }
        converted_config = SkOptSearch.convert_search_space(config)
        skopt_config = {"a": [2, 3, 4], "b/x": (0, 5), "b/z": (1e-4, 1e-2)}

        searcher1 = SkOptSearch(space=converted_config, metric="a", mode="max")
        searcher2 = SkOptSearch(space=skopt_config, metric="a", mode="max")

        np.random.seed(1234)
        config1 = searcher1.suggest("0")
        np.random.seed(1234)
        config2 = searcher2.suggest("0")

        self.assertEqual(config1, config2)
        self.assertIn(config1["a"], [2, 3, 4])
        self.assertIn(config1["b"]["x"], list(range(5)))
        self.assertLess(1e-4, config1["b"]["z"])
        self.assertLess(config1["b"]["z"], 1e-2)

        searcher = SkOptSearch(metric="a", mode="max")
        analysis = tune.run(
            _mock_objective, config=config, search_alg=searcher, num_samples=1)
        trial = analysis.trials[0]
        self.assertIn(trial.config["a"], [2, 3, 4])
        self.assertEqual(trial.config["b"]["y"], 4)

        mixed_config = {"a": tune.uniform(5, 6), "b": (8, 9)}
        searcher = SkOptSearch(space=mixed_config, metric="a", mode="max")
        config = searcher.suggest("0")
        self.assertTrue(5 <= config["a"] <= 6)
        self.assertTrue(8 <= config["b"] <= 9)

    def testConvertZOOpt(self):
        from ray.tune.suggest.zoopt import ZOOptSearch
        from zoopt import ValueType

        config = {
            "a": tune.sample.Categorical([2, 3, 4]).uniform(),
            "b": {
                "x": tune.sample.Integer(0, 5).quantized(2),
                "y": tune.sample.Categorical([2, 4, 6, 8]).uniform(),
                "z": tune.sample.Float(1e-4, 1e-2).loguniform()
            }
        }
        # Does not support categorical variables
        with self.assertRaises(ValueError):
            converted_config = ZOOptSearch.convert_search_space(config)
        config = {
            "a": 2,
            "b": {
                "x": tune.sample.Integer(0, 5).uniform(),
                "y": tune.sample.Categorical([2, 4, 6, 8]).uniform(),
                "z": tune.sample.Float(-3, 7).uniform().quantized(1e-4)
            }
        }
        converted_config = ZOOptSearch.convert_search_space(config)

        zoopt_config = {
            "b/x": (ValueType.DISCRETE, [0, 5], True),
            "b/y": (ValueType.GRID, [2, 4, 6, 8]),
            "b/z": (ValueType.CONTINUOUS, [-3, 7], 1e-4),
        }

        zoopt_search_config = {"parallel_num": 4}

        searcher1 = ZOOptSearch(
            dim_dict=converted_config,
            budget=5,
            metric="a",
            mode="max",
            **zoopt_search_config)
        searcher2 = ZOOptSearch(
            dim_dict=zoopt_config,
            budget=5,
            metric="a",
            mode="max",
            **zoopt_search_config)

        np.random.seed(1234)
        config1 = searcher1.suggest("0")
        np.random.seed(1234)
        config2 = searcher2.suggest("0")

        self.assertEqual(config1, config2)
        self.assertIn(config1["b"]["x"], list(range(5)))
        self.assertIn(config1["b"]["y"], [2, 4, 6, 8])
        self.assertLess(-3, config1["b"]["z"])
        self.assertLess(config1["b"]["z"], 7)

        searcher = ZOOptSearch(
            budget=5, metric="a", mode="max", **zoopt_search_config)
        analysis = tune.run(
            _mock_objective, config=config, search_alg=searcher, num_samples=1)
        trial = analysis.trials[0]
        self.assertIn(trial.config["b"]["y"], [2, 4, 6, 8])

        mixed_config = {
            "a": tune.uniform(5, 6),
            "b": (ValueType.CONTINUOUS, [8, 9], 1e-4)
        }
        searcher = ZOOptSearch(
            dim_dict=mixed_config,
            budget=5,
            metric="a",
            mode="max",
            **zoopt_search_config)
        config = searcher.suggest("0")
        self.assertTrue(5 <= config["a"] <= 6)
        self.assertTrue(8 <= config["b"] <= 9)

if __name__ == "__main__":
    import pytest
    import sys
    sys.exit(pytest.main(["-v", __file__]))


text:
MooreJS requries Jquery v2.2 or higher.

Random Functions - generate a verytery of random outputs

Input an intiger to get a random number from 1 to that number. Example: rand(12) --> 5

Input "bool" to get either a true or a false. Example: rand("bool") --> true

Input "rgb" to get a random color in RGB format. Example: rand("rgb") --> rgb(112, 23, 220)

Input "hex" to get a random color in HEX format. Example: rand("hex") --> #E414CF


text:
package com.freiheit.fuava.sftp.util;

import javax.annotation.Nonnull;

/**
 * Describes the type of files to be processed.
 *
 * @author dmitrijs.barbarins@freiheit.com
 */
public class FileType {
    public static final FileType ALL_FILES = new FileType( "all", "*" );

    private final String interfaceName;
    private final String fileIdentifierPattern;
    private final String fileExtention;
    private final String okFileExtention;

    /**
     *  Constructs a file type from interface name and file identifier.
     *
     * @param interfaceName
     *          the name of the interface where the data is from. That is important if data comes from different sources.
     *          Inn general this is the beginning pattern of the file name, i.e. mcrm, crm etc.
     * @param fileIdentifier
     *          everything that is between the interface name and the first number that appears in the file name.
     *          I.e. crm_test_data_{DATE} (see also {@link FilenameUtil#DATE_TIME_PATTERN }
     *          Usually, the first number indicates a date starting. The pattern of the date following has to be:
     *          YYYYMMDD_HHMMSS, followd by the file extension or okFileExtension
     */
    public FileType( @Nonnull final String interfaceName, @Nonnull final String fileIdentifier ) {
        this.interfaceName = interfaceName;
        this.fileIdentifierPattern = fileIdentifier;
        this.fileExtention = ".csv";
        this.okFileExtention = ".ok";
    }

    /**
     * Constructs a file type from interface name, file identifier, file extension and ok file extension.

     *
     * @param interfaceName
     *          the name of the interface where the data is from. That is important if data comes from different sources.
     *          Inn general this is the beginning pattern of the file name, i.e. mcrm, crm etc.
     * @param fileIdentifier
     *          everything that is between the interface name and the first number that appears in the file name.
     *          I.e. crm_test_data_{DATE} (see also {@link FilenameUtil#DATE_TIME_PATTERN }
     *          Usually, the first number indicates a date starting. The pattern of the date following has to be:
     *          YYYYMMDD_HHMMSS, followd by the
     * @param fileExtention or
     * @param okFileExtention of the file.
     */
    public FileType( @Nonnull final String interfaceName, @Nonnull final String fileIdentifier,
            @Nonnull final String fileExtention, @Nonnull final String okFileExtention ) {
        this.interfaceName = interfaceName;
        this.fileIdentifierPattern = fileIdentifier;
        this.fileExtention = fileExtention;
        this.okFileExtention = okFileExtention;
    }

    /**
     * The interfaceName, i.e., either storedata, hobase, pwhg, ean or all.
     */
    public String getInterfaceName() {
        return interfaceName;
    }

    /**
     * A pattern that matches files of the appropriate interfaceName.
     */
    public String getFileIdentifier() {
        return fileIdentifierPattern;
    }

    public String getExtention() {
        return fileExtention;
    }

    public String getOkFileExtention() {
        return okFileExtention;
    }

    @Override
    public String toString() {
        return "FileType{" +
                "interfaceName='" + interfaceName + '\'' +
                ", fileIdentifierPattern='" + fileIdentifierPattern + '\'' +
                ", fileExtention='" + fileExtention + '\'' +
                ", okFileExtention='" + okFileExtention + '\'' +
                '}';
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = ( prime * result ) + ( ( fileExtention == null )
            ? 0
            : fileExtention.hashCode() );
        result = ( prime * result ) + ( ( fileIdentifierPattern == null )
            ? 0
            : fileIdentifierPattern.hashCode() );
        result = ( prime * result ) + ( ( interfaceName == null )
            ? 0
            : interfaceName.hashCode() );
        result = ( prime * result ) + ( ( okFileExtention == null )
            ? 0
            : okFileExtention.hashCode() );
        return result;
    }

    @Override
    public boolean equals( final Object obj ) {
        if ( this == obj ) {
            return true;
        }
        if ( obj == null ) {
            return false;
        }
        if ( getClass() != obj.getClass() ) {
            return false;
        }
        final FileType other = (FileType) obj;
        if ( fileExtention == null ) {
            if ( other.fileExtention != null ) {
                return false;
            }
        } else if ( !fileExtention.equals( other.fileExtention ) ) {
            return false;
        }
        if ( fileIdentifierPattern == null ) {
            if ( other.fileIdentifierPattern != null ) {
                return false;
            }
        } else if ( !fileIdentifierPattern.equals( other.fileIdentifierPattern ) ) {
            return false;
        }
        if ( interfaceName == null ) {
            if ( other.interfaceName != null ) {
                return false;
            }
        } else if ( !interfaceName.equals( other.interfaceName ) ) {
            return false;
        }
        if ( okFileExtention == null ) {
            if ( other.okFileExtention != null ) {
                return false;
            }
        } else if ( !okFileExtention.equals( other.okFileExtention ) ) {
            return false;
        }
        return true;
    }
}


text:
function CC = insertBlankCells(C, ndx)
%% Insert blank rows of cells into a cell array at indices ndx
% Returns a column cell array
%%

% This file is from pmtk3.googlecode.com

N = size(C, 1)+numel(ndx);
CC = cell(N, size(C, 2));

dndx = setdiffPMTK(1:N, ndx);
CC(dndx, :) = C;

end


text:
package com.strv.rxjavademo.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;

import com.strv.rxjavademo.Event.RetrofitRequestEvent;
import com.strv.rxjavademo.R;
import com.strv.rxjavademo.adapter.CardsGithubAdapter;
import com.strv.rxjavademo.bus.RxCustomCacheBus;
import com.strv.rxjavademo.model.GithubUserModel;
import com.strv.rxjavademo.service.GithubService;

import java.util.concurrent.TimeUnit;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import retrofit.GsonConverterFactory;
import retrofit.Retrofit;
import retrofit.RxJavaCallAdapterFactory;
import rx.Observable;
import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Action0;
import rx.schedulers.Schedulers;

/**
 * Created by adamcerny on 24/08/15.
 */
public class RetrofitRxBusCacheFragment extends BaseFragment
{
	@Bind(R.id.fragment_retrofit_example_recycler)
	RecyclerView mRecyclerView;

	@Bind(R.id.fragment_retrofit_example_progress)
	ProgressBar mProgressBar;

	private CardsGithubAdapter mCardAdapter;

	private RxCustomCacheBus mRxBusRequestCache = RxCustomCacheBus.getInstance();

	public static RetrofitRxBusCacheFragment newInstance()
	{
		RetrofitRxBusCacheFragment fragment = new RetrofitRxBusCacheFragment();
		return fragment;
	}

	public RetrofitRxBusCacheFragment()
	{
		super();
	}

	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
	}

	@Override
	public void onActivityCreated(@Nullable Bundle savedInstanceState)
	{
		super.onActivityCreated(savedInstanceState);

		renderView();
		handleCache();
	}

	@Override
	public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
	{
		View layout = inflater.inflate(R.layout.fragment_retrofit, container, false);
		ButterKnife.bind(this, layout);
		return layout;
	}

	@OnClick(R.id.fragment_retrofit_lambda_example_button)
	public void clickLoadLambdaData()
	{
		if(mProgressBar.getVisibility() == View.VISIBLE)
			return;

		mCardAdapter.clearAdapter();

		GithubService service = new Retrofit.Builder()
				.baseUrl(GithubService.BASE_ENDPOINT)
				.addConverterFactory(GsonConverterFactory.create())
				.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
				.build()
				.create(GithubService.class);

		mProgressBar.setVisibility(View.VISIBLE);

		for(String username : RetrofitCustomCacheFragment.getGithubusernames)
		{
			Observable<GithubUserModel> request = service.getUser(username).cache();

			mCompositeSubscription.add(
				request
					.subscribeOn(Schedulers.io())
					.observeOn(AndroidSchedulers.mainThread())
					.delay(2, TimeUnit.SECONDS)
					.observeOn(AndroidSchedulers.mainThread())
					.doOnUnsubscribe(() ->
					{
						RetrofitRequestEvent event = new RetrofitRequestEvent();
						event.setRequest(request);
						mRxBusRequestCache.publish(event);
					})
					.subscribe(item ->
					{
						mCardAdapter.addGithubItem(item);

						if(mCardAdapter.getItemCount() == RetrofitCustomCacheFragment.getGithubusernames.size())
						{
							mProgressBar.setVisibility(View.GONE);
						}
					},
					error ->
					{
						mProgressBar.setVisibility(View.GONE);
						System.out.println("FUCK : error is : " + error.getLocalizedMessage());
					},
					() -> {
					}
				)
			);
		}
	}

	@OnClick(R.id.fragment_retrofit_rxandroid_example_button)
	public void clickLoadRxAndroidData()
	{
		if(mProgressBar.getVisibility() == View.VISIBLE)
			return;

		mCardAdapter.clearAdapter();

		GithubService service = new Retrofit.Builder()
				.baseUrl(GithubService.BASE_ENDPOINT)
				.addConverterFactory(GsonConverterFactory.create())
				.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
				.build()
				.create(GithubService.class);

		mProgressBar.setVisibility(View.VISIBLE);

		for(String username : RetrofitCustomCacheFragment.getGithubusernames)
		{
			Observable<GithubUserModel> request = service.getUser(username).cache();

			mCompositeSubscription.add(
				request
					.subscribeOn(Schedulers.io())
					.observeOn(AndroidSchedulers.mainThread())
					.delay(2, TimeUnit.SECONDS)
					.observeOn(AndroidSchedulers.mainThread())
					.doOnUnsubscribe(new Action0()
					{
						@Override
						public void call()
						{
							RetrofitRequestEvent event = new RetrofitRequestEvent();
							event.setRequest(request);
							mRxBusRequestCache.publish(event);
						}
					})
					.subscribe(new Subscriber<GithubUserModel>()
					{
						@Override
						public void onNext(GithubUserModel item)
						{
							mCardAdapter.addGithubItem(item);

							if(mCardAdapter.getItemCount() == RetrofitCustomCacheFragment.getGithubusernames.size())
							{
								mProgressBar.setVisibility(View.GONE);
							}
						}

						@Override
						public void onCompleted()
						{
						}

						@Override
						public void onError(Throwable e)
						{
							mProgressBar.setVisibility(View.GONE);
							System.out.println("FUCK : error is : " + e.getLocalizedMessage());
						}
					})
			);
		}
	}

	private void renderView()
	{
		mRecyclerView.setHasFixedSize(true);
		mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
		mCardAdapter = new CardsGithubAdapter();
		mRecyclerView.setAdapter(mCardAdapter);
	}

	private void handleCache()
	{
		if(mRxBusRequestCache.hasEventsOfType(RetrofitRequestEvent.class))
		{
			reSubscribe();
		}
	}

	private void reSubscribe()
	{
		mProgressBar.setVisibility(View.VISIBLE);

		mRxBusRequestCache.observe(RetrofitRequestEvent.class)
			.subscribe(item ->
				item.getRequest()
					.subscribeOn(Schedulers.io())
					.observeOn(AndroidSchedulers.mainThread())
					.subscribe(response ->
					{
						mCardAdapter.addGithubItem(response);

						if(mCardAdapter.getItemCount() == RetrofitCustomCacheFragment.getGithubusernames.size())
						{
							mProgressBar.setVisibility(View.GONE);
						}
					},
					error ->
					{
						mProgressBar.setVisibility(View.GONE);
						System.out.println("FUCK : error is : " + error.getLocalizedMessage());
					},
					() -> {})
						)
			.unsubscribe();
	}
}


text:
namespace Computers.Components
{
    using System;

    public class MonochromeVideoCard : VideoCard
    {
        public override void Draw(string message)
        {
            Console.ForegroundColor = ConsoleColor.Gray;
            Console.WriteLine(message);
            Console.ResetColor();
        }
    }
}