text:
package broker_test

import (
	"bytes"
	"fmt"

	. "github.com/kubernetes-sigs/service-catalog/cmd/svcat/broker"
	"github.com/kubernetes-sigs/service-catalog/cmd/svcat/command"
	"github.com/kubernetes-sigs/service-catalog/cmd/svcat/test"
	"github.com/kubernetes-sigs/service-catalog/pkg/apis/servicecatalog/v1beta1"
	"github.com/kubernetes-sigs/service-catalog/pkg/svcat"
	servicecatalog "github.com/kubernetes-sigs/service-catalog/pkg/svcat/service-catalog"
	"github.com/kubernetes-sigs/service-catalog/pkg/svcat/service-catalog/service-catalogfakes"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/spf13/pflag"
	"k8s.io/apimachinery/pkg/apis/meta/v1"
)

var _ = Describe("Describe Command", func() {
	Describe("NewDescribeCmd", func() {
		It("Builds and returns a cobra command with the correct flags", func() {
			cxt := &command.Context{}
			cmd := NewDescribeCmd(cxt)
			Expect(*cmd).NotTo(BeNil())
			Expect(cmd.Use).To(Equal("broker NAME"))
			Expect(cmd.Short).To(ContainSubstring("Show details of a specific broker"))
			Expect(cmd.Example).To(ContainSubstring("svcat describe broker asb"))
			Expect(len(cmd.Aliases)).To(Equal(2))
		})
	})

	Describe("Validate", func() {
		It("succeeds if a broker name is provided", func() {
			cmd := DescribeCmd{}
			err := cmd.Validate([]string{"bananabroker"})
			Expect(err).NotTo(HaveOccurred())
		})
		It("errors if a broker name is not provided", func() {
			cmd := DescribeCmd{}
			err := cmd.Validate([]string{})
			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring("a broker name is required"))
		})
	})
	Describe("Run", func() {
		var (
			brokerName               string
			brokerToReturn           *v1beta1.ClusterServiceBroker
			brokerURL                string
			namespace                string
			namespacedBrokerToReturn *v1beta1.ServiceBroker
		)
		BeforeEach(func() {
			brokerName = "foobarbroker"
			brokerURL = "www.foobar.com"
			namespace = "banana-namespace"

			brokerToReturn = &v1beta1.ClusterServiceBroker{
				ObjectMeta: v1.ObjectMeta{
					Name: brokerName,
				},
				Spec: v1beta1.ClusterServiceBrokerSpec{
					CommonServiceBrokerSpec: v1beta1.CommonServiceBrokerSpec{
						URL:                 brokerURL,
						CatalogRestrictions: &v1beta1.CatalogRestrictions{},
					},
				},
			}
			namespacedBrokerToReturn = &v1beta1.ServiceBroker{
				ObjectMeta: v1.ObjectMeta{
					Name:      brokerName,
					Namespace: namespace,
				},
				Spec: v1beta1.ServiceBrokerSpec{
					CommonServiceBrokerSpec: v1beta1.CommonServiceBrokerSpec{
						URL:                 brokerURL,
						CatalogRestrictions: &v1beta1.CatalogRestrictions{},
					},
				},
			}
		})
		It("Calls the pkg/svcat libs RetrieveBrokerByID method with the passed in variables and prints output to the user", func() {
			outputBuffer := &bytes.Buffer{}

			fakeApp, _ := svcat.NewApp(nil, nil, namespace)
			fakeSDK := new(servicecatalogfakes.FakeSvcatClient)
			fakeSDK.RetrieveBrokerByIDReturns(brokerToReturn, nil)
			fakeApp.SvcatClient = fakeSDK
			cxt := svcattest.NewContext(outputBuffer, fakeApp)
			cmd := DescribeCmd{
				Context:    cxt,
				Namespaced: command.NewNamespaced(cxt),
				Name:       brokerName,
				Scoped:     command.NewScoped(),
			}
			cmd.Namespaced.ApplyNamespaceFlags(&pflag.FlagSet{})
			cmd.Scope = servicecatalog.AllScope
			err := cmd.Run()

			Expect(err).NotTo(HaveOccurred())
			Expect(fakeSDK.RetrieveBrokerByIDCallCount()).To(Equal(1))
			returnedName, returnedScopeOpts := fakeSDK.RetrieveBrokerByIDArgsForCall(0)
			Expect(returnedName).To(Equal(brokerName))
			scopeOpts := servicecatalog.ScopeOptions{
				Scope:     servicecatalog.AllScope,
				Namespace: namespace,
			}
			Expect(returnedScopeOpts).To(Equal(scopeOpts))

			output := outputBuffer.String()
			Expect(output).To(ContainSubstring(brokerName))
			Expect(output).To(ContainSubstring(brokerURL))
			Expect(output).To(ContainSubstring("Scope:    cluster"))
		})
		It("prints out a namespaced broker when it only finds a namespace broker", func() {
			outputBuffer := &bytes.Buffer{}

			fakeApp, _ := svcat.NewApp(nil, nil, namespace)
			fakeSDK := new(servicecatalogfakes.FakeSvcatClient)
			fakeSDK.RetrieveBrokerByIDReturns(namespacedBrokerToReturn, nil)
			fakeApp.SvcatClient = fakeSDK
			cxt := svcattest.NewContext(outputBuffer, fakeApp)
			cmd := DescribeCmd{
				Context:    cxt,
				Namespaced: command.NewNamespaced(cxt),
				Name:       brokerName,
				Scoped:     command.NewScoped(),
			}
			cmd.Namespaced.ApplyNamespaceFlags(&pflag.FlagSet{})
			cmd.Scope = servicecatalog.AllScope
			err := cmd.Run()

			Expect(err).NotTo(HaveOccurred())
			Expect(fakeSDK.RetrieveBrokerByIDCallCount()).To(Equal(1))
			returnedName, returnedScopeOpts := fakeSDK.RetrieveBrokerByIDArgsForCall(0)
			Expect(returnedName).To(Equal(brokerName))
			scopeOpts := servicecatalog.ScopeOptions{
				Scope:     servicecatalog.AllScope,
				Namespace: namespace,
			}
			Expect(returnedScopeOpts).To(Equal(scopeOpts))

			output := outputBuffer.String()
			Expect(output).To(ContainSubstring(brokerName))
			Expect(output).To(ContainSubstring(brokerURL))
			Expect(output).To(ContainSubstring("Scope:       namespace "))
		})
		It("bubbles up errors", func() {
			outputBuffer := &bytes.Buffer{}
			errMsg := "incompatible potato"
			errToReturn := fmt.Errorf(errMsg)

			fakeApp, _ := svcat.NewApp(nil, nil, namespace)
			fakeSDK := new(servicecatalogfakes.FakeSvcatClient)
			fakeSDK.RetrieveBrokerByIDReturns(nil, errToReturn)
			fakeApp.SvcatClient = fakeSDK
			cxt := svcattest.NewContext(outputBuffer, fakeApp)
			cmd := DescribeCmd{
				Context:    cxt,
				Namespaced: command.NewNamespaced(cxt),
				Name:       brokerName,
				Scoped:     command.NewScoped(),
			}
			cmd.Namespaced.ApplyNamespaceFlags(&pflag.FlagSet{})
			cmd.Scope = servicecatalog.AllScope
			err := cmd.Run()

			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring(errMsg))

			Expect(fakeSDK.RetrieveBrokerByIDCallCount()).To(Equal(1))
			returnedName, returnedScopeOpts := fakeSDK.RetrieveBrokerByIDArgsForCall(0)
			Expect(returnedName).To(Equal(brokerName))
			scopeOpts := servicecatalog.ScopeOptions{
				Scope:     servicecatalog.AllScope,
				Namespace: namespace,
			}
			Expect(returnedScopeOpts).To(Equal(scopeOpts))
		})
		It("prompts the user for more input when it gets a MultipleBrokersFound error", func() {
			outputBuffer := &bytes.Buffer{}
			errToReturn := fmt.Errorf(servicecatalog.MultipleBrokersFoundError + " for '" + brokerName + "'")

			fakeApp, _ := svcat.NewApp(nil, nil, namespace)
			fakeSDK := new(servicecatalogfakes.FakeSvcatClient)
			fakeSDK.RetrieveBrokerByIDReturns(nil, errToReturn)
			fakeApp.SvcatClient = fakeSDK
			cxt := svcattest.NewContext(outputBuffer, fakeApp)
			cmd := DescribeCmd{
				Context:    cxt,
				Namespaced: command.NewNamespaced(cxt),
				Name:       brokerName,
				Scoped:     command.NewScoped(),
			}
			cmd.Namespaced.ApplyNamespaceFlags(&pflag.FlagSet{})
			cmd.Scope = servicecatalog.AllScope
			err := cmd.Run()

			Expect(err).To(HaveOccurred())
			Expect(err.Error()).To(ContainSubstring(servicecatalog.MultipleBrokersFoundError))
			Expect(err.Error()).To(ContainSubstring("specify a scope with --scope"))

			Expect(fakeSDK.RetrieveBrokerByIDCallCount()).To(Equal(1))
			returnedName, returnedScopeOpts := fakeSDK.RetrieveBrokerByIDArgsForCall(0)
			Expect(returnedName).To(Equal(brokerName))
			scopeOpts := servicecatalog.ScopeOptions{
				Scope:     servicecatalog.AllScope,
				Namespace: namespace,
			}
			Expect(returnedScopeOpts).To(Equal(scopeOpts))
		})
	})
})


text:
import numpy as np
import pybinding as pb
from pybinding.constants import pi, phi0, hbar

__all__ = ['mass_term', 'coulomb_potential', 'constant_magnetic_field',
           'triaxial_strain', 'gaussian_bump']

def mass_term(delta):
    """Break sublattice symmetry, make massive Dirac electrons, open a band gap

    Only for monolayer graphene.

    Parameters
    ----------
    delta : float
        Onsite energy +delta is added to sublattice 'A' and -delta to 'B'.
    """
    @pb.onsite_energy_modifier
    def onsite(energy, sub_id):
        energy[sub_id == "A"] += delta
        energy[sub_id == "B"] -= delta
        return energy

    return onsite

def coulomb_potential(beta, cutoff_radius=.0, offset=(0, 0, 0)):
    """A Coulomb potential created by an impurity in graphene

    Parameters
    ----------
    beta : float
       Charge of the impurity [unitless].
    cutoff_radius : float
        Cut off the potential below this radius [nm].
    offset: array_like
        Position of the charge.
    """
    from .constants import vf
    # beta is dimensionless -> multiply hbar*vF makes it [eV * nm]
    scaled_beta = beta * hbar * vf

    @pb.onsite_energy_modifier
    def potential(energy, x, y, z):
        x0, y0, z0 = offset
        r = np.sqrt((x - x0)**2 + (y - y0)**2 + (z - z0)**2)
        r[r < cutoff_radius] = cutoff_radius
        return energy - scaled_beta / r

    return potential

def constant_magnetic_field(magnitude):
    """Constant magnetic field in the z-direction, perpendicular to the graphene plane

    Parameters
    ----------
    magnitude : float
        In units of Tesla.
    """
    scale = 1e-18  # both the vector potential and coordinates are in [nm] -> scale to [m]
    const = scale * 2 * pi / phi0

    @pb.hopping_energy_modifier(is_complex=True)
    def func(energy, x1, y1, x2, y2):
        # vector potential along the x-axis
        vp_x = 0.5 * magnitude * (y1 + y2)
        # integral of (A * dl) from position 1 to position 2
        peierls = vp_x * (x1 - x2)
        return energy * np.exp(1j * const * peierls)

    return func

@pb.hopping_energy_modifier
def strained_hopping(energy, x1, y1, z1, x2, y2, z2):
    from .constants import a_cc, beta

    l = np.sqrt((x1 - x2)**2 + (y1 - y2)**2 + (z1 - z2)**2)
    w = l / a_cc - 1
    return energy * np.exp(-beta * w)

def triaxial_strain(magnetic_field):
    """Triaxial strain corresponding to a homogeneous pseudo-magnetic field

    Parameters
    ----------
    magnetic_field : float
        Intensity of the pseudo-magnetic field to induce.
    """
    from .constants import a_cc, beta

    def field_to_strain(field):
        return field * a_cc / (4 * hbar * beta) * 10**-18

    c = field_to_strain(magnetic_field)
    zigzag_direction = False

    @pb.site_position_modifier
    def displacement(x, y, z):
        if not zigzag_direction:
            ux = 2*c * x*y
            uy = c * (x**2 - y**2)
        else:
            ux = c * (y**2 - x**2)
            uy = 2*c * x*y

        x += ux
        y += uy

        return x, y, z

    return displacement, strained_hopping

def gaussian_bump(height, sigma, center=(0, 0)):
    """Gaussian bump deformation

    Parameters
    ----------
    height : float
        Height of the bump [nm].
    sigma : float
        Gaussian sigma parameter: controls the width of the bump [nm].
    center : array_like
        Position of the center of the bump.
    """
    @pb.site_position_modifier
    def displacement(x, y):
        x0, y0 = center
        r2 = (x - x0)**2 + (y - y0)**2
        z = height * np.exp(-r2 / sigma**2)
        return x, y, z

    return displacement, strained_hopping

redpajama_set_name: RedPajamaGithub


text:
from gi.repository import GObject
from gi.repository import Gtk
from blueman.Sdp import *
from blueman.Functions import *
from blueman.main.SignalTracker import SignalTracker
from blueman.gui.manager.ManagerProgressbar import ManagerProgressbar
from blueman.main.Config import Config
from blueman.main.AppletService import AppletService
from blueman.gui.MessageArea import MessageArea
from blueman.bluez.BlueZInterface import BlueZInterface

from blueman.Lib import rfcomm_list

def get_x_icon(icon_name, size):
    ic = get_icon(icon_name, size)
    x = get_icon("blueman-x", size)
    pixbuf = composite_icon(ic, [(x, 0, 0, 255)])

    return pixbuf

class ManagerDeviceMenu(Gtk.Menu):
    __ops__ = {}
    __instances__ = []

    def __init__(self, blueman):
        GObject.GObject.__init__(self)
        self.Blueman = blueman
        self.SelectedDevice = None

        self.is_popup = False

        #object, args,
        self.Signals = SignalTracker()
        self.MainSignals = SignalTracker()

        self.MainSignals.Handle("gobject", self.Blueman.List, "device-property-changed",
                                self.on_device_property_changed)

        ManagerDeviceMenu.__instances__.append(self)

        self.Generate()

    def __del__(self):
        dprint("deleting devicemenu")

    #	GObject.GObject.__del__(self)

    def popup(self, *args):
        self.is_popup = True

        self.MainSignals.DisconnectAll()
        self.MainSignals.Handle("gobject", self.Blueman.List, "device-property-changed",
                                self.on_device_property_changed)

        def disconnectall(x):
            self.MainSignals.DisconnectAll()

        self.MainSignals.Handle("gobject", self, "selection-done", disconnectall)

        self.Generate()

        Gtk.Menu.popup(self, *args)

    def clear(self):
        self.Signals.DisconnectAll()

        def each(child, data):
            self.remove(child)
            child.destroy()

        self.foreach(each, None)

    def set_op(self, device, message):
        ManagerDeviceMenu.__ops__[device.get_object_path()] = message
        for inst in ManagerDeviceMenu.__instances__:
            dprint("op: regenerating instance", inst)
            if inst.SelectedDevice == self.SelectedDevice and not (inst.is_popup and not inst.props.visible):
                inst.Generate()

    def get_op(self, device):
        try:
            return ManagerDeviceMenu.__ops__[device.get_object_path()]
        except:
            return None

    def unset_op(self, device):
        del ManagerDeviceMenu.__ops__[device.get_object_path()]
        for inst in ManagerDeviceMenu.__instances__:
            dprint("op: regenerating instance", inst)
            if inst.SelectedDevice == self.SelectedDevice and not (inst.is_popup and not inst.props.visible):
                inst.Generate()

    def service_property_changed(self, key, value):
        if key == "Connected":
            self.Generate()

    def on_connect(self, item, device, service_id=None, *args):
        def success(*args2):
            try:
                uuid16 = sdp_get_serial_type(device.Address, args[0])
            except:
                uuid16 = 0

            dprint("success", args2)
            prog.message(_("Success!"))

            if service_id == "serial" and SERIAL_PORT_SVCLASS_ID in uuid16:
                MessageArea.show_message(_("Serial port connected to %s") % args2[0], Gtk.STOCK_DIALOG_INFO)
            else:
                MessageArea.close()

            self.unset_op(device)

        def fail(*args):
            prog.message(_("Failed"))

            self.unset_op(device)
            dprint("fail", args)
            MessageArea.show_message(_("Connection Failed: ") + e_(str(args[0])))

        self.set_op(device, _("Connecting..."))
        prog = ManagerProgressbar(self.Blueman, False)

        try:
            appl = AppletService()
        except:
            dprint("** Failed to connect to applet")
            fail()
            return
        try:
            appl.SetTimeHint(Gtk.get_current_event_time())
        except:
            pass

        if service_id:
            svc = device.Services[service_id]

            if service_id == "network":
                uuid = args[0]
                appl.ServiceProxy(svc.get_interface_name(),
                                  svc.get_object_path(),
                                  "Connect",
                                  [uuid],
                                  reply_handler=success,
                                  error_handler=fail, timeout=200)

            elif service_id == "input":
                appl.ServiceProxy(svc.get_interface_name(),
                                  svc.get_object_path(),
                                  "Connect", [],
                                  reply_handler=success,
                                  error_handler=fail, timeout=200)

            elif service_id == "serial":
                uuid = str(args[0])

                appl.RfcommConnect(device.get_object_path(),
                                   uuid,
                                   reply_handler=success,
                                   error_handler=fail, timeout=200)

            else:
                appl.ServiceProxy(svc.get_interface_name(),
                                  svc.get_object_path(),
                                  "Connect", [],
                                  reply_handler=success,
                                  error_handler=fail, timeout=200)
        else:
            appl.ServiceProxy(device.get_interface_name(), device.get_object_path(), 'Connect', [],
                              reply_handler=success, error_handler=fail, timeout=200)

        prog.start()

    def on_disconnect(self, item, device, service_id=None, *args):
        if service_id == "serial":
            try:
                appl = AppletService()
            except:
                dprint("** Failed to connect to applet")
            else:
                appl.RfcommDisconnect(device.get_object_path(), args[0])
                self.Generate()
        else:
            try:
                appl = AppletService()
            except:
                dprint("** Failed to connect to applet")
                return
            if service_id:
                connection_object = device.Services[service_id]
            else:
                connection_object = device
            appl.ServiceProxy(connection_object.get_interface_name(),
                              connection_object.get_object_path(), "Disconnect", [])

    def on_device_property_changed(self, List, device, iter, (key, value)):
    #		print "menu:", key, value
        if List.compare(iter, List.selected()):
            if key == "Connected" \
                or key == "Fake" \
                or key == "UUIDs" \
                or key == "Trusted" \
                or key == "Paired":
                self.Generate()

    def Generate(self):
        self.clear()

        appl = AppletService()

        items = []

        if not self.is_popup or self.props.visible:
            selected = self.Blueman.List.selected()
            if not selected:
                return
            device = self.Blueman.List.get(selected, "device")["device"]
        else:
            (x, y) = self.Blueman.List.get_pointer()
            path = self.Blueman.List.get_path_at_pos(x, y)
            if path != None:
                device = self.Blueman.List.get(path[0], "device")["device"]
            else:
                return

        if not device.Valid:
            return
        self.SelectedDevice = device

        op = self.get_op(device)

        if op != None:
            item = create_menuitem(op, get_icon("gtk-connect", 16))
            item.props.sensitive = False
            item.show()
            self.append(item)
            return

        rets = self.Blueman.Plugins.Run("on_request_menu_items", self, device)

        for ret in rets:
            if ret:
                for (item, pos) in ret:
                    items.append((pos, item))

        if device.Fake:
            item = create_menuitem(_("_Add Device"), get_icon("gtk-add", 16))
            self.Signals.Handle("gobject", item, "activate",
                                lambda x: self.Blueman.add_device(device))
            item.show()
            self.append(item)
            item.props.tooltip_text = _("Add this device to known devices list")

            item = create_menuitem(_("_Setup..."), get_icon("gtk-properties", 16))
            self.append(item)
            self.Signals.Handle("gobject", item, "activate",
                                lambda x: self.Blueman.setup(device))
            item.show()
            item.props.tooltip_text = _("Run the setup assistant for this device")

            item = create_menuitem(_("_Pair"), get_icon("gtk-dialog-authentication", 16))
            self.Signals.Handle("gobject", item, "activate",
                                lambda x: self.Blueman.bond(device))
            self.append(item)
            item.show()
            item.props.tooltip_text = _("Pair with the device")

            item = Gtk.SeparatorMenuItem()
            item.show()
            self.append(item)

            send_item = create_menuitem(_("Send a _File..."), get_icon("gtk-copy", 16))
            self.Signals.Handle("gobject", send_item, "activate",
                                lambda x: self.Blueman.send(device))
            send_item.show()
            self.append(send_item)

        else:
            dprint(device.Alias)

            item = None

            have_disconnectables = False
            have_connectables = False

            if True in map(lambda x: x[0] >= 100 and x[0] < 200, items):
                have_disconnectables = True

            if True in map(lambda x: x[0] < 100, items):
                have_connectables = True

            if True in map(lambda x: x[0] >= 200, items) and (have_connectables or have_disconnectables):
                item = Gtk.SeparatorMenuItem()
                item.show()
                items.append((199, item))

            if have_connectables:
                item = Gtk.MenuItem()
                label = Gtk.Label()
                label.set_markup(_("Connect To:"))
                label.props.xalign = 0.0

                label.show()
                item.add(label)
                item.props.sensitive = False
                item.show()
                items.append((0, item))

            if have_disconnectables:
                item = Gtk.MenuItem()
                label = Gtk.Label()
                label.set_markup(_("Disconnect:"))
                label.props.xalign = 0.0

                label.show()
                item.add(label)
                item.props.sensitive = False
                item.show()
                items.append((99, item))

            items.sort(lambda a, b: cmp(a[0], b[0]))
            for priority, item in items:
                self.append(item)

            if items != []:
                item = Gtk.SeparatorMenuItem()
                item.show()
                self.append(item)

            del items

            send_item = create_menuitem(_("Send a _File..."), get_icon("gtk-copy", 16))
            send_item.props.sensitive = False
            self.append(send_item)
            send_item.show()

            browse_item = create_menuitem(_("_Browse Device..."), get_icon("gtk-open", 16))
            browse_item.props.sensitive = False
            self.append(browse_item)
            browse_item.show()

            uuids = device.UUIDs
            for uuid in uuids:
                uuid16 = uuid128_to_uuid16(uuid)
                if uuid16 == OBEX_OBJPUSH_SVCLASS_ID:
                    self.Signals.Handle("gobject", send_item, "activate", lambda x: self.Blueman.send(device))
                    send_item.props.sensitive = True

                if uuid16 == OBEX_FILETRANS_SVCLASS_ID:
                    self.Signals.Handle("gobject", browse_item, "activate", lambda x: self.Blueman.browse(device))
                    browse_item.props.sensitive = True

            item = Gtk.SeparatorMenuItem()
            item.show()
            self.append(item)

            item = create_menuitem(_("_Pair"), get_icon("gtk-dialog-authentication", 16))
            item.props.tooltip_text = _("Create pairing with the device")
            self.append(item)
            item.show()
            if not device.Paired:
                self.Signals.Handle("gobject", item, "activate", lambda x: self.Blueman.bond(device))
            else:
                item.props.sensitive = False

            if not device.Trusted:
                item = create_menuitem(_("_Trust"), get_icon("blueman-trust", 16))
                self.Signals.Handle("gobject", item, "activate", lambda x: self.Blueman.toggle_trust(device))
                self.append(item)
                item.show()
            else:
                item = create_menuitem(_("_Untrust"), get_icon("blueman-untrust", 16))
                self.append(item)
                self.Signals.Handle("gobject", item, "activate", lambda x: self.Blueman.toggle_trust(device))
                item.show()
            item.props.tooltip_text = _("Mark/Unmark this device as trusted")

            item = create_menuitem(_("_Setup..."), get_icon("gtk-properties", 16))
            self.append(item)
            self.Signals.Handle("gobject", item, "activate", lambda x: self.Blueman.setup(device))
            item.show()
            item.props.tooltip_text = _("Run the setup assistant for this device")

            if BlueZInterface.get_interface_version()[0] < 5:
                def update_services(item):
                    def reply():
                        self.unset_op(device)
                        prog.message(_("Success!"))
                        MessageArea.close()

                    def error(*args):
                        self.unset_op(device)
                        prog.message(_("Fail"))
                        MessageArea.show_message(e_(str(args[0])))

                    prog = ManagerProgressbar(self.Blueman, False, _("Refreshing"))
                    prog.start()
                    self.set_op(device, _("Refreshing Services..."))
                    appl.RefreshServices(device.get_object_path(), reply_handler=reply, error_handler=error)

                item = create_menuitem(_("Refresh Services"), get_icon("gtk-refresh", 16))
                self.append(item)
                self.Signals.Handle(item, "activate", update_services)
                item.show()

            item = Gtk.SeparatorMenuItem()
            item.show()
            self.append(item)

            item = create_menuitem(_("_Remove..."), get_icon("gtk-delete", 16))
            self.Signals.Handle(item, "activate", lambda x: self.Blueman.remove(device))
            self.append(item)
            item.show()
            item.props.tooltip_text = _("Remove this device from the known devices list")

            item = Gtk.SeparatorMenuItem()
            item.show()
            self.append(item)

            item = create_menuitem(_("_Disconnect"), get_icon("gtk-disconnect", 16))
            item.props.tooltip_text = _("Forcefully disconnect the device")

            self.append(item)
            item.show()

            def on_disconnect(item):
                def finished(*args):
                    self.unset_op(device)

                self.set_op(device, _("Disconnecting..."))
                self.Blueman.disconnect(device,
                                        reply_handler=finished,
                                        error_handler=finished)

            if device.Connected:
                self.Signals.Handle(item, "activate", on_disconnect)

            else:
                item.props.sensitive = False


text:
#region copyright

/* * * * * * * * * * * * * * * * * * * * * * * * * */
/* Carl Zeiss IMT (IZfM Dresden)                   */
/* Softwaresystem PiWeb                            */
/* (c) Carl Zeiss 2017                             */
/* * * * * * * * * * * * * * * * * * * * * * * * * */

#endregion

namespace Zeiss.PiWeb.Api.Rest.Common.Client
{
	#region usings

	using System;
	using JetBrains.Annotations;

	#endregion

	/// <summary>
	/// Interface for a cache that defines a method for clearing a cache entry for a specific <see cref="Uri" />.
	/// </summary>
	public interface ICacheClearable
	{
		#region methods

		/// <summary>
		/// Clears a cache entry for the given <see cref="Uri" />.
		/// </summary>
		/// <param name="uri">The address for which a cache entry should be cleared.</param>
		void InvalidateCache( [NotNull] Uri uri );

		#endregion
	}
}


text:
namespace g{namespace Android{namespace android{namespace graphics{struct Bitmap;}}}}
namespace g{namespace Fuse{namespace Android{namespace Controls{struct BitmapFactory;}}}}
namespace g{namespace Uno{namespace Collections{struct Dictionary;}}}
namespace g{namespace Uno{namespace UX{struct BundleFileSource;}}}
namespace g{namespace Uno{namespace UX{struct FileSource;}}}

namespace g{
namespace Fuse{
namespace Android{
namespace Controls{

// internal static extern class BitmapFactory :730
// {
uClassType* BitmapFactory_typeof();
void BitmapFactory__GetBitmap_fn(::g::Uno::UX::FileSource* file, ::g::Android::android::graphics::Bitmap** __retval);
void BitmapFactory__GetBitmapFromBundleFile_fn(::g::Uno::UX::BundleFileSource* bundleFile, ::g::Android::android::graphics::Bitmap** __retval);
void BitmapFactory__GetBitmapFromFileSource_fn(::g::Uno::UX::FileSource* file, ::g::Android::android::graphics::Bitmap** __retval);

struct BitmapFactory : uObject
{
    static uSStrong< ::g::Uno::Collections::Dictionary*> _bitmapCache_;
    static uSStrong< ::g::Uno::Collections::Dictionary*>& _bitmapCache() { return BitmapFactory_typeof()->Init(), _bitmapCache_; }

    static ::g::Android::android::graphics::Bitmap* GetBitmap(::g::Uno::UX::FileSource* file);
    static ::g::Android::android::graphics::Bitmap* GetBitmapFromBundleFile(::g::Uno::UX::BundleFileSource* bundleFile);
    static ::g::Android::android::graphics::Bitmap* GetBitmapFromFileSource(::g::Uno::UX::FileSource* file);
};
// }

}}}} // ::g::Fuse::Android::Controls


text:
package org.codehaus.enunciate.template.strategies;

import net.sf.jelly.apt.strategies.FileStrategy;
import net.sf.jelly.apt.strategies.MissingParameterException;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * A file strategy that takes into account a base directory.
 *
 * @author Ryan Heaton
 */
public class EnunciateFileStrategy extends FileStrategy {

  private final File outputDirectory;

  public EnunciateFileStrategy(File outputDirectory) {
    this.outputDirectory = outputDirectory;
  }

  @Override
  public PrintWriter getWriter() throws IOException, MissingParameterException {
    File dir = this.outputDirectory;
    if (dir == null) {
      //no output directory is specified,
      return super.getWriter();
    }
    else {
      String pckg = getPackage();
      if ((pckg != null) && (pckg.trim().length() > 0)) {
        String[] dirnames = pckg.split("\\.");
        for (String dirname : dirnames) {
          dir = new File(dir, dirname);
        }
      }
      dir.mkdirs();

      String charset = getCharset();
      if (charset != null) {
        return new PrintWriter(new File(dir, getName()), charset);
      }
      else {
        return new PrintWriter(new File(dir, getName()));
      }
    }
  }
}


text:
import json
from rest_framework import serializers as ser
from rest_framework import exceptions

from api.base.utils import absolute_reverse
from api.files.serializers import FileSerializer
from api.nodes.serializers import NodeSerializer, NodeProviderSerializer
from api.nodes.serializers import NodeLinksSerializer, NodeLicenseSerializer
from api.nodes.serializers import NodeContributorsSerializer, NodeTagField
from api.base.serializers import (IDField, RelationshipField, LinksField, HideIfWithdrawal,
                                  FileCommentRelationshipField, NodeFileHyperLinkField, HideIfRegistration, JSONAPIListField)

class RegistrationSerializer(NodeSerializer):

    category_choices = NodeSerializer.category_choices
    category_choices_string = NodeSerializer.category_choices_string
    category = HideIfWithdrawal(ser.ChoiceField(choices=category_choices, help_text="Choices: " + category_choices_string))

    date_modified = HideIfWithdrawal(ser.DateTimeField(read_only=True))
    fork = HideIfWithdrawal(ser.BooleanField(read_only=True, source='is_fork'))
    collection = HideIfWithdrawal(ser.BooleanField(read_only=True, source='is_collection'))
    node_license = HideIfWithdrawal(NodeLicenseSerializer())
    tags = HideIfWithdrawal(JSONAPIListField(child=NodeTagField(), required=False))
    public = HideIfWithdrawal(ser.BooleanField(source='is_public', required=False,
                                               help_text='Nodes that are made public will give read-only access '
                                        'to everyone. Private nodes require explicit read '
                                        'permission. Write and admin access are the same for '
                                        'public and private nodes. Administrators on a parent '
                                        'node have implicit read permissions for all child nodes'))
    current_user_permissions = HideIfWithdrawal(ser.SerializerMethodField(help_text='List of strings representing the permissions '
                                                                   'for the current user on this node.'))

    pending_embargo_approval = HideIfWithdrawal(ser.BooleanField(read_only=True, source='is_pending_embargo',
                                                                 help_text='The associated Embargo is awaiting approval by project admins.'))
    pending_registration_approval = HideIfWithdrawal(ser.BooleanField(source='is_pending_registration', read_only=True,
                                                                      help_text='The associated RegistrationApproval is awaiting approval by project admins.'))
    pending_withdrawal = HideIfWithdrawal(ser.BooleanField(source='is_pending_retraction', read_only=True,
                                                           help_text='The registration is awaiting withdrawal approval by project admins.'))
    withdrawn = ser.BooleanField(source='is_retracted', read_only=True,
                                 help_text='The registration has been withdrawn.')

    date_registered = ser.DateTimeField(source='registered_date', read_only=True, help_text='Date time of registration.')
    embargo_end_date = HideIfWithdrawal(ser.SerializerMethodField(help_text='When the embargo on this registration will be lifted.'))

    withdrawal_justification = ser.CharField(source='retraction.justification', read_only=True)
    template_from = HideIfWithdrawal(ser.CharField(required=False, allow_blank=False, allow_null=False,
                help_text='Specify a node id for a node you would like to use as a template for the '
                'new node. Templating is like forking, except that you do not copy the '
                'files, only the project structure. Some information is changed on the top '
                'level project by submitting the appropriate fields in the request body, '
                'and some information will not change. By default, the description will '
                'be cleared and the project will be made private.'))
    registration_supplement = ser.SerializerMethodField()
    registered_meta = HideIfWithdrawal(ser.SerializerMethodField(
        help_text='A dictionary with supplemental registration questions and responses.'))

    registered_by = HideIfWithdrawal(RelationshipField(
        related_view='users:user-detail',
        related_view_kwargs={'user_id': '<registered_user_id>'}
    ))

    registered_from = HideIfWithdrawal(RelationshipField(
        related_view='nodes:node-detail',
        related_view_kwargs={'node_id': '<registered_from_id>'}
    ))

    children = HideIfWithdrawal(RelationshipField(
        related_view='registrations:registration-children',
        related_view_kwargs={'node_id': '<pk>'},
        related_meta={'count': 'get_node_count'},
    ))

    comments = HideIfWithdrawal(RelationshipField(
        related_view='registrations:registration-comments',
        related_view_kwargs={'node_id': '<pk>'},
        related_meta={'unread': 'get_unread_comments_count'}))

    contributors = RelationshipField(
        related_view='registrations:registration-contributors',
        related_view_kwargs={'node_id': '<pk>'},
        related_meta={'count': 'get_contrib_count'}
    )

    files = HideIfWithdrawal(RelationshipField(
        related_view='registrations:registration-providers',
        related_view_kwargs={'node_id': '<pk>'}
    ))

    wikis = HideIfWithdrawal(RelationshipField(
        related_view='registrations:registration-wikis',
        related_view_kwargs={'node_id': '<pk>'},
    ))

    forked_from = HideIfWithdrawal(RelationshipField(
        related_view=lambda n: 'registrations:registration-detail' if getattr(n, 'is_registration', False) else 'nodes:node-detail',
        related_view_kwargs={'node_id': '<forked_from_id>'}
    ))

    license = HideIfWithdrawal(RelationshipField(
        related_view='licenses:license-detail',
        related_view_kwargs={'license_id': '<node_license.node_license._id>'},
    ))

    forks = HideIfWithdrawal(RelationshipField(
        related_view='registrations:registration-forks',
        related_view_kwargs={'node_id': '<pk>'}
    ))

    node_links = HideIfWithdrawal(RelationshipField(
        related_view='registrations:registration-pointers',
        related_view_kwargs={'node_id': '<pk>'},
        related_meta={'count': 'get_pointers_count'}
    ))

    parent = HideIfWithdrawal(RelationshipField(
        related_view='registrations:registration-detail',
        related_view_kwargs={'node_id': '<parent_node._id>'},
        filter_key='parent_node'
    ))

    logs = HideIfWithdrawal(RelationshipField(
        related_view='registrations:registration-logs',
        related_view_kwargs={'node_id': '<pk>'},
    ))

    root = HideIfWithdrawal(RelationshipField(
        related_view='registrations:registration-detail',
        related_view_kwargs={'node_id': '<root._id>'}
    ))

    affiliated_institutions = HideIfWithdrawal(RelationshipField(
        related_view='registrations:registration-institutions',
        related_view_kwargs={'node_id': '<pk>'}
    ))
    registrations = HideIfRegistration(RelationshipField(
        related_view='nodes:node-registrations',
        related_view_kwargs={'node_id': '<pk>'}
    ))
    identifiers = HideIfWithdrawal(RelationshipField(
        related_view='registrations:identifier-list',
        related_view_kwargs={'node_id': '<pk>'}
    ))

    # TODO: Finish me

    # TODO: Override create?

    links = LinksField({'self': 'get_registration_url', 'html': 'get_absolute_html_url'})

    def get_registration_url(self, obj):
        return absolute_reverse('registrations:registration-detail', kwargs={'node_id': obj._id})

    def get_absolute_url(self, obj):
        return self.get_registration_url(obj)

    def get_registered_meta(self, obj):
        if obj.registered_meta:
            meta_values = obj.registered_meta.values()[0]
            try:
                return json.loads(meta_values)
            except TypeError:
                return meta_values
            except ValueError:
                return meta_values
        return None

    def get_embargo_end_date(self, obj):
        if obj.embargo_end_date:
            return obj.embargo_end_date
        return None

    def get_registration_supplement(self, obj):
        if obj.registered_schema:
            schema = obj.registered_schema[0]
            if schema is None:
                return None
            return schema.name
        return None

    def get_current_user_permissions(self, obj):
        return NodeSerializer.get_current_user_permissions(self, obj)

    def update(self, *args, **kwargs):
        raise exceptions.APIException('Registrations cannot be modified.')

    class Meta:
        type_ = 'registrations'

class RegistrationDetailSerializer(RegistrationSerializer):
    """
    Overrides NodeSerializer to make id required.
    """
    id = IDField(source='_id', required=True)

class RegistrationNodeLinksSerializer(NodeLinksSerializer):
    def get_absolute_url(self, obj):
        node_id = self.context['request'].parser_context['kwargs']['node_id']
        return absolute_reverse(
            'registrations:registration-pointer-detail',
            kwargs={
                'node_id': node_id,
                'node_link_id': obj._id
            }
        )

class RegistrationContributorsSerializer(NodeContributorsSerializer):
    def get_absolute_url(self, obj):
        node_id = self.context['request'].parser_context['kwargs']['node_id']
        return absolute_reverse(
            'registrations:registration-contributor-detail',
            kwargs={
                'node_id': node_id,
                'user_id': obj._id
            }
        )

class RegistrationFileSerializer(FileSerializer):

    files = NodeFileHyperLinkField(
        related_view='registrations:registration-files',
        related_view_kwargs={'node_id': '<node_id>', 'path': '<path>', 'provider': '<provider>'},
        kind='folder'
    )

    comments = FileCommentRelationshipField(related_view='registrations:registration-comments',
                                            related_view_kwargs={'node_id': '<node._id>'},
                                            related_meta={'unread': 'get_unread_comments_count'},
                                            filter={'target': 'get_file_guid'})

class RegistrationProviderSerializer(NodeProviderSerializer):
    """
    Overrides NodeProviderSerializer to lead to correct registration file links
    """
    files = NodeFileHyperLinkField(
        related_view='registrations:registration-files',
        related_view_kwargs={'node_id': '<node_id>', 'path': '<path>', 'provider': '<provider>'},
        kind='folder',
        never_embed=True
    )


text:
module Searchable
  extend ActiveSupport::Concern

  class SearchVector < Struct.new(:document, :weight)
  end

  def self.search_configuration
   if Rails.env.test? # Migrations don't run on test database :(
     "spanish"
   else
     "es"
   end
  end

  included do
    after_save :update_search_metadata
  end

  class_methods do
    def search(text)
      query = <<-SQL
       SELECT #{table_name}.*
       FROM #{table_name}, plainto_tsquery(?, ?) as search_text
       WHERE (lexemes @@ search_text)
       ORDER BY ts_rank(lexemes, search_text) DESC;
      SQL
      find_by_sql [query, Searchable.search_configuration, text]
    end
  end

  def update_search_metadata
    search_vector_sql = text_search_vectors.map do |search_vector|
      "setweight(to_tsvector(
       #{ActiveRecord::Base.sanitize(Searchable.search_configuration)},
       #{ActiveRecord::Base.sanitize(search_vector.document)}),
       #{ActiveRecord::Base.sanitize(search_vector.weight)}
      )"
    end.join("||")

    ActiveRecord::Base.connection.execute <<-SQL
     UPDATE #{self.class.table_name}
     SET lexemes = #{search_vector_sql}
     WHERE #{self.class.table_name}.id = #{ActiveRecord::Base.sanitize(self.id)}
    SQL
  end
end


text:
package com.microsoft.azure.management.containerservice.v2019_06_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Information about a service principal identity for the cluster to use for
 * manipulating Azure APIs.
 */
public class ManagedClusterServicePrincipalProfile {
    /**
     * The ID for the service principal.
     */
    @JsonProperty(value = "clientId", required = true)
    private String clientId;

    /**
     * The secret password associated with the service principal in plain text.
     */
    @JsonProperty(value = "secret")
    private String secret;

    /**
     * Get the ID for the service principal.
     *
     * @return the clientId value
     */
    public String clientId() {
        return this.clientId;
    }

    /**
     * Set the ID for the service principal.
     *
     * @param clientId the clientId value to set
     * @return the ManagedClusterServicePrincipalProfile object itself.
     */
    public ManagedClusterServicePrincipalProfile withClientId(String clientId) {
        this.clientId = clientId;
        return this;
    }

    /**
     * Get the secret password associated with the service principal in plain text.
     *
     * @return the secret value
     */
    public String secret() {
        return this.secret;
    }

    /**
     * Set the secret password associated with the service principal in plain text.
     *
     * @param secret the secret value to set
     * @return the ManagedClusterServicePrincipalProfile object itself.
     */
    public ManagedClusterServicePrincipalProfile withSecret(String secret) {
        this.secret = secret;
        return this;
    }

}


text:
namespace agent {
namespace asan {

class AsanLogger;

class HotPatchingAsanRuntime {
 public:
  // Hot patching Asan transform instruments the entry point of the modules so
  // that this function is called before each DllMain call of the instrumented
  // modules. At this point the code of the hot patching runtime module is
  // already loaded so, this is a good place to do hot patching.
  // @param entry_frame A frame containing the return address and the parameters
  //     of the original DllMain function.
  static void WINAPI DllMainEntryHook(agent::EntryFrame* entry_frame,
                                      FuncAddr function);

  // Access to the singleton class.
  // @returns the hot patching Asan runtime.
  static HotPatchingAsanRuntime* GetInstance() {
    return Singleton<HotPatchingAsanRuntime>::get();
  }

  // Activates the hot patching Asan mode on a given module.
  // @param instance The handle to the module.
  // NOTE: The current implementation of this function is not thread-safe. This
  //     is not a problem for now, because we call this function under the
  //     loader lock.
  bool HotPatch(HINSTANCE instance);

  // Sets up the hot patching Asan runtime.
  void SetUp();

  // Gets the set of modules that have already been hot patched.
  // @returns a set containing the handles of the hot patched modules.
  const std::unordered_set<HMODULE>& hot_patched_modules() {
    return hot_patched_modules_;
  }

  // Gets a logger.
  AsanLogger* logger() {
    DCHECK_NE(static_cast<AsanLogger*>(nullptr), logger_.get());
    return logger_.get();
  }

 protected:
  void SetUpLogger();

  // The shared logger instance that will be used to report errors and runtime
  // information.
  scoped_ptr<AsanLogger> logger_;

  // Set of modules that have already been hot patched. We don't want to hot
  // patch the same module twice.
  std::unordered_set<HMODULE> hot_patched_modules_;

 private:
  friend struct DefaultSingletonTraits<HotPatchingAsanRuntime>;
  friend class HotPatchingAsanRuntimeTest;

  HotPatchingAsanRuntime();
  ~HotPatchingAsanRuntime();

  DISALLOW_COPY_AND_ASSIGN(HotPatchingAsanRuntime);
};

}  // namespace asan
}  // namespace agent

extern "C" {

// Exposes the hot patching Asan runtime to the unittests.
// @returns the runtime instance.
agent::asan::HotPatchingAsanRuntime* hp_asan_GetActiveHotPatchingAsanRuntime();

}

#endif  // SYZYGY_AGENT_ASAN_HOT_PATCHING_ASAN_RUNTIME_H_


text:
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Graphics;
using osu.Framework.Graphics.Transforms;

namespace osu.Game.Storyboards.Drawables
{
    internal interface IFlippable : ITransformable
    {
        bool FlipH { get; set; }
        bool FlipV { get; set; }
    }

    internal class TransformFlipH : Transform<bool, IFlippable>
    {
        private bool valueAt(double time)
            => time < EndTime ? StartValue : EndValue;

        public override string TargetMember => nameof(IFlippable.FlipH);

        protected override void Apply(IFlippable d, double time) => d.FlipH = valueAt(time);
        protected override void ReadIntoStartValue(IFlippable d) => StartValue = d.FlipH;
    }

    internal class TransformFlipV : Transform<bool, IFlippable>
    {
        private bool valueAt(double time)
            => time < EndTime ? StartValue : EndValue;

        public override string TargetMember => nameof(IFlippable.FlipV);

        protected override void Apply(IFlippable d, double time) => d.FlipV = valueAt(time);
        protected override void ReadIntoStartValue(IFlippable d) => StartValue = d.FlipV;
    }

    internal static class FlippableExtensions
    {
        /// <summary>
        /// Adjusts <see cref="IFlippable.FlipH"/> after a delay.
        /// </summary>
        /// <returns>A <see cref="TransformSequence{T}"/> to which further transforms can be added.</returns>
        public static TransformSequence<T> TransformFlipH<T>(this T flippable, bool newValue, double delay = 0)
            where T : class, IFlippable
            => flippable.TransformTo(flippable.PopulateTransform(new TransformFlipH(), newValue, delay));

        /// <summary>
        /// Adjusts <see cref="IFlippable.FlipV"/> after a delay.
        /// </summary>
        /// <returns>A <see cref="TransformSequence{T}"/> to which further transforms can be added.</returns>
        public static TransformSequence<T> TransformFlipV<T>(this T flippable, bool newValue, double delay = 0)
            where T : class, IFlippable
            => flippable.TransformTo(flippable.PopulateTransform(new TransformFlipV(), newValue, delay));
    }
}


text:
require 'gorillib/array/extract_options'

# Extends the class object with class and instance accessors for class attributes,
# just like the native attr* accessors for instance attributes.
#
# Note that unlike +class_attribute+, if a subclass changes the value then that would
# also change the value for parent class. Similarly if parent class changes the value
# then that would change the value of subclasses too.
#
#  class Person
#    cattr_accessor :hair_colors
#  end
#
#  Person.hair_colors = [:brown, :black, :blonde, :red]
#  Person.hair_colors     # => [:brown, :black, :blonde, :red]
#  Person.new.hair_colors # => [:brown, :black, :blonde, :red]
#
# To opt out of the instance writer method, pass :instance_writer => false.
# To opt out of the instance reader method, pass :instance_reader => false.
#
#   class Person
#     cattr_accessor :hair_colors, :instance_writer => false, :instance_reader => false
#   end
#
#   Person.new.hair_colors = [:brown]  # => NoMethodError
#   Person.new.hair_colors             # => NoMethodError
class Class
  def cattr_reader(*syms)
    options = syms.extract_options!
    syms.each do |sym|
      class_eval(<<-EOS, __FILE__, __LINE__ + 1)
        unless defined? @@#{sym}
          @@#{sym} = nil
        end

        def self.#{sym}
          @@#{sym}
        end
      EOS

      unless options[:instance_reader] == false
        class_eval(<<-EOS, __FILE__, __LINE__ + 1)
          def #{sym}
            @@#{sym}
          end
        EOS
      end
    end
  end unless method_defined?(:cattr_reader)

  def cattr_writer(*syms)
    options = syms.extract_options!
    syms.each do |sym|
      class_eval(<<-EOS, __FILE__, __LINE__ + 1)
        unless defined? @@#{sym}
          @@#{sym} = nil
        end

        def self.#{sym}=(obj)
          @@#{sym} = obj
        end
      EOS

      unless options[:instance_writer] == false
        class_eval(<<-EOS, __FILE__, __LINE__ + 1)
          def #{sym}=(obj)
            @@#{sym} = obj
          end
        EOS
      end
      self.send("#{sym}=", yield) if block_given?
    end
  end unless method_defined?(:cattr_writer)

  def cattr_accessor(*syms, &blk)
    cattr_reader(*syms)
    cattr_writer(*syms, &blk)
  end unless method_defined?(:cattr_accessor)
end


text:
using System.Runtime.InteropServices;
using System.Xml.Serialization;

namespace Diadoc.Api.Com
{
	[ComVisible(true)]
	[Guid("42D1D718-6C89-4DF4-A9A1-715013162B71")]
	//NOTE: Это хотели, чтобы можно было использовать XML-сериализацию для классов
	[XmlType(TypeName = "TotalCountType", Namespace = "https://diadoc-api.kontur.ru")]
	public enum TotalCountType
	{
		UnknownCountType = Proto.TotalCountType.UnknownCountType,
		Equal = Proto.TotalCountType.Equal,
		GreaterThanOrEqual = Proto.TotalCountType.GreaterThanOrEqual
	}
}


text:
Additional header content

Clones this instance.

**Namespace:** iTin.Export.Model
**Assembly:** iTin.Export.Core (in iTin.Export.Core.dll) Version: 2.0.0.0 (2.0.0.0)

## Syntax

**C#**

``` C#
public MaximumCondition Clone()
```

**VB**

``` VB
Public Function Clone As MaximumCondition
```

#### Return Value
Type: MaximumCondition
A new object that is a copy of this instance.

## Remarks
\[Missing <remarks> documentation for "M:iTin.Export.Model.MaximumCondition.Clone"\]

## See Also

#### Reference
MaximumCondition Class
iTin.Export.Model Namespace


text:
package io.machinecode.vial.core;

import org.junit.Assert;
import org.junit.Test;

import java.util.Arrays;

/**
 * @author Brent Douglas
 * @since 1.0
 */
public class IllegalKeyTest extends Assert {

    @Test
    public void testToString() {
        assertEquals("Illegal Key", new IllegalKey().toString());
    }
}