text:
package org.openhubframework.openhub.admin.web.common.rpc;

import java.time.OffsetDateTime;
import javax.annotation.Nullable;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.http.HttpStatus;
import org.springframework.util.Assert;

import org.openhubframework.openhub.api.exception.ErrorExtEnum;
import org.openhubframework.openhub.api.exception.IntegrationException;

/**
 * General fault response when server error occurred.
 *
 * @author Petr Juza
 * @since 2.0
 */
public class GeneralFaultRpc {

    private final OffsetDateTime timestamp;

    private final HttpStatus status;

    private final ErrorExtEnum error;

    private final Exception exception;

    /**
     * Creates new fault response.
     *
     * @param status    HTTP status
     * @param error     Error
     * @param exception Exception
     */
    public GeneralFaultRpc(HttpStatus status, ErrorExtEnum error, Exception exception) {
        Assert.notNull(status, "status mustn't not be null");
        Assert.notNull(error, "error mustn't not be null");
        Assert.notNull(exception, "exception mustn't not be null");

        this.timestamp = OffsetDateTime.now();
        this.status = status;
        this.error = error;
        this.exception = exception;
    }

    /**
     * Creates new fault response.
     *
     * @param status HTTP status
     * @param ex     Integration exception
     */
    public GeneralFaultRpc(HttpStatus status, IntegrationException ex) {
        this(status, ex.getError(), ex);
    }

    /**
     * Gets timestamp: 2016-12-10T18:21:08+0100 (string): timestamp when error occurred.
     */
    public OffsetDateTime getTimestamp() {
        return timestamp;
    }

    /**
     * Gets httpStatus: 204 (number) - HTTP status code.
     */
    public int getHttpStatus() {
        return status.value();
    }

    /**
     * Gets httpDesc: 'No Content' (string) - description of HTTP status.
     */
    public String getHttpDesc() {
        return status.getReasonPhrase();
    }

    /**
     * Gets errorCode: 'O_E001' (string) - internal error code.
     */
    public String getErrorCode() {
        return error.getErrorCode();
    }

    /**
     * Gets type: 'java.lang.RuntimeException' (string) - type of error (=class name of the exception).
     */
    public String getType() {
        return exception.getClass().getSimpleName();
    }

    /**
     * Gets message: 'Message describing the error' (string) - a description of the error in default language.
     */
    public String getMessage() {
        return exception.getMessage();
    }

    /**
     * Gets messageI18n: 'Message describing the error' (string,) - a description of the error in localized language.
     */
    @Nullable
    public String getMessageI18n() {
        return exception.getMessage();
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
                .append("timestamp", timestamp)
                .append("status", status)
                .append("error", error)
                .append("exception", exception)
                .toString();
    }
}


text:
package org.eclipse.jface.text;

import org.eclipse.core.runtime.Assert;

import org.eclipse.jface.internal.text.SelectionProcessor;

/**
 * Standard implementation of {@link org.eclipse.jface.text.IBlockTextSelection}.
 *
 * @since 3.5
 */
public class BlockTextSelection extends TextSelection implements IBlockTextSelection {

	/** The start line. */
	private final int fStartLine;
	/** The start column. */
	private final int fStartColumn;
	/** The end line. */
	private final int fEndLine;
	/** The end column. */
	private final int fEndColumn;
	/** The tabulator width used to compute visual columns from character offsets. */
	private final int fTabWidth;

	/**
	 * Creates a column selection for the given lines and columns.
	 *
	 * @param document the document that this selection refers to
	 * @param startLine the start line
	 * @param startColumn the possibly virtual start column, measured in characters from the start
	 *        of startLine
	 * @param endLine the inclusive end line
	 * @param endColumn the exclusive and possibly virtual end column, measured in characters from
	 *        the start of endLine
	 * @param tabWidth the tabulator width used to compute the visual offsets from character offsets
	 */
	public BlockTextSelection(IDocument document, int startLine, int startColumn, int endLine, int endColumn, int tabWidth) {
		super(document, computeOffset(document, startLine, startColumn), computeOffset(document, endLine, endColumn) - computeOffset(document, startLine, startColumn));
		Assert.isLegal(startLine >= 0);
		Assert.isLegal(startColumn >= 0);
		Assert.isLegal(endLine >= startLine);
		Assert.isLegal(endColumn >= 0);
		Assert.isLegal(tabWidth >= 0);
		fStartLine= startLine;
		fStartColumn= startColumn;
		fEndLine= endLine;
		fEndColumn= endColumn;
		fTabWidth= tabWidth > 0	? tabWidth : 8; // seems to be the default when StyledText.getTabs returns 0
	}

	/**
	 * Returns the document offset for a given tuple of line and column count. If the column count
	 * points beyond the end of the line, the end of the line is returned (virtual location). If the
	 * line points beyond the number of lines, the end of the document is returned; if the line is
	 * < zero, 0 is returned.
	 *
	 * @param document the document to get line information from
	 * @param line the line in the document, may be greater than the line count
	 * @param column the offset in the given line, may be greater than the line length
	 * @return the document offset corresponding to the line and column counts
	 */
	private static int computeOffset(IDocument document, int line, int column) {
		try {
			IRegion lineInfo= document.getLineInformation(line);
			int offsetInLine= Math.min(column, lineInfo.getLength());
			return lineInfo.getOffset() + offsetInLine;
		} catch (BadLocationException x) {
			if (line < 0)
				return 0;
			return document.getLength();
		}
	}

	/*
	 * @see org.eclipse.jface.text.TextSelection#getStartLine()
	 */
	public int getStartLine() {
		return fStartLine;
	}

	/*
	 * @see org.eclipse.jface.text.IColumnTextSelection#getStartColumn()
	 */
	public int getStartColumn() {
		return fStartColumn;
	}

	/*
	 * @see org.eclipse.jface.text.TextSelection#getEndLine()
	 */
	public int getEndLine() {
		return fEndLine;
	}

	/*
	 * @see org.eclipse.jface.text.IColumnTextSelection#getEndColumn()
	 */
	public int getEndColumn() {
		return fEndColumn;
	}

	/*
	 * @see org.eclipse.jface.text.TextSelection#getText()
	 */
	public String getText() {
		IDocument document= getDocument();
		if (document != null) {
			try {
				return new SelectionProcessor(document, fTabWidth).getText(this);
			} catch (BadLocationException x) {
				// ignore and default to super implementation
			}
		}
		return super.getText();
	}

	/*
	 * @see org.eclipse.jface.text.TextSelection#hashCode()
	 */
	public int hashCode() {
		final int prime= 31;
		int result= super.hashCode();
		result= prime * result + fEndColumn;
		result= prime * result + fEndLine;
		result= prime * result + fStartColumn;
		result= prime * result + fStartLine;
		return result;
	}

	/*
	 * @see org.eclipse.jface.text.TextSelection#equals(java.lang.Object)
	 */
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		final BlockTextSelection other= (BlockTextSelection) obj;
		if (fEndColumn != other.fEndColumn)
			return false;
		if (fEndLine != other.fEndLine)
			return false;
		if (fStartColumn != other.fStartColumn)
			return false;
		if (fStartLine != other.fStartLine)
			return false;
		return true;
	}

	/*
	 * @see org.eclipse.jface.text.IColumnTextSelection#getRegions()
	 */
	public IRegion[] getRegions() {
		IDocument document= getDocument();
		if (document != null) {
			try {
				return new SelectionProcessor(document, fTabWidth).getRanges(this);
			} catch (BadLocationException x) {
				// default to single region behavior
			}
		}
		return new IRegion[] {new Region(getOffset(), getLength())};
	}
}

redpajama_set_name: RedPajamaGithub


text:
package com.microsoft.azure.management.appservice.v2018_02_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * The ResponseMetaData model.
 */
public class ResponseMetaData {
    /**
     * Source of the Data.
     */
    @JsonProperty(value = "dataSource")
    private DataSource dataSource;

    /**
     * Get source of the Data.
     *
     * @return the dataSource value
     */
    public DataSource dataSource() {
        return this.dataSource;
    }

    /**
     * Set source of the Data.
     *
     * @param dataSource the dataSource value to set
     * @return the ResponseMetaData object itself.
     */
    public ResponseMetaData withDataSource(DataSource dataSource) {
        this.dataSource = dataSource;
        return this;
    }

}


text:
import {
  PanelLayout
} from './panellayout';

import {
  Widget
} from './widget';

/**
 * A simple and convenient panel widget class.
 *
 * #### Notes
 * This class is suitable as a base class for implementing a variety of
 * convenience panel widgets, but can also be used directly with CSS to
 * arrange a collection of widgets.
 *
 * This class provides a convenience wrapper around a [[PanelLayout]].
 */
export
class Panel extends Widget {
  /**
   * Construct a new panel.
   *
   * @param options - The options for initializing the panel.
   */
  constructor(options: Panel.IOptions = {}) {
    super();
    this.addClass('p-Panel');
    this.layout = Private.createLayout(options);
  }

  /**
   * A read-only array of the widgets in the panel.
   */
  get widgets(): ReadonlyArray<Widget> {
    return (this.layout as PanelLayout).widgets;
  }

  /**
   * Add a widget to the end of the panel.
   *
   * @param widget - The widget to add to the panel.
   *
   * #### Notes
   * If the widget is already contained in the panel, it will be moved.
   */
  addWidget(widget: Widget): void {
    (this.layout as PanelLayout).addWidget(widget);
  }

  /**
   * Insert a widget at the specified index.
   *
   * @param index - The index at which to insert the widget.
   *
   * @param widget - The widget to insert into to the panel.
   *
   * #### Notes
   * If the widget is already contained in the panel, it will be moved.
   */
  insertWidget(index: number, widget: Widget): void {
    (this.layout as PanelLayout).insertWidget(index, widget);
  }
}

/**
 * The namespace for the `Panel` class statics.
 */
export
namespace Panel {
  /**
   * An options object for creating a panel.
   */
  export
  interface IOptions {
    /**
     * The panel layout to use for the panel.
     *
     * The default is a new `PanelLayout`.
     */
    layout?: PanelLayout;
  }
}

/**
 * The namespace for the module implementation details.
 */
namespace Private {
  /**
   * Create a panel layout for the given panel options.
   */
  export
  function createLayout(options: Panel.IOptions): PanelLayout {
    return options.layout || new PanelLayout();
  }
}


text:
Variants for c++11
==================

This is a quick and dirty variant implementation in c++11. It was done
for fun and practice and so it probably has many holes in
it. Suggestions and corrections are welcome.

ps: yes, I know, pragma once isn't standard.


text:
package com.facebook.buck.rules;

import static org.junit.Assert.assertEquals;

import com.facebook.buck.step.StepRunner;
import com.facebook.buck.util.AndroidPlatformTarget;
import com.facebook.buck.util.HumanReadableException;
import com.facebook.buck.util.ProjectFilesystem;
import com.google.common.base.Optional;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList;

import org.easymock.EasyMock;
import org.junit.Test;

import java.io.File;
import java.util.List;

public class BuildContextTest {

  @Test
  public void testGetAndroidBootclasspathSupplierWithAndroidPlatformTarget() {
    BuildContext.Builder builder = BuildContext.builder();

    // Set to non-null values.
    builder.setProjectRoot(EasyMock.createMock(File.class));
    builder.setDependencyGraph(EasyMock.createMock(DependencyGraph.class));
    builder.setCommandRunner(EasyMock.createMock(StepRunner.class));
    builder.setProjectFilesystem(EasyMock.createMock(ProjectFilesystem.class));
    builder.setJavaPackageFinder(EasyMock.createMock(JavaPackageFinder.class));

    AndroidPlatformTarget androidPlatformTarget = EasyMock.createMock(AndroidPlatformTarget.class);
    List<File> entries = ImmutableList.of(
        new File("add-ons/addon-google_apis-google-15/libs/effects.jar"),
        new File("add-ons/addon-google_apis-google-15/libs/maps.jar"),
        new File("add-ons/addon-google_apis-google-15/libs/usb.jar"));
    EasyMock.expect(androidPlatformTarget.getBootclasspathEntries()).andReturn(entries);

    EasyMock.replay(androidPlatformTarget);

    builder.setAndroidBootclasspathForAndroidPlatformTarget(Optional.of(androidPlatformTarget));

    BuildContext context = builder.build();
    Supplier<String> androidBootclasspathSupplier = context.getAndroidBootclasspathSupplier();

    String androidBootclasspath = androidBootclasspathSupplier.get();
    assertEquals(
        "add-ons/addon-google_apis-google-15/libs/effects.jar:" +
        "add-ons/addon-google_apis-google-15/libs/maps.jar:" +
        "add-ons/addon-google_apis-google-15/libs/usb.jar",
        androidBootclasspath);

    // Call get() again to ensure that the underlying getBootclasspathEntries() is not called again
    // to verify that memoization is working as expected.
    androidBootclasspathSupplier.get();

    EasyMock.verify(androidPlatformTarget);
  }

  @Test(expected = HumanReadableException.class)
  public void testGetAndroidBootclasspathSupplierWithoutAndroidPlatformTarget() {
    BuildContext.Builder builder = BuildContext.builder();

    // Set to non-null values.
    builder.setProjectRoot(EasyMock.createMock(File.class));
    builder.setDependencyGraph(EasyMock.createMock(DependencyGraph.class));
    builder.setCommandRunner(EasyMock.createMock(StepRunner.class));
    builder.setProjectFilesystem(EasyMock.createMock(ProjectFilesystem.class));
    builder.setJavaPackageFinder(EasyMock.createMock(JavaPackageFinder.class));

    BuildContext context = builder.build();
    Supplier<String> androidBootclasspathSupplier = context.getAndroidBootclasspathSupplier();

    // If no AndroidPlatformTarget is passed to the builder, it should return a Supplier whose get()
    // method throws an exception.
    androidBootclasspathSupplier.get();
  }

  @Test(expected = HumanReadableException.class)
  public void testGetAndroidBootclasspathSupplierWithAbsentAndroidPlatformTarget() {
    BuildContext.Builder builder = BuildContext.builder();

    // Set to non-null values.
    builder.setProjectRoot(EasyMock.createMock(File.class));
    builder.setDependencyGraph(EasyMock.createMock(DependencyGraph.class));
    builder.setCommandRunner(EasyMock.createMock(StepRunner.class));
    builder.setProjectFilesystem(EasyMock.createMock(ProjectFilesystem.class));
    builder.setJavaPackageFinder(EasyMock.createMock(JavaPackageFinder.class));

    // Set to absent value.
    builder.setAndroidBootclasspathForAndroidPlatformTarget(
        Optional.<AndroidPlatformTarget>absent());

    BuildContext context = builder.build();
    Supplier<String> androidBootclasspathSupplier = context.getAndroidBootclasspathSupplier();

    // If no AndroidPlatformTarget is passed to the builder, it should return a Supplier whose get()
    // method throws an exception.
    androidBootclasspathSupplier.get();
  }
}


text:
<?php
/**
 * Checkout coupon form
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

global $woocommerce;

if ( ! WC()->cart->coupons_enabled() ) {
	return;
}

$info_message = apply_filters( 'woocommerce_checkout_coupon_message', __( 'Have a coupon?', 'woocommerce' ) );
$info_message .= ' ' . __( 'Click here to enter your code', 'woocommerce' ) . '';
wc_print_notice( $info_message, 'notice' );
?>

<form class="checkout_coupon" method="post" style="display:none">

		<input type="text" name="coupon_code" class="input-text" placeholder="<?php _e( 'Coupon code', 'woocommerce' ); ?>" id="coupon_code" value="" />

		<input type="submit" class="btn btn-primary" name="apply_coupon" value="<?php _e( 'Apply Coupon', 'woocommerce' ); ?>" />

</form>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static void Main()
    {
        var numbers = Console.ReadLine().Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries)
            .Select(int.Parse).ToList();

        string input = Console.ReadLine();

        while (input != "end")
        {
            int currentNum = int.Parse(input);
            int firstDigit = currentNum;

            while (firstDigit >= 10)
            {
                firstDigit /= 10;
            }

            for (int i = 0; i < numbers.Count; i++)
            {
                if (i == firstDigit)
                {
                    numbers.Insert(firstDigit, currentNum);
                }
            }

            input = Console.ReadLine();
        }

        Console.WriteLine(string.Join(" ", numbers));
    }
}


text:
package com.karcompany;

/**
 * Created by pvkarthik on 2016-12-12.
 *
 * Application which will initialize DI graph.
 */

import android.app.Application;

import com.karcompany.di.components.ApplicationComponent;
import com.karcompany.di.components.DaggerApplicationComponent;
import com.karcompany.di.modules.ApplicationModule;
import com.karcompany.networking.NetworkModule;

public class GitExplorerApplication extends Application {

	private static ApplicationComponent applicationComponent;

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

	private void initializeInjector() {
		applicationComponent = DaggerApplicationComponent.builder()
				.applicationModule(new ApplicationModule(this))
				.networkModule(new NetworkModule(this))
				.build();
		applicationComponent.inject(this);
	}

	public static ApplicationComponent getApplicationComponent() {
		return applicationComponent;
	}
}


text:
<!DOCTYPE html>

<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="import" href="m.html">

<button onclick="document.querySelector('m-drawer').toggle();">Toggle drawer</button>

<m-drawer>

</m-drawer>


text:
def evaled?(type)
  type == "Array" || type == "Hash"
end

Given /^"(\S*?)(\s\(.*\))?" is parsed (as|to) Bencode$/ do |param, type, direction|
  unless type.nil?
  	type = type.gsub /[\(\)\s]/, ''
    param = evaled?(type) ? eval(param) : Kernel.send(type, param)
  end
  begin
    @output = direction == "to" ? BEncodr.bencode(param) : BEncodr.bdecode(param)
  rescue => @error
  end
end

Then /^I should get back "(.*?)" as "(.*?)"$/ do |string, type|
  @output.should be_a_kind_of eval(type)
  expected = evaled?(type) ? eval(string) : Kernel.send(type, string)
  @output.should eq expected
end

Then /^an error should be raised$/ do
  @error.should_not be nil
  @error.should be_a_kind_of StandardError
end


text:
<bill session="110" type="hc" number="264" retreived_date="1226017698" updated="2008-11-06T19:28:18-05:00">
	<status><vote2 date="1197867600" datetime="2007-12-17" where="s" result="pass" how="by Unanimous Consent" roll=""/></status>

	<introduced date="1196744400" datetime="2007-12-04"/>
	<titles>
		<title type="official" as="introduced">Honoring the University of Hawaii for its 100 years of commitment to public higher education.</title>
	</titles>
	<sponsor id="412200"/>
	<cosponsors>
		<cosponsor id="400041" joined="2007-12-11"/>
		<cosponsor id="400001" joined="2007-12-04"/>
		<cosponsor id="400179" joined="2007-12-11"/>
	</cosponsors>
	<actions>
		<action date="1196744400" datetime="2007-12-04"><text>Referred to the House Committee on Education and Labor.</text></action>
		<action date="1197394320" datetime="2007-12-11T13:32:00-05:00"><text>Ms. Hirono moved to suspend the rules and agree to the resolution.</text></action>
		<action date="1197394380" datetime="2007-12-11T13:33:00-05:00"><text>Considered under suspension of the rules.</text><reference label="consideration" ref="CR H15241-15243"/></action>
		<action date="1197394380" datetime="2007-12-11T13:33:00-05:00"><text>DEBATE - The House proceeded with forty minutes of debate on H. Con. Res. 264.</text></action>
		<vote date="1197395280" how="by voice vote" datetime="2007-12-11T13:48:00-05:00" where="h" type="vote" result="pass" ><text>On motion to suspend the rules and agree to the resolution Agreed to by voice vote.</text><reference label="text" ref="CR H15241"/></vote>
		<action date="1197435600" datetime="2007-12-12"><text>Received in the Senate and referred to the Committee on the Judiciary.</text></action>
		<action date="1197867600" datetime="2007-12-17"><text>Senate Committee on the Judiciary discharged by Unanimous Consent.</text><reference label="consideration" ref="CR S15791"/></action>
		<vote date="1197867600" how="by Unanimous Consent" datetime="2007-12-17" where="s" type="vote2" result="pass" ><text>Resolution agreed to in Senate without amendment and with a preamble by Unanimous Consent.</text></vote>
		<action date="1197867600" datetime="2007-12-17"><text>Message on Senate action sent to the House.</text></action>
	</actions>
	<committees>
		<committee name="House Education and Labor" subcommittee="" activity="Referral" />
		<committee name="Senate Judiciary" subcommittee="" activity="Referral, Discharged" />
	</committees>
	<relatedbills>

	</relatedbills>
	<subjects>
		<term name="Commemorations"/>
		<term name="Anniversaries"/>
		<term name="Colleges"/>
		<term name="Congressional tributes"/>
		<term name="Education"/>
		<term name="Hawaii"/>
		<term name="Higher education"/>
	</subjects>
	<amendments>

	</amendments>
	<summary>
	12/17/2007--Passed Senate without amendment. (This measure has not been amended since it was introduced. The summary of that version is repeated here.) Congratulates the University of Hawaii on the momentous occasion of its 100th Anniversary. Expresses the warmest aloha and best wishes of Congress for continued success.<br/>
	</summary>
</bill>


text:
default['chef-compliance']['version'] = nil
default['chef-compliance']['package_source'] = nil
default['chef-compliance']['channel'] = :stable

# Chef MLSA
# https://www.chef.io/blog/2016/04/26/changes-to-how-chef-products-handle-licenses/
# https://www.chef.io/online-master-agreement/
default['chef-compliance']['accept_license'] = false

# The Chef Compliance Server must have an API FQDN set.
# https://docs.chef.io/install_compliance.html
default['chef-compliance']['api_fqdn'] = node['fqdn']

#
# Chef Compliance Tunables
#
# For a complete list see:
# https://docs.chef.io/install_compliance.html
# Example:
#
# In a recipe:
#
#   node.default['chef-compliance']['configuration']['nginx']['ssl_port'] = 4433
#
# In a role:
#
#   default_attributes(
#     'chef-compliance' => {
#       'configuration' => {
#         'ssl' => {
#           'certificate' => '/path/to/certificate.crt',
#           'certificate_key' => '/path/to/certificate.key'
#         }
#       }
#     }
#   )
#
default['chef-compliance']['configuration'] = {}


text:
mkdir -p "$PREFIX/bin"
export MACHTYPE=x86_64
export BINDIR=$(pwd)/bin
export L="${LDFLAGS}"
mkdir -p "$BINDIR"
(cd kent/src/lib && make)
(cd kent/src/htslib && make)
(cd kent/src/jkOwnLib && make)
(cd kent/src/hg/lib && make)
(cd kent/src/utils/bedGeneParts && make)
cp bin/bedGeneParts "$PREFIX/bin"
chmod +x "$PREFIX/bin/bedGeneParts"


text:
namespace Chloe.Annotations
{
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
    public class DbFunctionAttribute : Attribute
    {
        public DbFunctionAttribute()
        {
        }
        public DbFunctionAttribute(string name)
        {
            this.Name = name;
        }
        public string Name { get; set; }
        public string Schema { get; set; }
    }
}


text:
<?php

include_once './../include/config.php';
if(!is_auth()) redirect ();
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
header("Cache-Control: no-transform,public,max-age=300,s-maxage=900");
header('Content-Type: application/json; charset=utf-8');
if (isset($_REQUEST)) {
    $search_str = '%' . trim($_REQUEST['term']) . '%';
//echo $search_str.'<br>';
//die();
    $query = "SELECT business_id as value,business_name as label FROM business "
            . "WHERE business_name LIKE " . pq($search_str) . " OR business_id LIKE " . pq($search_str);
//echo $query;
    $result = mysqli_query($db, $query);
    if ($result) {
        $data = array();
        while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
            $data[] = $row;
        }
        echo json_encode($data, JSON_UNESCAPED_UNICODE);
//    var_dump(json_encode($data));
    } else {
        echo "can't query";
    }
}
//$data = array(
//    array(
//      'id'=>1,
//    'name'=>'test'
//    ),
//        array(
//      'id'=>2,
//    'name'=>'test2'
//    ),
//);
//echo json_encode($data);


text:
package org.apache.felix.ipojo.composite.service.instantiator;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;

import org.apache.felix.ipojo.ComponentInstance;
import org.apache.felix.ipojo.ConfigurationException;
import org.apache.felix.ipojo.PolicyServiceContext;
import org.apache.felix.ipojo.architecture.HandlerDescription;
import org.apache.felix.ipojo.composite.CompositeHandler;
import org.apache.felix.ipojo.composite.instance.InstanceHandler;
import org.apache.felix.ipojo.composite.util.SourceManager;
import org.apache.felix.ipojo.metadata.Element;
import org.apache.felix.ipojo.parser.ParseException;
import org.apache.felix.ipojo.util.DependencyModel;
import org.apache.felix.ipojo.util.DependencyStateListener;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Filter;
import org.osgi.framework.InvalidSyntaxException;

/**
 * Service Instantiator Class. This handler allows to instantiate service
 * instance inside the composition.
 *
 * @author Felix Project Team
 */
public class ServiceDependencyHandler extends CompositeHandler implements DependencyStateListener {

    /**
     * List of instances to manage.
     */
    private List/* <SvcInstance> */m_instances = new ArrayList();

    /**
     * List of importers.
     */
    private List/* <ServiceImporter> */ m_importers = new ArrayList();

    /**
     * Flag indicating if the handler has already finished the start method.
     */
    private boolean m_isStarted;

    /**
     * The handler description.
     */
    private ServiceInstantiatorDescription m_description;

    /**
     * Source Managers.
     */
    private List m_sources;

    /**
     * Create a Service instance object form the given Element.
     * This method parse the given element and configure the service instance object.
     * @param service : the Element describing the service instance
     * @param conf : the configuration from the composite instance
     * @throws ConfigurationException : the service instance cannot be created correctly
     */
    private void createServiceInstance(Element service, Dictionary conf) throws ConfigurationException {
        // Prepare the configuration to append.
        Properties toAppend = new Properties();
        Enumeration keys = conf.keys();
        while(keys.hasMoreElements()) {
        	String key = (String) keys.nextElement();
        	if (! key.equals("instance.name")
        			|| key.equals("component")) { // Remove instance.name and component
        		toAppend.put(key, conf.get(key));
        	}
        }

        String spec = service.getAttribute("specification");
        if (spec == null) {
            throw new ConfigurationException("Malformed service : the specification attribute is mandatory");
        }
        String filter = "(&(!(factory.name=" + getCompositeManager().getFactory().getComponentDescription().getName() + "))(factory.state=1))"; // Cannot reinstantiate yourself
        String givenFilter = service.getAttribute("filter");
        if (givenFilter != null) {
            filter = "(&" + filter + givenFilter + ")"; //NOPMD
        }

        Filter fil;
        try {
            fil = getCompositeManager().getGlobalContext().createFilter(filter);
        } catch (InvalidSyntaxException e) {
            throw new ConfigurationException("Malformed filter " + filter + " : " + e.getMessage());
        }

        Properties prop = new Properties();
        Element[] props = service.getElements("property");
        for (int k = 0; props != null && k < props.length; k++) {
            try {
                InstanceHandler.parseProperty(props[k], prop);
            } catch (ParseException e) {
                throw new ConfigurationException("An instance configuration is invalid : " + e.getMessage());
            }
        }

        Properties instanceConfiguration = new Properties();
     	instanceConfiguration.putAll(prop);
        instanceConfiguration.putAll(toAppend);

        String aggregate = service.getAttribute("aggregate");
        boolean agg = aggregate != null && aggregate.equalsIgnoreCase("true");

        String optional = service.getAttribute("optional");
        boolean opt = optional != null && optional.equalsIgnoreCase("true");

        int policy = DependencyModel.getPolicy(service);

        Comparator cmp = DependencyModel.getComparator(service, getCompositeManager().getGlobalContext());

        SvcInstance inst = new SvcInstance(this, spec, instanceConfiguration, agg, opt, fil, cmp, policy);
        m_instances.add(inst);

        String sources = service.getAttribute("context-source");
        if (sources != null) {
            SourceManager source = new SourceManager(sources, filter, inst, getCompositeManager());
            if (m_sources == null) {
                m_sources = new ArrayList(1);
            }
            m_sources.add(source);
        }
    }

    /**
     * Create a Service importer object from the given Element.
     * This method parse the given element and configure the service importer object.
     * @param imp : Element describing the import
     * @param confFilter : instance filter customization
     * @throws ConfigurationException : the service importer cannot be created correctly
     */
    private void createServiceImport(Element imp, Dictionary confFilter) throws ConfigurationException {
        boolean optional = false;
        boolean aggregate = false;
        String specification = imp.getAttribute("specification");

        if (specification == null) {
            // Malformed import
            error("Malformed import: the specification attribute is mandatory");
            throw new ConfigurationException("Malformed import : the specification attribute is mandatory");
        } else {
            String opt = imp.getAttribute("optional");
            optional = opt != null && opt.equalsIgnoreCase("true");

            String agg = imp.getAttribute("aggregate");
            aggregate = agg != null && agg.equalsIgnoreCase("true");

            String original = "(&(objectClass=" + specification + ")(!(instance.name=" + getCompositeManager().getInstanceName() + ")))"; // Cannot import yourself
            String filter = original;
            String givenFilter = imp.getAttribute("filter");
            if (givenFilter != null) {
                filter = "(&" + filter + givenFilter + ")"; //NOPMD
            }

            String identitity = imp.getAttribute("id");

            String scope = imp.getAttribute("scope");
            BundleContext context = getCompositeManager().getGlobalContext(); // Get the default bundle context.
            if (scope != null) {
                if (scope.equalsIgnoreCase("global")) {
                    context = new PolicyServiceContext(getCompositeManager().getGlobalContext(), getCompositeManager().getParentServiceContext(), PolicyServiceContext.GLOBAL);
                } else if (scope.equalsIgnoreCase("composite")) {
                    context = new PolicyServiceContext(getCompositeManager().getGlobalContext(), getCompositeManager().getParentServiceContext(), PolicyServiceContext.LOCAL);
                } else if (scope.equalsIgnoreCase("composite+global")) {
                    context = new PolicyServiceContext(getCompositeManager().getGlobalContext(), getCompositeManager().getParentServiceContext(), PolicyServiceContext.LOCAL_AND_GLOBAL);
                }
            }

            // Configure instance filter if available
            if (confFilter != null && identitity != null && confFilter.get(identitity) != null) {
                filter = "(&" + original + (String) confFilter.get(identitity) + ")";
            }

            Filter fil = null;
            if (filter != null) {
                try {
                    fil = getCompositeManager().getGlobalContext().createFilter(filter);
                } catch (InvalidSyntaxException e) {
                    throw new ConfigurationException("A required filter " + filter + " is malformed : " + e.getMessage());
                }
            }

            Comparator cmp = DependencyModel.getComparator(imp, getCompositeManager().getGlobalContext());
            Class spec = DependencyModel.loadSpecification(specification, getCompositeManager().getGlobalContext());
            int policy = DependencyModel.getPolicy(imp);

            ServiceImporter importer = new ServiceImporter(spec, fil, aggregate, optional, cmp, policy, context, identitity, this);
            m_importers.add(importer);

            String sources = imp.getAttribute("context-source");
            if (sources != null) {
                SourceManager source = new SourceManager(sources, filter, importer, getCompositeManager());
                if (m_sources == null) {
                    m_sources = new ArrayList(1);
                }
                m_sources.add(source);
            }

        }
    }

    /**
     * Configure the handler.
     * @param metadata : the metadata of the component
     * @param conf : the instance configuration
     * @throws ConfigurationException : the specification attribute is missing
     * @see org.apache.felix.ipojo.CompositeHandler#configure(org.apache.felix.ipojo.CompositeManager, org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)
     */
    public void configure(Element metadata, Dictionary conf) throws ConfigurationException {
        Element[] services = metadata.getElements("subservice");
        // Get instance filters
        Dictionary confFilter = null;
        if (conf.get("requires.filters") != null) {
            confFilter = (Dictionary) conf.get("requires.filters");
        }

        for (int i = 0; i < services.length; i++) {
            String action = services[i].getAttribute("action");
            if (action == null) {
                throw new ConfigurationException("The action attribute must be set to 'instantiate' or 'import'");
            } else if ("instantiate".equalsIgnoreCase(action)) {
                createServiceInstance(services[i], conf);
            } else if ("import".equalsIgnoreCase(action)) {
                createServiceImport(services[i], confFilter);
            } else {
                throw new ConfigurationException("Unknown action : " + action);
            }
        }

        m_description = new ServiceInstantiatorDescription(this, m_instances, m_importers);
    }

    /**
     * Start the service instantiator handler.
     * Start all created service instance.
     * @see org.apache.felix.ipojo.CompositeHandler#start()
     */
    public void start() {
        for (int i = 0; m_sources != null && i < m_sources.size(); i++) {
            SourceManager source = (SourceManager) m_sources.get(i);
            source.start();
        }

        for (int i = 0; i < m_importers.size(); i++) {
            ServiceImporter imp = (ServiceImporter) m_importers.get(i);
            imp.start();
        }

        for (int i = 0; i < m_instances.size(); i++) {
            SvcInstance inst = (SvcInstance) m_instances.get(i);
            inst.start();
        }

        isHandlerValid();
        m_isStarted = true;
    }

    /**
     * Check the handler validity.
     * @see org.apache.felix.ipojo.CompositeHandler#isValid()
     */
    private void isHandlerValid() {
        for (int i = 0; i < m_importers.size(); i++) {
            ServiceImporter imp = (ServiceImporter) m_importers.get(i);
            if (imp.getState() != DependencyModel.RESOLVED) {
                setValidity(false);
                return;
            }
        }

        for (int i = 0; i < m_instances.size(); i++) {
            SvcInstance inst = (SvcInstance) m_instances.get(i);
            if (inst.getState() != DependencyModel.RESOLVED) {
                setValidity(false);
                return;
            }
        }

        setValidity(true);
    }

    /**
     * Handler stop method.
     * Stop all created service instance.
     * @see org.apache.felix.ipojo.CompositeHandler#stop()
     */
    public void stop() {
        for (int i = 0; m_sources != null && i < m_sources.size(); i++) {
            SourceManager source = (SourceManager) m_sources.get(i);
            source.stop();
        }

        for (int i = 0; i < m_instances.size(); i++) {
            SvcInstance inst = (SvcInstance) m_instances.get(i);
            inst.stop();
        }

        for (int i = 0; i < m_importers.size(); i++) {
            ServiceImporter imp = (ServiceImporter) m_importers.get(i);
            imp.stop();
        }

        m_isStarted = false;
    }

    /**
     * State change callback.
     * This method is used to freeze the set of used provider if the static binding policy is used.
     * @param newState : the new state of the underlying instance
     * @see org.apache.felix.ipojo.Handler#stateChanged(int)
     */
    public void stateChanged(int newState) {
        // If we are becoming valid and started, check if we need to freeze importers.
        if (m_isStarted && newState == ComponentInstance.VALID) {
            for (int i = 0; i < m_importers.size(); i++) {
                ServiceImporter imp = (ServiceImporter) m_importers.get(i);
                if (imp.getBindingPolicy() == DependencyModel.STATIC_BINDING_POLICY) {
                    imp.freeze();
                }
            }

            for (int i = 0; i < m_instances.size(); i++) {
                SvcInstance imp = (SvcInstance) m_instances.get(i);
                if (imp.getBindingPolicy() == DependencyModel.STATIC_BINDING_POLICY) {
                    imp.freeze();
                }
            }
        }
    }

    /**
     * An service instance becomes valid.
     * @param dep : dependency becoming valid.
     */
    public void validate(DependencyModel dep) {
        if (!getValidity()) {
            isHandlerValid();
        }
    }

    /**
     * A service instance becomes invalid.
     * @param dep : dependency becoming valid.
     */
    public void invalidate(DependencyModel dep) {
        if (getValidity()) {
            isHandlerValid();
        }
    }

    /**
     * Get the service instantiator handler description.
     * @return the description
     * @see org.apache.felix.ipojo.CompositeHandler#getDescription()
     */
    public HandlerDescription getDescription() {
        return m_description;
    }

    public List getInstances() {
        return m_instances;
    }

    public List getRequirements() {
        return m_importers;
    }
}


text:
#ifndef PYTHON_THREAD_GUARD_H
#define PYTHON_THREAD_GUARD_H

// Guard class that releases the lock in the constructor and
// re-acquires it again in the destructor

class ReleasePythonLock
{
    PyThreadState *save;

    public:
	ReleasePythonLock() {
            save = PyEval_SaveThread();
        }

	~ReleasePythonLock() {
            PyEval_RestoreThread(save);
        }
};

// Guard class that ensures the correct state of the GIL
// the Global Interpreter Lock of Python

class EnsurePythonLock
{
    PyGILState_STATE gstate;

    public:
        EnsurePythonLock() {
            gstate = PyGILState_Ensure();
        }

	~EnsurePythonLock() {
            PyGILState_Release(gstate);
        }
};
#endif // PYTHON_THREAD_GUARD_H


text:
<?php

namespace Solid\Http;

/**
 * @package Solid\Http
 * @author Martin Pettersson <martin@solid-framework.com>
 */
trait RequestBuilderTrait
{
    /**
     * @param array $server
     * @return string|null
     */
    protected function getMethod(array $server): ?string
    {
        if (array_key_exists('REQUEST_METHOD', $server)) {
            return $server['REQUEST_METHOD'];
        }

        return null;
    }

    /**
     * @param array $server
     * @return string|null
     */
    protected function getProtocolVersion(array $server): ?string
    {
        if (!array_key_exists('SERVER_PROTOCOL', $server)) {
            return null;
        }

        $protocolSplit = explode('/', $server['SERVER_PROTOCOL']);
        $protocolVersion = end($protocolSplit);

        if (strlen($protocolVersion) === 3 && ($protocolVersion)) {
            return $protocolVersion;
        }

        return null;
    }
}


text:
namespace arc {

class ArcCustomNotificationItem
    : public ArcNotificationItem,
      public ArcNotificationSurfaceManager::Observer {
 public:
  class Observer {
   public:
    // Invoked when the notification data for this item has changed.
    virtual void OnItemDestroying() = 0;

    // Invoked when the pinned stated is changed.
    virtual void OnItemPinnedChanged() = 0;

    // Invoked when the notification surface for this item is gone.
    virtual void OnItemNotificationSurfaceRemoved() = 0;

   protected:
    virtual ~Observer() = default;
  };

  ArcCustomNotificationItem(ArcNotificationManager* manager,
                            message_center::MessageCenter* message_center,
                            const std::string& notification_key,
                            const AccountId& profile_id);
  ~ArcCustomNotificationItem() override;

  void UpdateWithArcNotificationData(
      const mojom::ArcNotificationData& data) override;

  void CloseFromCloseButton();

  void AddObserver(Observer* observer);
  void RemoveObserver(Observer* observer);

  bool pinned() const { return pinned_; }

 private:
  // ArcNotificationSurfaceManager::Observer:
  void OnNotificationSurfaceAdded(exo::NotificationSurface* surface) override;
  void OnNotificationSurfaceRemoved(exo::NotificationSurface* surface) override;

  bool pinned_ = false;
  base::ObserverList<Observer> observers_;

  DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationItem);
};

}  // namespace arc

#endif  // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_ITEM_H_


text:
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import os
import json
import pytest
import sys

if sys.version_info < (2, 7):
    pytestmark = pytest.mark.skip("F5 Ansible modules require Python >= 2.7")

from ansible.module_utils.basic import AnsibleModule

from ansible_collections.f5networks.f5_modules.plugins.modules.bigip_gtm_monitor_tcp_half_open import (
    ApiParameters, ModuleParameters, ModuleManager, ArgumentSpec
)
from ansible_collections.f5networks.f5_modules.tests.unit.compat import unittest
from ansible_collections.f5networks.f5_modules.tests.unit.compat.mock import Mock, patch
from ansible_collections.f5networks.f5_modules.tests.unit.modules.utils import set_module_args

fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {}

def load_fixture(name):
    path = os.path.join(fixture_path, name)

    if path in fixture_data:
        return fixture_data[path]

    with open(path) as f:
        data = f.read()

    try:
        data = json.loads(data)
    except Exception:
        pass

    fixture_data[path] = data
    return data

class TestParameters(unittest.TestCase):
    def test_module_parameters(self):
        args = dict(
            name='foo',
            parent='parent',
            ip='10.10.10.10',
            port=80,
            interval=20,
            timeout=30,
            probe_interval=10,
            probe_timeout=20,
            probe_attempts=30,
            partition='Common'
        )

        p = ModuleParameters(params=args)
        assert p.name == 'foo'
        assert p.parent == '/Common/parent'
        assert p.ip == '10.10.10.10'
        assert p.port == 80
        assert p.type == 'tcp_half_open'
        assert p.destination == '10.10.10.10:80'
        assert p.interval == 20
        assert p.timeout == 30
        assert p.probe_interval == 10
        assert p.probe_timeout == 20
        assert p.probe_attempts == 30

    def test_module_parameters_ints_as_strings(self):
        args = dict(
            name='foo',
            parent='parent',
            ip='10.10.10.10',
            port='80',
            interval='20',
            timeout='30',
            probe_interval='10',
            probe_timeout='20',
            probe_attempts='30',
            partition='Common'
        )

        p = ModuleParameters(params=args)
        assert p.name == 'foo'
        assert p.parent == '/Common/parent'
        assert p.ip == '10.10.10.10'
        assert p.port == 80
        assert p.type == 'tcp_half_open'
        assert p.destination == '10.10.10.10:80'
        assert p.interval == 20
        assert p.timeout == 30
        assert p.probe_interval == 10
        assert p.probe_timeout == 20
        assert p.probe_attempts == 30

    def test_api_parameters(self):
        args = dict(
            name='foo',
            defaultsFrom='/Common/parent',
            destination='10.10.10.10:80',
            interval=20,
            timeout=30,
            probeInterval=10,
            probeTimeout=20,
            probeAttempts=30,
            ignoreDownResponse='disabled'
        )

        p = ApiParameters(params=args)
        assert p.name == 'foo'
        assert p.parent == '/Common/parent'
        assert p.ip == '10.10.10.10'
        assert p.port == 80
        assert p.type == 'tcp_half_open'
        assert p.destination == '10.10.10.10:80'
        assert p.interval == 20
        assert p.timeout == 30
        assert p.probe_interval == 10
        assert p.probe_timeout == 20
        assert p.probe_attempts == 30

class TestManager(unittest.TestCase):

    def setUp(self):
        self.spec = ArgumentSpec()
        self.p1 = patch('ansible_collections.f5networks.f5_modules.plugins.modules.bigip_gtm_monitor_tcp_half_open.module_provisioned')
        self.m1 = self.p1.start()
        self.m1.return_value = True
        self.p2 = patch('ansible_collections.f5networks.f5_modules.plugins.modules.bigip_gtm_monitor_tcp_half_open.tmos_version')
        self.p3 = patch('ansible_collections.f5networks.f5_modules.plugins.modules.bigip_gtm_monitor_tcp_half_open.send_teem')
        self.m2 = self.p2.start()
        self.m2.return_value = '14.1.0'
        self.m3 = self.p3.start()
        self.m3.return_value = True

    def tearDown(self):
        self.p1.stop()
        self.p2.stop()
        self.p3.stop()

    def test_create_monitor(self, *args):
        set_module_args(dict(
            name='foo',
            ip='10.10.10.10',
            port=80,
            interval=20,
            timeout=30,
            provider=dict(
                server='localhost',
                password='password',
                user='admin'
            )
        ))

        module = AnsibleModule(
            argument_spec=self.spec.argument_spec,
            supports_check_mode=self.spec.supports_check_mode
        )

        # Override methods in the specific type of manager
        mm = ModuleManager(module=module)
        mm.exists = Mock(side_effect=[False, True])
        mm.create_on_device = Mock(return_value=True)
        mm.module_provisioned = Mock(return_value=True)

        results = mm.exec_module()

        assert results['changed'] is True


text:
<?php

namespace Pterodactyl\Http\Controllers\Api\Application\Servers;

use Pterodactyl\Models\Server;
use Pterodactyl\Transformers\Api\Application\ServerTransformer;
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
use Pterodactyl\Http\Requests\Api\Application\Servers\GetExternalServerRequest;

class ExternalServerController extends ApplicationApiController
{
    /**
     * Retrieve a specific server from the database using its external ID.
     */
    public function index(GetExternalServerRequest $request, string $external_id): array
    {
        $server = Server::query()->where('external_id', $external_id)->firstOrFail();

        return $this->fractal->item($server)
            ->transformWith($this->getTransformer(ServerTransformer::class))
            ->toArray();
    }
}


text:
from lino.api import dd, rt, _
from lino.utils.instantiator import create_row
#from .choicelists import VoteStates
from .roles import SimpleVotesUser

class VoteAction(dd.Action):
    def goto_vote(self, obj, ar):
        if obj.user == ar.get_user():
            da = rt.models.votes.MyVotes.detail_action
        else:
            da = rt.models.votes.VotesByVotable.detail_action
        # da = ar.actor.detail_action
        ar.goto_instance(obj, detail_action=da)

class CreateVote(VoteAction):
    """Define your vote about this object.

    visible only when you don't yet have a vote on this
    object. Clicking it will create a default vote object and show
    that object in a detail window.

    """
    sort_index = 100
    button_text  = u"☆"  # 2606
    show_in_workflow = True
    show_in_bbar = False
    required_roles = dd.login_required(SimpleVotesUser)

    # parameters = dict(
    #     state=VoteStates.field(),
    #     comment=dd.RichTextField(_("Comment"), blank=True))
    # params_layout = dd.Panel("""
    # state
    # comment
    # """, window_size=(50, 12))

    def get_action_permission(self, ar, obj, state):
        if not super(CreateVote, self).get_action_permission(ar, obj, state):
            return False
        vote = obj.get_favourite(ar.get_user())
        return vote is None

    def run_from_ui(self, ar, **kw):
        me = ar.get_user()
        obj = ar.selected_rows[0]
        Vote = rt.models.votes.Vote
        options = dict(votable=obj, user=me)
        # pv = ar.action_param_values
        # options.update(state=pv.state)
        vote = create_row(Vote, **options)

        # if pv.comment:
        #     create_row(
        #         rt.models.comments.Comment,
        #         owner=obj,
        #         short_text=pv.comment, user=ar.get_user())

        self.goto_vote(vote, ar)

class EditVote(VoteAction):
    sort_index = 100
    button_text = u"★"  # 2605
    show_in_workflow = True
    show_in_bbar = False
    required_roles = dd.login_required(SimpleVotesUser)

    def run_from_ui(self, ar, **kw):
        self.goto_vote(ar.selected_rows[0], ar)

class VotableEditVote(EditVote):
    """Edit your vote about this object.
    """
    def get_action_permission(self, ar, obj, state):
        if not super(VotableEditVote, self).get_action_permission(ar, obj, state):
            return False
        vote = obj.get_favourite(ar.get_user())
        return vote is not None

    def run_from_ui(self, ar, **kw):
        obj = ar.selected_rows[0]
        vote = obj.get_favourite(ar.get_user())
        # print(20170116, vote)
        self.goto_vote(vote, ar)

        # da = rt.models.votes.VotesByVotable.detail_action
        # ar.goto_instance(vote, detail_action=da)


text:
<?php

namespace PhpToZephir\Converter\Printer\Stmt;

use PhpParser\Node\Stmt;
use PhpToZephir\Converter\SimplePrinter;

class StaticVarPrinter extends SimplePrinter
{
    /**
     * @return string
     */
    public static function getType()
    {
        return 'pStmt_StaticVar';
    }

    /**
     * @param Stmt\StaticVar $node
     *
     * @return string
     */
    public function convert(Stmt\StaticVar $node)
    {
        return '$'.$node->name
             .(null !== $node->default ? ' = '.$this->dispatcher->p($node->default) : '');
    }
}


text:
layout: docs
title: Installing Shindig as a Docker container
headline: Installing Shindig as a Docker container
description: Download and install Shindig in your environment by following a few simple steps
---

# Overview
{:class="page-header"}

Shindig is bundled as a Docker image that can run on virtually any OS environment.
{:class="lead"}

## Prerequisites

The only requirement for running the service locally or on any type of server, is to download and install [Docker](http://docker.io){:target="_blank"}.

> Docker is a platform for developers and sysadmins to develop, ship, and run applications. Docker lets you quickly assemble applications from components and eliminates the friction that can come when shipping code. Docker lets you get your code tested and deployed into production as fast as possible.

### Download and install the Docker runtime

Download and install the Docker runtime for your type of OS by following the [instructions on the web site](https://docs.docker.com/installation/){:target="_blank"}.

## Install the service

### Download and install the Shindig server image

After you have successfully installed the Docker Engine on the target machine, now it's time to download and run the container image that will be hosting the service.  Copy and paste the following command on a terminal:

$  docker pull opendashboards/od-shindig-docker:bootstrap

The command will download and install the latest image of the service on the target machine.

Heads up

Depending on your OS / environment, you might be required to have administrative rights in order to execute the above commands.

Also the initial installation of Docker Engine and other images will take some time - depending also on your internet connection -
    so be patient.

### Start a new Docker container

After the service has been successfully downloaded and installed, it's time to run it.  Copy the following command in the terminal to get it started.

$  docker run -d -p 8080:8080 --name="shindig" opendashboards/od-shindig-docker:bootstrap

If the command executes successfully, you should see the ID of the container instance that was just launched by the Docker Engine on the terminal.

Service logs

    Since we launched the service as a background process, there will be no logs printed out in this terminal window.  In order to view any logging
    activity from the service, you should run the following command on either the same or a different terminal window:

$  docker logs -f shindig

	The -f argument tells Docker to leave the log output stream running forever, i.e. as you will be using the service you will be able to
	see results in real time printed out in the console.

### Managing the container

Once the service container has been started, you can easily manage its state by executing the following Docker command in a terminal window:

$  docker start | stop | restart shindig

Using the appropriate Docker command, you can now start, stop or restart the service.

### Checking everything is in place

If everything went according to plan, it's time for a final check to see whether our service is up and running.  Open a browser window and point to the following URL

> [http://localhost:8080/containers/commoncontainer](http://localhost:8080/containers/commoncontainer/){:target='_blank'}

If everything went according to plan, you should see on your browser the default sample gadget container page that is bundled
with the standard installation of Shindig.

![Sample common container](/assets/images/getting-started/common-container.png "Sample common container"){:class='img-responsive'}

## Customizing the Docker image

> The sample code can be found at the [Github repository](https://github.com/OpenDashboards/od-shindig-docker/tree/master/customized){:target='_blank'}.

##################################################################
# OpenDashboards - Shindig - Docker - Bootstrap server
#
# Description
# -----------
# Creates a Docker image containing the latest stable version
# of the Apache Shindig web app.
#
# Author: Chris Spiliotopoulos (@chefArchitect)
##################################################################

# Extend the official Jetty image
FROM jetty:9.3.7

MAINTAINER Chris Spiliotopoulos (@chefArchitect)

# Download the latest stable version of the Apache Shindig web module from Maven Central
RUN wget http://central.maven.org/maven2/org/apache/shindig/shindig-server/2.5.2/shindig-server-2.5.2.war -O ROOT.war

# Unzip the .war package into the webapps Jetty directory
RUN unzip ROOT.war -d webapps/ROOT

#
# Set some environment variables
#

# The default Shindig host - localhost
ENV SHINDIG_HOST localhost

# The default Shindig port - 8080
ENV SHINDIG_PORT 8080

#
# Launch the Jetty engine
#

CMD java -Djava.io.tmpdir=/tmp/jetty -Dshindig.host=$SHINDIG_HOST -Dshindig.port=$SHINDIG_PORT -jar /usr/local/jetty/start.jar jetty.port=$SHINDIG_PORT

The Shindig image is extending the latest version of the Jetty server image, downloads the latest
Shindig web artifact from the central Maven repository and runs the web app in a Jetty instance, exposing
port *8080*.

### Overriding the default Shindig properties

You can easily create a customized version of Shindig that meets your specific requirements, where you can adjust the default Shindig properties
and containers configuration.

Create the following folder structure:

shindig/
├── containers/
│   └── default/
│       └── container.js
├── shindig.properties
└── Dockerfile

**Dockerfile**

##################################################################
# OpenDashboards - Shindig - Docker - Customized server
#
# Description
# -----------
# Extends the basic Shindig image and adds custom configuration
#
# Author: Chris Spiliotopoulos (@chefArchitect)
##################################################################

# Extend the bootstrap Shindig image
FROM opendashboards/od-shindig-docker:bootstrap

MAINTAINER Chris Spiliotopoulos (@chefArchitect)

ADD shindig.properties webapps/ROOT/WEB-INF/classes/shindig.properties
ADD containers webapps/ROOT/WEB-INF/classes/containers

#
# Launch the Jetty engine
#

CMD java -Djava.io.tmpdir=/tmp/jetty -Dshindig.host=$SHINDIG_HOST -Dshindig.port=$SHINDIG_PORT -jar /usr/local/jetty/start.jar jetty.port=$SHINDIG_PORT

#### Build the custom image

$ docker build --tag="opendashboards/od-shindig-docker:customized" .


text:
namespace GMusicProxyGui.View
{
    partial class FrmMain
    {
        /// <summary>
        /// Erforderliche Designervariable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Verwendete Ressourcen bereinigen.
        /// </summary>
        /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Vom Windows Form-Designer generierter Code

        /// <summary>
        /// Erforderliche Methode für die Designerunterstützung.
        /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
            this.menu = new System.Windows.Forms.MenuStrip();
            this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.artistTitleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.titleArtistToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.serverToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.installerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.configToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.controlPanelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.tabControlSR = new MetroFramework.Controls.MetroTabControl();
            this.tabPageSearch = new MetroFramework.Controls.MetroTabPage();
            this.btnGetMyStations = new MetroFramework.Controls.MetroButton();
            this.btnMixSearch = new MetroFramework.Controls.MetroButton();
            this.btnGetMyPlaylists = new MetroFramework.Controls.MetroButton();
            this.btnSearch = new MetroFramework.Controls.MetroButton();
            this.txtBoxArtist = new MetroFramework.Controls.MetroTextBox();
            this.txtBoxTitle = new MetroFramework.Controls.MetroTextBox();
            this.lblArtist = new MetroFramework.Controls.MetroLabel();
            this.lblTitle = new MetroFramework.Controls.MetroLabel();
            this.tabPageResult = new MetroFramework.Controls.MetroTabPage();
            this.listViewResult = new System.Windows.Forms.ListView();
            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.imgResultListCover = new System.Windows.Forms.ImageList(this.components);
            this.pnlResultControlls = new MetroFramework.Controls.MetroPanel();
            this.btnAddDownload = new MetroFramework.Controls.MetroButton();
            this.tabPageDownload = new MetroFramework.Controls.MetroTabPage();
            this.listViewDownload = new System.Windows.Forms.ListView();
            this.columnHeaderTitle = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.columnHeaderArtist = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.columnHeaderAlbum = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.imgDownloadListCover = new System.Windows.Forms.ImageList(this.components);
            this.pnlDownloadControls = new MetroFramework.Controls.MetroPanel();
            this.btnRemoveDownload = new MetroFramework.Controls.MetroButton();
            this.progressBarDownload = new MetroFramework.Controls.MetroProgressBar();
            this.btnDownload = new MetroFramework.Controls.MetroButton();
            this.tabPagePlaylist = new MetroFramework.Controls.MetroTabPage();
            this.listViewPlaylist = new System.Windows.Forms.ListView();
            this.columnHeaderPlaylistTitle = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.pnlPlaylistControls = new MetroFramework.Controls.MetroPanel();
            this.btnOpenPlaylist = new MetroFramework.Controls.MetroButton();
            this.picBoxLogo = new System.Windows.Forms.PictureBox();
            this.menu.SuspendLayout();
            this.tabControlSR.SuspendLayout();
            this.tabPageSearch.SuspendLayout();
            this.tabPageResult.SuspendLayout();
            this.pnlResultControlls.SuspendLayout();
            this.tabPageDownload.SuspendLayout();
            this.pnlDownloadControls.SuspendLayout();
            this.tabPagePlaylist.SuspendLayout();
            this.pnlPlaylistControls.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.picBoxLogo)).BeginInit();
            this.SuspendLayout();
            //
            // menu
            //
            this.menu.BackColor = System.Drawing.Color.Transparent;
            this.menu.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.settingsToolStripMenuItem,
            this.importToolStripMenuItem,
            this.aboutToolStripMenuItem,
            this.serverToolStripMenuItem});
            this.menu.Location = new System.Drawing.Point(20, 444);
            this.menu.Name = "menu";
            this.menu.Size = new System.Drawing.Size(607, 24);
            this.menu.TabIndex = 0;
            //
            // settingsToolStripMenuItem
            //
            this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
            this.settingsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
            this.settingsToolStripMenuItem.Text = "Settings";
            this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click);
            //
            // importToolStripMenuItem
            //
            this.importToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.artistTitleToolStripMenuItem,
            this.titleArtistToolStripMenuItem});
            this.importToolStripMenuItem.Name = "importToolStripMenuItem";
            this.importToolStripMenuItem.Size = new System.Drawing.Size(73, 20);
            this.importToolStripMenuItem.Text = "Import list";
            //
            // artistTitleToolStripMenuItem
            //
            this.artistTitleToolStripMenuItem.Name = "artistTitleToolStripMenuItem";
            this.artistTitleToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
            this.artistTitleToolStripMenuItem.Text = "Artist - Title";
            this.artistTitleToolStripMenuItem.Click += new System.EventHandler(this.artistTitleToolStripMenuItem_Click);
            //
            // titleArtistToolStripMenuItem
            //
            this.titleArtistToolStripMenuItem.Name = "titleArtistToolStripMenuItem";
            this.titleArtistToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
            this.titleArtistToolStripMenuItem.Text = "Title - Artist";
            this.titleArtistToolStripMenuItem.Click += new System.EventHandler(this.titleArtistToolStripMenuItem_Click);
            //
            // aboutToolStripMenuItem
            //
            this.aboutToolStripMenuItem.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
            this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
            this.aboutToolStripMenuItem.Size = new System.Drawing.Size(52, 20);
            this.aboutToolStripMenuItem.Text = "About";
            this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
            //
            // serverToolStripMenuItem
            //
            this.serverToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.installerToolStripMenuItem,
            this.configToolStripMenuItem,
            this.controlPanelToolStripMenuItem});
            this.serverToolStripMenuItem.Enabled = false;
            this.serverToolStripMenuItem.Name = "serverToolStripMenuItem";
            this.serverToolStripMenuItem.Size = new System.Drawing.Size(51, 20);
            this.serverToolStripMenuItem.Text = "Server";
            //
            // installerToolStripMenuItem
            //
            this.installerToolStripMenuItem.Name = "installerToolStripMenuItem";
            this.installerToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
            this.installerToolStripMenuItem.Text = "Installer";
            this.installerToolStripMenuItem.Click += new System.EventHandler(this.installerToolStripMenuItem_Click);
            //
            // configToolStripMenuItem
            //
            this.configToolStripMenuItem.Name = "configToolStripMenuItem";
            this.configToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
            this.configToolStripMenuItem.Text = "Config";
            this.configToolStripMenuItem.Click += new System.EventHandler(this.configToolStripMenuItem_Click);
            //
            // controlPanelToolStripMenuItem
            //
            this.controlPanelToolStripMenuItem.Name = "controlPanelToolStripMenuItem";
            this.controlPanelToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
            this.controlPanelToolStripMenuItem.Text = "Control Panel";
            this.controlPanelToolStripMenuItem.Click += new System.EventHandler(this.controlPanelToolStripMenuItem_Click);
            //
            // tabControlSR
            //
            this.tabControlSR.Controls.Add(this.tabPageSearch);
            this.tabControlSR.Controls.Add(this.tabPageResult);
            this.tabControlSR.Controls.Add(this.tabPageDownload);
            this.tabControlSR.Controls.Add(this.tabPagePlaylist);
            this.tabControlSR.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tabControlSR.Location = new System.Drawing.Point(20, 60);
            this.tabControlSR.Name = "tabControlSR";
            this.tabControlSR.SelectedIndex = 0;
            this.tabControlSR.Size = new System.Drawing.Size(607, 384);
            this.tabControlSR.Style = MetroFramework.MetroColorStyle.Orange;
            this.tabControlSR.TabIndex = 2;
            this.tabControlSR.UseSelectable = true;
            //
            // tabPageSearch
            //
            this.tabPageSearch.Controls.Add(this.btnGetMyStations);
            this.tabPageSearch.Controls.Add(this.btnMixSearch);
            this.tabPageSearch.Controls.Add(this.btnGetMyPlaylists);
            this.tabPageSearch.Controls.Add(this.btnSearch);
            this.tabPageSearch.Controls.Add(this.txtBoxArtist);
            this.tabPageSearch.Controls.Add(this.txtBoxTitle);
            this.tabPageSearch.Controls.Add(this.lblArtist);
            this.tabPageSearch.Controls.Add(this.lblTitle);
            this.tabPageSearch.HorizontalScrollbarBarColor = true;
            this.tabPageSearch.HorizontalScrollbarHighlightOnWheel = false;
            this.tabPageSearch.HorizontalScrollbarSize = 10;
            this.tabPageSearch.Location = new System.Drawing.Point(4, 38);
            this.tabPageSearch.Name = "tabPageSearch";
            this.tabPageSearch.Padding = new System.Windows.Forms.Padding(3);
            this.tabPageSearch.Size = new System.Drawing.Size(599, 342);
            this.tabPageSearch.TabIndex = 0;
            this.tabPageSearch.Text = "Search";
            this.tabPageSearch.UseVisualStyleBackColor = true;
            this.tabPageSearch.VerticalScrollbarBarColor = true;
            this.tabPageSearch.VerticalScrollbarHighlightOnWheel = false;
            this.tabPageSearch.VerticalScrollbarSize = 10;
            //
            // btnGetMyStations
            //
            this.btnGetMyStations.FontWeight = MetroFramework.MetroButtonWeight.Regular;
            this.btnGetMyStations.Location = new System.Drawing.Point(235, 94);
            this.btnGetMyStations.Name = "btnGetMyStations";
            this.btnGetMyStations.Size = new System.Drawing.Size(109, 23);
            this.btnGetMyStations.TabIndex = 14;
            this.btnGetMyStations.Text = "Get my stations";
            this.btnGetMyStations.UseSelectable = true;
            this.btnGetMyStations.Click += new System.EventHandler(this.btnGetMyStations_Click);
            //
            // btnMixSearch
            //
            this.btnMixSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.btnMixSearch.FontWeight = MetroFramework.MetroButtonWeight.Regular;
            this.btnMixSearch.Location = new System.Drawing.Point(424, 94);
            this.btnMixSearch.Name = "btnMixSearch";
            this.btnMixSearch.Size = new System.Drawing.Size(86, 23);
            this.btnMixSearch.TabIndex = 13;
            this.btnMixSearch.Text = "Mix search";
            this.btnMixSearch.UseSelectable = true;
            this.btnMixSearch.Click += new System.EventHandler(this.btnMixSearch_Click);
            //
            // btnGetMyPlaylists
            //
            this.btnGetMyPlaylists.FontWeight = MetroFramework.MetroButtonWeight.Regular;
            this.btnGetMyPlaylists.Location = new System.Drawing.Point(119, 94);
            this.btnGetMyPlaylists.Name = "btnGetMyPlaylists";
            this.btnGetMyPlaylists.Size = new System.Drawing.Size(110, 23);
            this.btnGetMyPlaylists.TabIndex = 12;
            this.btnGetMyPlaylists.Text = "Get my playlists";
            this.btnGetMyPlaylists.UseSelectable = true;
            this.btnGetMyPlaylists.Click += new System.EventHandler(this.btnGetMyPlaylists_Click);
            //
            // btnSearch
            //
            this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.btnSearch.FontWeight = MetroFramework.MetroButtonWeight.Regular;
            this.btnSearch.Location = new System.Drawing.Point(516, 94);
            this.btnSearch.Name = "btnSearch";
            this.btnSearch.Size = new System.Drawing.Size(75, 23);
            this.btnSearch.TabIndex = 11;
            this.btnSearch.Text = "Search";
            this.btnSearch.UseSelectable = true;
            this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
            //
            // txtBoxArtist
            //
            this.txtBoxArtist.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            //
            //
            //
            this.txtBoxArtist.CustomButton.Image = null;
            this.txtBoxArtist.CustomButton.Location = new System.Drawing.Point(454, 2);
            this.txtBoxArtist.CustomButton.Name = "";
            this.txtBoxArtist.CustomButton.Size = new System.Drawing.Size(15, 15);
            this.txtBoxArtist.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
            this.txtBoxArtist.CustomButton.TabIndex = 1;
            this.txtBoxArtist.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
            this.txtBoxArtist.CustomButton.UseSelectable = true;
            this.txtBoxArtist.CustomButton.Visible = false;
            this.txtBoxArtist.Lines = new string[0];
            this.txtBoxArtist.Location = new System.Drawing.Point(119, 54);
            this.txtBoxArtist.MaxLength = 32767;
            this.txtBoxArtist.Name = "txtBoxArtist";
            this.txtBoxArtist.PasswordChar = '\0';
            this.txtBoxArtist.ScrollBars = System.Windows.Forms.ScrollBars.None;
            this.txtBoxArtist.SelectedText = "";
            this.txtBoxArtist.SelectionLength = 0;
            this.txtBoxArtist.SelectionStart = 0;
            this.txtBoxArtist.ShortcutsEnabled = true;
            this.txtBoxArtist.Size = new System.Drawing.Size(472, 20);
            this.txtBoxArtist.TabIndex = 10;
            this.txtBoxArtist.UseSelectable = true;
            this.txtBoxArtist.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
            this.txtBoxArtist.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
            //
            // txtBoxTitle
            //
            this.txtBoxTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            //
            //
            //
            this.txtBoxTitle.CustomButton.Image = null;
            this.txtBoxTitle.CustomButton.Location = new System.Drawing.Point(454, 2);
            this.txtBoxTitle.CustomButton.Name = "";
            this.txtBoxTitle.CustomButton.Size = new System.Drawing.Size(15, 15);
            this.txtBoxTitle.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
            this.txtBoxTitle.CustomButton.TabIndex = 1;
            this.txtBoxTitle.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
            this.txtBoxTitle.CustomButton.UseSelectable = true;
            this.txtBoxTitle.CustomButton.Visible = false;
            this.txtBoxTitle.Lines = new string[0];
            this.txtBoxTitle.Location = new System.Drawing.Point(119, 13);
            this.txtBoxTitle.MaxLength = 32767;
            this.txtBoxTitle.Name = "txtBoxTitle";
            this.txtBoxTitle.PasswordChar = '\0';
            this.txtBoxTitle.ScrollBars = System.Windows.Forms.ScrollBars.None;
            this.txtBoxTitle.SelectedText = "";
            this.txtBoxTitle.SelectionLength = 0;
            this.txtBoxTitle.SelectionStart = 0;
            this.txtBoxTitle.ShortcutsEnabled = true;
            this.txtBoxTitle.Size = new System.Drawing.Size(472, 20);
            this.txtBoxTitle.TabIndex = 9;
            this.txtBoxTitle.UseSelectable = true;
            this.txtBoxTitle.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
            this.txtBoxTitle.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
            //
            // lblArtist
            //
            this.lblArtist.AutoSize = true;
            this.lblArtist.Location = new System.Drawing.Point(6, 54);
            this.lblArtist.Name = "lblArtist";
            this.lblArtist.Size = new System.Drawing.Size(43, 19);
            this.lblArtist.TabIndex = 8;
            this.lblArtist.Text = "Artist:";
            //
            // lblTitle
            //
            this.lblTitle.AutoSize = true;
            this.lblTitle.Location = new System.Drawing.Point(6, 13);
            this.lblTitle.Name = "lblTitle";
            this.lblTitle.Size = new System.Drawing.Size(36, 19);
            this.lblTitle.TabIndex = 7;
            this.lblTitle.Text = "Title:";
            //
            // tabPageResult
            //
            this.tabPageResult.Controls.Add(this.listViewResult);
            this.tabPageResult.Controls.Add(this.pnlResultControlls);
            this.tabPageResult.HorizontalScrollbarBarColor = true;
            this.tabPageResult.HorizontalScrollbarHighlightOnWheel = false;
            this.tabPageResult.HorizontalScrollbarSize = 10;
            this.tabPageResult.Location = new System.Drawing.Point(4, 38);
            this.tabPageResult.Name = "tabPageResult";
            this.tabPageResult.Padding = new System.Windows.Forms.Padding(3);
            this.tabPageResult.Size = new System.Drawing.Size(599, 342);
            this.tabPageResult.TabIndex = 2;
            this.tabPageResult.Text = "Result";
            this.tabPageResult.UseVisualStyleBackColor = true;
            this.tabPageResult.VerticalScrollbarBarColor = true;
            this.tabPageResult.VerticalScrollbarHighlightOnWheel = false;
            this.tabPageResult.VerticalScrollbarSize = 10;
            //
            // listViewResult
            //
            this.listViewResult.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.columnHeader1,
            this.columnHeader2,
            this.columnHeader3});
            this.listViewResult.Dock = System.Windows.Forms.DockStyle.Fill;
            this.listViewResult.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.listViewResult.FullRowSelect = true;
            this.listViewResult.Location = new System.Drawing.Point(3, 31);
            this.listViewResult.Name = "listViewResult";
            this.listViewResult.ShowGroups = false;
            this.listViewResult.Size = new System.Drawing.Size(593, 308);
            this.listViewResult.SmallImageList = this.imgResultListCover;
            this.listViewResult.TabIndex = 0;
            this.listViewResult.UseCompatibleStateImageBehavior = false;
            this.listViewResult.View = System.Windows.Forms.View.Details;
            this.listViewResult.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listViewResult_KeyDown);
            this.listViewResult.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listViewResult_MouseDoubleClick);
            //
            // columnHeader1
            //
            this.columnHeader1.Text = "Title";
            //
            // columnHeader2
            //
            this.columnHeader2.Text = "Artist";
            //
            // columnHeader3
            //
            this.columnHeader3.Text = "Album";
            //
            // imgResultListCover
            //
            this.imgResultListCover.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
            this.imgResultListCover.ImageSize = new System.Drawing.Size(64, 64);
            this.imgResultListCover.TransparentColor = System.Drawing.Color.Transparent;
            //
            // pnlResultControlls
            //
            this.pnlResultControlls.Controls.Add(this.btnAddDownload);
            this.pnlResultControlls.Dock = System.Windows.Forms.DockStyle.Top;
            this.pnlResultControlls.HorizontalScrollbarBarColor = true;
            this.pnlResultControlls.HorizontalScrollbarHighlightOnWheel = false;
            this.pnlResultControlls.HorizontalScrollbarSize = 10;
            this.pnlResultControlls.Location = new System.Drawing.Point(3, 3);
            this.pnlResultControlls.Name = "pnlResultControlls";
            this.pnlResultControlls.Size = new System.Drawing.Size(593, 28);
            this.pnlResultControlls.TabIndex = 1;
            this.pnlResultControlls.VerticalScrollbarBarColor = true;
            this.pnlResultControlls.VerticalScrollbarHighlightOnWheel = false;
            this.pnlResultControlls.VerticalScrollbarSize = 10;
            //
            // btnAddDownload
            //
            this.btnAddDownload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.btnAddDownload.FontWeight = MetroFramework.MetroButtonWeight.Regular;
            this.btnAddDownload.Location = new System.Drawing.Point(424, 3);
            this.btnAddDownload.Name = "btnAddDownload";
            this.btnAddDownload.Size = new System.Drawing.Size(164, 23);
            this.btnAddDownload.TabIndex = 0;
            this.btnAddDownload.Text = "Add to download";
            this.btnAddDownload.UseSelectable = true;
            this.btnAddDownload.Click += new System.EventHandler(this.btnAddDownload_Click);
            //
            // tabPageDownload
            //
            this.tabPageDownload.Controls.Add(this.listViewDownload);
            this.tabPageDownload.Controls.Add(this.pnlDownloadControls);
            this.tabPageDownload.HorizontalScrollbarBarColor = true;
            this.tabPageDownload.HorizontalScrollbarHighlightOnWheel = false;
            this.tabPageDownload.HorizontalScrollbarSize = 10;
            this.tabPageDownload.Location = new System.Drawing.Point(4, 38);
            this.tabPageDownload.Name = "tabPageDownload";
            this.tabPageDownload.Padding = new System.Windows.Forms.Padding(3);
            this.tabPageDownload.Size = new System.Drawing.Size(599, 342);
            this.tabPageDownload.TabIndex = 1;
            this.tabPageDownload.Text = "Download";
            this.tabPageDownload.UseVisualStyleBackColor = true;
            this.tabPageDownload.VerticalScrollbarBarColor = true;
            this.tabPageDownload.VerticalScrollbarHighlightOnWheel = false;
            this.tabPageDownload.VerticalScrollbarSize = 10;
            //
            // listViewDownload
            //
            this.listViewDownload.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.columnHeaderTitle,
            this.columnHeaderArtist,
            this.columnHeaderAlbum});
            this.listViewDownload.Dock = System.Windows.Forms.DockStyle.Fill;
            this.listViewDownload.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.listViewDownload.FullRowSelect = true;
            this.listViewDownload.Location = new System.Drawing.Point(3, 31);
            this.listViewDownload.Name = "listViewDownload";
            this.listViewDownload.ShowGroups = false;
            this.listViewDownload.Size = new System.Drawing.Size(593, 308);
            this.listViewDownload.SmallImageList = this.imgDownloadListCover;
            this.listViewDownload.TabIndex = 0;
            this.listViewDownload.UseCompatibleStateImageBehavior = false;
            this.listViewDownload.View = System.Windows.Forms.View.Details;
            this.listViewDownload.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listViewDownload_KeyDown);
            this.listViewDownload.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listViewDownload_MouseDoubleClick);
            //
            // columnHeaderTitle
            //
            this.columnHeaderTitle.Text = "Title";
            //
            // columnHeaderArtist
            //
            this.columnHeaderArtist.Text = "Artist";
            //
            // columnHeaderAlbum
            //
            this.columnHeaderAlbum.Text = "Album";
            //
            // imgDownloadListCover
            //
            this.imgDownloadListCover.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
            this.imgDownloadListCover.ImageSize = new System.Drawing.Size(64, 64);
            this.imgDownloadListCover.TransparentColor = System.Drawing.Color.Transparent;
            //
            // pnlDownloadControls
            //
            this.pnlDownloadControls.Controls.Add(this.btnRemoveDownload);
            this.pnlDownloadControls.Controls.Add(this.progressBarDownload);
            this.pnlDownloadControls.Controls.Add(this.btnDownload);
            this.pnlDownloadControls.Dock = System.Windows.Forms.DockStyle.Top;
            this.pnlDownloadControls.HorizontalScrollbarBarColor = true;
            this.pnlDownloadControls.HorizontalScrollbarHighlightOnWheel = false;
            this.pnlDownloadControls.HorizontalScrollbarSize = 10;
            this.pnlDownloadControls.Location = new System.Drawing.Point(3, 3);
            this.pnlDownloadControls.Name = "pnlDownloadControls";
            this.pnlDownloadControls.Size = new System.Drawing.Size(593, 28);
            this.pnlDownloadControls.TabIndex = 1;
            this.pnlDownloadControls.VerticalScrollbarBarColor = true;
            this.pnlDownloadControls.VerticalScrollbarHighlightOnWheel = false;
            this.pnlDownloadControls.VerticalScrollbarSize = 10;
            //
            // btnRemoveDownload
            //
            this.btnRemoveDownload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.btnRemoveDownload.FontWeight = MetroFramework.MetroButtonWeight.Regular;
            this.btnRemoveDownload.Location = new System.Drawing.Point(398, 3);
            this.btnRemoveDownload.Name = "btnRemoveDownload";
            this.btnRemoveDownload.Size = new System.Drawing.Size(109, 23);
            this.btnRemoveDownload.TabIndex = 2;
            this.btnRemoveDownload.Text = "Remove from list";
            this.btnRemoveDownload.UseSelectable = true;
            this.btnRemoveDownload.Click += new System.EventHandler(this.btnRemoveDownload_Click);
            //
            // progressBarDownload
            //
            this.progressBarDownload.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.progressBarDownload.Enabled = false;
            this.progressBarDownload.Location = new System.Drawing.Point(0, 3);
            this.progressBarDownload.Name = "progressBarDownload";
            this.progressBarDownload.Size = new System.Drawing.Size(392, 23);
            this.progressBarDownload.Style = MetroFramework.MetroColorStyle.Orange;
            this.progressBarDownload.TabIndex = 1;
            //
            // btnDownload
            //
            this.btnDownload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.btnDownload.FontWeight = MetroFramework.MetroButtonWeight.Regular;
            this.btnDownload.Location = new System.Drawing.Point(513, 3);
            this.btnDownload.Name = "btnDownload";
            this.btnDownload.Size = new System.Drawing.Size(75, 23);
            this.btnDownload.TabIndex = 0;
            this.btnDownload.Text = "Download";
            this.btnDownload.UseSelectable = true;
            this.btnDownload.Click += new System.EventHandler(this.btnDownload_Click);
            //
            // tabPagePlaylist
            //
            this.tabPagePlaylist.Controls.Add(this.listViewPlaylist);
            this.tabPagePlaylist.Controls.Add(this.pnlPlaylistControls);
            this.tabPagePlaylist.HorizontalScrollbarBarColor = true;
            this.tabPagePlaylist.HorizontalScrollbarHighlightOnWheel = false;
            this.tabPagePlaylist.HorizontalScrollbarSize = 10;
            this.tabPagePlaylist.Location = new System.Drawing.Point(4, 38);
            this.tabPagePlaylist.Name = "tabPagePlaylist";
            this.tabPagePlaylist.Padding = new System.Windows.Forms.Padding(3);
            this.tabPagePlaylist.Size = new System.Drawing.Size(599, 342);
            this.tabPagePlaylist.TabIndex = 3;
            this.tabPagePlaylist.Text = "Playlist";
            this.tabPagePlaylist.UseVisualStyleBackColor = true;
            this.tabPagePlaylist.VerticalScrollbarBarColor = true;
            this.tabPagePlaylist.VerticalScrollbarHighlightOnWheel = false;
            this.tabPagePlaylist.VerticalScrollbarSize = 10;
            //
            // listViewPlaylist
            //
            this.listViewPlaylist.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.columnHeaderPlaylistTitle});
            this.listViewPlaylist.Dock = System.Windows.Forms.DockStyle.Fill;
            this.listViewPlaylist.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.listViewPlaylist.FullRowSelect = true;
            this.listViewPlaylist.Location = new System.Drawing.Point(3, 31);
            this.listViewPlaylist.MultiSelect = false;
            this.listViewPlaylist.Name = "listViewPlaylist";
            this.listViewPlaylist.ShowGroups = false;
            this.listViewPlaylist.Size = new System.Drawing.Size(593, 308);
            this.listViewPlaylist.TabIndex = 0;
            this.listViewPlaylist.UseCompatibleStateImageBehavior = false;
            this.listViewPlaylist.View = System.Windows.Forms.View.Details;
            this.listViewPlaylist.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listViewPlaylist_MouseDoubleClick);
            //
            // columnHeaderPlaylistTitle
            //
            this.columnHeaderPlaylistTitle.Text = "Title";
            //
            // pnlPlaylistControls
            //
            this.pnlPlaylistControls.Controls.Add(this.btnOpenPlaylist);
            this.pnlPlaylistControls.Dock = System.Windows.Forms.DockStyle.Top;
            this.pnlPlaylistControls.HorizontalScrollbarBarColor = true;
            this.pnlPlaylistControls.HorizontalScrollbarHighlightOnWheel = false;
            this.pnlPlaylistControls.HorizontalScrollbarSize = 10;
            this.pnlPlaylistControls.Location = new System.Drawing.Point(3, 3);
            this.pnlPlaylistControls.Name = "pnlPlaylistControls";
            this.pnlPlaylistControls.Size = new System.Drawing.Size(593, 28);
            this.pnlPlaylistControls.TabIndex = 1;
            this.pnlPlaylistControls.VerticalScrollbarBarColor = true;
            this.pnlPlaylistControls.VerticalScrollbarHighlightOnWheel = false;
            this.pnlPlaylistControls.VerticalScrollbarSize = 10;
            //
            // btnOpenPlaylist
            //
            this.btnOpenPlaylist.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.btnOpenPlaylist.FontWeight = MetroFramework.MetroButtonWeight.Regular;
            this.btnOpenPlaylist.Location = new System.Drawing.Point(509, 3);
            this.btnOpenPlaylist.Name = "btnOpenPlaylist";
            this.btnOpenPlaylist.Size = new System.Drawing.Size(79, 23);
            this.btnOpenPlaylist.TabIndex = 0;
            this.btnOpenPlaylist.Text = "Open";
            this.btnOpenPlaylist.UseSelectable = true;
            this.btnOpenPlaylist.Click += new System.EventHandler(this.btnOpenPlaylist_Click);
            //
            // picBoxLogo
            //
            this.picBoxLogo.Image = ((System.Drawing.Image)(resources.GetObject("picBoxLogo.Image")));
            this.picBoxLogo.Location = new System.Drawing.Point(0, 5);
            this.picBoxLogo.Margin = new System.Windows.Forms.Padding(0);
            this.picBoxLogo.Name = "picBoxLogo";
            this.picBoxLogo.Size = new System.Drawing.Size(64, 64);
            this.picBoxLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
            this.picBoxLogo.TabIndex = 3;
            this.picBoxLogo.TabStop = false;
            //
            // FrmMain
            //
            this.AcceptButton = this.btnSearch;
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(647, 488);
            this.Controls.Add(this.picBoxLogo);
            this.Controls.Add(this.tabControlSR);
            this.Controls.Add(this.menu);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MainMenuStrip = this.menu;
            this.Name = "FrmMain";
            this.Style = MetroFramework.MetroColorStyle.Orange;
            this.Text = "GMusicProxyGui";
            this.TextAlign = MetroFramework.Forms.MetroFormTextAlign.Center;
            this.menu.ResumeLayout(false);
            this.menu.PerformLayout();
            this.tabControlSR.ResumeLayout(false);
            this.tabPageSearch.ResumeLayout(false);
            this.tabPageSearch.PerformLayout();
            this.tabPageResult.ResumeLayout(false);
            this.pnlResultControlls.ResumeLayout(false);
            this.tabPageDownload.ResumeLayout(false);
            this.pnlDownloadControls.ResumeLayout(false);
            this.tabPagePlaylist.ResumeLayout(false);
            this.pnlPlaylistControls.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.picBoxLogo)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.MenuStrip menu;
        private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
        private MetroFramework.Controls.MetroTabControl tabControlSR;
        private MetroFramework.Controls.MetroTabPage tabPageSearch;
        private MetroFramework.Controls.MetroButton btnSearch;
        private MetroFramework.Controls.MetroTextBox txtBoxArtist;
        private MetroFramework.Controls.MetroTextBox txtBoxTitle;
        private MetroFramework.Controls.MetroLabel lblArtist;
        private MetroFramework.Controls.MetroLabel lblTitle;
        private MetroFramework.Controls.MetroTabPage tabPageDownload;
        private System.Windows.Forms.ListView listViewDownload;
        private System.Windows.Forms.ColumnHeader columnHeaderTitle;
        private System.Windows.Forms.ColumnHeader columnHeaderAlbum;
        private System.Windows.Forms.ColumnHeader columnHeaderArtist;
        private System.Windows.Forms.ImageList imgDownloadListCover;
        private MetroFramework.Controls.MetroPanel pnlDownloadControls;
        private MetroFramework.Controls.MetroButton btnDownload;
        private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem artistTitleToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem titleArtistToolStripMenuItem;
        private MetroFramework.Controls.MetroProgressBar progressBarDownload;
        private MetroFramework.Controls.MetroTabPage tabPageResult;
        private System.Windows.Forms.ListView listViewResult;
        private System.Windows.Forms.ColumnHeader columnHeader1;
        private System.Windows.Forms.ColumnHeader columnHeader2;
        private System.Windows.Forms.ColumnHeader columnHeader3;
        private MetroFramework.Controls.MetroPanel pnlResultControlls;
        private MetroFramework.Controls.MetroButton btnAddDownload;
        private System.Windows.Forms.ImageList imgResultListCover;
        private MetroFramework.Controls.MetroButton btnRemoveDownload;
        private MetroFramework.Controls.MetroButton btnGetMyPlaylists;
        private MetroFramework.Controls.MetroTabPage tabPagePlaylist;
        private System.Windows.Forms.ListView listViewPlaylist;
        private System.Windows.Forms.ColumnHeader columnHeaderPlaylistTitle;
        private MetroFramework.Controls.MetroPanel pnlPlaylistControls;
        private MetroFramework.Controls.MetroButton btnOpenPlaylist;
        private MetroFramework.Controls.MetroButton btnMixSearch;
        private MetroFramework.Controls.MetroButton btnGetMyStations;
        private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
        private System.Windows.Forms.PictureBox picBoxLogo;
        private System.Windows.Forms.ToolStripMenuItem serverToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem installerToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem controlPanelToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem configToolStripMenuItem;
    }
}