text:
"""
Turn 2D array into Image object with isotropic pixel spacing for display

Args:

* img: 2D array

Returns:

* img: Image object for isotropic ImageView display
"""
function make_isotropic(img)
    img = Image(img)
    img["pixelspacing"] = [1, 1]
    return img
end

function view_isotropic(img)
    return view(img, pixelspacing=[1,1])
end

"""
Display thumbnail image with vectors and match indices overlayed
"""
function view_matches(img, vectors, factor)
  imgc, img2 = view_isotropic(img)
  a, b = draw_vectors(imgc, img2, vectors, RGB(0,0,1), RGB(1,0,1), factor)
  c = draw_indices(imgc, img2, vectors[1:2,:])
  return imgc, img2
end

"""
Display mesh on image
Args:
  imgc: ImageCanvas object
  img2: ImageSliced2d object
  nodes: Nx2 array of mesh node positions
  node_dict: dictionary of edges, indexed by node, containing connected nodes
Returns:
  imgc: ImageCanvas object
  img2: ImageSliced2d object
"""
function show_mesh(imgc, img2, nodes, node_dict, color=RGB(1,1,1))
    lines = Array{Float64}(4, 0)
    for k in sort(collect(keys(node_dict)))
        for v in node_dict[k]
            a = reverse(vec(nodes[k,:]))
            b = reverse(vec(nodes[v,:]))
            lines = hcat(lines, vcat(a, b))
        end
    end
    an_lines = ImageView.annotate!(imgc, img2, AnnotationLines(lines, color=color,
                                                            coord_order="yyxx"))
    return an_lines
end

function show_mesh(img, nodes, node_dict)
    imgc, img2 = view(img)
    return draw_mesh(imgc, img2, nodes, node_dict)
end

"""
Show vectors on image plot
Args:
  imgc: ImageCanvas object
  img2: ImageSliced2d object
  vectors: 4xN array of vector start and end points
  pt_color: optional color argument for points
  vec_color: optional color argument for vectors
Returns:
  imgc: ImageCanvas object
  img2: ImageSliced2d object
  an_points: annotation object for the points
  an_vectors: annotation object for the vectors
"""
function show_vectors(imgc, img2, vectors, pt_color=RGB(0,0,1),
                                                vec_color=RGB(1,0,1))
  if length(vectors) > 0
    an_vectors = ImageView.annotate!(imgc, img2, AnnotationLines(vectors, color=vec_color,
                                            coord_order="xxyy", linewidth=4))
    an_points = ImageView.annotate!(imgc, img2, AnnotationPoints(vectors[1:2,:],
                                                    size=4, color=pt_color, shape='.'))
  end
end

function show_vectors(img, vectors)
    imgc, img2 = view(img, pixelspacing=[1,1])
    return show_vectors(imgc, img2, vectors)
end

"""
Display match displacement vectors on images
Args:
  imgc: ImageCanvas object
  img2: ImageSliced2d object
  nodes: 2xN array of points
Returns:
  an_points: annotation object for the points
"""
function show_points(imgc, img2, points; color=RGB(0,0,1), linewidth=2.0, size=10.0, shape='o', t=NaN)
  an_points = nothing
  if length(points) > 0
    an_points = ImageView.annotate!(imgc, img2, AnnotationPoints(points,
                                                        color=color,
                                                        linewidth=linewidth,
                                                        size=size,
                                                        shape=shape, t=t, scale=true))
  end
  return an_points
end

function show_lines(imgc, img2, lines; color=RGB(0,0,1), linewidth=3.0, t=NaN)
  an_vectors = nothing
  if length(lines) > 0
    an_vectors = ImageView.annotate!(imgc, img2, AnnotationLines(lines, color=color, t=t,
                                            coord_order="xxyy", linewidth=linewidth))
  end
  return an_vectors
end

function show_colored_lines(imgc, img2, lines, colors; linewidth=3.0, t=NaN)
  an_vectors = nothing
  if length(lines) > 0
    an_vectors = ImageView.annotate!(imgc, img2, AnnotationColoredLines(lines, colors, t=t,
                                            coord_order="xxyy", linewidth=linewidth))
  end
  return an_vectors
end

function show_text(imgc, img2, str, x, y; color=RGB(0,0,1), fontsize=30, t=NaN)
  return ImageView.annotate!(imgc, img2, AnnotationText(x, y, str, t=t, color=color, fontsize=fontsize, halign="left"))
end

function imwrite_box(img, point, radius, path, color=RGB(0,1,0), linewidth=1.0)
  upper_left = point - [radius, radius]
  lower_right = point + [radius, radius]
  imgc, img2 = view(img, pixelspacing=[1,1])
  ImageView.annotate!(imgc, img2, AnnotationBox(tuple(upper_left...),
                                        tuple(lower_right...),
                                        color=color,
                                        linewidth=linewidth,
                                        coord_order="yxyx"))
  write_canvas(imgc, path)
  close_image(imgc)
end

function write_canvas(imgc, path)
  Cairo.write_to_png(imgc.c.back, path)
end

function close_image(imgc)
  destroy(toplevel(imgc))
end

function set_canvas_size(imgc, w, h)
  ImageView.set_size(toplevel(imgc), floor(Int64, w), floor(Int64, h))
end

function create_image(bb)
    z = ones(bb.h+1, bb.w+1)
    return view_isotropic(z), [bb.i, bb.j]
end

function show_box(imgc, img2, upper_left, lower_right, color=RGB(0,1,0), linewidth=1.0)
    an_box = ImageView.annotate!(imgc, img2, AnnotationBox(tuple(upper_left...),
                                                    tuple(lower_right...),
                                                    color=color,
                                                    linewidth=linewidth,
                                                    coord_order="yxyx"))
  return an_box
end

function show_points(img, points)
    imgc, img2 = view(img)
    return draw_points(imgc, img2, points)
end

function show_reference_vector(imgc, img2, ratio, bb, use_index=true)
  reference = 1
  margin = 0.02
  vectors = [bb.h*(1-margin);
              bb.w*(1-margin) - reference*ratio;
              bb.h*(1-margin);
              bb.w*(1-margin)]
  draw_vectors(imgc, img2, vectors, RGB(1,1,0), RGB(0,1,1), 1)
  if use_index
    draw_indices(imgc, img2, vectors[1:2,:], 18.0, [-reference*ratio/2, 20], (0.5,0.5,0.5))
  end
  return imgc, img2
end

"""
Write thumbnail image, with whatever drawings included
"""
function write_imageview(path, imgc, img2)
  println("Writing ", path)
  write_canvas(imgc, path)
  close_image(imgc)
end

function xcview(xc)
  xc_image = xcorr2Image(xc)
  hot = create_hot_colormap()
  xc_color = apply_colormap(xc_image, hot)
  ImageView.view(xc_color') #, pixelspacing=[1,1])
end

function uview(img::Array{UInt8,2})
  return ImageView.view(reinterpret(UFixed8, img), pixelspacing=[1,1])
end

function override_xy_label(imgc, img2, offset, scale=1.0)
  c = canvas(imgc)
  win = Tk.toplevel(c)
  fnotify = ImageView.Frame(win)
  lastrow = 2
  ImageView.grid(fnotify, lastrow+=1, 1, sticky="ew")
  xypos = ImageView.Label(fnotify)
  imgc.handles[:pointerlabel] = xypos
  ImageView.grid(xypos, 1, 1, sticky="ne")
  ImageView.set_visible(win, true)
  c.mouse.motion = (path,x,y)-> updatexylabel(xypos, imgc, img2, x, y, offset..., scale)
end

function updatexylabel(xypos, imgc, img2, x, y, x_off, y_off, scale=1.0)
  w = width(imgc.c)
  xu, yu = ImageView.device_to_user(Tk.getgc(imgc.c), x, y)
  # Image-coordinates
  xi, yi = floor(Integer, 1+xu), floor(Integer, 1+yu)
  if ImageView.isinside(imgc.canvasbb, x, y)
    val = img2[xi,yi]
    xo, yo = xi + x_off, yi + y_off
    xo, yo = round(Int64, xo / scale), round(Int64, yo / scale)
    str = "$yo, $xo ($yi, $xi): $val"
    if length(str)*10>w
      ImageView.set_value(xypos, "$yo, $xo ($yi, $xi)")
    else
      ImageView.set_value(xypos, str)
    end
  else
    ImageView.set_value(xypos, "($yi, $xi)")
  end
end


text:
package apimanagementapi

// 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/azure-sdk-for-go/services/apimanagement/mgmt/2016-10-10/apimanagement"
	"github.com/Azure/go-autorest/autorest"
	"io"
)

// PolicySnippetsClientAPI contains the set of methods on the PolicySnippetsClient type.
type PolicySnippetsClientAPI interface {
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, scope apimanagement.PolicyScopeContract) (result apimanagement.PolicySnippetsCollection, err error)
}

var _ PolicySnippetsClientAPI = (*apimanagement.PolicySnippetsClient)(nil)

// RegionsClientAPI contains the set of methods on the RegionsClient type.
type RegionsClientAPI interface {
	ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.RegionListResult, err error)
}

var _ RegionsClientAPI = (*apimanagement.RegionsClient)(nil)

// ApisClientAPI contains the set of methods on the ApisClient type.
type ApisClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters apimanagement.APIContract, ifMatch string) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.APIContract, err error)
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters apimanagement.APIUpdateContract, ifMatch string) (result autorest.Response, err error)
}

var _ ApisClientAPI = (*apimanagement.ApisClient)(nil)

// APIOperationsClientAPI contains the set of methods on the APIOperationsClient type.
type APIOperationsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters apimanagement.OperationContract) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result apimanagement.OperationContract, err error)
	ListByApis(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.OperationCollectionPage, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters apimanagement.OperationUpdateContract, ifMatch string) (result autorest.Response, err error)
}

var _ APIOperationsClientAPI = (*apimanagement.APIOperationsClient)(nil)

// APIOperationsPolicyClientAPI contains the set of methods on the APIOperationsPolicyClient type.
type APIOperationsPolicyClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters io.ReadCloser, ifMatch string) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result apimanagement.ReadCloser, err error)
}

var _ APIOperationsPolicyClientAPI = (*apimanagement.APIOperationsPolicyClient)(nil)

// APIProductsClientAPI contains the set of methods on the APIProductsClient type.
type APIProductsClientAPI interface {
	ListByApis(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionPage, err error)
}

var _ APIProductsClientAPI = (*apimanagement.APIProductsClient)(nil)

// APIPolicyClientAPI contains the set of methods on the APIPolicyClient type.
type APIPolicyClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters io.ReadCloser, ifMatch string) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.ReadCloser, err error)
}

var _ APIPolicyClientAPI = (*apimanagement.APIPolicyClient)(nil)

// AuthorizationServersClientAPI contains the set of methods on the AuthorizationServersClient type.
type AuthorizationServersClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, authsid string, parameters apimanagement.OAuth2AuthorizationServerContract) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result apimanagement.OAuth2AuthorizationServerContract, err error)
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionPage, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, authsid string, parameters apimanagement.OAuth2AuthorizationServerUpdateContract, ifMatch string) (result autorest.Response, err error)
}

var _ AuthorizationServersClientAPI = (*apimanagement.AuthorizationServersClient)(nil)

// BackendsClientAPI contains the set of methods on the BackendsClient type.
type BackendsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters apimanagement.BackendContract) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, backendid string, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (result apimanagement.BackendResponse, err error)
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionPage, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters apimanagement.BackendUpdateParameters, ifMatch string) (result autorest.Response, err error)
}

var _ BackendsClientAPI = (*apimanagement.BackendsClient)(nil)

// CertificatesClientAPI contains the set of methods on the CertificatesClient type.
type CertificatesClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, parameters apimanagement.CertificateCreateOrUpdateParameters, ifMatch string) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result apimanagement.CertificateContract, err error)
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionPage, err error)
}

var _ CertificatesClientAPI = (*apimanagement.CertificatesClient)(nil)

// OperationsClientAPI contains the set of methods on the OperationsClient type.
type OperationsClientAPI interface {
	List(ctx context.Context) (result apimanagement.OperationListResultPage, err error)
}

var _ OperationsClientAPI = (*apimanagement.OperationsClient)(nil)

// ServicesClientAPI contains the set of methods on the ServicesClient type.
type ServicesClientAPI interface {
	ApplyNetworkConfigurationUpdates(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServicesApplyNetworkConfigurationUpdatesFuture, err error)
	Backup(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceBackupRestoreParameters) (result apimanagement.ServicesBackupFuture, err error)
	CheckNameAvailability(ctx context.Context, parameters apimanagement.ServiceCheckNameAvailabilityParameters) (result apimanagement.ServiceNameAvailabilityResult, err error)
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceResource) (result apimanagement.ServiceResource, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceResource, err error)
	GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceGetSsoTokenResult, err error)
	List(ctx context.Context) (result apimanagement.ServiceListResultPage, err error)
	ListByResourceGroup(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultPage, err error)
	ManageDeployments(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceManageDeploymentsParameters) (result apimanagement.ServicesManageDeploymentsFuture, err error)
	Restore(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceBackupRestoreParameters) (result apimanagement.ServicesRestoreFuture, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceUpdateParameters) (result apimanagement.ServicesUpdateFuture, err error)
	UpdateHostname(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceUpdateHostnameParameters) (result apimanagement.ServicesUpdateHostnameFuture, err error)
	UploadCertificate(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceUploadCertificateParameters) (result apimanagement.CertificateInformation, err error)
}

var _ ServicesClientAPI = (*apimanagement.ServicesClient)(nil)

// GroupsClientAPI contains the set of methods on the GroupsClient type.
type GroupsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters apimanagement.GroupCreateParameters) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string) (result apimanagement.ErrorBodyContract, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result apimanagement.GroupContract, err error)
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters apimanagement.GroupUpdateParameters, ifMatch string) (result apimanagement.ErrorBodyContract, err error)
}

var _ GroupsClientAPI = (*apimanagement.GroupsClient)(nil)

// GroupUsersClientAPI contains the set of methods on the GroupUsersClient type.
type GroupUsersClientAPI interface {
	Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result apimanagement.ErrorBodyContract, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result apimanagement.ErrorBodyContract, err error)
	ListByGroups(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error)
}

var _ GroupUsersClientAPI = (*apimanagement.GroupUsersClient)(nil)

// IdentityProvidersClientAPI contains the set of methods on the IdentityProvidersClient type.
type IdentityProvidersClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderNameType, parameters apimanagement.IdentityProviderContract) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderNameType, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderNameType) (result apimanagement.IdentityProviderContract, err error)
	ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.IdentityProviderList, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderNameType, parameters apimanagement.IdentityProviderUpdateParameters, ifMatch string) (result autorest.Response, err error)
}

var _ IdentityProvidersClientAPI = (*apimanagement.IdentityProvidersClient)(nil)

// LoggersClientAPI contains the set of methods on the LoggersClient type.
type LoggersClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters apimanagement.LoggerCreateParameters) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (result apimanagement.LoggerResponse, err error)
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters apimanagement.LoggerUpdateParameters, ifMatch string) (result autorest.Response, err error)
}

var _ LoggersClientAPI = (*apimanagement.LoggersClient)(nil)

// NetworkStatusClientAPI contains the set of methods on the NetworkStatusClient type.
type NetworkStatusClientAPI interface {
	GetByService(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.NetworkStatusContract, err error)
}

var _ NetworkStatusClientAPI = (*apimanagement.NetworkStatusClient)(nil)

// OpenIDConnectProvidersClientAPI contains the set of methods on the OpenIDConnectProvidersClient type.
type OpenIDConnectProvidersClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, opid string, parameters apimanagement.OpenidConnectProviderCreateContract) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, opid string, ifMatch string) (result apimanagement.ErrorBodyContract, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result apimanagement.OpenidConnectProviderContract, err error)
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionPage, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, opid string, parameters apimanagement.OpenidConnectProviderUpdateContract, ifMatch string) (result autorest.Response, err error)
}

var _ OpenIDConnectProvidersClientAPI = (*apimanagement.OpenIDConnectProvidersClient)(nil)

// ProductsClientAPI contains the set of methods on the ProductsClient type.
type ProductsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters apimanagement.ProductContract) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, deleteSubscriptions *bool) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result apimanagement.ProductContract, err error)
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.ProductCollectionPage, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters apimanagement.ProductUpdateParameters, ifMatch string) (result autorest.Response, err error)
}

var _ ProductsClientAPI = (*apimanagement.ProductsClient)(nil)

// ProductApisClientAPI contains the set of methods on the ProductApisClient type.
type ProductApisClientAPI interface {
	Create(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error)
	ListByProducts(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error)
}

var _ ProductApisClientAPI = (*apimanagement.ProductApisClient)(nil)

// ProductGroupsClientAPI contains the set of methods on the ProductGroupsClient type.
type ProductGroupsClientAPI interface {
	Create(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result apimanagement.ErrorBodyContract, err error)
	ListByProducts(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error)
}

var _ ProductGroupsClientAPI = (*apimanagement.ProductGroupsClient)(nil)

// ProductSubscriptionsClientAPI contains the set of methods on the ProductSubscriptionsClient type.
type ProductSubscriptionsClientAPI interface {
	ListByProducts(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error)
}

var _ ProductSubscriptionsClientAPI = (*apimanagement.ProductSubscriptionsClient)(nil)

// ProductPolicyClientAPI contains the set of methods on the ProductPolicyClient type.
type ProductPolicyClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters io.ReadCloser, ifMatch string) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result apimanagement.ReadCloser, err error)
}

var _ ProductPolicyClientAPI = (*apimanagement.ProductPolicyClient)(nil)

// PropertiesClientAPI contains the set of methods on the PropertiesClient type.
type PropertiesClientAPI interface {
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionPage, err error)
}

var _ PropertiesClientAPI = (*apimanagement.PropertiesClient)(nil)

// PropertyClientAPI contains the set of methods on the PropertyClient type.
type PropertyClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, propID string, parameters apimanagement.PropertyCreateParameters) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, propID string, ifMatch string) (result apimanagement.ErrorBodyContract, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result apimanagement.PropertyContract, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, propID string, parameters apimanagement.PropertyUpdateParameters, ifMatch string) (result autorest.Response, err error)
}

var _ PropertyClientAPI = (*apimanagement.PropertyClient)(nil)

// QuotaByCounterKeysClientAPI contains the set of methods on the QuotaByCounterKeysClient type.
type QuotaByCounterKeysClientAPI interface {
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string) (result apimanagement.QuotaCounterCollection, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, parameters apimanagement.QuotaCounterValueContract) (result autorest.Response, err error)
}

var _ QuotaByCounterKeysClientAPI = (*apimanagement.QuotaByCounterKeysClient)(nil)

// QuotaByPeriodKeysClientAPI contains the set of methods on the QuotaByPeriodKeysClient type.
type QuotaByPeriodKeysClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string) (result apimanagement.QuotaCounterContract, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, parameters apimanagement.QuotaCounterValueContract) (result autorest.Response, err error)
}

var _ QuotaByPeriodKeysClientAPI = (*apimanagement.QuotaByPeriodKeysClient)(nil)

// ReportsClientAPI contains the set of methods on the ReportsClient type.
type ReportsClientAPI interface {
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, aggregation apimanagement.ReportsAggregation, filter string, top *int32, skip *int32, interval *string) (result apimanagement.ReportCollectionPage, err error)
}

var _ ReportsClientAPI = (*apimanagement.ReportsClient)(nil)

// SubscriptionsClientAPI contains the set of methods on the SubscriptionsClient type.
type SubscriptionsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters apimanagement.SubscriptionCreateParameters) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result apimanagement.SubscriptionContract, err error)
	List(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error)
	RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error)
	RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters apimanagement.SubscriptionUpdateParameters, ifMatch string) (result autorest.Response, err error)
}

var _ SubscriptionsClientAPI = (*apimanagement.SubscriptionsClient)(nil)

// TenantAccessClientAPI contains the set of methods on the TenantAccessClient type.
type TenantAccessClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.AccessInformationContract, err error)
	RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error)
	RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.AccessInformationUpdateParameters, ifMatch string) (result autorest.Response, err error)
}

var _ TenantAccessClientAPI = (*apimanagement.TenantAccessClient)(nil)

// TenantAccessGitClientAPI contains the set of methods on the TenantAccessGitClient type.
type TenantAccessGitClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.AccessInformationContract, err error)
	RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error)
	RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error)
}

var _ TenantAccessGitClientAPI = (*apimanagement.TenantAccessGitClient)(nil)

// TenantConfigurationClientAPI contains the set of methods on the TenantConfigurationClient type.
type TenantConfigurationClientAPI interface {
	Deploy(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.DeployConfigurationParameters) (result apimanagement.TenantConfigurationDeployFuture, err error)
	Save(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.SaveConfigurationParameter) (result apimanagement.TenantConfigurationSaveFuture, err error)
	Validate(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.DeployConfigurationParameters) (result apimanagement.TenantConfigurationValidateFuture, err error)
}

var _ TenantConfigurationClientAPI = (*apimanagement.TenantConfigurationClient)(nil)

// TenantConfigurationSyncStateClientAPI contains the set of methods on the TenantConfigurationSyncStateClient type.
type TenantConfigurationSyncStateClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.TenantConfigurationSyncStateContract, err error)
}

var _ TenantConfigurationSyncStateClientAPI = (*apimanagement.TenantConfigurationSyncStateClient)(nil)

// TenantPolicyClientAPI contains the set of methods on the TenantPolicyClient type.
type TenantPolicyClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters io.ReadCloser, ifMatch string) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ReadCloser, err error)
}

var _ TenantPolicyClientAPI = (*apimanagement.TenantPolicyClient)(nil)

// UsersClientAPI contains the set of methods on the UsersClient type.
type UsersClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters apimanagement.UserCreateParameters) (result autorest.Response, err error)
	Delete(ctx context.Context, resourceGroupName string, serviceName string, UID string, ifMatch string, deleteSubscriptions *bool) (result apimanagement.ErrorBodyContract, err error)
	GenerateSsoURL(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result apimanagement.GenerateSsoURLResult, err error)
	Get(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result apimanagement.UserContract, err error)
	GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters apimanagement.UserTokenParameters) (result apimanagement.UserTokenResult, err error)
	ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error)
	Update(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters apimanagement.UserUpdateParameters, ifMatch string) (result apimanagement.ErrorBodyContract, err error)
}

var _ UsersClientAPI = (*apimanagement.UsersClient)(nil)

// UserGroupsClientAPI contains the set of methods on the UserGroupsClient type.
type UserGroupsClientAPI interface {
	ListByUsers(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error)
}

var _ UserGroupsClientAPI = (*apimanagement.UserGroupsClient)(nil)

// UserSubscriptionsClientAPI contains the set of methods on the UserSubscriptionsClient type.
type UserSubscriptionsClientAPI interface {
	ListByUsers(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error)
}

var _ UserSubscriptionsClientAPI = (*apimanagement.UserSubscriptionsClient)(nil)

// UserIdentitiesClientAPI contains the set of methods on the UserIdentitiesClient type.
type UserIdentitiesClientAPI interface {
	ListByUsers(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result apimanagement.UserIdentityCollection, err error)
}

var _ UserIdentitiesClientAPI = (*apimanagement.UserIdentitiesClient)(nil)

// APIExportClientAPI contains the set of methods on the APIExportClient type.
type APIExportClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.APIExportResult, err error)
}

var _ APIExportClientAPI = (*apimanagement.APIExportClient)(nil)

redpajama_set_name: RedPajamaGithub


text:
.. django-simple-elasticsearch documentation master file, created by
   sphinx-quickstart on Tue Jul  9 22:26:36 2013.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

.. include:: ../README.rst

Jump to a section
-----------------

.. toctree::
   :maxdepth: 2

   usage
   contributing
   authors
   history

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


text:
package com.cognizant.cognizantits.qcconnection.qcupdation;

import com4j.Com4jObject;
import com4j.DISPID;
import com4j.DefaultValue;
import com4j.IID;
import com4j.NativeType;
import com4j.Optional;
import com4j.ReturnValue;
import com4j.VTID;

@IID("{35692E1B-C235-426A-A77B-CD0D159C4F2E}")
public abstract interface IReq2
  extends IReq
{
  @DISPID(37)
  @VTID(54)
  @ReturnValue(type=NativeType.Dispatch)
  public abstract Com4jObject reqTraceFactory(int paramInt);

  @DISPID(38)
  @VTID(55)
  public abstract boolean hasReqTraceability(int paramInt);

  @DISPID(39)
  @VTID(56)
  @ReturnValue(type=NativeType.Dispatch)
  public abstract Com4jObject requirementType();

  @DISPID(40)
  @VTID(57)
  public abstract String typeId();

  @DISPID(40)
  @VTID(58)
  public abstract void typeId(String paramString);

  @DISPID(41)
  @VTID(59)
  public abstract IStream get_Icon();

  @DISPID(42)
  @VTID(60)
  public abstract int parentId();

  @DISPID(42)
  @VTID(61)
  public abstract void parentId(int paramInt);

  @DISPID(43)
  @VTID(62)
  public abstract void populateTargetCycleToChildren();

  @DISPID(44)
  @VTID(63)
  public abstract void populateTargetReleaseToChildren();

  @DISPID(45)
  @VTID(64)
  public abstract boolean hasRichContent();

  @DISPID(46)
  @VTID(65)
  public abstract IList getCoverageTestsByReqFilter(String paramString, @Optional @DefaultValue("0") boolean paramBoolean);
}

/* Location:           D:\Prabu\jars\QC.jar
 * Qualified Name:     qcupdation.IReq2
 * JD-Core Version:    0.7.0.1
 */


text:
package org.apache.camel.component.aws2.sqs.integration;

import java.util.ArrayList;
import java.util.Collection;

import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
import org.apache.camel.ExchangePattern;
import org.apache.camel.Processor;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.aws2.sqs.Sqs2Constants;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.infra.aws.common.services.AWSService;
import org.apache.camel.test.infra.aws2.common.SystemPropertiesAWSCredentialsProvider;
import org.apache.camel.test.infra.aws2.common.TestAWSCredentialsProvider;
import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
import org.apache.camel.test.infra.common.SharedNameGenerator;
import org.apache.camel.test.infra.common.TestEntityNameGenerator;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import software.amazon.awssdk.auth.credentials.AwsCredentials;
import software.amazon.awssdk.services.sqs.SqsClient;

public class SqsProducerBatchSendIntegrationTest extends CamelTestSupport {

    @RegisterExtension
    public static AWSService<SqsClient> service = AWSServiceFactory.createSQSService();

    @RegisterExtension
    public static SharedNameGenerator sharedNameGenerator = new TestEntityNameGenerator();

    @EndpointInject("direct:start")
    private ProducerTemplate template;

    @EndpointInject("mock:result")
    private MockEndpoint result;

    @Test
    public void sendInOnly() throws Exception {
        result.expectedMessageCount(5);

        Exchange exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() {
            public void process(Exchange exchange) throws Exception {
                Collection c = new ArrayList<Integer>();
                c.add("1");
                c.add("2");
                c.add("3");
                c.add("4");
                c.add("5");
                exchange.getIn().setBody(c);
            }
        });

        assertMockEndpointsSatisfied();
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        TestAWSCredentialsProvider credentialsProvider = new SystemPropertiesAWSCredentialsProvider();
        AwsCredentials credentials = credentialsProvider.resolveCredentials();

        final String sqsEndpointUri
                = String.format("aws2-sqs://%s?accessKey=RAW(%s)&secretKey=RAW(%s)&region=eu-west-1&configuration=%s",
                        sharedNameGenerator.getName(),
                        credentials.accessKeyId(),
                        credentials.secretAccessKey(),
                        "#class:" + TestSqsConfiguration.class.getName());

        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start").startupOrder(2).setHeader(Sqs2Constants.SQS_OPERATION, constant("sendBatchMessage"))
                        .to(sqsEndpointUri);

                fromF("aws2-sqs://%s?accessKey=RAW(%s)&secretKey=RAW(%s)&region=eu-west-1&deleteAfterRead=true&configuration=%s",
                        sharedNameGenerator.getName(),
                        credentials.accessKeyId(),
                        credentials.secretAccessKey(),
                        "#class:" + TestSqsConfiguration.class.getName())
                                .startupOrder(1)
                                .log("${body}")
                                .to("mock:result");
            }
        };
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Index (library API)</title>
<meta name="date" content="2017-08-14">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

A B C G H I R S T

A

addTarget(View) - Method in class com.xeoh.android.texthighlighter.TextHighlighter

Add single TextView as target of current TextHighlighter.

B

BASE_MATCHER - Static variable in class com.xeoh.android.texthighlighter.TextHighlighter

Simple Matcher which finds exactly same word.

C

CASE_INSENSITIVE_MATCHER - Static variable in class com.xeoh.android.texthighlighter.TextHighlighter

Case insensitive Matcher which finds exactly same word but ignore case.

com.xeoh.android.texthighlighter - package com.xeoh.android.texthighlighter

G

getMatchIndices(String, String) - Method in interface com.xeoh.android.texthighlighter.TextHighlighter.Matcher

Implement algorithm to find matching indices.

H

highlight(String, TextHighlighter.Matcher) - Method in class com.xeoh.android.texthighlighter.TextHighlighter

Perform highlight action for targeted views.

I

invalidate(TextHighlighter.Matcher) - Method in class com.xeoh.android.texthighlighter.TextHighlighter

Re-Highlight words in given targets.

isHighlightable(String, String) - Method in interface com.xeoh.android.texthighlighter.TextHighlighter.Matcher

Implement algorithm to detecting any matching word exist.

R

resetBackgroundColor() - Method in class com.xeoh.android.texthighlighter.TextHighlighter

Reset background color of highlighted text.

resetForegroundColor() - Method in class com.xeoh.android.texthighlighter.TextHighlighter

Reset foreground color of highlighted text.

resetTargets() - Method in class com.xeoh.android.texthighlighter.TextHighlighter

Remove all targeted TextView.

S

setBackgroundColor(int) - Method in class com.xeoh.android.texthighlighter.TextHighlighter

Set background color of highlighted text.

setForegroundColor(int) - Method in class com.xeoh.android.texthighlighter.TextHighlighter

Set foreground color of highlighted text.

T

TextHighlighter - Class in com.xeoh.android.texthighlighter

TextHighlighter() - Constructor for class com.xeoh.android.texthighlighter.TextHighlighter

TextHighlighter.Matcher - Interface in com.xeoh.android.texthighlighter

Its method will be called to find position of highlighting text.

A B C G H I R S T

Skip navigation links

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFilesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('files', function (Blueprint $table) {
            $table->engine = 'InnoDb';
            $table->string('hash', 64)->primary();
            $table->string('disk', 64)->default('localhost');
            $table->string('path', 1024);
            $table->string('mime', 255);
            $table->bigInteger('size');
            $table->text('metadata');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('files');
    }
}


text:
package com.amazonaws.services.proton.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 * @see AWS API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateEnvironmentAccountConnectionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * The Amazon Resource Name (ARN) of an IAM service role in the environment account. Proton uses this role to
     * provision infrastructure resources using CodeBuild-based provisioning in the associated environment account.
     *

     */
    private String codebuildRoleArn;
    /**
     *

     * The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined
     * components in the associated environment account. It determines the scope of infrastructure that a component can
     * provision in the account.
     *

     *

     * The environment account connection must have a componentRoleArn to allow directly defined components
     * to be associated with any environments running in the account.
     *

     *

     * For more information about components, see Proton components in the
     * Proton User Guide.
     *

     */
    private String componentRoleArn;
    /**
     *

     * The ID of the environment account connection to update.
     *

     */
    private String id;
    /**
     *

     * The Amazon Resource Name (ARN) of the IAM service role that's associated with the environment account connection
     * to update.
     *

     */
    private String roleArn;

    /**
     *

     * The Amazon Resource Name (ARN) of an IAM service role in the environment account. Proton uses this role to
     * provision infrastructure resources using CodeBuild-based provisioning in the associated environment account.
     *

     *
     * @param codebuildRoleArn
     *        The Amazon Resource Name (ARN) of an IAM service role in the environment account. Proton uses this role to
     *        provision infrastructure resources using CodeBuild-based provisioning in the associated environment
     *        account.
     */

    public void setCodebuildRoleArn(String codebuildRoleArn) {
        this.codebuildRoleArn = codebuildRoleArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of an IAM service role in the environment account. Proton uses this role to
     * provision infrastructure resources using CodeBuild-based provisioning in the associated environment account.
     *

     *
     * @return The Amazon Resource Name (ARN) of an IAM service role in the environment account. Proton uses this role
     *         to provision infrastructure resources using CodeBuild-based provisioning in the associated environment
     *         account.
     */

    public String getCodebuildRoleArn() {
        return this.codebuildRoleArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of an IAM service role in the environment account. Proton uses this role to
     * provision infrastructure resources using CodeBuild-based provisioning in the associated environment account.
     *

     *
     * @param codebuildRoleArn
     *        The Amazon Resource Name (ARN) of an IAM service role in the environment account. Proton uses this role to
     *        provision infrastructure resources using CodeBuild-based provisioning in the associated environment
     *        account.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateEnvironmentAccountConnectionRequest withCodebuildRoleArn(String codebuildRoleArn) {
        setCodebuildRoleArn(codebuildRoleArn);
        return this;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined
     * components in the associated environment account. It determines the scope of infrastructure that a component can
     * provision in the account.
     *

     *

     * The environment account connection must have a componentRoleArn to allow directly defined components
     * to be associated with any environments running in the account.
     *

     *

     * For more information about components, see Proton components in the
     * Proton User Guide.
     *

     *
     * @param componentRoleArn
     *        The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined
     *        components in the associated environment account. It determines the scope of infrastructure that a
     *        component can provision in the account.

     *

     *        The environment account connection must have a componentRoleArn to allow directly defined
     *        components to be associated with any environments running in the account.
     *

     *

     *        For more information about components, see Proton components in the
     *        Proton User Guide.
     */

    public void setComponentRoleArn(String componentRoleArn) {
        this.componentRoleArn = componentRoleArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined
     * components in the associated environment account. It determines the scope of infrastructure that a component can
     * provision in the account.
     *

     *

     * The environment account connection must have a componentRoleArn to allow directly defined components
     * to be associated with any environments running in the account.
     *

     *

     * For more information about components, see Proton components in the
     * Proton User Guide.
     *

     *
     * @return The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly
     *         defined components in the associated environment account. It determines the scope of infrastructure that
     *         a component can provision in the account.

     *

     *         The environment account connection must have a componentRoleArn to allow directly defined
     *         components to be associated with any environments running in the account.
     *

     *

     *         For more information about components, see Proton components in
     *         the Proton User Guide.
     */

    public String getComponentRoleArn() {
        return this.componentRoleArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined
     * components in the associated environment account. It determines the scope of infrastructure that a component can
     * provision in the account.
     *

     *

     * The environment account connection must have a componentRoleArn to allow directly defined components
     * to be associated with any environments running in the account.
     *

     *

     * For more information about components, see Proton components in the
     * Proton User Guide.
     *

     *
     * @param componentRoleArn
     *        The Amazon Resource Name (ARN) of the IAM service role that Proton uses when provisioning directly defined
     *        components in the associated environment account. It determines the scope of infrastructure that a
     *        component can provision in the account.

     *

     *        The environment account connection must have a componentRoleArn to allow directly defined
     *        components to be associated with any environments running in the account.
     *

     *

     *        For more information about components, see Proton components in the
     *        Proton User Guide.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateEnvironmentAccountConnectionRequest withComponentRoleArn(String componentRoleArn) {
        setComponentRoleArn(componentRoleArn);
        return this;
    }

    /**
     *

     * The ID of the environment account connection to update.
     *

     *
     * @param id
     *        The ID of the environment account connection to update.
     */

    public void setId(String id) {
        this.id = id;
    }

    /**
     *

     * The ID of the environment account connection to update.
     *

     *
     * @return The ID of the environment account connection to update.
     */

    public String getId() {
        return this.id;
    }

    /**
     *

     * The ID of the environment account connection to update.
     *

     *
     * @param id
     *        The ID of the environment account connection to update.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateEnvironmentAccountConnectionRequest withId(String id) {
        setId(id);
        return this;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of the IAM service role that's associated with the environment account connection
     * to update.
     *

     *
     * @param roleArn
     *        The Amazon Resource Name (ARN) of the IAM service role that's associated with the environment account
     *        connection to update.
     */

    public void setRoleArn(String roleArn) {
        this.roleArn = roleArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of the IAM service role that's associated with the environment account connection
     * to update.
     *

     *
     * @return The Amazon Resource Name (ARN) of the IAM service role that's associated with the environment account
     *         connection to update.
     */

    public String getRoleArn() {
        return this.roleArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of the IAM service role that's associated with the environment account connection
     * to update.
     *

     *
     * @param roleArn
     *        The Amazon Resource Name (ARN) of the IAM service role that's associated with the environment account
     *        connection to update.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public UpdateEnvironmentAccountConnectionRequest withRoleArn(String roleArn) {
        setRoleArn(roleArn);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getCodebuildRoleArn() != null)
            sb.append("CodebuildRoleArn: ").append(getCodebuildRoleArn()).append(",");
        if (getComponentRoleArn() != null)
            sb.append("ComponentRoleArn: ").append(getComponentRoleArn()).append(",");
        if (getId() != null)
            sb.append("Id: ").append(getId()).append(",");
        if (getRoleArn() != null)
            sb.append("RoleArn: ").append(getRoleArn());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof UpdateEnvironmentAccountConnectionRequest == false)
            return false;
        UpdateEnvironmentAccountConnectionRequest other = (UpdateEnvironmentAccountConnectionRequest) obj;
        if (other.getCodebuildRoleArn() == null ^ this.getCodebuildRoleArn() == null)
            return false;
        if (other.getCodebuildRoleArn() != null && other.getCodebuildRoleArn().equals(this.getCodebuildRoleArn()) == false)
            return false;
        if (other.getComponentRoleArn() == null ^ this.getComponentRoleArn() == null)
            return false;
        if (other.getComponentRoleArn() != null && other.getComponentRoleArn().equals(this.getComponentRoleArn()) == false)
            return false;
        if (other.getId() == null ^ this.getId() == null)
            return false;
        if (other.getId() != null && other.getId().equals(this.getId()) == false)
            return false;
        if (other.getRoleArn() == null ^ this.getRoleArn() == null)
            return false;
        if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getCodebuildRoleArn() == null) ? 0 : getCodebuildRoleArn().hashCode());
        hashCode = prime * hashCode + ((getComponentRoleArn() == null) ? 0 : getComponentRoleArn().hashCode());
        hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
        hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
        return hashCode;
    }

    @Override
    public UpdateEnvironmentAccountConnectionRequest clone() {
        return (UpdateEnvironmentAccountConnectionRequest) super.clone();
    }

}


text:
package jboxGlue;

import org.jbox2d.common.Vec2;

import jgame.JGColor;
import jgame.JGObject;

public class Mass extends PhysicalObjectCircle {
	private static final double DEFAULT_RADIUS=4;
	private static double massRadius=DEFAULT_RADIUS; //preference
	public Mass(String id, double x, double y, double xvelo, double yvelo, double mass, int world){
		super(id, 1, JGColor.white, massRadius, mass, world);
		this.setPos(x, y);
		this.setVelo(xvelo, yvelo);
	}
	public static void setPreferences(double radius){
		massRadius=radius;
	}
	public void setVelo(double x, double y){
        // there's no body while the game object is initializing
        if (myBody != null) {
            // set velocity of jbox2d object, not jgame object
        	myBody.setLinearVelocity(new Vec2((float)x, (float)y));
        }
	}
    public void hit (JGObject other)
    {
        // we hit something! bounce off it!
    	if(!(other instanceof Mass || other instanceof FixedMass)){
    		 Vec2 velocity = myBody.getLinearVelocity();

    		// is it a tall wall?
    	        final double DAMPING_FACTOR = 0.8;
    	        boolean isSide = other.getBBox().height > other.getBBox().width;
    	        if (isSide) {
    	            velocity.x *= -DAMPING_FACTOR;
    	        }
    	        else {
    	            velocity.y *= -DAMPING_FACTOR;
    	        }
    	        // apply the change
    	        myBody.setLinearVelocity(velocity);
    	}

    }

}


text:
using System;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using NoteOne_Core.Resources;

namespace NoteOne_Core.Common.Models
{
    [DataContract]
    public class ServiceChannelGroupModel : ModelBase
    {
        public ServiceChannelGroupModel(ServiceChannelGroupID id)
        {
            GroupID = id;
            Title = id.GetDescriptionViaResources<Enum>();

            if (Models == null)
                Models = new ObservableCollection<ServiceChannelModel>();
        }

        [DataMember]
        public ServiceChannelGroupID GroupID { get; set; }

        [DataMember]
        public string Title { get; set; }

        [DataMember]
        public ObservableCollection<ServiceChannelModel> Models { get; private set; }

        //private bool _hasAction;
        //[DataMember]
        //public bool HasAction
        //{
        //    get { return _hasAction; }
        //    set { this.SetProperty(ref _hasAction, value); }
        //}

        //private RelayCommand _action;
        //public RelayCommand Action
        //{
        //    get { return _action; }
        //    set { this.SetProperty(ref _action, value); }
        //}
    }
}


text:
using System;
using System.Net;

namespace LuckyMe.Core.Business
{
    public class BusinessException : Exception
    {
        public HttpStatusCode StatusCode { get; private set; }

        public BusinessException(HttpStatusCode statusCode = HttpStatusCode.InternalServerError)
        {
            StatusCode = statusCode;
        }

        public BusinessException(string message, HttpStatusCode statusCode = HttpStatusCode.InternalServerError)
        : base(message)
        {
            StatusCode = statusCode;
        }

        public BusinessException(string message, Exception inner, HttpStatusCode statusCode = HttpStatusCode.InternalServerError)
        : base(message, inner)
        {
            StatusCode = statusCode;
        }
    }
}


text:
package com.amazonaws.services.iot.model.transform;

import java.util.Map;
import java.util.Map.Entry;

import com.amazonaws.services.iot.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;

import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;

/**
 * FirehoseAction JSON Unmarshaller
 */
public class FirehoseActionJsonUnmarshaller implements
        Unmarshaller<FirehoseAction, JsonUnmarshallerContext> {

    public FirehoseAction unmarshall(JsonUnmarshallerContext context)
            throws Exception {
        FirehoseAction firehoseAction = new FirehoseAction();

        int originalDepth = context.getCurrentDepth();
        String currentParentElement = context.getCurrentParentElement();
        int targetDepth = originalDepth + 1;

        JsonToken token = context.getCurrentToken();
        if (token == null)
            token = context.nextToken();
        if (token == VALUE_NULL)
            return null;

        while (true) {
            if (token == null)
                break;

            if (token == FIELD_NAME || token == START_OBJECT) {
                if (context.testExpression("roleArn", targetDepth)) {
                    context.nextToken();
                    firehoseAction.setRoleArn(StringJsonUnmarshaller
                            .getInstance().unmarshall(context));
                }
                if (context.testExpression("deliveryStreamName", targetDepth)) {
                    context.nextToken();
                    firehoseAction.setDeliveryStreamName(StringJsonUnmarshaller
                            .getInstance().unmarshall(context));
                }
            } else if (token == END_ARRAY || token == END_OBJECT) {
                if (context.getLastParsedParentElement() == null
                        || context.getLastParsedParentElement().equals(
                                currentParentElement)) {
                    if (context.getCurrentDepth() <= originalDepth)
                        break;
                }
            }
            token = context.nextToken();
        }

        return firehoseAction;
    }

    private static FirehoseActionJsonUnmarshaller instance;

    public static FirehoseActionJsonUnmarshaller getInstance() {
        if (instance == null)
            instance = new FirehoseActionJsonUnmarshaller();
        return instance;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright (c) 2010-2014 Evolveum
  ~
  ~ 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.
  -->
<user
		xmlns='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
		xmlns:c='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
		xmlns:t='http://prism.evolveum.com/xml/ns/public/types-3'
		xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
		xmlns:xsd='http://www.w3.org/2001/XMLSchema'
		xmlns:piracy='http://midpoint.evolveum.com/xml/ns/samples/piracy'
        xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">
    <name>alfred</name>
	<fullName>Alfred Hitchcock</fullName>
    <givenName>Alfred</givenName>
    <familyName>Hitchcock</familyName>
	<activation>
		<validFrom>1777-05-30T14:15:00Z</validFrom>
		<validTo>2222-02-22T08:30:42Z</validTo>
	</activation>
    <link>
        <resourceRef oid="10000000-0000-0000-0000-0000000dd204"/>           <!-- fuchsia -->
        <objectClass>ri:AccountObjectClass</objectClass>
        <activation>
            <administrativeStatus>enabled</administrativeStatus>
        </activation>
    </link>
	 <credentials>
        <password>
        	<value>
	            <clearValue>dead123</clearValue>
            </value>
        </password>
    </credentials>
</user>


text:
package com.jeesite.common.utils;

/**
 * @author wanye
 * @date Dec 14, 2008
 * @version v 1.0
 * @description 得到当前应用的系统路径
 */
public class SystemPath {

	public static String getSysPath() {
		String path = Thread.currentThread().getContextClassLoader()
				.getResource("").toString();
		String temp = path.replaceFirst("file:/", "").replaceFirst(
				"WEB-INF/classes/", "");
		String separator = System.getProperty("file.separator");
		String resultPath = temp.replaceAll("/", separator + separator);
		return resultPath;
	}

	public static String getClassPath() {
		String path = Thread.currentThread().getContextClassLoader()
				.getResource("").toString();
		String temp = path.replaceFirst("file:/", "");
		String separator = System.getProperty("file.separator");
		String resultPath = temp.replaceAll("/", separator + separator);
		return resultPath;
	}

	public static String getSystempPath() {
		return System.getProperty("java.io.tmpdir");
	}

	public static String getSeparator() {
		return System.getProperty("file.separator");
	}

	public static void main(String[] args) {
		System.out.println(getSysPath());
		System.out.println(System.getProperty("java.io.tmpdir"));
		System.out.println(getSeparator());
		System.out.println(getClassPath());
	}
}


text:
namespace Sdl.Community.GroupShareKit.Models.Response
{
    public class LanguageFileDetails
    {
	    public string LanguageFileId { get; set; }
	    public string FileName { get; set; }
	    public string LanguageCode { get; set; }
    }
}