text:
<?xml version="1.0"?>
<Document>

	<Sentence>
		<value>Ptosis (eyelid drooping) in infants and children is when the upper eyelid is lower than it should be.</value>
		<pattern_crowdsource> [[Ptosis|C0005745]] (eyelid drooping) in [[infants|C0021270]] and [[children|C0008059]] is when the upper eyelid is lower than it should be.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Ptosis</surface-form>
				<RDF-ID>C0005745</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>eyelid drooping</surface-form>
				<RDF-ID>C0005745</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>infants</surface-form>
				<RDF-ID>C0021270</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>children</surface-form>
				<RDF-ID>C0008059</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>upper eyelid</surface-form>
				<RDF-ID>C1280205</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>lower</surface-form>
				<RDF-ID>C0441994</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0021270 LOCATION_OF C0005745</triple>
			<triple>C0008059 LOCATION_OF C0005745</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Ptosis in infants and children is often due to a problem with the muscle that raises the eyelid.</value>
		<pattern_crowdsource> [[Ptosis|C0005745]] in [[infants|C0021270]] and [[children|C0008059]] is often due to a problem with the muscle that raises the eyelid.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Ptosis</surface-form>
				<RDF-ID>C0005745</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>infants</surface-form>
				<RDF-ID>C0021270</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>children</surface-form>
				<RDF-ID>C0008059</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>often</surface-form>
				<RDF-ID>C0332183</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>muscle</surface-form>
				<RDF-ID>C0026845</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>eyelid</surface-form>
				<RDF-ID>C1280734</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0021270 LOCATION_OF C0005745</triple>
			<triple>C0008059 LOCATION_OF C0005745</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>A nerve problem in the eyelid can also cause it to droop.</value>
		<pattern_crowdsource> A [[nerve problem|C0746848]] in the [[eyelid|C1280734]] can also cause it to droop.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>nerve problem</surface-form>
				<RDF-ID>C0746848</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>eyelid</surface-form>
				<RDF-ID>C1280734</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C1280734 LOCATION_OF C0746848</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>TREATMENT  Eyelid lift surgery (blepharoplasty) can repair drooping upper eyelids.</value>
		<pattern_crowdsource> TREATMENT  Eyelid [[lift|C0181620]] [[surgery|C0543467]] ([[blepharoplasty|C0197213]]) can repair drooping upper eyelids.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>TREATMENT</surface-form>
				<RDF-ID>C0087111</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Eyelid</surface-form>
				<RDF-ID>C1280734</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>lift</surface-form>
				<RDF-ID>C0181620</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>surgery</surface-form>
				<RDF-ID>C0543467</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>blepharoplasty</surface-form>
				<RDF-ID>C0197213</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>upper</surface-form>
				<RDF-ID>C1282910</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>drooping upper eyelids</surface-form>
				<RDF-ID>C0005745</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0197213 ISA C0543467</triple>
			<triple>C0543467 USES C0181620</triple>
			<triple>C0197213 USES C0181620</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>- In severe cases, surgery is needed right away to prevent "lazy eye" (amblyopia).</value>
		<pattern_crowdsource> - In severe cases, [[surgery|C0543467]] is needed right away to prevent "[[lazy eye|C0422955]]" (amblyopia).		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>severe</surface-form>
				<RDF-ID>C0205082</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>cases</surface-form>
				<RDF-ID>C0868928</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>surgery</surface-form>
				<RDF-ID>C0543467</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>right</surface-form>
				<RDF-ID>C0205090</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>lazy eye</surface-form>
				<RDF-ID>C0422955</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>amblyopia</surface-form>
				<RDF-ID>C0002418</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0543467 PREVENTS C0422955</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>The provider will also treat any eye problems from ptosis.</value>
		<pattern_crowdsource> The [[provider|C1441436]] will also treat any [[eye problems|C0262477]] from ptosis.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>provider</surface-form>
				<RDF-ID>C1441436</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>eye problems</surface-form>
				<RDF-ID>C0262477</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>ptosis</surface-form>
				<RDF-ID>C0005745</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C1441436 TREATS C0262477</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Your child may need to:  - Wear an eye patch to strengthen vision in the weaker eye.</value>
		<pattern_crowdsource> Your child may need to:  - Wear an [[eye patch|C0776981]] to strengthen vision in the weaker [[eye|C0015392]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>child</surface-form>
				<RDF-ID>C0008059</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>eye patch</surface-form>
				<RDF-ID>C0776981</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>vision</surface-form>
				<RDF-ID>C0042789</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>weaker</surface-form>
				<RDF-ID>C0004093</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>eye</surface-form>
				<RDF-ID>C0015392</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0015392 LOCATION_OF C0776981</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Children with mild ptosis should have regular eye exams to make sure amblyopia does not develop.</value>
		<pattern_crowdsource> [[Children|C0008059]] with mild [[ptosis|C0005745]] should have regular eye exams to make sure amblyopia does not develop.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Children</surface-form>
				<RDF-ID>C0008059</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>mild</surface-form>
				<RDF-ID>C0547040</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>ptosis</surface-form>
				<RDF-ID>C0005745</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>regular</surface-form>
				<RDF-ID>C0205272</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>eye exams</surface-form>
				<RDF-ID>C0200149</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>amblyopia</surface-form>
				<RDF-ID>C0002418</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>not</surface-form>
				<RDF-ID>C1518422</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0005745 PART_OF C0008059</triple>
		</triples>
	</Sentence>

</Document>


text:
package dtl

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

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

// VirtualNetworksClient is the the DevTest Labs Client.
type VirtualNetworksClient struct {
	ManagementClient
}

// NewVirtualNetworksClient creates an instance of the VirtualNetworksClient client.
func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient {
	return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID)
}

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

// CreateOrUpdate create or replace an existing virtual network. This operation can take a while to complete. This
// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be
// used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// network. virtualNetwork is a virtual network.
func (client VirtualNetworksClient) CreateOrUpdate(resourceGroupName string, labName string, name string, virtualNetwork VirtualNetwork, cancel <-chan struct{}) (<-chan VirtualNetwork, <-chan error) {
	resultChan := make(chan VirtualNetwork, 1)
	errChan := make(chan error, 1)
	go func() {
		var err error
		var result VirtualNetwork
		defer func() {
			if err != nil {
				errChan <- err
			}
			resultChan <- result
			close(resultChan)
			close(errChan)
		}()
		req, err := client.CreateOrUpdatePreparer(resourceGroupName, labName, name, virtualNetwork, cancel)
		if err != nil {
			err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure preparing request")
			return
		}

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

		result, err = client.CreateOrUpdateResponder(resp)
		if err != nil {
			err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "CreateOrUpdate", resp, "Failure responding to request")
		}
	}()
	return resultChan, errChan
}

// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client VirtualNetworksClient) CreateOrUpdatePreparer(resourceGroupName string, labName string, name string, virtualNetwork VirtualNetwork, cancel <-chan struct{}) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"labName":           autorest.Encode("path", labName),
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

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

	preparer := autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPut(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}", pathParameters),
		autorest.WithJSON(virtualNetwork),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare(&http.Request{Cancel: cancel})
}

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

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

// Delete delete virtual network. This operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// network.
func (client VirtualNetworksClient) Delete(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
	resultChan := make(chan autorest.Response, 1)
	errChan := make(chan error, 1)
	go func() {
		var err error
		var result autorest.Response
		defer func() {
			if err != nil {
				errChan <- err
			}
			resultChan <- result
			close(resultChan)
			close(errChan)
		}()
		req, err := client.DeletePreparer(resourceGroupName, labName, name, cancel)
		if err != nil {
			err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "Delete", nil, "Failure preparing request")
			return
		}

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

		result, err = client.DeleteResponder(resp)
		if err != nil {
			err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "Delete", resp, "Failure responding to request")
		}
	}()
	return resultChan, errChan
}

// DeletePreparer prepares the Delete request.
func (client VirtualNetworksClient) DeletePreparer(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"labName":           autorest.Encode("path", labName),
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

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

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

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

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

// Get get virtual network.
//
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// network. expand is specify the $expand query. Example: 'properties($expand=externalSubnets)'
func (client VirtualNetworksClient) Get(resourceGroupName string, labName string, name string, expand string) (result VirtualNetwork, err error) {
	req, err := client.GetPreparer(resourceGroupName, labName, name, expand)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "Get", nil, "Failure preparing request")
		return
	}

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

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

	return
}

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

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

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

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

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

// List list virtual networks in a given lab.
//
// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand
// query. Example: 'properties($expand=externalSubnets)' filter is the filter to apply to the operation. top is the
// maximum number of resources to return from the operation. orderby is the ordering expression for the results, using
// OData notation.
func (client VirtualNetworksClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationVirtualNetwork, err error) {
	req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "List", nil, "Failure preparing request")
		return
	}

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

	result, err = client.ListResponder(resp)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "List", resp, "Failure responding to request")
	}

	return
}

// ListPreparer prepares the List request.
func (client VirtualNetworksClient) ListPreparer(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"labName":           autorest.Encode("path", labName),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

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

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

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

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

// ListNextResults retrieves the next set of results, if any.
func (client VirtualNetworksClient) ListNextResults(lastResults ResponseWithContinuationVirtualNetwork) (result ResponseWithContinuationVirtualNetwork, err error) {
	req, err := lastResults.ResponseWithContinuationVirtualNetworkPreparer()
	if err != nil {
		return result, autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "List", nil, "Failure preparing next results request")
	}
	if req == nil {
		return
	}

	resp, err := client.ListSender(req)
	if err != nil {
		result.Response = autorest.Response{Response: resp}
		return result, autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "List", resp, "Failure sending next results request")
	}

	result, err = client.ListResponder(resp)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "List", resp, "Failure responding to next results request")
	}

	return
}

// ListComplete gets all elements from the list without paging.
func (client VirtualNetworksClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan VirtualNetwork, <-chan error) {
	resultChan := make(chan VirtualNetwork)
	errChan := make(chan error, 1)
	go func() {
		defer func() {
			close(resultChan)
			close(errChan)
		}()
		list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby)
		if err != nil {
			errChan <- err
			return
		}
		if list.Value != nil {
			for _, item := range *list.Value {
				select {
				case <-cancel:
					return
				case resultChan <- item:
					// Intentionally left blank
				}
			}
		}
		for list.NextLink != nil {
			list, err = client.ListNextResults(list)
			if err != nil {
				errChan <- err
				return
			}
			if list.Value != nil {
				for _, item := range *list.Value {
					select {
					case <-cancel:
						return
					case resultChan <- item:
						// Intentionally left blank
					}
				}
			}
		}
	}()
	return resultChan, errChan
}

// Update modify properties of virtual networks.
//
// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual
// network. virtualNetwork is a virtual network.
func (client VirtualNetworksClient) Update(resourceGroupName string, labName string, name string, virtualNetwork VirtualNetworkFragment) (result VirtualNetwork, err error) {
	req, err := client.UpdatePreparer(resourceGroupName, labName, name, virtualNetwork)
	if err != nil {
		err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "Update", nil, "Failure preparing request")
		return
	}

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

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

	return
}

// UpdatePreparer prepares the Update request.
func (client VirtualNetworksClient) UpdatePreparer(resourceGroupName string, labName string, name string, virtualNetwork VirtualNetworkFragment) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"labName":           autorest.Encode("path", labName),
		"name":              autorest.Encode("path", name),
		"resourceGroupName": autorest.Encode("path", resourceGroupName),
		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
	}

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

	preparer := autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPatch(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}", pathParameters),
		autorest.WithJSON(virtualNetwork),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare(&http.Request{})
}

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

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

redpajama_set_name: RedPajamaGithub


text:
/*
Authors: Laura VanDyke and Andrew Fuller
TermProject-Phase1
Date: Octorber 11, 2015
*/

#ifndef accepting_h
#define accepting_h

#include "state.h"

//Declare all of the functions performed when in the accepting state
static state_t* order_recieved();

#endif


text:
/*
 * Powered By wufuwei
 */

package com.osp.biz.dao;

import java.util.*;

import javacommon.base.*;

import cn.org.rapid_framework.page.Page;
import cn.org.rapid_framework.page.PageRequest;

/**
 * @author David Wu email:oradb(a)163.com
 * @version 1.0
 * @since 1.0
 */

import com.osp.biz.model.OspPullcontentlog;

public interface IOspPullcontentlogDao extends EntityDao<OspPullcontentlog,java.lang.Long>{

	public Class getEntityClass();

}


text:
{% extends 'visualizer/viz_base.html' %}

{% load static %}

{% block css %}
    <link href="{% static 'visualizer/css/basic_viz.css' %}" rel="stylesheet" />
    <link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all">

{% endblock %}

{% block viz_content %}

{% endblock %}

{% block js %}

{% endblock %}


text:
@interface ShelfCargoViewController : UITableViewController <UIPopoverPresentationControllerDelegate>

@property (nonatomic, readwrite) OrderItem *cargoItem;
@end


text:
namespace Hops.Models.Hops;

public class Alias
{
    public long HopId { get; set; }

    public string Name { get; set; } = string.Empty;
}


text:
"""WGL tracing code generator."""

from gltrace import GlTracer
from specs.stdapi import Module, API, Void
from specs.glapi import glapi
from specs.wglapi import wglapi

class WglTracer(GlTracer):

    getProcAddressFunctionNames = [
        "wglGetProcAddress",
    ]

    createContextFunctionNames = [
        'wglCreateContext',
        'wglCreateContextAttribsARB',
        'wglCreateLayerContext',
    ]

    destroyContextFunctionNames = [
        'wglDeleteContext',
    ]

    makeCurrentFunctionNames = [
        'wglMakeCurrent',
        'wglMakeContextCurrentARB',
        'wglMakeContextCurrentEXT',
    ]

    def traceFunctionImplBody(self, function):
        if function.name.startswith('wgl'):
            # When implementing WGL extensions OpenGL ICDs often have no
            # alternative to calling back into OPENGL32.DLL's wgl* entry points
            # due to lack of extensibility in the ICD interface.  These
            # internal calls are not only visually confusing but can actually
            # cause problems when tracing, and replaying.  A particularly nasty
            # case is wglCreateContextAttribsARB which ends up calling
            # wglCreateContext/wglCreateLayerContext to obtain a HGLRC that's
            # recognizable by OPENGL32.DLL.  Therefore we need to detect and
            # dispatch internal calls, without further ado.
            print r'    if (_reentrant) {'
            self.invokeFunction(function)
            if function.type is not Void:
                print '    return _result;'
            print r'    }'
            print r'    ReentryScope _reentry;'
            print r'    (void)_reentry;'
            print

        if function.name in self.destroyContextFunctionNames:
            # Unlike other GL APIs like EGL or GLX, WGL will make the context
            # inactive if it's currently the active context.
            print '    if (_wglGetCurrentContext() == hglrc) {'
            print '        gltrace::clearContext();'
            print '    }'
            print '    gltrace::releaseContext((uintptr_t)hglrc);'

        GlTracer.traceFunctionImplBody(self, function)

        if function.name in self.createContextFunctionNames:
            print '    if (_result)'
            print '        gltrace::createContext((uintptr_t)_result);'

        if function.name in self.makeCurrentFunctionNames:
            print '    if (_result) {'
            print '        if (hglrc != NULL)'
            print '            gltrace::setContext((uintptr_t)hglrc);'
            print '        else'
            print '            gltrace::clearContext();'
            print '    }'

if __name__ == '__main__':
    print
    print '#define _GDI32_'
    print
    print '#include <string.h>'
    print '#include <windows.h>'
    print
    print '#include "trace_writer_local.hpp"'
    print '#include "os.hpp"'
    print
    print '// To validate our prototypes'
    print '#define GL_GLEXT_PROTOTYPES'
    print '#define WGL_GLXEXT_PROTOTYPES'
    print
    print '#include "glproc.hpp"'
    print '#include "glsize.hpp"'
    print
    print 'static OS_THREAD_SPECIFIC(uintptr_t) _reentrant;'
    print
    print '// Helper class to track reentries in function scope.'
    print 'struct ReentryScope {'
    print 'inline ReentryScope() { _reentrant = 1; }'
    print 'inline ~ReentryScope() { _reentrant = 0; }'
    print '};'
    print
    module = Module()
    module.mergeModule(glapi)
    module.mergeModule(wglapi)
    api = API()
    api.addModule(module)
    tracer = WglTracer()
    tracer.traceApi(api)


text:
using namespace foundation;

namespace renderer
{

Tracer::Tracer(
    const Scene&                scene,
    const Intersector&          intersector,
    OSLShaderGroupExec&         shadergroup_exec,
    const float                 transparency_threshold,
    const size_t                max_iterations,
    const bool                  print_details)
  : m_intersector(intersector)
  , m_shadergroup_exec(shadergroup_exec)
  , m_assume_no_alpha_mapping(!scene.uses_alpha_mapping())
  , m_assume_no_participating_media(!scene.has_participating_media())
  , m_transmission_threshold(transparency_threshold)
  , m_max_iterations(max_iterations)
{
    if (print_details)
    {
        if (m_assume_no_alpha_mapping && m_assume_no_participating_media)
        {
            RENDERER_LOG_INFO(
                "the scene does not rely on alpha mapping "
                "and does not contain participating media; using probe tracing.");
        }
        else
        {
            RENDERER_LOG_INFO(
                "the scene uses alpha mapping "
                "or contains participating media; using standard tracing.");
        }
    }
}

const ShadingPoint& Tracer::do_trace(
    const ShadingContext&       shading_context,
    const ShadingRay&           ray,
    Spectrum&                   transmission,
    const ShadingPoint*         parent_shading_point)
{
    assert(is_normalized(ray.m_dir));

    transmission.set(1.0f);

    const ShadingPoint* shading_point_ptr = parent_shading_point;
    size_t shading_point_index = 0;
    Vector3d point = ray.m_org;
    size_t iterations = 0;

    m_shading_points[shading_point_index].clear();
    m_intersector.trace(
        ray,
        m_shading_points[shading_point_index],
        shading_point_ptr);

    while (true)
    {
        // Put a hard limit on the number of iterations.
        if (++iterations >= m_max_iterations)
        {
            RENDERER_LOG_WARNING(
                "reached hard iteration limit (%s), breaking trace loop.",
                pretty_int(m_max_iterations).c_str());
            break;
        }

        // Update the pointers to the shading points.
        shading_point_ptr = &m_shading_points[shading_point_index];
        shading_point_index = 1 - shading_point_index;

        const ShadingRay& current_ray = shading_point_ptr->get_ray();

        const ShadingRay::Medium* medium = current_ray.get_current_medium();
        const Volume* volume = medium == nullptr ? nullptr : medium->get_volume();

        // Stop if the ray escaped the scene.
        if (!shading_point_ptr->hit_surface())
        {
            if (volume != nullptr)
            {
                // The ray escaped the scene filled with volume, thus its transmission is 0.
                transmission.set(0.0f);
            }
            break;
        }

        // Retrieve the material at the shading point.
        const Material* material = shading_point_ptr->get_material();
        if (material == nullptr)
            break;

        const Material::RenderData& render_data = material->get_render_data();

        // Compute transmission of participating media.
        const ShadingRay& volume_ray = shading_point_ptr->get_ray();
        if (volume != nullptr)
        {
            Spectrum volume_transmission;
            void* data = volume->evaluate_inputs(shading_context, volume_ray);
            volume->prepare_inputs(shading_context.get_arena(), volume_ray, data);
            volume->evaluate_transmission(data, volume_ray, volume_transmission);
            transmission *= volume_transmission;
        }

        // Compute alpha.
        Alpha alpha;
        evaluate_alpha(*material, *shading_point_ptr, alpha);
        if (render_data.m_bsdf == nullptr &&
            render_data.m_bssrdf == nullptr &&
            render_data.m_volume != nullptr)
        {
            alpha[0] = 0.0f;
        }

        // Stop at the first fully opaque occluder.
        if (alpha[0] >= 1.0f)
            break;

        // Update the transmission factor.
        transmission *= 1.0f - alpha[0];

        // Stop once we hit full opacity.
        if (max_value(transmission) < m_transmission_threshold)
            break;

        // Move past this partial occluder.
        point = shading_point_ptr->get_point();

        // Continue the ray in the same direction.
        ShadingRay next_ray(
            point,
            current_ray.m_dir,
            current_ray.m_time,
            current_ray.m_flags,
            current_ray.m_depth + (volume == nullptr ? 0 : 1));

        // Determine whether the ray is entering or leaving a medium.
        const bool entering = shading_point_ptr->is_entering();

        // Update the medium list.
        const ObjectInstance& object_instance = shading_point_ptr->get_object_instance();
        if (entering)
            next_ray.add_medium(current_ray, &object_instance, material, 1.0f);
        else
            next_ray.remove_medium(current_ray, &object_instance);

        // Trace ray further.
        m_shading_points[shading_point_index].clear();
        m_intersector.trace(
            next_ray,
            m_shading_points[shading_point_index],
            shading_point_ptr);
    }

    return *shading_point_ptr;
}

const ShadingPoint& Tracer::do_trace_between(
    const ShadingContext&       shading_context,
    const foundation::Vector3d& target,
    const ShadingRay&           ray,
    Spectrum&                   transmission,
    const ShadingPoint*         parent_shading_point)
{
    transmission.set(1.0f);

    const ShadingPoint* shading_point_ptr = parent_shading_point;
    size_t shading_point_index = 0;
    Vector3d point = ray.m_org;
    size_t iterations = 0;

    m_shading_points[shading_point_index].clear();
    m_intersector.trace(
        ray,
        m_shading_points[shading_point_index],
        shading_point_ptr);

    while (true)
    {
        // Put a hard limit on the number of iterations.
        if (++iterations >= m_max_iterations)
        {
            RENDERER_LOG_WARNING(
                "reached hard iteration limit (%s), breaking trace loop.",
                pretty_int(m_max_iterations).c_str());
            break;
        }

        // Update the pointers to the shading points.
        shading_point_ptr = &m_shading_points[shading_point_index];
        shading_point_index = 1 - shading_point_index;

        const ShadingRay& current_ray = shading_point_ptr->get_ray();

        // Get information about the medium that contains the shadow ray.
        const ShadingRay::Medium* medium = current_ray.get_current_medium();
        const Volume* volume =
            (medium == nullptr) ? nullptr : medium->get_volume();
        const ShadingRay& volume_ray = shading_point_ptr->get_ray();

        // Compute transmission of participating media.
        if (volume != nullptr)
        {
            Spectrum volume_transmission;
            void* data = volume->evaluate_inputs(shading_context, volume_ray);
            volume->prepare_inputs(shading_context.get_arena(), volume_ray, data);
            volume->evaluate_transmission(data, volume_ray, volume_transmission);
            transmission *= volume_transmission;
        }

        // Stop if the ray hit the target.
        if (!shading_point_ptr->hit_surface())
            break;

        // Retrieve the material at the shading point.
        const Material* material = shading_point_ptr->get_material();
        if (material == nullptr)
            break;

        const Material::RenderData& render_data = material->get_render_data();

        // Compute alpha.
        Alpha alpha;
        evaluate_alpha(*material, *shading_point_ptr, alpha);
        if (
            render_data.m_bsdf == nullptr &&
            render_data.m_bssrdf == nullptr &&
            render_data.m_volume != nullptr)
        {
            alpha[0] = 0.0f;
        }

        // Stop at the first fully opaque occluder.
        if (alpha[0] >= 1.0f)
            break;

        // Update the transmission factor.
        transmission *= 1.0f - alpha[0];

        // Stop once we hit full opacity.
        if (max_value(transmission) < m_transmission_threshold)
            break;

        // Move past this partial occluder.
        point = shading_point_ptr->get_point();

        // Continue the ray in the same direction.
        const Vector3d direction = target - point;
        const double dist = norm(direction);

        ShadingRay next_ray(
            point,
            direction / dist,
            0.0,                    // ray tmin
            dist * (1.0 - 1.0e-6),  // ray tmax
            current_ray.m_time,
            current_ray.m_flags,
            current_ray.m_depth + (volume == nullptr ? 0 : 1));

        // Determine whether the ray is entering or leaving a medium.
        const bool entering = shading_point_ptr->is_entering();

        // Update the medium list.
        const ObjectInstance& object_instance = shading_point_ptr->get_object_instance();
        if (entering)
            next_ray.add_medium(current_ray, &object_instance, material, 1.0f);
        else
            next_ray.remove_medium(current_ray, &object_instance);

        // Trace ray further.
        m_shading_points[shading_point_index].clear();
        m_intersector.trace(
            next_ray,
            m_shading_points[shading_point_index],
            shading_point_ptr);
    }

    return *shading_point_ptr;
}

void Tracer::evaluate_alpha(
    const Material&             material,
    const ShadingPoint&         shading_point,
    Alpha&                      alpha) const
{
    alpha = shading_point.get_alpha();

    // Apply OSL transparency if needed.
    if (const ShaderGroup* sg = material.get_render_data().m_shader_group)
    {
        if (sg->has_transparency())
        {
            Alpha a;
            m_shadergroup_exec.execute_shadow(*sg, shading_point, a);
            alpha *= a;
        }
    }
}

}   // namespace renderer


text:
#include "stdafx.h"
#include "ProjectMan.h"
#include "PagePackage.h"
#include "../MFCExt/BrowseForFolder.h"
#include <Shlwapi.h>

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPagePackage property page

IMPLEMENT_DYNCREATE(CPagePackage, CPropertyPage)

CPagePackage::CPagePackage() : CPropertyPage(CPagePackage::IDD)
, m_AddCrashLib(FALSE)
, m_AddFpsDisplay(FALSE)
, m_AddDebugMode(FALSE)
{
	//{{AFX_DATA_INIT(CPagePackage)
	m_OutputDir = _T("");
	m_CopyExe = FALSE;
	m_CopySet = FALSE;
	m_CopyD3DX = FALSE;
	m_ChangeIcon = FALSE;
	m_ChangeIconSet = FALSE;
	m_ExeName = _T("");
	m_SetName = _T("");
	m_IconName = _T("");
	m_IconNameSet = _T("");
	m_BindPackage = FALSE;
	//}}AFX_DATA_INIT

	m_ProjectRoot = "";
}

CPagePackage::~CPagePackage()
{
}

void CPagePackage::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPagePackage)
	DDX_Control(pDX, IDC_PACKAGES, m_Packages);
	DDX_Control(pDX, IDC_BIND_PACKAGE, m_ButtonBindPackage);
	DDX_Control(pDX, IDC_BROWSE_ICON, m_ButtonBrowseIcon);
	DDX_Control(pDX, IDC_BROWSE_ICON_SET, m_ButtonBrowseIconSet);
	DDX_Control(pDX, IDC_ICON_NAME, m_EditIconName);
	DDX_Control(pDX, IDC_ICON_NAME_SET, m_EditIconNameSet);
	DDX_Control(pDX, IDC_EXE_NAME, m_EditExeName);
	DDX_Control(pDX, IDC_SET_NAME, m_EditSetName);
	DDX_Control(pDX, IDC_CHANGE_ICON, m_CheckChangeIcon);
	DDX_Control(pDX, IDC_CHANGE_ICON_SET, m_CheckChangeIconSet);
	DDX_Control(pDX, IDC_COPY_EXE, m_CheckCopyExe);
	DDX_Control(pDX, IDC_COPY_SET, m_CheckCopySet);
	DDX_Control(pDX, IDC_COPY_D3DX, m_CheckCopyD3DX);
	DDX_Control(pDX, IDC_OUTPUT_DIR, m_EdOutput);
	DDX_Text(pDX, IDC_OUTPUT_DIR, m_OutputDir);
	DDX_Check(pDX, IDC_COPY_EXE, m_CopyExe);
	DDX_Check(pDX, IDC_COPY_SET, m_CopySet);
	DDX_Check(pDX, IDC_COPY_D3DX, m_CopyD3DX);
	DDX_Check(pDX, IDC_CHANGE_ICON, m_ChangeIcon);
	DDX_Check(pDX, IDC_CHANGE_ICON_SET, m_ChangeIconSet);
	DDX_Text(pDX, IDC_EXE_NAME, m_ExeName);
	DDX_Text(pDX, IDC_SET_NAME, m_SetName);
	DDX_Text(pDX, IDC_ICON_NAME, m_IconName);
	DDX_Text(pDX, IDC_ICON_NAME_SET, m_IconNameSet);
	DDX_Check(pDX, IDC_BIND_PACKAGE, m_BindPackage);
	//}}AFX_DATA_MAP
	DDX_Check(pDX, IDC_ADD_CRASH_LIB, m_AddCrashLib);
	DDX_Check(pDX, IDC_ADD_FPS, m_AddFpsDisplay);
	DDX_Check(pDX, IDC_ADD_DEBUG_MODE, m_AddDebugMode);
}

BEGIN_MESSAGE_MAP(CPagePackage, CPropertyPage)
	//{{AFX_MSG_MAP(CPagePackage)
	ON_BN_CLICKED(IDC_BROWSE_OUTPUT, OnBrowseOutput)
	ON_BN_CLICKED(IDC_BROWSE_ICON, OnBrowseIcon)
	ON_BN_CLICKED(IDC_BROWSE_ICON_SET, OnBrowseIconSet)
	ON_BN_CLICKED(IDC_BIND_PACKAGE, OnBindPackage)
	ON_BN_CLICKED(IDC_COPY_EXE, OnStateChange)
	ON_BN_CLICKED(IDC_COPY_SET, OnStateChange)
	ON_BN_CLICKED(IDC_CHANGE_ICON, OnStateChange)
	ON_BN_CLICKED(IDC_CHANGE_ICON_SET, OnStateChange)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPagePackage message handlers

//////////////////////////////////////////////////////////////////////////
BOOL CPagePackage::OnInitDialog()
{
	CPropertyPage::OnInitDialog();
	LOCWIN(this);

	int i;

	m_Packages.Clear();
	for(i=0; i<m_PackageNames.GetSize(); i++){
		m_Packages.AddString(m_PackageNames[i]);
		if(m_PackageNames[i]==m_SelectedPackage) m_Packages.SetCurSel(i);
	}
	if(m_Packages.GetCurSel()==CB_ERR) m_Packages.SetCurSel(0);

	SetState();

	return TRUE;
}

//////////////////////////////////////////////////////////////////////////
void CPagePackage::OnStateChange()
{
	SetState();
}

//////////////////////////////////////////////////////////////////////////
void CPagePackage::SetState()
{
	m_EditExeName.EnableWindow(m_CheckCopyExe.GetCheck());
	m_CheckChangeIcon.EnableWindow(m_CheckCopyExe.GetCheck());
	m_EditIconName.EnableWindow(m_CheckCopyExe.GetCheck() && m_CheckChangeIcon.GetCheck());
	m_ButtonBrowseIcon.EnableWindow(m_CheckCopyExe.GetCheck() && m_CheckChangeIcon.GetCheck());

	m_ButtonBindPackage.EnableWindow(m_CheckCopyExe.GetCheck());
	m_Packages.EnableWindow(m_ButtonBindPackage.GetCheck() && m_CheckCopyExe.GetCheck());

	m_EditSetName.EnableWindow(m_CheckCopySet.GetCheck());
	m_CheckChangeIconSet.EnableWindow(m_CheckCopySet.GetCheck());
	m_EditIconNameSet.EnableWindow(m_CheckCopySet.GetCheck() && m_CheckChangeIconSet.GetCheck());
	m_ButtonBrowseIconSet.EnableWindow(m_CheckCopySet.GetCheck() && m_CheckChangeIconSet.GetCheck());

}

//////////////////////////////////////////////////////////////////////////
void CPagePackage::OnBrowseOutput()
{
	CBrowseForFolder bf;
	bf.hWndOwner = this->GetSafeHwnd();
	bf.strTitle = LOC("/str0103/Select a folder to put the compiled packages to...");

	CString Path;
	m_EdOutput.GetWindowText(Path);

	if(PathIsRelative(Path)){
		char Temp[MAX_PATH];
		if(m_ProjectRoot!="" && PathCanonicalize(Temp, m_ProjectRoot + Path)) Path = CString(Temp);
	}

	bf.strStartupDir = Path;

	if (bf.GetFolder(Path)){

		char RelPath[MAX_PATH];
		if(m_ProjectRoot=="" || !PathRelativePathTo(RelPath, m_ProjectRoot, FILE_ATTRIBUTE_NORMAL, Path, FILE_ATTRIBUTE_NORMAL)){
			strcpy(RelPath, Path);
		}
		m_EdOutput.SetWindowText(RelPath);
	}
}

//////////////////////////////////////////////////////////////////////////
void CPagePackage::OnBrowseIcon()
{
	OnBrowseIcon(m_EditIconName);
}

//////////////////////////////////////////////////////////////////////////
void CPagePackage::OnBrowseIconSet()
{
	OnBrowseIcon(m_EditIconNameSet);
}

//////////////////////////////////////////////////////////////////////////
void CPagePackage::OnBrowseIcon(CEdit& EditName)
{
	CString Path;
	EditName.GetWindowText(Path);

	if(PathIsRelative(Path)){
		char Temp[MAX_PATH];
		if(m_ProjectRoot!="" && PathCanonicalize(Temp, m_ProjectRoot + Path)) Path = CString(Temp);
	}

	CFileFind finder;
	if(!finder.FindFile(Path)) Path = "";

	DWORD Flags = OFN_HIDEREADONLY|OFN_ENABLESIZING|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST;
	CString Filter = LOC("/str0179/Icon files") +  CString(" (*.ico)|*.ico|") + LOC("/str1003/All Files") + " (*.*)|*.*||";

	CFileDialog dlg(TRUE, NULL, Path, Flags, Filter, this);

	if(dlg.DoModal()==IDOK){
		char RelPath[MAX_PATH];
		if(m_ProjectRoot=="" || !PathRelativePathTo(RelPath, m_ProjectRoot, FILE_ATTRIBUTE_NORMAL, dlg.GetPathName(), FILE_ATTRIBUTE_NORMAL)){
			strcpy(RelPath, dlg.GetPathName());
		}
		EditName.SetWindowText(RelPath);
	}
}

//////////////////////////////////////////////////////////////////////////
void CPagePackage::OnBindPackage()
{
	SetState();
}

//////////////////////////////////////////////////////////////////////////
void CPagePackage::AddPackage(CString Name)
{
	m_PackageNames.Add(Name);
}

//////////////////////////////////////////////////////////////////////////
void CPagePackage::OnOK()
{
	if(m_ButtonBindPackage.GetCheck() && m_Packages.GetCurSel()!=CB_ERR) m_SelectedPackage = m_PackageNames[m_Packages.GetCurSel()];
	else m_SelectedPackage = "";

	CPropertyPage::OnOK();
}


text:
<?php

namespace App\DataFixtures\ORM;

use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use App\Entity\EventDetail;

/**
 * Class LoadEventDetailData
 *
 * @author Andrey Nilov <nilov@glavweb.ru>
 * @package Glavweb\DatagridBundle
 */
class LoadEventDetailData extends Fixture implements OrderedFixtureInterface
{
    /**
     * @param ObjectManager $manager
     */
    public function load(ObjectManager $manager)
    {
        $data = [
            ['body' => 'Body for event detail 1', 'reference' => 'event-detail-1'],
            ['body' => 'Body for event detail 2', 'reference' => 'event-detail-2'],
            ['body' => 'Body for event detail 3', 'reference' => 'event-detail-3'],
        ];

        foreach ($data as $item) {
            $eventDetail = new EventDetail();
            $eventDetail->setBody($item['body']);
            $manager->persist($eventDetail);

            $this->addReference($item['reference'], $eventDetail);
        }

        $manager->flush();
    }

    /**
     * Set loading order.
     *
     * @return int
     */
    public function getOrder()
    {
        return 1;
    }
}


text:
{% csrf_token %}
{% include "gui_app/includes/message.html" %}
{{ form.non_field_errors }}
	<input id="project_id" type="hidden" name="project_id" value="{{ blueprint.project_id }}">

	    	*Blueprint name
	        <input id="name" name="name" type="text" class="form-control" value="{{ blueprint.name }}">
	        {{ form.name.errors }}

	    	Description
	        <textarea id="description" name="description" class="form-control">{{ blueprint.description }}</textarea>
	        {{ form.description.errors }}

			* Pattern Select

Please select one or more.

Pattern name : revison Platform:PlatformVersion

			{% for pt in patterns %}
          <input type="hidden" name="revision" value="{'id': '{{ pt.id }}', 'revision': '{{ pt.revision }}'}"></input>

						<input type="checkbox" name="pattern_id" value="{{ pt.id }}" {% for my in my_pattern %}{% ifequal my.id pt.id %} checked="checked" {% endifequal %}{% endfor %}>{{ pt.name }}:{{ pt.revision }}
            <select name="platform_version" id="platform_version" class="form-control input-sm pull-right pull_100" style="width: 100px;">
							  {% for b in platform_version%}
							  <option value="{'id': '{{ pt.id }}', 'platform_version': '{{ b.value }}'}" {% for my in my_pattern %}{% ifequal my.id pt.id %}{% ifequal my.platform_version b.value %} selected="selected" {% endifequal %}{% endifequal %}{% endfor %}>
							       {{ b.value }}
							   </option>
							  {% endfor %}
						</select>
						<select name="platform" id="platform" class="form-control input-sm pull-right pull_100" style="width: 100px;">
							  {% for b in platform%}
							  <option value="{'id': '{{ pt.id }}', 'platform': '{{ b.value }}'}" {% for my in my_pattern %}{% ifequal my.id pt.id %}{% ifequal my.platform b.value %} selected="selected" {% endifequal %}{% endifequal %}{% endfor %}>
							       {{ b.value }}
							   </option>
							  {% endfor %}
						</select>

			{% endfor %}


test

buck.outputPath: buck-out/gen/test/test-output

buck.ruleType: genrule

buck.type: genrule

out: test-output


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace AjaxTipsAndTricks.Models
{
    public class Order
    {
        public int ID { get; set; }
        public decimal Total { get; set; }
        public string ProductTitle { get; set; }
    }
}


text:
<?php

namespace Google\Service\Document;

class GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores extends \Google\Collection
{
  protected $collection_key = 'detectedDefects';
  protected $detectedDefectsType = GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect::class;
  protected $detectedDefectsDataType = 'array';
  /**
   * @var float
   */
  public $qualityScore;

  /**
   * @param GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect[]
   */
  public function setDetectedDefects($detectedDefects)
  {
    $this->detectedDefects = $detectedDefects;
  }
  /**
   * @return GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect[]
   */
  public function getDetectedDefects()
  {
    return $this->detectedDefects;
  }
  /**
   * @param float
   */
  public function setQualityScore($qualityScore)
  {
    $this->qualityScore = $qualityScore;
  }
  /**
   * @return float
   */
  public function getQualityScore()
  {
    return $this->qualityScore;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores::class, 'Google_Service_Document_GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores');


text:
name = GrowlMail

# The build style
# Possible values are Debug and Release
BUILDCONFIGURATION?=Release

all: $(name)

$(name):
	xcodebuild -configuration $(BUILDCONFIGURATION) build
clean:
	xcodebuild clean
dist:
	xcodebuild -configuration $(BUILDCONFIGURATION) -workspace GrowlMail.xcworkspace -scheme "Package GrowlMail" build


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

<TITLE>
InstanceCreator
</TITLE>

<META NAME="date" CONTENT="2014-06-02">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.google.gson

Interface InstanceCreator<T>

Type Parameters:
T - the type of object that will be created by this implementation.

public interface InstanceCreator<T>

This interface is implemented to create instances of a class that does not define a no-args
 constructor. If you can modify the class, you should instead add a private, or public
 no-args constructor. However, that is not possible for library classes, such as JDK classes, or
 a third-party library that you do not have source-code of. In such cases, you should define an
 instance creator for the class. Implementations of this interface should be registered with
 GsonBuilder.registerTypeAdapter(Type, Object) method before Gson will be able to use
 them.

Let us look at an example where defining an InstanceCreator might be useful. The
 Id class defined below does not have a default no-args constructor.

 public class Id<T> {
   private final Class<T> clazz;
   private final long value;
   public Id(Class<T> clazz, long value) {
     this.clazz = clazz;
     this.value = value;
   }
 }

If Gson encounters an object of type Id during deserialization, it will throw an
 exception. The easiest way to solve this problem will be to add a (public or private) no-args
 constructor as follows:

 private Id() {
   this(Object.class, 0L);
 }

However, let us assume that the developer does not have access to the source-code of the
 Id class, or does not want to define a no-args constructor for it. The developer
 can solve this problem by defining an InstanceCreator for Id:

 class IdInstanceCreator implements InstanceCreator<Id> {
   public Id createInstance(Type type) {
     return new Id(Object.class, 0L);
   }
 }

Note that it does not matter what the fields of the created instance contain since Gson will
 overwrite them with the deserialized values specified in Json. You should also ensure that a
 new object is returned, not a common object since its fields will be overwritten.
 The developer will need to register IdInstanceCreator with Gson as follows:

 Gson gson = new GsonBuilder().registerTypeAdapter(Id.class, new IdInstanceCreator()).create();

Author:

Inderjeet Singh, Joel Leitch

Method Summary

 T
createInstance(java.lang.reflect.Type type)

          Gson invokes this call-back method during deserialization to create an instance of the
 specified type.

Method Detail

createInstance

T createInstance(java.lang.reflect.Type type)

Gson invokes this call-back method during deserialization to create an instance of the
 specified type. The fields of the returned instance are overwritten with the data present
 in the Json. Since the prior contents of the object are destroyed and overwritten, do not
 return an instance that is useful elsewhere. In particular, do not return a common instance,
 always use new to create a new instance.

Parameters:
type - the parameterized T represented as a Type.

Returns:
a default object instance of type T.

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
/**
 */

package org.apache.harmony.test.func.reg.jit.btest1408;

import java.util.logging.Logger;

import org.apache.harmony.test.share.reg.RegressionTest;

public class Btest1408 extends RegressionTest {

    public static final byte BADBYTE = -128;

    public static void main(String[] args) {
        System.exit(new Btest1408().test(Logger.global, args));
    }

    public int test(Logger logger, String [] args) {
        return f2() ? passed() : failed();
    }

    public int f1() {
        return 2;
    }
    public boolean f2() {
        int res = f1();
        return (BADBYTE < res);
    }
}


text:
RangeSlider is custom iOS7 control that gives you a UISlider like UI for selecting a range of values.
This project is a modified verson of: https://github.com/buildmobile/iosrangeslider.

## Authors

* Vlad Seryakov

## License

MIT License.


text:
package de.jdynameta.metamodel.application;

import java.lang.String;
import java.lang.Long;

public  class AppLongDomainModel extends de.jdynameta.base.value.GenericValueObjectImpl

{

	/**
	 *Constructor
	 */
	public AppLongDomainModel ()
	{
		super(ApplicationRepository.getSingleton().getClassForName("AppLongDomainModel"));
	}
	/**
	 *Constructor for subclasses
	 */
	public AppLongDomainModel (de.jdynameta.base.metainfo.ClassInfo infoForType)
	{
		super(infoForType);
	}

	/**
	 * Get the representation
	 * @generated
	 * @return get the representation
	 */
	public String getRepresentation()
	{
		return (String) getValue("representation");
	}

	/**
	 * set the representation
	 * @generated
	 * @param representation
	 */
	public void setRepresentation( String aRepresentation)
	{
		 setValue( "representation",(aRepresentation!= null) ? aRepresentation.trim() : null);
	}

	/**
	 * Get the dbValue
	 * @generated
	 * @return get the dbValue
	 */
	public Long getDbValueValue()
	{
		return (Long) getValue("dbValue");
	}

	/**
	 * set the dbValue
	 * @generated
	 * @param dbValue
	 */
	public void setDbValue( Long aDbValue)
	{
		 setValue( "dbValue",aDbValue);
	}

	public long getDbValue()
	{
		return getDbValueValue().intValue();
	}

	/**
	 * Get the type
	 * @generated
	 * @return get the type
	 */
	public de.jdynameta.metamodel.application.AppLongType getType()
	{
		return (de.jdynameta.metamodel.application.AppLongType) getValue("Type");
	}

	/**
	 * set the type
	 * @generated
	 * @param type
	 */
	public void setType( AppLongType aType)
	{
		 setValue( "Type",aType);
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object
	 */
	@Override
	public boolean equals(Object compareObj)
	{
		AppLongDomainModel typeObj = (AppLongDomainModel) compareObj;
		return typeObj != null
				&& (
					(
					(getDbValueValue() != null
					&& typeObj.getDbValueValue() != null
					&& this.getDbValueValue().equals( typeObj.getDbValueValue()) )

					&& (getType() != null
					&& typeObj.getType() != null
					&& typeObj.getType().equals( typeObj.getType()) )
					)
					|| ( getDbValueValue() == null
					&& typeObj.getDbValueValue() == null
					&& getType() == null
					&& typeObj.getType() == null
					&& this == typeObj )
				);
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode()
	{
		return 				 (( getDbValueValue() != null) ? getDbValueValue().hashCode() : super.hashCode())
			^
				 (( getType() != null) ? getType().hashCode() : super.hashCode())		;
	}

}


text:
import { pad } from '../index';

declare const Pkcs7: typeof pad.Pkcs7;
export = Pkcs7;


text:
        highscore: {{navbar.user.highScore}}

      fettigkeitsgrad: {{navbar.user.fettigkeitsgrad}}

          Intro

High Scores

            sign up/sign in

Contact

Twitter

Facebook

Github

Dribbble

Email


text:
package org.jrimum.bopepo.pdf;

import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Image;
import com.itextpdf.text.pdf.PdfContentByte;
import com.itextpdf.text.pdf.PdfCopy;
import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.PdfStamper;
import java.io.ByteArrayOutputStream;
import java.util.Collection;

import org.jrimum.utilix.Exceptions;

/**
 * Serviços e atividades relacionadas a manipulação de PDF (provavelmente da lib
 * iText).
 *
 * @author Gilmar P.S.L.
 *
 * @since 0.2
 *
 * @version 0.2
 */
public class PDFs {

    /**
     *

     * Muda um input field para uma imgem com as dimensões e possição do field.
     *

     *
     * @param stamper
     * @param positions
     * @param image
     * @return rectanglePDF
     * @throws DocumentException
     *
     * @since 0.2
     */
    public static PdfRectangle changeFieldToImage(PdfStamper stamper,
            float[] positions, Image image) throws DocumentException {

        PdfRectangle rect = new PdfRectangle(positions);

        return changeFieldToImage(stamper, rect, image);
    }

    /**
     *

     * Muda um input field para uma imgem com as dimensões e possição do field.
     *

     *
     * @param stamper
     * @param rect
     * @param image
     * @return rectanglePDF
     * @throws DocumentException
     *
     * @since 0.2
     */
    public static PdfRectangle changeFieldToImage(PdfStamper stamper,
            PdfRectangle rect, Image image) throws DocumentException {

        // Ajustando o tamanho da imagem de acordo com o tamanho do campo.
        // image.scaleToFit(rect.getWidth(), rect.getHeight());
        image.scaleAbsolute(rect.getWidth(), rect.getHeight());

        // A rotina abaixo tem por objetivo deixar a imagem posicionada no
        // centro
        // do field, tanto na perspectiva horizontal como na vertical.
        // Caso não se queira mais posicionar a imagem no centro do field, basta
        // efetuar a chamada a seguir:
        // "image.setAbsolutePosition
        // (rect.getLowerLeftX(),rect.getLowerLeftY());"
        image.setAbsolutePosition(rect.getLowerLeftX()
                + (rect.getWidth() - image.getScaledWidth()) / 2, rect
                .getLowerLeftY()
                + (rect.getHeight() - image.getScaledHeight()) / 2);

        int page = rect.getPage();
        PdfContentByte overContent = stamper.getOverContent(page);
        //Tentar a proxima pagina
        if (overContent == null) {
            overContent = stamper.getOverContent(page + 1);
        }
        overContent.addImage(image);
        return rect;
    }

    /**
     * Junta varios arquivos pdf em um só.
     *
     * @param pdfFiles Coleção de array de bytes
     *
     * @return Arquivo PDF em forma de byte
     * @since 0.2
     */
    public static byte[] mergeFiles(Collection<byte[]> pdfFiles) {

        return mergeFiles(pdfFiles, null);
    }

    /**
     * Junta varios arquivos pdf em um só.
     *
     * @param pdfFiles Coleção de array de bytes
     * @param info Usa somente as informações
     * (title,subject,keywords,author,creator)
     *
     * @return Arquivo PDF em forma de byte
     *
     * @since 0.2
     */
    public static byte[] mergeFiles(Collection<byte[]> pdfFiles, PdfDocInfo info) {

        try {

            ByteArrayOutputStream byteOS = new ByteArrayOutputStream();

            Document document = new Document();

            PdfCopy copy = new PdfCopy(document, byteOS);

            document.open();

            for (byte[] f : pdfFiles) {

                PdfReader reader = new PdfReader(f);

                for (int page = 1; page <= reader.getNumberOfPages(); page++) {

                    copy.addPage(copy.getImportedPage(reader, page));
                }

                reader.close();
            }

            document.addCreationDate();

            if (info != null) {

                document.addAuthor(info.author());
                document.addCreator(info.creator());
                document.addTitle(info.title());
                document.addSubject(info.subject());
                document.addKeywords(info.keywords());
            }

            copy.close();
            document.close();
            byteOS.close();

            return byteOS.toByteArray();

        } catch (Exception e) {
            return Exceptions.throwIllegalStateException(e);
        }
    }

}


text:
package com.impetus.kundera.persistence.event;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * The Class PersonnelDTO.
 *
 * @author amresh.singh
 */

@Entity
@Table(name = "person", schema = "KunderaTest@kunderatest")
@EntityListeners({ PersonHandler.class })
public class PersonEventDispatch
{

    /** The person id. */
    @Id
    private String personId;

    /** The first name. */
    @Column(name = "first_name")
    private String firstName;

    /** The last name. */
    @Column(name = "last_name")
    private String lastName;

    /**
     * Instantiates a new personnel dto.
     *
     * @param personId
     *            the person id
     * @param firstName
     *            the first name
     * @param lastName
     *            the last name
     */
    public PersonEventDispatch(String personId, String firstName, String lastName)
    {
        this.personId = personId;
        this.firstName = firstName;
        this.lastName = lastName;
    }

    /**
     * Instantiates a new personnel dto.
     */
    public PersonEventDispatch()
    {

    }

    /**
     * Gets the person id.
     *
     * @return the personId
     */
    public String getPersonId()
    {
        return personId;
    }

    /**
     * Sets the person id.
     *
     * @param personId
     *            the personId to set
     */
    public void setPersonId(String personId)
    {
        this.personId = personId;
    }

    /**
     * Gets the first name.
     *
     * @return the firstName
     */
    public String getFirstName()
    {
        return firstName;
    }

    /**
     * Sets the first name.
     *
     * @param firstName
     *            the firstName to set
     */
    public void setFirstName(String firstName)
    {
        this.firstName = firstName;
    }

    /**
     * Gets the last name.
     *
     * @return the lastName
     */
    public String getLastName()
    {
        return lastName;
    }

    /**
     * Sets the last name.
     *
     * @param lastName
     *            the lastName to set
     */
    public void setLastName(String lastName)
    {
        this.lastName = lastName;
    }

}


text:
class NewFileClass
{
public:
  void doSomething(int i) {}
};


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
	<item android:state_pressed="false" android:state_enabled="true"
          android:state_focused="false" android:color="@color/header_title"/>
    <item android:state_pressed="true" android:state_enabled="true"
          android:color="@color/header_title_disabled"/>
    <item android:state_pressed="false" android:state_enabled="true"
          android:state_focused="true" android:color="@color/header_title" />
    <item android:state_pressed="false" android:state_enabled="false"
          android:state_focused="true" android:color="@color/header_title_disabled" />
    <item android:state_pressed="false" android:state_enabled="false"
          android:state_focused="false" android:color="@color/header_action_disabled" />
</selector>


text:
namespace fgui {
    export interface IUISource {
        fileName: string;
        loaded: boolean;
        load(callback: Function, thisObj: any): void;
    }
}