text:
package org.eclipse.swt.snippets;

/*
 * Canvas example snippet: scroll an image (flicker free, no double buffering)
 *
 * For a list of all SWT example snippets see
 * http://www.eclipse.org/swt/snippets/
 */
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;

public class Snippet48 {

public static void main (String [] args) {
	Display display = new Display ();
	Shell shell = new Shell (display);
	shell.setLayout(new FillLayout());
	Image originalImage = null;
	FileDialog dialog = new FileDialog (shell, SWT.OPEN);
	dialog.setText ("Open an image file or cancel");
	String string = dialog.open ();
	if (string != null) {
		originalImage = new Image (display, string);
	}
	if (originalImage == null) {
		int width = 150, height = 200;
		originalImage = new Image (display, width, height);
		GC gc = new GC (originalImage);
		gc.fillRectangle (0, 0, width, height);
		gc.drawLine (0, 0, width, height);
		gc.drawLine (0, height, width, 0);
		gc.drawText ("Default Image", 10, 10);
		gc.dispose ();
	}
	final Image image = originalImage;
	final Point origin = new Point (0, 0);
	final Canvas canvas = new Canvas (shell, SWT.NO_BACKGROUND |
			SWT.NO_REDRAW_RESIZE | SWT.V_SCROLL | SWT.H_SCROLL);
	final ScrollBar hBar = canvas.getHorizontalBar ();
	hBar.addListener (SWT.Selection, new Listener () {
		@Override
		public void handleEvent (Event e) {
			int hSelection = hBar.getSelection ();
			int destX = -hSelection - origin.x;
			Rectangle rect = image.getBounds ();
			canvas.scroll (destX, 0, 0, 0, rect.width, rect.height, false);
			origin.x = -hSelection;
		}
	});
	final ScrollBar vBar = canvas.getVerticalBar ();
	vBar.addListener (SWT.Selection, new Listener () {
		@Override
		public void handleEvent (Event e) {
			int vSelection = vBar.getSelection ();
			int destY = -vSelection - origin.y;
			Rectangle rect = image.getBounds ();
			canvas.scroll (0, destY, 0, 0, rect.width, rect.height, false);
			origin.y = -vSelection;
		}
	});
	canvas.addListener (SWT.Resize,  new Listener () {
		@Override
		public void handleEvent (Event e) {
			Rectangle rect = image.getBounds ();
			Rectangle client = canvas.getClientArea ();
			hBar.setMaximum (rect.width);
			vBar.setMaximum (rect.height);
			hBar.setThumb (Math.min (rect.width, client.width));
			vBar.setThumb (Math.min (rect.height, client.height));
			int hPage = rect.width - client.width;
			int vPage = rect.height - client.height;
			int hSelection = hBar.getSelection ();
			int vSelection = vBar.getSelection ();
			if (hSelection >= hPage) {
				if (hPage <= 0) hSelection = 0;
				origin.x = -hSelection;
			}
			if (vSelection >= vPage) {
				if (vPage <= 0) vSelection = 0;
				origin.y = -vSelection;
			}
			canvas.redraw ();
		}
	});
	canvas.addListener (SWT.Paint, new Listener () {
		@Override
		public void handleEvent (Event e) {
			GC gc = e.gc;
			gc.drawImage (image, origin.x, origin.y);
			Rectangle rect = image.getBounds ();
			Rectangle client = canvas.getClientArea ();
			int marginWidth = client.width - rect.width;
			if (marginWidth > 0) {
				gc.fillRectangle (rect.width, 0, marginWidth, client.height);
			}
			int marginHeight = client.height - rect.height;
			if (marginHeight > 0) {
				gc.fillRectangle (0, rect.height, client.width, marginHeight);
			}
		}
	});
	Rectangle rect = image.getBounds ();
	shell.setSize (Math.max(200, rect.width - 100), Math.max(150, rect.height - 100));
	shell.open ();
	while (!shell.isDisposed ()) {
		if (!display.readAndDispatch ()) display.sleep ();
	}
	originalImage.dispose();
	display.dispose ();
}

}


text:
import { JsonWebTokenError } from "jsonwebtoken";
/**
 * Error subclass for signaling that the kid field is not present in the JWT header
 */
export declare class MissingKeyIdError extends JsonWebTokenError {
    constructor();
}

redpajama_set_name: RedPajamaGithub


text:
{-# LANGUAGE OverloadedStrings, PatternGuards, DataKinds, GADTs #-}

module Main where

import           Language.Hakaru.Pretty.Concrete
import           Language.Hakaru.Syntax.TypeCheck
import           Language.Hakaru.Syntax.IClasses

import           Language.Hakaru.Types.Sing
import           Language.Hakaru.Disintegrate
import           Language.Hakaru.Evaluation.ConstantPropagation
import           Language.Hakaru.Command

import           Data.Text
import qualified Data.Text.IO as IO
import           System.IO (stderr)

import           System.Environment

main :: IO ()
main = do
  args  <- getArgs
  progs <- mapM readFromFile args
  case progs of
      [prog] -> runDisintegrate prog
      _      -> IO.hPutStrLn stderr "Usage: disintegrate <file>"

runDisintegrate :: Text -> IO ()
runDisintegrate prog =
    case parseAndInfer prog of
    Left  err                -> IO.hPutStrLn stderr err
    Right (TypedAST typ ast) ->
        case typ of
          SMeasure (SData (STyCon sym `STyApp` _ `STyApp` _) _)
            | Just Refl <- jmEq1 sym sSymbol_Pair
            -> case determine (disintegrate ast) of
               Just ast' -> print . pretty $ constantPropagation ast'
               Nothing   -> IO.hPutStrLn stderr "No disintegration found"
          _ -> IO.hPutStrLn stderr "Can only disintegrate a measure over pairs"


text:
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2017 FIRST. All Rights Reserved.                        */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

#include "Resource.h"

#include "ErrorBase.h"
#include "WPIErrors.h"

using namespace frc;

hal::priority_recursive_mutex Resource::m_createLock;

/**
 * Allocate storage for a new instance of Resource.
 *
 * Allocate a bool array of values that will get initialized to indicate that no
 * resources have been allocated yet. The indicies of the resources are [0 ..
 * elements - 1].
 */
Resource::Resource(uint32_t elements) {
  std::lock_guard<hal::priority_recursive_mutex> sync(m_createLock);
  m_isAllocated = std::vector<bool>(elements, false);
}

/**
 * Factory method to create a Resource allocation-tracker *if* needed.
 *
 * @param r        address of the caller's Resource pointer. If *r == nullptr,
 *                 this will construct a Resource and make *r point to it. If
 *                 *r != nullptr, i.e. the caller already has a Resource
 *                 instance, this won't do anything.
 * @param elements the number of elements for this Resource allocator to
 *                 track, that is, it will allocate resource numbers in the
 *                 range [0 .. elements - 1].
 */
/*static*/ void Resource::CreateResourceObject(std::unique_ptr<Resource>& r,
                                               uint32_t elements) {
  std::lock_guard<hal::priority_recursive_mutex> sync(m_createLock);
  if (!r) {
    r = std::make_unique<Resource>(elements);
  }
}

/**
 * Allocate a resource.
 *
 * When a resource is requested, mark it allocated. In this case, a free
 * resource value within the range is located and returned after it is marked
 * allocated.
 */
uint32_t Resource::Allocate(const std::string& resourceDesc) {
  std::lock_guard<hal::priority_recursive_mutex> sync(m_allocateLock);
  for (uint32_t i = 0; i < m_isAllocated.size(); i++) {
    if (!m_isAllocated[i]) {
      m_isAllocated[i] = true;
      return i;
    }
  }
  wpi_setWPIErrorWithContext(NoAvailableResources, resourceDesc);
  return std::numeric_limits<uint32_t>::max();
}

/**
 * Allocate a specific resource value.
 *
 * The user requests a specific resource value, i.e. channel number and it is
 * verified unallocated, then returned.
 */
uint32_t Resource::Allocate(uint32_t index, const std::string& resourceDesc) {
  std::lock_guard<hal::priority_recursive_mutex> sync(m_allocateLock);
  if (index >= m_isAllocated.size()) {
    wpi_setWPIErrorWithContext(ChannelIndexOutOfRange, resourceDesc);
    return std::numeric_limits<uint32_t>::max();
  }
  if (m_isAllocated[index]) {
    wpi_setWPIErrorWithContext(ResourceAlreadyAllocated, resourceDesc);
    return std::numeric_limits<uint32_t>::max();
  }
  m_isAllocated[index] = true;
  return index;
}

/**
 * Free an allocated resource.
 *
 * After a resource is no longer needed, for example a destructor is called for
 * a channel assignment class, Free will release the resource value so it can
 * be reused somewhere else in the program.
 */
void Resource::Free(uint32_t index) {
  std::unique_lock<hal::priority_recursive_mutex> sync(m_allocateLock);
  if (index == std::numeric_limits<uint32_t>::max()) return;
  if (index >= m_isAllocated.size()) {
    wpi_setWPIError(NotAllocated);
    return;
  }
  if (!m_isAllocated[index]) {
    wpi_setWPIError(NotAllocated);
    return;
  }
  m_isAllocated[index] = false;
}


text:
var db = require('orm').db;
exports.index = function (req, res) {
	res.render('home/administration', {
		title: 'Consultorio Medico'
	});
};
exports.city = function (req, res) {
	db.models.tbcountry.find(function (err, data) {
		if (err) {
			console.log([err], ['api_country.GetAllItems'])
			res.send({
				'success': false,
				'msg': 'Error obteniendo listado de paises'
			});
		} else {
			var dataRet = JSON.stringify(data)
			res.render('administration/city', {
				title: 'Paises',
				dataCollection: dataRet
			});
		}
	});
};


text:
//  This file was automatically generated at 03-May-22 6:15:26 PM
//
//  Changes to this file may be overwritten without warning
//
//  Generator:  commandparse version 3.0.0.879
//      Goedel Script Version : 0.1   Generated
//      Goedel Schema Version : 0.1   Generated
//
//      Copyright : © 2015-2021
//
//  Build Platform: Win32NT 10.0.19042.0
//
//
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Goedel.Command;
using Goedel.Utilities;
#pragma warning disable IDE0079
#pragma warning disable IDE1006
#pragma warning disable CS1591

namespace Goedel.Mesh.Shell.ServiceAdmin;

public partial class CommandLineInterpreter : CommandLineInterpreterBase {

	/// The command entries
    public static SortedDictionary<string, DescribeCommand> Entries { get; set; }
	/// The default command.
	public static DescribeCommandEntry DefaultCommand { get; set; }
	/// Description of the comman
	public static string Description { get; set; } = "<Not specified>";

	static readonly char UnixFlag = '-';
	static readonly char WindowsFlag = '/';

    ///
    /// Default help dispatch
    ///
    /// <param name="Dispatch">The command description.</param>
    /// <param name="args">The set of arguments.</param>
    /// <param name="index">The first unparsed argument.</param>
    public static void Help (DispatchShell Dispatch, string[] args, int index) =>
        Brief(Description, DefaultCommand, Entries);

    public readonly static DescribeCommandEntry DescribeHelp = new () {
        Identifier = "help",
        HandleDelegate = Help,
        Entries = new () { }
        };

    static CommandLineInterpreter () {
        System.OperatingSystem OperatingSystem = System.Environment.OSVersion;

        if (OperatingSystem.Platform == PlatformID.Unix |
                OperatingSystem.Platform == PlatformID.MacOSX) {
            FlagIndicator = UnixFlag;
            }
        else {
            FlagIndicator = WindowsFlag;
            }

			Description = "Mathematical Mesh Service Administration tool";

		Entries = new   () {
			{"about", _About._DescribeCommand },
			{"create", _Create._DescribeCommand },
			{"dns", _DNS._DescribeCommand },
			{"netsh", _Netsh._DescribeCommand },
			{"help", DescribeHelp }
			}; // End Entries

        }

    public void MainMethod(string[] Args) {
		Shell Dispatch = new ();

		try {
			MainMethod (Dispatch, Args);
			}
        catch (Goedel.Command.ParserException) {
			Brief(Description, DefaultCommand, Entries);
			}
        catch (System.Exception Exception) {
            Console.WriteLine("Application: {0}", Exception.Message);
            }
		}

    public void MainMethod(Shell Dispatch, string[] Args) =>
		Dispatcher (Entries, DefaultCommand, Dispatch, Args, 0);

	public static void Handle_About (
				DispatchShell  DispatchIn, string[] Args, int Index) {
		Shell Dispatch =	DispatchIn as Shell;
		About		Options = new ();
		ProcessOptions (Args, Index, Options);
		Dispatch._PreProcess (Options);
		var result = Dispatch.About (Options);
		Dispatch._PostProcess (result);
		}

	public static void Handle_Create (
				DispatchShell  DispatchIn, string[] Args, int Index) {
		Shell Dispatch =	DispatchIn as Shell;
		Create		Options = new ();
		ProcessOptions (Args, Index, Options);
		Dispatch._PreProcess (Options);
		var result = Dispatch.Create (Options);
		Dispatch._PostProcess (result);
		}

	public static void Handle_DNS (
				DispatchShell  DispatchIn, string[] Args, int Index) {
		Shell Dispatch =	DispatchIn as Shell;
		DNS		Options = new ();
		ProcessOptions (Args, Index, Options);
		Dispatch._PreProcess (Options);
		var result = Dispatch.DNS (Options);
		Dispatch._PostProcess (result);
		}

	public static void Handle_Netsh (
				DispatchShell  DispatchIn, string[] Args, int Index) {
		Shell Dispatch =	DispatchIn as Shell;
		Netsh		Options = new ();
		ProcessOptions (Args, Index, Options);
		Dispatch._PreProcess (Options);
		var result = Dispatch.Netsh (Options);
		Dispatch._PostProcess (result);
		}

} // class Main

// The stub class for carrying optional parameters for each command type
// As with the main class each consists of an abstract main class
// with partial virtual that can be extended as required.

// All subclasses inherit from the abstract classes Goedel.Regisrty.Dispatch
// and Goedel.Command.Type

public interface IReporting {
	Flag			Verbose{get; set;}
	Flag			Report{get; set;}
	Flag			Json{get; set;}
	}

public class _About : Goedel.Command.Dispatch ,
						IReporting{

	public override Goedel.Command.Type[] _Data {get; set;} = new Goedel.Command.Type[] {
		new Flag (),
		new Flag (),
		new Flag (),
		new Flag ()		} ;

	/// Field accessor for option [verbose]
	public virtual Flag Verbose {
		get => _Data[0] as Flag;
		set => _Data[0]  = value;
		}

	public virtual string _Verbose {
		set => _Data[0].Parameter (value);
		}
	/// Field accessor for option [report]
	public virtual Flag Report {
		get => _Data[1] as Flag;
		set => _Data[1]  = value;
		}

	public virtual string _Report {
		set => _Data[1].Parameter (value);
		}
	/// Field accessor for option [json]
	public virtual Flag Json {
		get => _Data[2] as Flag;
		set => _Data[2]  = value;
		}

	public virtual string _Json {
		set => _Data[2].Parameter (value);
		}
	/// Field accessor for option [where]
	public virtual Flag Where {
		get => _Data[3] as Flag;
		set => _Data[3]  = value;
		}

	public virtual string _Where {
		set => _Data[3].Parameter (value);
		}
	public override DescribeCommandEntry DescribeCommand {get; set;} = _DescribeCommand;

	public readonly static DescribeCommandEntry _DescribeCommand = new   () {
		Identifier = "about",
		Brief =  "Report version and compilation date.",
		HandleDelegate =  CommandLineInterpreter.Handle_About,
		Lazy =  false,
		Entries = new List<DescribeEntry> () {
			new DescribeEntryOption () {
				Identifier = "Verbose",
				Default = "false", // null if null
				Brief = "Verbose reports (default)",
				Index = 0,
				Key = "verbose"
				},
			new DescribeEntryOption () {
				Identifier = "Report",
				Default = "true", // null if null
				Brief = "Report output (default)",
				Index = 1,
				Key = "report"
				},
			new DescribeEntryOption () {
				Identifier = "Json",
				Default = "false", // null if null
				Brief = "Report output in JSON format",
				Index = 2,
				Key = "json"
				},
			new DescribeEntryOption () {
				Identifier = "Where",
				Default = "false", // null if null
				Brief = "Report location of configuration files.",
				Index = 3,
				Key = "where"
				}
			}
		};

	}

public partial class About : _About {
    } // class About

public class _Create : Goedel.Command.Dispatch ,
						IReporting{

	public override Goedel.Command.Type[] _Data {get; set;} = new Goedel.Command.Type[] {
		new Flag (),
		new Flag (),
		new Flag (),
		new String (),
		new String (),
		new String (),
		new String (),
		new String (),
		new ExistingFile (),
		new String ()		} ;

	/// Field accessor for option [verbose]
	public virtual Flag Verbose {
		get => _Data[0] as Flag;
		set => _Data[0]  = value;
		}

	public virtual string _Verbose {
		set => _Data[0].Parameter (value);
		}
	/// Field accessor for option [report]
	public virtual Flag Report {
		get => _Data[1] as Flag;
		set => _Data[1]  = value;
		}

	public virtual string _Report {
		set => _Data[1].Parameter (value);
		}
	/// Field accessor for option [json]
	public virtual Flag Json {
		get => _Data[2] as Flag;
		set => _Data[2]  = value;
		}

	public virtual string _Json {
		set => _Data[2].Parameter (value);
		}
	/// Field accessor for parameter []
	public virtual String ServiceDns {
		get => _Data[3] as String;
		set => _Data[3]  = value;
		}

	public virtual string _ServiceDns {
		set => _Data[3].Parameter (value);
		}
	/// Field accessor for option [hostconfig]
	public virtual String HostConfig {
		get => _Data[4] as String;
		set => _Data[4]  = value;
		}

	public virtual string _HostConfig {
		set => _Data[4].Parameter (value);
		}
	/// Field accessor for option [ip]
	public virtual String HostIp {
		get => _Data[5] as String;
		set => _Data[5]  = value;
		}

	public virtual string _HostIp {
		set => _Data[5].Parameter (value);
		}
	/// Field accessor for option [host]
	public virtual String HostDns {
		get => _Data[6] as String;
		set => _Data[6]  = value;
		}

	public virtual string _HostDns {
		set => _Data[6].Parameter (value);
		}
	/// Field accessor for option [admin]
	public virtual String Admin {
		get => _Data[7] as String;
		set => _Data[7]  = value;
		}

	public virtual string _Admin {
		set => _Data[7].Parameter (value);
		}
	/// Field accessor for option [config]
	public virtual ExistingFile MultiConfig {
		get => _Data[8] as ExistingFile;
		set => _Data[8]  = value;
		}

	public virtual string _MultiConfig {
		set => _Data[8].Parameter (value);
		}
	/// Field accessor for option [account]
	public virtual String Account {
		get => _Data[9] as String;
		set => _Data[9]  = value;
		}

	public virtual string _Account {
		set => _Data[9].Parameter (value);
		}
	public override DescribeCommandEntry DescribeCommand {get; set;} = _DescribeCommand;

	public readonly static DescribeCommandEntry _DescribeCommand = new   () {
		Identifier = "create",
		Brief =  "Initialize a new Mesh service and administration account",
		HandleDelegate =  CommandLineInterpreter.Handle_Create,
		Lazy =  false,
		Entries = new List<DescribeEntry> () {
			new DescribeEntryOption () {
				Identifier = "Verbose",
				Default = "false", // null if null
				Brief = "Verbose reports (default)",
				Index = 0,
				Key = "verbose"
				},
			new DescribeEntryOption () {
				Identifier = "Report",
				Default = "true", // null if null
				Brief = "Report output (default)",
				Index = 1,
				Key = "report"
				},
			new DescribeEntryOption () {
				Identifier = "Json",
				Default = "false", // null if null
				Brief = "Report output in JSON format",
				Index = 2,
				Key = "json"
				},
			new DescribeEntryParameter () {
				Identifier = "ServiceDns",
				Default = null, // null if null
				Brief = "The DNS address of the service",
				Index = 3,
				Key = ""
				},
			new DescribeEntryOption () {
				Identifier = "HostConfig",
				Default = null, // null if null
				Brief = "The host configuration name (defaults to mmmsettings.json)",
				Index = 4,
				Key = "hostconfig"
				},
			new DescribeEntryOption () {
				Identifier = "HostIp",
				Default = null, // null if null
				Brief = "The external IP address of the host.",
				Index = 5,
				Key = "ip"
				},
			new DescribeEntryOption () {
				Identifier = "HostDns",
				Default = null, // null if null
				Brief = "The DNS address of the host for service configuration",
				Index = 6,
				Key = "host"
				},
			new DescribeEntryOption () {
				Identifier = "Admin",
				Default = null, // null if null
				Brief = "The administrator account address, also default for the host domain.",
				Index = 7,
				Key = "admin"
				},
			new DescribeEntryOption () {
				Identifier = "MultiConfig",
				Default = "HostsAndServices", // null if null
				Brief = "The configuration file, is created if necessary",
				Index = 8,
				Key = "config"
				},
			new DescribeEntryOption () {
				Identifier = "Account",
				Default = null, // null if null
				Brief = "The account under which the service is to run (defaults to account executing command).",
				Index = 9,
				Key = "account"
				}
			}
		};

	}

public partial class Create : _Create {
    } // class Create

public class _DNS : Goedel.Command.Dispatch ,
						IReporting{

	public override Goedel.Command.Type[] _Data {get; set;} = new Goedel.Command.Type[] {
		new Flag (),
		new Flag (),
		new Flag (),
		new NewFile (),
		new String (),
		new ExistingFile ()		} ;

	/// Field accessor for option [verbose]
	public virtual Flag Verbose {
		get => _Data[0] as Flag;
		set => _Data[0]  = value;
		}

	public virtual string _Verbose {
		set => _Data[0].Parameter (value);
		}
	/// Field accessor for option [report]
	public virtual Flag Report {
		get => _Data[1] as Flag;
		set => _Data[1]  = value;
		}

	public virtual string _Report {
		set => _Data[1].Parameter (value);
		}
	/// Field accessor for option [json]
	public virtual Flag Json {
		get => _Data[2] as Flag;
		set => _Data[2]  = value;
		}

	public virtual string _Json {
		set => _Data[2].Parameter (value);
		}
	/// Field accessor for parameter []
	public virtual NewFile DnsConfig {
		get => _Data[3] as NewFile;
		set => _Data[3]  = value;
		}

	public virtual string _DnsConfig {
		set => _Data[3].Parameter (value);
		}
	/// Field accessor for parameter []
	public virtual String HostConfig {
		get => _Data[4] as String;
		set => _Data[4]  = value;
		}

	public virtual string _HostConfig {
		set => _Data[4].Parameter (value);
		}
	/// Field accessor for option [config]
	public virtual ExistingFile MultiConfig {
		get => _Data[5] as ExistingFile;
		set => _Data[5]  = value;
		}

	public virtual string _MultiConfig {
		set => _Data[5].Parameter (value);
		}
	public override DescribeCommandEntry DescribeCommand {get; set;} = _DescribeCommand;

	public readonly static DescribeCommandEntry _DescribeCommand = new   () {
		Identifier = "dns",
		Brief =  "Compute the DNS configuration from the service config.",
		HandleDelegate =  CommandLineInterpreter.Handle_DNS,
		Lazy =  false,
		Entries = new List<DescribeEntry> () {
			new DescribeEntryOption () {
				Identifier = "Verbose",
				Default = "false", // null if null
				Brief = "Verbose reports (default)",
				Index = 0,
				Key = "verbose"
				},
			new DescribeEntryOption () {
				Identifier = "Report",
				Default = "true", // null if null
				Brief = "Report output (default)",
				Index = 1,
				Key = "report"
				},
			new DescribeEntryOption () {
				Identifier = "Json",
				Default = "false", // null if null
				Brief = "Report output in JSON format",
				Index = 2,
				Key = "json"
				},
			new DescribeEntryParameter () {
				Identifier = "DnsConfig",
				Default = null, // null if null
				Brief = "The file to write the DNS configuration to",
				Index = 3,
				Key = ""
				},
			new DescribeEntryParameter () {
				Identifier = "HostConfig",
				Default = null, // null if null
				Brief = "The host configuration name",
				Index = 4,
				Key = ""
				},
			new DescribeEntryOption () {
				Identifier = "MultiConfig",
				Default = "HostsAndServices", // null if null
				Brief = "The configuration file, is created if necessary",
				Index = 5,
				Key = "config"
				}
			}
		};

	}

public partial class DNS : _DNS {
    } // class DNS

public class _Netsh : Goedel.Command.Dispatch ,
						IReporting{

	public override Goedel.Command.Type[] _Data {get; set;} = new Goedel.Command.Type[] {
		new Flag (),
		new Flag (),
		new Flag (),
		new NewFile (),
		new String (),
		new ExistingFile ()		} ;

	/// Field accessor for option [verbose]
	public virtual Flag Verbose {
		get => _Data[0] as Flag;
		set => _Data[0]  = value;
		}

	public virtual string _Verbose {
		set => _Data[0].Parameter (value);
		}
	/// Field accessor for option [report]
	public virtual Flag Report {
		get => _Data[1] as Flag;
		set => _Data[1]  = value;
		}

	public virtual string _Report {
		set => _Data[1].Parameter (value);
		}
	/// Field accessor for option [json]
	public virtual Flag Json {
		get => _Data[2] as Flag;
		set => _Data[2]  = value;
		}

	public virtual string _Json {
		set => _Data[2].Parameter (value);
		}
	/// Field accessor for parameter []
	public virtual NewFile DnsConfig {
		get => _Data[3] as NewFile;
		set => _Data[3]  = value;
		}

	public virtual string _DnsConfig {
		set => _Data[3].Parameter (value);
		}
	/// Field accessor for parameter []
	public virtual String HostConfig {
		get => _Data[4] as String;
		set => _Data[4]  = value;
		}

	public virtual string _HostConfig {
		set => _Data[4].Parameter (value);
		}
	/// Field accessor for option [config]
	public virtual ExistingFile MultiConfig {
		get => _Data[5] as ExistingFile;
		set => _Data[5]  = value;
		}

	public virtual string _MultiConfig {
		set => _Data[5].Parameter (value);
		}
	public override DescribeCommandEntry DescribeCommand {get; set;} = _DescribeCommand;

	public readonly static DescribeCommandEntry _DescribeCommand = new   () {
		Identifier = "netsh",
		Brief =  "Compute the netsh configuration from the service config.",
		HandleDelegate =  CommandLineInterpreter.Handle_Netsh,
		Lazy =  false,
		Entries = new List<DescribeEntry> () {
			new DescribeEntryOption () {
				Identifier = "Verbose",
				Default = "false", // null if null
				Brief = "Verbose reports (default)",
				Index = 0,
				Key = "verbose"
				},
			new DescribeEntryOption () {
				Identifier = "Report",
				Default = "true", // null if null
				Brief = "Report output (default)",
				Index = 1,
				Key = "report"
				},
			new DescribeEntryOption () {
				Identifier = "Json",
				Default = "false", // null if null
				Brief = "Report output in JSON format",
				Index = 2,
				Key = "json"
				},
			new DescribeEntryParameter () {
				Identifier = "DnsConfig",
				Default = null, // null if null
				Brief = "The file to write the netsh configuration to",
				Index = 3,
				Key = ""
				},
			new DescribeEntryParameter () {
				Identifier = "HostConfig",
				Default = null, // null if null
				Brief = "The host configuration name",
				Index = 4,
				Key = ""
				},
			new DescribeEntryOption () {
				Identifier = "MultiConfig",
				Default = "HostsAndServices", // null if null
				Brief = "The configuration file, is created if necessary",
				Index = 5,
				Key = "config"
				}
			}
		};

	}

public partial class Netsh : _Netsh {
    } // class Netsh

public partial class  Flag : Goedel.Command._Flag {
    public Flag(string value=null) : base (value) {}
    } // Flag

public partial class  File : Goedel.Command._File {
	public File(string value=null) : base (value) {}
    } // File

public partial class  NewFile : Goedel.Command._NewFile {
	public NewFile(string value=null) : base (value) {}
    } // NewFile

public partial class  ExistingFile : Goedel.Command._ExistingFile {
	public ExistingFile(string value=null) : base (value) {}
    } // ExistingFile

public partial class  Integer : Goedel.Command._Integer {
	public Integer(string value=null) : base (value) {}
    } // Integer

public partial class  String : Goedel.Command._String {
	public String(string value=null) : base (value) {}
    } // String

public partial class  Enumeration<T> : _Enumeration<T> {
    public Enumeration(DescribeEntryEnumerate description) : base(description){
        }
    } // _Enumeration<T>

// The stub class just contains routines that echo their arguments and
// write 'not yet implemented'

// Eventually there will be a compiler option to suppress the debugging
// to eliminate the redundant code
public class _Shell : global::Goedel.Command.DispatchShell {

	public virtual ShellResult About ( About Options) {
		CommandLineInterpreter.DescribeValues (Options);
		return null;
		}

	public virtual ShellResult Create ( Create Options) {
		CommandLineInterpreter.DescribeValues (Options);
		return null;
		}

	public virtual ShellResult DNS ( DNS Options) {
		CommandLineInterpreter.DescribeValues (Options);
		return null;
		}

	public virtual ShellResult Netsh ( Netsh Options) {
		CommandLineInterpreter.DescribeValues (Options);
		return null;
		}

    } // class _Shell

public partial class Shell : _Shell {
    } // class Shell


text:
package dtl

// Copyright (c) Microsoft and contributors.  All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"context"
	"github.com/Azure/go-autorest/autorest"
	"github.com/Azure/go-autorest/autorest/azure"
	"github.com/Azure/go-autorest/autorest/validation"
	"net/http"
)

// LabsClient is the the DevTest Labs Client.
type LabsClient struct {
	BaseClient
}

// NewLabsClient creates an instance of the LabsClient client.
func NewLabsClient(subscriptionID string) LabsClient {
	return NewLabsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}

// NewLabsClientWithBaseURI creates an instance of the LabsClient client.
func NewLabsClientWithBaseURI(baseURI string, subscriptionID string) LabsClient {
	return LabsClient{NewWithBaseURI(baseURI, subscriptionID)}
}

// ClaimAnyVM claim a random claimable virtual machine in the lab. This operation can take a while to complete.
// Parameters:
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
func (client LabsClient) ClaimAnyVM(ctx context.Context, resourceGroupName string, name string) (result LabsClaimAnyVMFuture, err error) {
	req, err := client.ClaimAnyVMPreparer(ctx, resourceGroupName, name)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ClaimAnyVM", nil, "Failure preparing request")
		return
	}

	result, err = client.ClaimAnyVMSender(req)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ClaimAnyVM", result.Response(), "Failure sending request")
		return
	}

	return
}

// ClaimAnyVMPreparer prepares the ClaimAnyVM request.
func (client LabsClient) ClaimAnyVMPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

	const APIVersion = "2016-05-15"
	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}

	preparer := autorest.CreatePreparer(
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/claimAnyVm", pathParameters),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// ClaimAnyVMSender sends the ClaimAnyVM request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) ClaimAnyVMSender(req *http.Request) (future LabsClaimAnyVMFuture, err error) {
	var resp *http.Response
	resp, err = autorest.SendWithSender(client, req,
		azure.DoRetryWithRegistration(client.Client))
	if err != nil {
		return
	}
	err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
	if err != nil {
		return
	}
	future.Future, err = azure.NewFutureFromResponse(resp)
	return
}

// ClaimAnyVMResponder handles the response to the ClaimAnyVM request. The method always
// closes the http.Response Body.
func (client LabsClient) ClaimAnyVMResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
		autorest.ByClosing())
	result.Response = resp
	return
}

// CreateEnvironment create virtual machines in a lab. This operation can take a while to complete.
// Parameters:
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
// labVirtualMachineCreationParameter - properties for creating a virtual machine.
func (client LabsClient) CreateEnvironment(ctx context.Context, resourceGroupName string, name string, labVirtualMachineCreationParameter LabVirtualMachineCreationParameter) (result LabsCreateEnvironmentFuture, err error) {
	if err := validation.Validate([]validation.Validation{
		{TargetValue: labVirtualMachineCreationParameter,
			Constraints: []validation.Constraint{{Target: "labVirtualMachineCreationParameter.LabVirtualMachineCreationParameterProperties", Name: validation.Null, Rule: false,
				Chain: []validation.Constraint{{Target: "labVirtualMachineCreationParameter.LabVirtualMachineCreationParameterProperties.ApplicableSchedule", Name: validation.Null, Rule: false,
					Chain: []validation.Constraint{{Target: "labVirtualMachineCreationParameter.LabVirtualMachineCreationParameterProperties.ApplicableSchedule.ApplicableScheduleProperties", Name: validation.Null, Rule: true,
						Chain: []validation.Constraint{{Target: "labVirtualMachineCreationParameter.LabVirtualMachineCreationParameterProperties.ApplicableSchedule.ApplicableScheduleProperties.LabVmsShutdown", Name: validation.Null, Rule: false,
							Chain: []validation.Constraint{{Target: "labVirtualMachineCreationParameter.LabVirtualMachineCreationParameterProperties.ApplicableSchedule.ApplicableScheduleProperties.LabVmsShutdown.ScheduleProperties", Name: validation.Null, Rule: true, Chain: nil}}},
							{Target: "labVirtualMachineCreationParameter.LabVirtualMachineCreationParameterProperties.ApplicableSchedule.ApplicableScheduleProperties.LabVmsStartup", Name: validation.Null, Rule: false,
								Chain: []validation.Constraint{{Target: "labVirtualMachineCreationParameter.LabVirtualMachineCreationParameterProperties.ApplicableSchedule.ApplicableScheduleProperties.LabVmsStartup.ScheduleProperties", Name: validation.Null, Rule: true, Chain: nil}}},
						}},
					}},
				}}}}}); err != nil {
		return result, validation.NewError("dtl.LabsClient", "CreateEnvironment", err.Error())
	}

	req, err := client.CreateEnvironmentPreparer(ctx, resourceGroupName, name, labVirtualMachineCreationParameter)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "CreateEnvironment", nil, "Failure preparing request")
		return
	}

	result, err = client.CreateEnvironmentSender(req)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "CreateEnvironment", result.Response(), "Failure sending request")
		return
	}

	return
}

// CreateEnvironmentPreparer prepares the CreateEnvironment request.
func (client LabsClient) CreateEnvironmentPreparer(ctx context.Context, resourceGroupName string, name string, labVirtualMachineCreationParameter LabVirtualMachineCreationParameter) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

	const APIVersion = "2016-05-15"
	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}

	preparer := autorest.CreatePreparer(
		autorest.AsContentType("application/json; charset=utf-8"),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/createEnvironment", pathParameters),
		autorest.WithJSON(labVirtualMachineCreationParameter),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// CreateEnvironmentSender sends the CreateEnvironment request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) CreateEnvironmentSender(req *http.Request) (future LabsCreateEnvironmentFuture, err error) {
	var resp *http.Response
	resp, err = autorest.SendWithSender(client, req,
		azure.DoRetryWithRegistration(client.Client))
	if err != nil {
		return
	}
	err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
	if err != nil {
		return
	}
	future.Future, err = azure.NewFutureFromResponse(resp)
	return
}

// CreateEnvironmentResponder handles the response to the CreateEnvironment request. The method always
// closes the http.Response Body.
func (client LabsClient) CreateEnvironmentResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
		autorest.ByClosing())
	result.Response = resp
	return
}

// CreateOrUpdate create or replace an existing lab. This operation can take a while to complete.
// Parameters:
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
// lab - a lab.
func (client LabsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, lab Lab) (result LabsCreateOrUpdateFuture, err error) {
	req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, name, lab)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "CreateOrUpdate", nil, "Failure preparing request")
		return
	}

	result, err = client.CreateOrUpdateSender(req)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
		return
	}

	return
}

// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client LabsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, name string, lab Lab) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

	const APIVersion = "2016-05-15"
	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}

	preparer := autorest.CreatePreparer(
		autorest.AsContentType("application/json; charset=utf-8"),
		autorest.AsPut(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}", pathParameters),
		autorest.WithJSON(lab),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) CreateOrUpdateSender(req *http.Request) (future LabsCreateOrUpdateFuture, err error) {
	var resp *http.Response
	resp, err = autorest.SendWithSender(client, req,
		azure.DoRetryWithRegistration(client.Client))
	if err != nil {
		return
	}
	err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
	if err != nil {
		return
	}
	future.Future, err = azure.NewFutureFromResponse(resp)
	return
}

// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client LabsClient) CreateOrUpdateResponder(resp *http.Response) (result Lab, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
		autorest.ByUnmarshallingJSON(&result),
		autorest.ByClosing())
	result.Response = autorest.Response{Response: resp}
	return
}

// Delete delete lab. This operation can take a while to complete.
// Parameters:
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
func (client LabsClient) Delete(ctx context.Context, resourceGroupName string, name string) (result LabsDeleteFuture, err error) {
	req, err := client.DeletePreparer(ctx, resourceGroupName, name)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "Delete", nil, "Failure preparing request")
		return
	}

	result, err = client.DeleteSender(req)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "Delete", result.Response(), "Failure sending request")
		return
	}

	return
}

// DeletePreparer prepares the Delete request.
func (client LabsClient) DeletePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

	const APIVersion = "2016-05-15"
	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}

	preparer := autorest.CreatePreparer(
		autorest.AsDelete(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}", pathParameters),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) DeleteSender(req *http.Request) (future LabsDeleteFuture, err error) {
	var resp *http.Response
	resp, err = autorest.SendWithSender(client, req,
		azure.DoRetryWithRegistration(client.Client))
	if err != nil {
		return
	}
	err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
	if err != nil {
		return
	}
	future.Future, err = azure.NewFutureFromResponse(resp)
	return
}

// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client LabsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
		autorest.ByClosing())
	result.Response = resp
	return
}

// ExportResourceUsage exports the lab resource usage into a storage account This operation can take a while to
// complete.
// Parameters:
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
// exportResourceUsageParameters - the parameters of the export operation.
func (client LabsClient) ExportResourceUsage(ctx context.Context, resourceGroupName string, name string, exportResourceUsageParameters ExportResourceUsageParameters) (result LabsExportResourceUsageFuture, err error) {
	req, err := client.ExportResourceUsagePreparer(ctx, resourceGroupName, name, exportResourceUsageParameters)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ExportResourceUsage", nil, "Failure preparing request")
		return
	}

	result, err = client.ExportResourceUsageSender(req)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ExportResourceUsage", result.Response(), "Failure sending request")
		return
	}

	return
}

// ExportResourceUsagePreparer prepares the ExportResourceUsage request.
func (client LabsClient) ExportResourceUsagePreparer(ctx context.Context, resourceGroupName string, name string, exportResourceUsageParameters ExportResourceUsageParameters) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

	const APIVersion = "2016-05-15"
	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}

	preparer := autorest.CreatePreparer(
		autorest.AsContentType("application/json; charset=utf-8"),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/exportResourceUsage", pathParameters),
		autorest.WithJSON(exportResourceUsageParameters),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// ExportResourceUsageSender sends the ExportResourceUsage request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) ExportResourceUsageSender(req *http.Request) (future LabsExportResourceUsageFuture, err error) {
	var resp *http.Response
	resp, err = autorest.SendWithSender(client, req,
		azure.DoRetryWithRegistration(client.Client))
	if err != nil {
		return
	}
	err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
	if err != nil {
		return
	}
	future.Future, err = azure.NewFutureFromResponse(resp)
	return
}

// ExportResourceUsageResponder handles the response to the ExportResourceUsage request. The method always
// closes the http.Response Body.
func (client LabsClient) ExportResourceUsageResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
		autorest.ByClosing())
	result.Response = resp
	return
}

// GenerateUploadURI generate a URI for uploading custom disk images to a Lab.
// Parameters:
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
// generateUploadURIParameter - properties for generating an upload URI.
func (client LabsClient) GenerateUploadURI(ctx context.Context, resourceGroupName string, name string, generateUploadURIParameter GenerateUploadURIParameter) (result GenerateUploadURIResponse, err error) {
	req, err := client.GenerateUploadURIPreparer(ctx, resourceGroupName, name, generateUploadURIParameter)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "GenerateUploadURI", nil, "Failure preparing request")
		return
	}

	resp, err := client.GenerateUploadURISender(req)
	if err != nil {
		result.Response = autorest.Response{Response: resp}
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "GenerateUploadURI", resp, "Failure sending request")
		return
	}

	result, err = client.GenerateUploadURIResponder(resp)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "GenerateUploadURI", resp, "Failure responding to request")
	}

	return
}

// GenerateUploadURIPreparer prepares the GenerateUploadURI request.
func (client LabsClient) GenerateUploadURIPreparer(ctx context.Context, resourceGroupName string, name string, generateUploadURIParameter GenerateUploadURIParameter) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

	const APIVersion = "2016-05-15"
	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}

	preparer := autorest.CreatePreparer(
		autorest.AsContentType("application/json; charset=utf-8"),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/generateUploadUri", pathParameters),
		autorest.WithJSON(generateUploadURIParameter),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// GenerateUploadURISender sends the GenerateUploadURI request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) GenerateUploadURISender(req *http.Request) (*http.Response, error) {
	return autorest.SendWithSender(client, req,
		azure.DoRetryWithRegistration(client.Client))
}

// GenerateUploadURIResponder handles the response to the GenerateUploadURI request. The method always
// closes the http.Response Body.
func (client LabsClient) GenerateUploadURIResponder(resp *http.Response) (result GenerateUploadURIResponse, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK),
		autorest.ByUnmarshallingJSON(&result),
		autorest.ByClosing())
	result.Response = autorest.Response{Response: resp}
	return
}

// Get get lab.
// Parameters:
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
// expand - specify the $expand query. Example: 'properties($select=defaultStorageAccount)'
func (client LabsClient) Get(ctx context.Context, resourceGroupName string, name string, expand string) (result Lab, err error) {
	req, err := client.GetPreparer(ctx, resourceGroupName, name, expand)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "Get", nil, "Failure preparing request")
		return
	}

	resp, err := client.GetSender(req)
	if err != nil {
		result.Response = autorest.Response{Response: resp}
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "Get", resp, "Failure sending request")
		return
	}

	result, err = client.GetResponder(resp)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "Get", resp, "Failure responding to request")
	}

	return
}

// GetPreparer prepares the Get request.
func (client LabsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, expand string) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

	const APIVersion = "2016-05-15"
	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}
	if len(expand) > 0 {
		queryParameters["$expand"] = autorest.Encode("query", expand)
	}

	preparer := autorest.CreatePreparer(
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}", pathParameters),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) GetSender(req *http.Request) (*http.Response, error) {
	return autorest.SendWithSender(client, req,
		azure.DoRetryWithRegistration(client.Client))
}

// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client LabsClient) GetResponder(resp *http.Response) (result Lab, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK),
		autorest.ByUnmarshallingJSON(&result),
		autorest.ByClosing())
	result.Response = autorest.Response{Response: resp}
	return
}

// ListByResourceGroup list labs in a resource group.
// Parameters:
// resourceGroupName - the name of the resource group.
// expand - specify the $expand query. Example: 'properties($select=defaultStorageAccount)'
// filter - the filter to apply to the operation.
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client LabsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabPage, err error) {
	result.fn = client.listByResourceGroupNextResults
	req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, expand, filter, top, orderby)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ListByResourceGroup", nil, "Failure preparing request")
		return
	}

	resp, err := client.ListByResourceGroupSender(req)
	if err != nil {
		result.rwcl.Response = autorest.Response{Response: resp}
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ListByResourceGroup", resp, "Failure sending request")
		return
	}

	result.rwcl, err = client.ListByResourceGroupResponder(resp)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ListByResourceGroup", resp, "Failure responding to request")
	}

	return
}

// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
func (client LabsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

	const APIVersion = "2016-05-15"
	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}
	if len(expand) > 0 {
		queryParameters["$expand"] = autorest.Encode("query", expand)
	}
	if len(filter) > 0 {
		queryParameters["$filter"] = autorest.Encode("query", filter)
	}
	if top != nil {
		queryParameters["$top"] = autorest.Encode("query", *top)
	}
	if len(orderby) > 0 {
		queryParameters["$orderby"] = autorest.Encode("query", orderby)
	}

	preparer := autorest.CreatePreparer(
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs", pathParameters),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
	return autorest.SendWithSender(client, req,
		azure.DoRetryWithRegistration(client.Client))
}

// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
// closes the http.Response Body.
func (client LabsClient) ListByResourceGroupResponder(resp *http.Response) (result ResponseWithContinuationLab, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK),
		autorest.ByUnmarshallingJSON(&result),
		autorest.ByClosing())
	result.Response = autorest.Response{Response: resp}
	return
}

// listByResourceGroupNextResults retrieves the next set of results, if any.
func (client LabsClient) listByResourceGroupNextResults(lastResults ResponseWithContinuationLab) (result ResponseWithContinuationLab, err error) {
	req, err := lastResults.responseWithContinuationLabPreparer()
	if err != nil {
		return result, autorest.NewErrorWithError(err, "dtl.LabsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
	}
	if req == nil {
		return
	}
	resp, err := client.ListByResourceGroupSender(req)
	if err != nil {
		result.Response = autorest.Response{Response: resp}
		return result, autorest.NewErrorWithError(err, "dtl.LabsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
	}
	result, err = client.ListByResourceGroupResponder(resp)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
	}
	return
}

// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client LabsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabIterator, err error) {
	result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, expand, filter, top, orderby)
	return
}

// ListBySubscription list labs in a subscription.
// Parameters:
// expand - specify the $expand query. Example: 'properties($select=defaultStorageAccount)'
// filter - the filter to apply to the operation.
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client LabsClient) ListBySubscription(ctx context.Context, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabPage, err error) {
	result.fn = client.listBySubscriptionNextResults
	req, err := client.ListBySubscriptionPreparer(ctx, expand, filter, top, orderby)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ListBySubscription", nil, "Failure preparing request")
		return
	}

	resp, err := client.ListBySubscriptionSender(req)
	if err != nil {
		result.rwcl.Response = autorest.Response{Response: resp}
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ListBySubscription", resp, "Failure sending request")
		return
	}

	result.rwcl, err = client.ListBySubscriptionResponder(resp)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ListBySubscription", resp, "Failure responding to request")
	}

	return
}

// ListBySubscriptionPreparer prepares the ListBySubscription request.
func (client LabsClient) ListBySubscriptionPreparer(ctx context.Context, expand string, filter string, top *int32, orderby string) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"subscriptionId": autorest.Encode("path", client.SubscriptionID),
	}

	const APIVersion = "2016-05-15"
	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}
	if len(expand) > 0 {
		queryParameters["$expand"] = autorest.Encode("query", expand)
	}
	if len(filter) > 0 {
		queryParameters["$filter"] = autorest.Encode("query", filter)
	}
	if top != nil {
		queryParameters["$top"] = autorest.Encode("query", *top)
	}
	if len(orderby) > 0 {
		queryParameters["$orderby"] = autorest.Encode("query", orderby)
	}

	preparer := autorest.CreatePreparer(
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs", pathParameters),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
	return autorest.SendWithSender(client, req,
		azure.DoRetryWithRegistration(client.Client))
}

// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
// closes the http.Response Body.
func (client LabsClient) ListBySubscriptionResponder(resp *http.Response) (result ResponseWithContinuationLab, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK),
		autorest.ByUnmarshallingJSON(&result),
		autorest.ByClosing())
	result.Response = autorest.Response{Response: resp}
	return
}

// listBySubscriptionNextResults retrieves the next set of results, if any.
func (client LabsClient) listBySubscriptionNextResults(lastResults ResponseWithContinuationLab) (result ResponseWithContinuationLab, err error) {
	req, err := lastResults.responseWithContinuationLabPreparer()
	if err != nil {
		return result, autorest.NewErrorWithError(err, "dtl.LabsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
	}
	if req == nil {
		return
	}
	resp, err := client.ListBySubscriptionSender(req)
	if err != nil {
		result.Response = autorest.Response{Response: resp}
		return result, autorest.NewErrorWithError(err, "dtl.LabsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
	}
	result, err = client.ListBySubscriptionResponder(resp)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
	}
	return
}

// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client LabsClient) ListBySubscriptionComplete(ctx context.Context, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabIterator, err error) {
	result.page, err = client.ListBySubscription(ctx, expand, filter, top, orderby)
	return
}

// ListVhds list disk images available for custom image creation.
// Parameters:
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
func (client LabsClient) ListVhds(ctx context.Context, resourceGroupName string, name string) (result ResponseWithContinuationLabVhdPage, err error) {
	result.fn = client.listVhdsNextResults
	req, err := client.ListVhdsPreparer(ctx, resourceGroupName, name)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ListVhds", nil, "Failure preparing request")
		return
	}

	resp, err := client.ListVhdsSender(req)
	if err != nil {
		result.rwclv.Response = autorest.Response{Response: resp}
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ListVhds", resp, "Failure sending request")
		return
	}

	result.rwclv, err = client.ListVhdsResponder(resp)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ListVhds", resp, "Failure responding to request")
	}

	return
}

// ListVhdsPreparer prepares the ListVhds request.
func (client LabsClient) ListVhdsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

	const APIVersion = "2016-05-15"
	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}

	preparer := autorest.CreatePreparer(
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds", pathParameters),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// ListVhdsSender sends the ListVhds request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) ListVhdsSender(req *http.Request) (*http.Response, error) {
	return autorest.SendWithSender(client, req,
		azure.DoRetryWithRegistration(client.Client))
}

// ListVhdsResponder handles the response to the ListVhds request. The method always
// closes the http.Response Body.
func (client LabsClient) ListVhdsResponder(resp *http.Response) (result ResponseWithContinuationLabVhd, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK),
		autorest.ByUnmarshallingJSON(&result),
		autorest.ByClosing())
	result.Response = autorest.Response{Response: resp}
	return
}

// listVhdsNextResults retrieves the next set of results, if any.
func (client LabsClient) listVhdsNextResults(lastResults ResponseWithContinuationLabVhd) (result ResponseWithContinuationLabVhd, err error) {
	req, err := lastResults.responseWithContinuationLabVhdPreparer()
	if err != nil {
		return result, autorest.NewErrorWithError(err, "dtl.LabsClient", "listVhdsNextResults", nil, "Failure preparing next results request")
	}
	if req == nil {
		return
	}
	resp, err := client.ListVhdsSender(req)
	if err != nil {
		result.Response = autorest.Response{Response: resp}
		return result, autorest.NewErrorWithError(err, "dtl.LabsClient", "listVhdsNextResults", resp, "Failure sending next results request")
	}
	result, err = client.ListVhdsResponder(resp)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "listVhdsNextResults", resp, "Failure responding to next results request")
	}
	return
}

// ListVhdsComplete enumerates all values, automatically crossing page boundaries as required.
func (client LabsClient) ListVhdsComplete(ctx context.Context, resourceGroupName string, name string) (result ResponseWithContinuationLabVhdIterator, err error) {
	result.page, err = client.ListVhds(ctx, resourceGroupName, name)
	return
}

// Update modify properties of labs.
// Parameters:
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
// lab - a lab.
func (client LabsClient) Update(ctx context.Context, resourceGroupName string, name string, lab LabFragment) (result Lab, err error) {
	req, err := client.UpdatePreparer(ctx, resourceGroupName, name, lab)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "Update", nil, "Failure preparing request")
		return
	}

	resp, err := client.UpdateSender(req)
	if err != nil {
		result.Response = autorest.Response{Response: resp}
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "Update", resp, "Failure sending request")
		return
	}

	result, err = client.UpdateResponder(resp)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.LabsClient", "Update", resp, "Failure responding to request")
	}

	return
}

// UpdatePreparer prepares the Update request.
func (client LabsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, name string, lab LabFragment) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

	const APIVersion = "2016-05-15"
	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}

	preparer := autorest.CreatePreparer(
		autorest.AsContentType("application/json; charset=utf-8"),
		autorest.AsPatch(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}", pathParameters),
		autorest.WithJSON(lab),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client LabsClient) UpdateSender(req *http.Request) (*http.Response, error) {
	return autorest.SendWithSender(client, req,
		azure.DoRetryWithRegistration(client.Client))
}

// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client LabsClient) UpdateResponder(resp *http.Response) (result Lab, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK),
		autorest.ByUnmarshallingJSON(&result),
		autorest.ByClosing())
	result.Response = autorest.Response{Response: resp}
	return
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

	<appender name="RCSDEBUG" class="org.apache.log4j.DailyRollingFileAppender">
		<!--<param name="File" value="/usr/eToBlogs/logs/Debug.log" /> -->
		<param name="File" value="D:/logs/STaoBaolog/Debug.log" />
		<param name="Append" value="true" />
		<param name="DatePattern" value="'.'yyyy-MM-dd" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss\} %-5p] [%t] {%c:%L}-%m%n" />
		</layout>
		<filter class="org.apache.log4j.varia.LevelRangeFilter">
			<param name="LevelMin" value="DEBUG" />
			<param name="LevelMax" value="DEBUG" />
		</filter>
	</appender>

	<appender name="RCSINFO" class="org.apache.log4j.DailyRollingFileAppender">
		<!--<param name="File" value="/usr/eToBlogs/logs/Info.log" /> -->
		<param name="File" value="D:/logs/STaoBaolog/Info.log" />
		<param name="Append" value="true" />
		<param name="DatePattern" value="'.'yyyy-MM-dd" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss\} %-5p] [%t] {%c:%L}-%m%n" />
		</layout>
		<filter class="org.apache.log4j.varia.LevelRangeFilter">
			<param name="LevelMin" value="INFO" />
			<param name="LevelMax" value="INFO" />
		</filter>
	</appender>

	<appender name="RCSERROR" class="org.apache.log4j.DailyRollingFileAppender">
		<!--<param name="File" value="/usr/eToBlogs/logs/Error.log" /> -->
		<param name="File" value="D:/logs/STaoBaolog/Error.log" />
		<param name="Append" value="true" />
		<param name="DatePattern" value="'.'yyyy-MM-dd" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss\} %-5p] [%t] {%c:%L}-%m%n" />
		</layout>
		<filter class="org.apache.log4j.varia.LevelRangeFilter">
			<param name="LevelMin" value="ERROR" />
			<param name="LevelMax" value="ERROR" />
		</filter>
	</appender>

	<appender name="myConsole" class="org.apache.log4j.ConsoleAppender">
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%d{dd HH:mm:ss,SSS\} %-5p] [%t] %c{2\} - %m%n" />
		</layout>
		<!--过滤器设置输出的级别 -->
		<filter class="org.apache.log4j.varia.LevelRangeFilter">
			<param name="levelMin" value="debug" />
			<param name="levelMax" value="warn" />
			<param name="AcceptOnMatch" value="true" />
		</filter>
	</appender>

	<!-- 设置mybatis的SQL输出start -->
	<logger name="java.sql.Connection">
        <level value="debug" />
        <appender-ref ref="myConsole" />
    </logger>

    <logger name="java.sql.Statement">
        <level value="debug" />
        <appender-ref ref="myConsole" />
    </logger>

    <logger name="java.sql.CallableStatement">
        <level value="debug" />
        <appender-ref ref="myConsole" />
    </logger>

    <logger name="java.sql.PreparedStatement">
        <level value="debug" />
        <appender-ref ref="myConsole" />
    </logger>
   <!-- 设置mybatis的SQL输出end -->

	<category name="STBLOG" additivity="false">
		<level value="ALL" />
		<appender-ref ref="RCSDEBUG" />
		<appender-ref ref="RCSINFO" />
		<appender-ref ref="RCSERROR" />
		<appender-ref ref="myConsole" />
	</category>

<root>
  <priority value="debug" />
  		<appender-ref ref="RCSDEBUG" />
		<appender-ref ref="RCSINFO" />
		<appender-ref ref="RCSERROR" />
		<appender-ref ref="myConsole" />
 </root>

</log4j:configuration>


text:
<?php

namespace Magento\Framework\App\View\Asset;

use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Filesystem\Directory\WriteFactory;
use Magento\Framework\View\Asset;

/**
 * A publishing service for view assets
 *
 * @api
 */
class Publisher
{
    /**
     * @var \Magento\Framework\Filesystem
     */
    protected $filesystem;

    /**
     * @var MaterializationStrategy\Factory
     */
    private $materializationStrategyFactory;

    /**
     * @var WriteFactory
     */
    private $writeFactory;

    /**
     * @param \Magento\Framework\Filesystem $filesystem
     * @param MaterializationStrategy\Factory $materializationStrategyFactory
     * @param WriteFactory $writeFactory
     */
    public function __construct(
        \Magento\Framework\Filesystem $filesystem,
        MaterializationStrategy\Factory $materializationStrategyFactory,
        WriteFactory $writeFactory
    ) {
        $this->filesystem = $filesystem;
        $this->materializationStrategyFactory = $materializationStrategyFactory;
        $this->writeFactory = $writeFactory;
    }

    /**
     * @param Asset\LocalInterface $asset
     * @return bool
     */
    public function publish(Asset\LocalInterface $asset)
    {
        $dir = $this->filesystem->getDirectoryRead(DirectoryList::STATIC_VIEW);
        if ($dir->isExist($asset->getPath())) {
            return true;
        }

        return $this->publishAsset($asset);
    }

    /**
     * Publish the asset
     *
     * @param Asset\LocalInterface $asset
     * @return bool
     */
    private function publishAsset(Asset\LocalInterface $asset)
    {
        $targetDir = $this->filesystem->getDirectoryWrite(DirectoryList::STATIC_VIEW);
        $fullSource = $asset->getSourceFile();
        $source = basename($fullSource);
        $sourceDir = $this->writeFactory->create(dirname($fullSource));
        $destination = $asset->getPath();
        $strategy = $this->materializationStrategyFactory->create($asset);
        return $strategy->publishFile($sourceDir, $targetDir, $source, $destination);
    }
}


text:
namespace Daishi.PaySharp {
    /// Metadata necessary to facilitate a successful PayPal
    ///     SetExpressCheckout call.
    public class SetExpressCheckoutPayload : ExpressCheckoutPayload {
        /// Gets or sets the action.
        /// <value>The action.</value>
        public string Action {
            get { return "Sale"; }
        }
        /// Gets or sets the amount.
        /// <value>The amount.</value>
        public string Amount { get; set; }
        /// Gets or sets the currency code.
        /// <value>The currency code.</value>
        public string CurrencyCode { get; set; }
        /// Gets or sets the cancel URL.
        /// <value>The cancel URL.</value>
        public string CancelUrl { get; set; }
        /// Gets or sets the return URL.
        /// <value>The return URL.</value>
        public string ReturnUrl { get; set; }
        /// Gets or sets the locale code.
        /// <value>The locale code.</value>
        public string LocaleCode { get; set; }
        /// Gets or sets the require billing address.
        /// <value>The require billing address.</value>
        public string RequireBillingAddress { get; set; }
        /// Gets or sets the no shipping.
        /// <value>The no shipping.</value>
        public string NoShipping {
            get { return "1"; }
        }
        /// Gets or sets the name of the payment request.
        /// <value>The name of the payment request.</value>
        public string PaymentRequestName { get; set; }
        /// Gets or sets the payment request description.
        /// <value>The payment request description.</value>
        public string PaymentRequestDescription { get; set; }
        /// Gets or sets the payment request quantity.
        /// <value>The payment request quantity.</value>
        public string PaymentRequestQuantity {
            get { return "1"; }
        }
        /// Gets or sets the method.
        /// <value>The method.</value>
        public override string Method {
            get { return "SetExpressCheckout"; }
        }
    }
}


text:
/* Some best-practice CSS that's useful for most apps */
/* Just remove them if they're not what you want */
html {
  box-sizing: border-box;
  font-family: Roboto, sans-serif
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

/* fix for Normalize.css 4 vs Material UI 0.15 */
span[type=button] {
  appearance: none;
}


text:
(function() {
  var ArgumentParser, PathReplacer, PathScanner, PathSearcher, main, path, search, singleProcessReplaceMain, singleProcessScanMain, singleProcessSearchMain, _;

  _ = require('underscore');

  ArgumentParser = require('argparse').ArgumentParser;

  PathSearcher = require('./path-searcher');

  PathScanner = require('./path-scanner');

  PathReplacer = require('./path-replacer');

  path = require("path");

  search = require('./single-process-search').search;

  singleProcessScanMain = require('./single-process-search').scanMain;

  singleProcessSearchMain = require('./single-process-search').searchMain;

  singleProcessReplaceMain = require('./single-process-search').replaceMain;

  /*
  This CLI is mainly for benchmarking. While there may be useful data output to
  the console, it will probably change. The options will probably change as
  well.
  */

  main = function() {
    var argParser, options;
    argParser = new ArgumentParser({
      version: require('../package.json').version,
      addHelp: true,
      description: 'List paths, search, and replace in a directory'
    });
    argParser.addArgument(['-m', '--multiprocess'], {
      action: 'storeTrue'
    });
    argParser.addArgument(['-e', '--excludeVcsIgnores'], {
      action: 'storeTrue'
    });
    argParser.addArgument(['-o', '--verbose'], {
      action: 'storeTrue'
    });
    argParser.addArgument(['-d', '--dryReplace'], {
      action: 'storeTrue'
    });
    argParser.addArgument(['-s', '--search']);
    argParser.addArgument(['-r', '--replace']);
    argParser.addArgument(['pathToScan']);
    options = argParser.parseArgs();
    if (options.search && options.replace) {
      return singleProcessReplaceMain(options);
    } else if (options.search) {
      if (options.multiprocess) {
        return require('./multi-process-search').searchMain(options);
      } else {
        return singleProcessSearchMain(options);
      }
    } else {
      return singleProcessScanMain(options);
    }
  };

  module.exports = {
    main: main,
    search: search,
    PathSearcher: PathSearcher,
    PathScanner: PathScanner,
    PathReplacer: PathReplacer
  };

}).call(this);


text:
module ReportsKit
  module Reports
    module Data
      class FormatTable
        attr_accessor :data, :format, :first_column_label, :report_options

        def initialize(data, format:, first_column_label:, report_options:)
          self.data = data
          self.format = format
          self.first_column_label = first_column_label
          self.report_options = report_options || {}
        end

        def perform
          table_data
        end

        private

        def table_data
          data_rows_with_labels = data_rows.map.with_index do |data_row, index|
            label = format_string(data[:labels][index])
            [label] + data_row
          end
          [column_names] + data_rows_with_labels
        end

        def column_names
          column_names_column_values[0]
        end

        def column_values
          column_names_column_values[1]
        end

        def data_rows
          @data_rows ||= column_values.transpose
        end

        def column_names_column_values
          @column_names_column_values ||= begin
            column_names = [format_string(first_column_label)]
            column_values = []
            data[:datasets].each do |dataset|
              column_names << format_string(dataset[:label])
              column_values << dataset[:data]
            end
            [column_names, column_values]
          end
        end

        def format_string(string)
          return string unless string && strip_html_tags?
          ActionView::Base.full_sanitizer.sanitize(string)
        end

        def strip_html_tags?
          format == 'csv'
        end
      end
    end
  end
end


text:
"""Test for letsencrypt_nginx.dvsni."""
import unittest
import shutil

import mock

from acme import challenges

from letsencrypt import achallenges
from letsencrypt import errors

from letsencrypt.plugins import common_test
from letsencrypt.tests import acme_util

from letsencrypt_nginx import obj
from letsencrypt_nginx.tests import util

class DvsniPerformTest(util.NginxTest):
    """Test the NginxDVSNI challenge."""

    account_key = common_test.DvsniTest.auth_key
    achalls = [
        achallenges.DVSNI(
            challb=acme_util.chall_to_challb(
                challenges.DVSNI(token="kNdwjwOeX0I_A8DXt9Msmg"), "pending"),
            domain="www.example.com", account_key=account_key),
        achallenges.DVSNI(
            challb=acme_util.chall_to_challb(
                challenges.DVSNI(
                    token="\xba\xa9\xda?<m\xaewmx\xea\xad\xadv\xf4\x02\xc9y"
                          "\x80\xe2_X\t\xe7\xc7\xa4\t\xca\xf7&\x945"
                ), "pending"),
            domain="blah", account_key=account_key),
        achallenges.DVSNI(
            challb=acme_util.chall_to_challb(
                challenges.DVSNI(
                    token="\x8c\x8a\xbf_-f\\cw\xee\xd6\xf8/\xa5\xe3\xfd"
                          "\xeb9\xf1\xf5\xb9\xefVM\xc9w\xa4u\x9c\xe1\x87\xb4"
                ), "pending"),
            domain="www.example.org", account_key=account_key),
    ]

    def setUp(self):
        super(DvsniPerformTest, self).setUp()

        config = util.get_nginx_configurator(
            self.config_path, self.config_dir, self.work_dir)

        from letsencrypt_nginx import dvsni
        self.sni = dvsni.NginxDvsni(config)

    def tearDown(self):
        shutil.rmtree(self.temp_dir)
        shutil.rmtree(self.config_dir)
        shutil.rmtree(self.work_dir)

    @mock.patch("letsencrypt_nginx.configurator"
                ".NginxConfigurator.choose_vhost")
    def test_perform(self, mock_choose):
        self.sni.add_chall(self.achalls[1])
        mock_choose.return_value = None
        result = self.sni.perform()
        self.assertTrue(result is None)

    def test_perform0(self):
        responses = self.sni.perform()
        self.assertEqual([], responses)

    @mock.patch("letsencrypt_nginx.configurator.NginxConfigurator.save")
    def test_perform1(self, mock_save):
        self.sni.add_chall(self.achalls[0])
        response = self.achalls[0].gen_response(self.account_key)
        mock_setup_cert = mock.MagicMock(return_value=response)

        # pylint: disable=protected-access
        self.sni._setup_challenge_cert = mock_setup_cert

        responses = self.sni.perform()

        mock_setup_cert.assert_called_once_with(self.achalls[0])
        self.assertEqual([response], responses)
        self.assertEqual(mock_save.call_count, 2)

        # Make sure challenge config is included in main config
        http = self.sni.configurator.parser.parsed[
            self.sni.configurator.parser.loc["root"]][-1]
        self.assertTrue(
            util.contains_at_depth(http, ['include', self.sni.challenge_conf], 1))

    def test_perform2(self):
        acme_responses = []
        for achall in self.achalls:
            self.sni.add_chall(achall)
            acme_responses.append(achall.gen_response(self.account_key))

        mock_setup_cert = mock.MagicMock(side_effect=acme_responses)
        # pylint: disable=protected-access
        self.sni._setup_challenge_cert = mock_setup_cert

        sni_responses = self.sni.perform()

        self.assertEqual(mock_setup_cert.call_count, 3)

        for index, achall in enumerate(self.achalls):
            self.assertEqual(
                mock_setup_cert.call_args_list[index], mock.call(achall))

        http = self.sni.configurator.parser.parsed[
            self.sni.configurator.parser.loc["root"]][-1]
        self.assertTrue(['include', self.sni.challenge_conf] in http[1])
        self.assertTrue(
            util.contains_at_depth(http, ['server_name', 'blah'], 3))

        self.assertEqual(len(sni_responses), 3)
        for i in xrange(3):
            self.assertEqual(sni_responses[i], acme_responses[i])

    def test_mod_config(self):
        self.sni.add_chall(self.achalls[0])
        self.sni.add_chall(self.achalls[2])

        v_addr1 = [obj.Addr("69.50.225.155", "9000", True, False),
                   obj.Addr("127.0.0.1", "", False, False)]
        v_addr2 = [obj.Addr("myhost", "", False, True)]
        ll_addr = [v_addr1, v_addr2]
        self.sni._mod_config(ll_addr)  # pylint: disable=protected-access

        self.sni.configurator.save()

        self.sni.configurator.parser.load()

        http = self.sni.configurator.parser.parsed[
            self.sni.configurator.parser.loc["root"]][-1]
        self.assertTrue(['include', self.sni.challenge_conf] in http[1])

        vhosts = self.sni.configurator.parser.get_vhosts()
        vhs = [vh for vh in vhosts if vh.filep == self.sni.challenge_conf]

        for vhost in vhs:
            if vhost.addrs == set(v_addr1):
                response = self.achalls[0].gen_response(self.account_key)
            else:
                response = self.achalls[2].gen_response(self.account_key)
                self.assertEqual(vhost.addrs, set(v_addr2))
            self.assertEqual(vhost.names, set([response.z_domain]))

        self.assertEqual(len(vhs), 2)

    def test_mod_config_fail(self):
        root = self.sni.configurator.parser.loc["root"]
        self.sni.configurator.parser.parsed[root] = [['include', 'foo.conf']]
        # pylint: disable=protected-access
        self.assertRaises(
            errors.MisconfigurationError, self.sni._mod_config, [])

if __name__ == "__main__":
    unittest.main()  # pragma: no cover


text:
"""Selective implementation of tcl info command.
This script is used while running python tests translated from Tcl."""

import re

def command (caller_globals, caller_locals, pattern):
    return commands(caller_globals, caller_locals, pattern)

def commands (caller_globals, caller_locals, pattern):
    print("pattern %s" % pattern)
    rex = re.compile(pattern)

    str = ""
    for c in caller_globals:
        if rex.match(c):
            str += c + " "
    for c in caller_locals:
        if rex.match(c):
            str += c + " "
    return str.strip()


text:
var nano = require('../');

var pub = nano.socket('pub');
var sub1 = nano.socket('sub');
var sub2 = nano.socket('sub');
var sub3 = nano.socket('sub');

var addr = 'tcp://127.0.0.1:7789'
pub.bind(addr);
sub1.connect(addr);
sub2.connect(addr);
sub3.connect(addr);

sub1.on('message', function (buf) {
    console.log("sub1 got: %s", buf.toString());
});

sub2.on('message', function (buf) {
    console.log("sub2 got: %s", buf.toString());
});

sub3.on('message', function (buf) {
    console.log("sub3 got: %s", buf.toString());
});

setTimeout(function () {
    console.log("PUBLISHING...");
    pub.send("Hello from nanomsg!");
}, 100);


text:
require 'timeout'

Notifier = Struct.new(:url, :protocol, :host_with_port, :rubygem, :version, :api_key) do
  extend StatsD::Instrument

  def payload
    rubygem.payload(version, protocol, host_with_port).to_json
  end

  def authorization
    Digest::SHA2.hexdigest(rubygem.name + version.number + api_key)
  end

  def perform
    timeout(5) do
      RestClient.post url,
        payload,
        :timeout        => 5,
        :open_timeout   => 5,
        'Content-Type'  => 'application/json',
        'Authorization' => authorization
    end
    true
  rescue *(HTTP_ERRORS + [RestClient::Exception, SocketError, SystemCallError])
    WebHook.find_by_url(url).try(:increment!, :failure_count)
    false
  end
  statsd_count_success :perform, 'Webhook.perform.success'

  private

  def timeout(sec, &block)
    Timeout.timeout(sec, &block)
  end
end


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Error Busqueda</title>

No se han encontrado resultados para la busqueda


text:
title: docker/ucp upgrade
description: Upgrade the UCP components on this node
keywords: ucp, cli, upgrade
redirect_from:
 - /reference/ucp/3.0/cli/upgrade/
---

Upgrade the UCP cluster

## Usage

```
 docker container run --rm -it \
        --name ucp \
        -v /var/run/docker.sock:/var/run/docker.sock \
        docker/ucp \
        upgrade [command options]
```

## Description

This command upgrades the UCP running on this cluster.

Before performing an upgrade, you should perform a backup by using the
[backup](backup.md) command.

After upgrading UCP, go to the UCP web UI and confirm each node is
healthy and that all nodes have been upgraded successfully.

## Options

| Option                | Description                                                                                |
|:----------------------|:------------------------------------------------------------------------------------------------------|
| `--debug, D`          | Enable debug mode                                                                                |
| `--jsonlog`           | Produce json formatted output for easier parsing                                                      |
| `--interactive, i`    | Run in interactive mode and prompt for configuration values                                           |
| `--admin-username`    | The UCP administrator username                                                                        |
| `--admin-password`    | The UCP administrator password                                                                        |
| `--pull`              | Pull UCP images: `always`, when `missing`, or `never`                                                 |
| `--registry-username` | Username to use when pulling images                                                                   |
| `--registry-password` | Password to use when pulling images                                                                   |
| `--id`                | The ID of the UCP instance to upgrade                                                                 |
| `--host-address`      | Override the previously configured host address with this IP or network interface                     |
| `--force-minimums`    | Force the install/upgrade even if the system does not meet the minimum requirements                   |
| `--pod-cidr`          | Kubernetes cluster IP pool for the pods to allocated IP from (Default: 192.168.0.0/16                 |
| `--nodeport-range`    | Allowed port range for Kubernetes services of type NodePort (Default: 32768-35535)                    |
| `--cloud-provider`    | The cloud provider for the cluster                                                                    |
| `--cni-installer-url` | A URL pointing to a kubernetes YAML file to be used as an installer for the CNI plugin of the cluster |


text:
package org.opencb.opencga.catalog.db.mongodb;

import org.apache.commons.lang3.StringUtils;
import org.junit.Before;
import org.junit.Test;
import org.opencb.commons.datastore.core.DataStoreServerAddress;
import org.opencb.commons.datastore.core.ObjectMap;
import org.opencb.commons.datastore.mongodb.MongoDBConfiguration;
import org.opencb.commons.datastore.mongodb.MongoDataStore;
import org.opencb.commons.datastore.mongodb.MongoDataStoreManager;
import org.opencb.opencga.catalog.audit.AuditRecord;
import org.opencb.opencga.catalog.db.api.AuditDBAdaptor;
import org.opencb.opencga.catalog.utils.UuidUtils;
import org.opencb.opencga.core.common.TimeUtils;
import org.opencb.opencga.core.config.Configuration;
import org.opencb.opencga.core.models.common.Enums;

import java.util.Collections;

/**
 * Created on 18/08/15
 *
 * @author Jacobo Coll <jacobo167@gmail.com>
 */
public class AuditMongoDBAdaptorTest {

    private AuditDBAdaptor auditDbAdaptor;

    @Before
    public void beforeClass() throws Exception {
        Configuration configuration = Configuration.load(getClass().getResource("/configuration-test.yml")
                .openStream());

        DataStoreServerAddress dataStoreServerAddress = new DataStoreServerAddress(
                configuration.getCatalog().getDatabase().getHosts().get(0).split(":")[0], 27017);

        MongoDBConfiguration mongoDBConfiguration = MongoDBConfiguration.builder()
                .add("username", configuration.getCatalog().getDatabase().getUser())
                .add("password", configuration.getCatalog().getDatabase().getPassword())
                .add("authenticationDatabase", configuration.getCatalog().getDatabase().getOptions().get("authenticationDatabase"))
                .build();

//        String database = catalogConfiguration.getDatabase().getDatabase();
        String database;
        if(StringUtils.isNotEmpty(configuration.getDatabasePrefix())) {
            if (!configuration.getDatabasePrefix().endsWith("_")) {
                database = configuration.getDatabasePrefix() + "_catalog";
            } else {
                database = configuration.getDatabasePrefix() + "catalog";
            }
        } else {
            database = "opencga_test_catalog";
        }

        /**
         * Database is cleared before each execution
         */
//        clearDB(dataStoreServerAddress, mongoCredentials);
        MongoDataStoreManager mongoManager = new MongoDataStoreManager(dataStoreServerAddress.getHost(), dataStoreServerAddress.getPort());
        MongoDataStore db = mongoManager.get(database);
        db.getDb().drop();

        auditDbAdaptor = new MongoDBAdaptorFactory(Collections.singletonList(dataStoreServerAddress), mongoDBConfiguration, database)
                .getCatalogAuditDbAdaptor();
    }

    @Test
    public void testInsertAuditRecord() throws Exception {
        auditDbAdaptor.insertAuditRecord(new AuditRecord(UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.AUDIT),
                UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.AUDIT), "user", "api", Enums.Action.CREATE,
                Enums.Resource.SAMPLE, "sampleId", "sampleUuid", "studyId", "studyUuid", new ObjectMap(),
                new AuditRecord.Status(AuditRecord.Status.Result.SUCCESS), TimeUtils.getDate(), new ObjectMap()));
        auditDbAdaptor.insertAuditRecord(new AuditRecord(UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.AUDIT),
                UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.AUDIT), "user", "api", Enums.Action.CREATE,
                Enums.Resource.SAMPLE, "sampleId2", "sampleUuid2", "studyId", "studyUuid", new ObjectMap(),
                new AuditRecord.Status(AuditRecord.Status.Result.SUCCESS), TimeUtils.getDate(), new ObjectMap()));
        auditDbAdaptor.insertAuditRecord(new AuditRecord(UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.AUDIT),
                UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.AUDIT), "user", "api", Enums.Action.CREATE,
                Enums.Resource.SAMPLE, "sampleId3", "sampleUuid3", "studyId", "studyUuid", new ObjectMap(),
                new AuditRecord.Status(AuditRecord.Status.Result.SUCCESS), TimeUtils.getDate(), new ObjectMap()));
    }

//    @Test
//    public void testGet() throws Exception {
//
//    }
}


text:
using BdRestServer.Filters;
using BdRestServer.Helpers;
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace BdRestServer.Models
{
    [AdminAuthFilter]
    public class UsersController : ApiController
    {
        // GET api/values
        public HttpResponseMessage Get()
        {
            MySqlConnection conn = DBHelper.conn;
            IEnumerable<Dictionary<string, object>> dict = null;

            try
            {
                var command = conn.CreateCommand();
                command.CommandText = "SELECT userid, email, CONCAT(`last_name`, ' ', `first_name`) as name FROM users";
                conn.Open();
                dict = SerializeHelper.Serialize(command.ExecuteReader());
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
            finally {
                conn.Close();
            }

            if (dict == null)
                return Request.CreateResponse(HttpStatusCode.BadRequest);

            return Request.CreateResponse(HttpStatusCode.OK, dict);
        }
    }
}


text:
import React from 'react';
import { connect } from 'react-redux';

export default class ChatUserList extends React.Component {

  constructor(props) {
    super(props);
  }

  renderUsers() {
    const users = this.props.users || [];

    return users.map((user, i) => {
      return
{user}
;
    });
  }

  render() {
    return (

Users

          {this.renderUsers()}

    );
  }
}


text:
#ifndef __CONFIG_H__
#define __CONFIG_H__

/**
* override byteswap
*/
#define TN_BYTESWAP
#include <stdint.h>
int64_t bswap_64(int64_t x);
int32_t bswap_32(int64_t x);
int16_t bswap_16(int64_t x);
#define ntohll(x) bswap_64 (x)
#define ntohl(x)  bswap_32 (x)
#define ntohs(x)  bswap_16 (x)
#define htonll(x) bswap_64 (x)
#define htonl(x)  bswap_32 (x)
#define htons(x)  bswap_16 (x)

/**
 * Version stuff
 */
#define THRIFT_NANO_VERSION_MAJOR 0
#define THRIFT_NANO_VERSION_MINOR 1
#define THRIFT_NANO_VERSION_PATCH 0

/**
 * Configurable things
 * Note: If you modify this list you may want to update defs.h with defaults
 */

/**
 * Will you allow thrift_nano to allocate memory?
 */
#define THRIFT_ALLOC                    THRIFT_ALLOC_DEF
/**
 * Enabled binary protocol?
 */
#define THRIFT_PROTOCOL_BINARY          THRIFT_PROTOCOL_BINARY_DEF
/**
 * Enabled compact protocol? (requires binary)
 */
#define THRIFT_PROTOCOL_COMPACT         THRIFT_PROTOCOL_COMPACT_DEF

/**
 * Enabled file transport?
 */
#define THRIFT_TRANSPORT_FILE           0
/**
 * Enabled memory transport?
 */
#define THRIFT_TRANSPORT_MEMORY         0

#endif /* __CONFIG_H__ */


text:
using UnityEngine;
using System.Collections;

public class SphereInteraction : UsableObject
{
	override public void OnInteractContinuous (GameObject actor, bool changed)
	{
		Rigidbody sphereBody = GetComponent<Rigidbody> ();
		sphereBody.AddForce (actor.transform.forward * 20f);
	}
}