text:
namespace efsw {

FileWatcherImpl::FileWatcherImpl( FileWatcher * parent ) :
	mFileWatcher( parent ),
	mInitOK( false ),
	mIsGeneric( false )
{
	System::maxFD();
}

FileWatcherImpl::~FileWatcherImpl()
{
}

bool FileWatcherImpl::initOK()
{
	return mInitOK;
}

bool FileWatcherImpl::linkAllowed( const std::string& curPath, const std::string& link )
{
	return ( mFileWatcher->followSymlinks() && mFileWatcher->allowOutOfScopeLinks() ) || -1 != String::strStartsWith( curPath, link );
}

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Van Rooij, De Kesel & Verbeken, Nova Hedwigia 77(1-2): 235 (2003)

#### Original name
Lactarius rufomarginatus Verbeken & Van Rooij

### Remarks
null

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Nelmio\ApiDocBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Reference;

class RegisterExtractorParsersPass implements CompilerPassInterface
{
    public function process(ContainerBuilder $container)
    {
        if (false === $container->hasDefinition('nelmio_api_doc.extractor.api_doc_extractor')) {
            return;
        }

        $definition = $container->getDefinition('nelmio_api_doc.extractor.api_doc_extractor');

        //find registered parsers and sort by priority
        $sortedParsers = array();
        foreach ($container->findTaggedServiceIds('nelmio_api_doc.extractor.parser') as $id => $tagAttributes) {
            foreach ($tagAttributes as $attributes) {
                $priority = isset($attributes['priority']) ? $attributes['priority'] : 0;
                $sortedParsers[$priority][] = $id;
            }
        }

        //add parsers if any
        if (!empty($sortedParsers)) {
            krsort($sortedParsers);
            $sortedParsers = call_user_func_array('array_merge', $sortedParsers);

            //add method call for each registered parsers
            foreach ($sortedParsers as $id) {
                $definition->addMethodCall('addParser', array(new Reference($id)));
            }
        }
    }
}


text:
App.events = (function() {
	let check = function(e) {
		e.preventDefault()
		let input = $('#event_name')
		if(input.val() === "") {
			input.focus()
			App.flash.warning("", 'SPÉCyphi 1 N0N STeplé')
		}
		else
			$('form').submit()
	}

	return {
		init: function() {
			App.covers.setBindingName($('#event_name'))
			App.covers.setBindingDate($('#event_date'))
			App.covers.setBindingCover($('#event_cover'))
			App.covers.setActionOnSubmit(check)
		}
	}
})()

$(function() {
	App.events.init()
	$('select').material_select()
	Materialize.updateTextFields()
	$('.datepicker').pickadate({
		selectYears: 15,
		container: '#root-container',
		selectMonths: true,
		format: 'dd/mm/yyyy',
		formatSubmit: 'dd/mm/yyyy'
	})
})
;


text:
package com.nulabinc.zxcvbn;

import com.nulabinc.zxcvbn.matchers.Match;

import java.util.List;

public interface Matcher {
    public List<Match> execute(CharSequence password);
}


text:
package org.innovateuk.ifs.management.competition.setup.application.sectionupdater;

import org.innovateuk.ifs.commons.rest.RestResult;
import org.innovateuk.ifs.commons.service.ServiceResult;
import org.innovateuk.ifs.competition.resource.CompetitionResource;
import org.innovateuk.ifs.competition.resource.CompetitionSetupSubsection;
import org.innovateuk.ifs.competition.service.CompetitionSetupRestService;
import org.innovateuk.ifs.management.competition.setup.application.form.DetailsForm;
import org.innovateuk.ifs.management.competition.setup.core.form.CompetitionSetupForm;
import org.innovateuk.ifs.user.resource.UserResource;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;

import java.math.BigDecimal;

import static org.assertj.core.api.Assertions.assertThat;
import static org.innovateuk.ifs.competition.builder.CompetitionResourceBuilder.newCompetitionResource;
import static org.innovateuk.ifs.user.builder.UserResourceBuilder.newUserResource;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;

@RunWith(MockitoJUnitRunner.Silent.class)
public class ApplicationDetailsSectionSaverTest {

    @InjectMocks
    private DetailsSectionUpdater service;

    @Mock
    private CompetitionSetupRestService competitionSetupRestService;

    @Before
    public void setup() {
        LocalValidatorFactoryBean validator = new LocalValidatorFactoryBean();
        validator.afterPropertiesSet();
        ReflectionTestUtils.setField(service, "validator", validator);
    }

    @Test
    public void testSectionToSave() {
        assertThat(service.subsectionToSave()).isEqualByComparingTo(CompetitionSetupSubsection.APPLICATION_DETAILS);
    }

    @Test
    public void testsSupportsForm() {
        assertThat(service.supportsForm(DetailsForm.class)).isTrue();
        assertThat(service.supportsForm(CompetitionSetupForm.class)).isFalse();
    }

    @Test
    public void doSaveSection_validInputIsMappedProperlyAndResultsInUpdateRestCall() {
        CompetitionResource competitionResource = newCompetitionResource().withId(1L).build();
        DetailsForm detailsForm = new DetailsForm();
        detailsForm.setMinProjectDuration(new BigDecimal(9));
        detailsForm.setMaxProjectDuration(new BigDecimal(10));
        detailsForm.setUseResubmissionQuestion(true);

        UserResource loggedInUser = newUserResource().build();

        when(competitionSetupRestService.update(any())).thenReturn(RestResult.restSuccess());

        ServiceResult<Void> result = service.doSaveSection(competitionResource, detailsForm, loggedInUser);

        CompetitionResource expectedCompetitionResource = newCompetitionResource().build();
        expectedCompetitionResource.setId(1L);
        expectedCompetitionResource.setMinProjectDuration(9);
        expectedCompetitionResource.setMaxProjectDuration(10);
        expectedCompetitionResource.setUseResubmissionQuestion(true);

        assertThat(result.isSuccess()).isTrue();
        verify(competitionSetupRestService, times(1)).update(expectedCompetitionResource);
    }

    @Test
    public void doSaveSection_errorWhenFieldsAreEmpty() {
        CompetitionResource competitionResource = newCompetitionResource().build();
        DetailsForm detailsForm = new DetailsForm();

        UserResource loggedInUser = newUserResource().build();

        ServiceResult<Void> result = service.doSaveSection(competitionResource, detailsForm, loggedInUser);

        assertThat(result.isFailure()).isTrue();
        assertThat(result.getErrors().size()).isEqualTo(3);
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("minProjectDuration") &&
                        error.getErrorKey().equals("validation.field.must.not.be.blank"))
                .isNotEmpty();
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("maxProjectDuration") &&
                        error.getErrorKey().equals("validation.field.must.not.be.blank"))
                .isNotEmpty();
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("useResubmissionQuestion") &&
                        error.getErrorKey().equals("validation.application.must.indicate.resubmission.or.not"))
                .isNotEmpty();

        verifyNoInteractions(competitionSetupRestService);
    }

    @Test
    public void doSaveSection_errorWhenProjectDurationsAreBelowMinimumAllowed() {
        CompetitionResource competitionResource = newCompetitionResource().build();
        DetailsForm detailsForm = new DetailsForm();
        detailsForm.setUseResubmissionQuestion(false);
        detailsForm.setMaxProjectDuration(new BigDecimal(0));
        detailsForm.setMinProjectDuration(new BigDecimal(0));

        UserResource loggedInUser = newUserResource().build();

        ServiceResult<Void> result = service.doSaveSection(competitionResource, detailsForm, loggedInUser);

        assertThat(result.isFailure()).isTrue();
        assertThat(result.getErrors().size()).isEqualTo(2);
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("minProjectDuration") &&
                        error.getErrorKey().equals("competition.setup.applicationdetails.projectduration.min"))
                .isNotEmpty();
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("maxProjectDuration") &&
                        error.getErrorKey().equals("competition.setup.applicationdetails.projectduration.min"))
                .isNotEmpty();

        verifyNoInteractions(competitionSetupRestService);
    }

    @Test
    public void doSaveSection_errorWhenProjectDurationsAreNegative() {
        CompetitionResource competitionResource = newCompetitionResource().build();
        DetailsForm detailsForm = new DetailsForm();
        detailsForm.setUseResubmissionQuestion(false);
        detailsForm.setMaxProjectDuration(new BigDecimal(-1));
        detailsForm.setMinProjectDuration(new BigDecimal(-1));

        UserResource loggedInUser = newUserResource().build();

        ServiceResult<Void> result = service.doSaveSection(competitionResource, detailsForm, loggedInUser);

        assertThat(result.isFailure()).isTrue();
        assertThat(result.getErrors().size()).isEqualTo(2);
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("minProjectDuration") &&
                        error.getErrorKey().equals("competition.setup.applicationdetails.projectduration.min"))
                .isNotEmpty();
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("maxProjectDuration") &&
                        error.getErrorKey().equals("competition.setup.applicationdetails.projectduration.min"))
                .isNotEmpty();

        verifyNoInteractions(competitionSetupRestService);
    }

    @Test
    public void doSaveSection_errorWhenDecimalsInProjectDurations() {
        CompetitionResource competitionResource = newCompetitionResource().build();
        DetailsForm detailsForm = new DetailsForm();
        detailsForm.setUseResubmissionQuestion(false);
        detailsForm.setMinProjectDuration(new BigDecimal(3.5));
        detailsForm.setMaxProjectDuration(new BigDecimal(3.5));

        UserResource loggedInUser = newUserResource().build();

        ServiceResult<Void> result = service.doSaveSection(competitionResource, detailsForm, loggedInUser);

        assertThat(result.isFailure()).isTrue();
        assertThat(result.getErrors().size()).isEqualTo(2);
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("minProjectDuration") &&
                        error.getErrorKey().equals("validation.standard.integer.non.decimal.format"))
                .isNotEmpty();
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("maxProjectDuration") &&
                        error.getErrorKey().equals("validation.standard.integer.non.decimal.format"))
                .isNotEmpty();

        verifyNoInteractions(competitionSetupRestService);
    }

    @Test
    public void doSaveSection_successWhenMinFieldIsEqualToMaxField() {
        CompetitionResource competitionResource = newCompetitionResource().build();
        DetailsForm detailsForm = new DetailsForm();

        detailsForm.setMinProjectDuration(new BigDecimal(10));
        detailsForm.setMaxProjectDuration(new BigDecimal(10));
        detailsForm.setUseResubmissionQuestion(true);

        UserResource loggedInUser = newUserResource().build();

        when(competitionSetupRestService.update(any())).thenReturn(RestResult.restSuccess());

        ServiceResult<Void> result = service.doSaveSection(competitionResource, detailsForm, loggedInUser);

        assertThat(result.isSuccess()).isTrue();

        verify(competitionSetupRestService, times(1)).update(any());
    }

    @Test
    public void doSaveSection_errorWhenMinFieldExceedsMaxField() {
        CompetitionResource competitionResource = newCompetitionResource().build();
        DetailsForm detailsForm = new DetailsForm();

        detailsForm.setMinProjectDuration(new BigDecimal(11));
        detailsForm.setMaxProjectDuration(new BigDecimal(10));
        detailsForm.setUseResubmissionQuestion(false);

        UserResource loggedInUser = newUserResource().build();

        ServiceResult<Void> result = service.doSaveSection(competitionResource, detailsForm, loggedInUser);

        assertThat(result.isFailure()).isTrue();
        assertThat(result.getErrors().size()).isEqualTo(2);
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("minProjectDuration") &&
                        error.getErrorKey().equals("competition.setup.applicationdetails.min.projectduration.exceedsmax"))
                .isNotEmpty();
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("maxProjectDuration") &&
                        error.getErrorKey().equals("competition.setup.applicationdetails.max.projectduration.beneathmin"))
                .isNotEmpty();

        verifyNoInteractions(competitionSetupRestService);
    }

    @Test
    public void doSaveSection_errorWhenProjectDurationsExceedMaximumAllowed() {
        CompetitionResource competitionResource = newCompetitionResource().build();
        DetailsForm detailsForm = new DetailsForm();
        detailsForm.setMinProjectDuration(new BigDecimal(85));
        detailsForm.setMaxProjectDuration(new BigDecimal(85));
        detailsForm.setUseResubmissionQuestion(false);

        UserResource loggedInUser = newUserResource().build();

        ServiceResult<Void> result = service.doSaveSection(competitionResource, detailsForm, loggedInUser);

        assertThat(result.isFailure()).isTrue();
        assertThat(result.getErrors().size()).isEqualTo(2);
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("minProjectDuration") &&
                        error.getErrorKey().equals("competition.setup.applicationdetails.projectduration.max"))
                .isNotEmpty();
        assertThat(result.getErrors())
                .filteredOn(error -> error.getFieldName().equals("maxProjectDuration") &&
                        error.getErrorKey().equals("competition.setup.applicationdetails.projectduration.max"))
                .isNotEmpty();

        verifyNoInteractions(competitionSetupRestService);
    }
}


text:
class IStringBuilder;

class JSONObject : public JSONBaseObject {
private:
  std::map<std::string, JSONBaseObject*> _entries;

  void putKeyAndValueDescription(const std::string& key,
                                 IStringBuilder* isb) const;
  void putKeyAndValueToString(const std::string& key,
                              IStringBuilder* isb) const;

public:
  ~JSONObject();

  const JSONObject* asObject() const {
    return this;
  }

  const JSONBaseObject* get(const std::string& key) const;

  const JSONObject*  getAsObject (const std::string& key) const;
  const JSONArray*   getAsArray  (const std::string& key) const;
  const JSONBoolean* getAsBoolean(const std::string& key) const;
  const JSONNumber*  getAsNumber (const std::string& key) const;
  const JSONString*  getAsString (const std::string& key) const;

  bool getAsBoolean(const std::string& key,
                    bool defaultValue) const;

  double getAsNumber(const std::string& key,
                     double defaultValue) const;

  const std::string getAsString(const std::string& key,
                                const std::string& defaultValue) const;

  void put(const std::string& key,
           JSONBaseObject* object);

  void put(const std::string& key,
           const std::string& value);

  void put(const std::string& key,
           double value);

  void put(const std::string& key,
           float value);

  void put(const std::string& key,
           int value);

  void put(const std::string& key,
           long long value);

  void put(const std::string& key,
           bool value);

  size_t size() const;

  std::vector<std::string> keys() const;

  const std::string description() const;
  const std::string toString() const;

  JSONObject* deepCopy() const;

  void acceptVisitor(JSONVisitor* visitor) const;

};

#endif


text:
/**
 *
 */

define(['backbone', 'AdminApplication'], function (Backbone, app) {
	app.meta.models.GradoModel = Backbone.Model.extend({
		idAttribute: 'idGrado',
		defaults: {
			gradoNombre: ''
		}
	});

	return app.meta.models.GradoModel;
});


text:
/**
 * Action Icons.css
 */

/**
 * TABLE OF CONTENTS
 *
 * =BASE
 * =ACTION_STATES
 * =DISABLED_ACTION_STATES
 */

/**
 * =BASE
 */
.action_icon {
  cursor: pointer;
  display: block;
  float: left;
  height: 16px;
  padding-left: 20px;
  padding-top: 3px;
}

/**
 * =ACTION_STATES
 */
.add_icon {
  background: url(../../images/g9/icons/icon_add_16.png) no-repeat left 50%;
}
.remove_icon {
  background: url(../../images/g9/icons/icon_remove_16.png) no-repeat left 50%;
}
.delete_icon {
  background: url(../../images/g9/icons/icon_delete_16.png) no-repeat left 50%;
}
.edit_icon {
  background: url(../../images/g9/icons/icon_edit_16.png) no-repeat left 50%;
}
.preview_icon {
    background: url(../../images/g9/icons/icon_preview_16.png) no-repeat left 50%;
}
.preview_icon_wobg{
    background: url(../../images/g9/icons/icon_preview_wobg_16.png) no-repeat left 50%;
}
.move_icon {
  background: url(../../images/g9/icons/icon_move_16.png) no-repeat left 50%;
}
.clone_icon {
  background: url(../../images/g9/icons/icon_clone_16.png) no-repeat left 50%;
}
.lock_icon {
    background: url(../../images/g9/icons/icon_lock_16.png) no-repeat left 50%;
}

/**
 * =DISABLED_ACTION_STATES
 */
.add_icon_disabled,
.remove_icon_disabled,
.delete_icon_disabled,
.lock_icon_disabled,
.edit_icon_disabled,
.move_icon_disable,
.clone_icon_disable {
    color: #999999;
    cursor: default;
    display: inline-block;
}
.remove_icon_disabled,
.delete_icon_disabled {
  background: url(../../images/g9/icons/icon_delete_disabled_16.png) no-repeat left 50%;
}

.add_icon_disabled {
    background: url("../../images/g9/icons/icon_add_disabled_16.png") no-repeat scroll left 50% rgba(0, 0, 0, 0);
    line-height: 16px;
    padding-left: 20px;
}
.lock_icon_disabled{
    background: url("../../images/g9/icons/icon_lock_disabled_16.png") no-repeat scroll left 50% rgba(0, 0, 0, 0);
    padding-left: 20px;
}

.remove_icon_disabled,
.delete_icon_disabled {
  background: url(../../images/g9/icons/icon_delete_disabled_16.png) no-repeat left 50%;
}
.edit_icon_disabled {
}
.move_icon_disabled {
}
.clone_icon_disabled {
}

/**
 * != NEEDS MIGRAGION: EXISTS B/C OF NOT USING UI HELPER
**/
.add_link {
  display: inline-block;
  background: url(../../images/g9/icons/icon_add.png) no-repeat left 50%;
  padding: 5px 5px 5px 20px;
}
.menu_link {
  background: url(../../images/g9/icons/arrow_open.png) no-repeat right 50%;
  padding-right: 16px;
}
.icon_remove {
  display: block;
  height: 18px;
  width: 18px;
  background: url(../../images/g9/icon_close_16.png) no-repeat 1px 3px;
  cursor: pointer;
}
.icon_cannot_remove {
  background: url(../../images/g9/icon_close_16_disabled.png);
  display: block;
  height: 18px;
  width: 18px;
  cursor: inherit;
}


text:
/**
 */
package relations.impl;

import java.util.Collection;

import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.util.InternalEList;

import org.eclipse.emf.internal.cdo.CDOObjectImpl;

import relations.CouldResolveObject;
import relations.RelationsPackage;

/**
 *
 * An implementation of the model object 'Could Resolve Object'.
 *
 *

 * The following features are implemented:
 *

 *

 *
{@link relations.impl.CouldResolveObjectImpl#getCouldResolve Could Resolve}

 *
{@link relations.impl.CouldResolveObjectImpl#getCouldBeResolvedBy Could Be Resolved By}

 *

 *
 * @generated
 */
public abstract class CouldResolveObjectImpl extends CDOObjectImpl implements CouldResolveObject {
	/**
	 *
	 *
	 * @generated
	 */
	protected CouldResolveObjectImpl() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return RelationsPackage.Literals.COULD_RESOLVE_OBJECT;
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected int eStaticFeatureCount() {
		return 0;
	}

	/**
	 *
	 *
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	public EList<CouldResolveObject> getCouldResolve() {
		return (EList<CouldResolveObject>)eDynamicGet(RelationsPackage.COULD_RESOLVE_OBJECT__COULD_RESOLVE, RelationsPackage.Literals.COULD_RESOLVE_OBJECT__COULD_RESOLVE, true, true);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	public EList<CouldResolveObject> getCouldBeResolvedBy() {
		return (EList<CouldResolveObject>)eDynamicGet(RelationsPackage.COULD_RESOLVE_OBJECT__COULD_BE_RESOLVED_BY, RelationsPackage.Literals.COULD_RESOLVE_OBJECT__COULD_BE_RESOLVED_BY, true, true);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_RESOLVE:
				return ((InternalEList<InternalEObject>)(InternalEList<?>)getCouldResolve()).basicAdd(otherEnd, msgs);
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_BE_RESOLVED_BY:
				return ((InternalEList<InternalEObject>)(InternalEList<?>)getCouldBeResolvedBy()).basicAdd(otherEnd, msgs);
		}
		return super.eInverseAdd(otherEnd, featureID, msgs);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_RESOLVE:
				return ((InternalEList<?>)getCouldResolve()).basicRemove(otherEnd, msgs);
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_BE_RESOLVED_BY:
				return ((InternalEList<?>)getCouldBeResolvedBy()).basicRemove(otherEnd, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_RESOLVE:
				return getCouldResolve();
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_BE_RESOLVED_BY:
				return getCouldBeResolvedBy();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_RESOLVE:
				getCouldResolve().clear();
				getCouldResolve().addAll((Collection<? extends CouldResolveObject>)newValue);
				return;
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_BE_RESOLVED_BY:
				getCouldBeResolvedBy().clear();
				getCouldBeResolvedBy().addAll((Collection<? extends CouldResolveObject>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_RESOLVE:
				getCouldResolve().clear();
				return;
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_BE_RESOLVED_BY:
				getCouldBeResolvedBy().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_RESOLVE:
				return !getCouldResolve().isEmpty();
			case RelationsPackage.COULD_RESOLVE_OBJECT__COULD_BE_RESOLVED_BY:
				return !getCouldBeResolvedBy().isEmpty();
		}
		return super.eIsSet(featureID);
	}

} //CouldResolveObjectImpl


text:
<o2 use I18N />
<o2 setResourcePath>o2.Universal.editObject.class</o2:setResourcePath>

$lang->getString('headerEditClass') $object->getMetaName()

<o2 formTable>

    $lang->getString('objectIdIn') O2_OBJ_CLASS
    $object->getId()

    $lang->getString('lblClassName')
    $object->getClassName()

  <o2 input label="$lang->getString('lblMgrClassName')" name="object.managerClass" value="$object->getManagerClass()" rule="length:,128" ruleMsg="$lang->getString('errorMgrClassName')" size="60" />
  <o2 input label="$lang->getString('lblEditUrl')"      name="object.editUrl"      value="$object->getEditUrl()"      rule="length:,128" ruleMsg="$lang->getString('errorEditUrl')"      size="60" />
  <o2 input label="$lang->getString('lblEditTemplate')" name="object.editTemplate" value="$object->getEditTemplate()" rule="length:,128" ruleMsg="$lang->getString('errorEditTemplate')" size="60" />
  <o2 input label="$lang->getString('lblNewUrl')"       name="object.newUrl"       value="$object->getNewUrl()"       rule="length:,128" ruleMsg="$lang->getString('errorNewUrl')"       size="60" />
</o2:formTable>


text:
package com.qq;

import com.qq.open.OpenApiV3;
import com.qq.open.OpensnsException;
import java.util.HashMap;

/**
 *
 * @author FUX
 */
public class QQApi {

    /**
     *
     */
    public static boolean DEBUG = true;

    /**
     * OpenApi服务器地址
     * @return
     */
    public static String getSvrAddr()
    {
        if(DEBUG)
        {
            return "119.147.19.43";
        }

        return "openapi.tencentyun.com";
    }

    public static void testGetUserInfo(OpenApiV3 sdk, String openid, String openkey, String pf)
    {
        // 指定OpenApi Cgi名字
        String scriptName = "/v3/user/get_info";

        // 指定HTTP请求协议类型
        String protocol = "http";

        // 填充URL请求参数
        HashMap<String,String> params = new HashMap<String, String>();
        params.put("openid", openid);
        params.put("openkey", openkey);
        params.put("pf", pf);

        try
        {
            String resp = sdk.api(scriptName, params, protocol);
            System.out.println(resp);
        }
        catch (OpensnsException e)
        {
            System.out.printf("Request Failed. code:%d, msg:%s\n", e.getErrorCode(), e.getMessage());
            e.printStackTrace();
        }
    }

}


text:
#include <assert.h>
#include "fsl_spi_dma_shared_function.h"

/*******************************************************************************
 * Variables
 ******************************************************************************/

/* Pointer to runtime state structure.*/
void * g_spiDmaStatePtr[HW_SPI_INSTANCE_COUNT] = {
    NULL
};

/*******************************************************************************
 * Code
 ******************************************************************************/

/*!
 * @brief The function SPI_DRV_DmaIRQHandler passes IRQ control to either the master or
 * slave driver.
 *
 * The address of the IRQ handlers are checked to make sure they are non-zero before
 * they are called. If the IRQ handler's address is zero, it means that driver was
 * not present in the link (because the IRQ handlers are marked as weak). This would
 * actually be a program error, because it means the master/slave config for the IRQ
 * was set incorrectly.
 */
void SPI_DRV_DmaIRQHandler(uint32_t instance)
{
    assert(instance < HW_SPI_INSTANCE_COUNT);
    uint32_t baseAddr = g_spiBaseAddr[instance];

    if (SPI_HAL_IsMaster(baseAddr))
    {
        /* Master mode.*/
        SPI_DRV_DmaMasterIRQHandler(instance);
    }
    else
    {
        /* Slave mode.*/
        SPI_DRV_DmaSlaveIRQHandler(instance);
    }
}

/*******************************************************************************
 * EOF
 ******************************************************************************/


text:
Dots and Boxes
==============

This game is very well described here [https://icebreakerideas.com/fun-games-to-play-at-home/#Dots_and_Boxes](https://icebreakerideas.com/fun-games-to-play-at-home/#Dots_and_Boxes)

![](https://icebreakerideas.com/wp-content/uploads/2015/12/Dots-and-Boxes-e1450594187730.jpg?raw=true)

* game begins with empty grid of dots
* players take turns at adding a horizontal or vertical line between two un-joined adjacent dots
* a player who completes the fourth side of a 1x1 box earns a point, writes their initials in the box and gets another turn.
* game is over when there are no more lines that can be placed
* winner is the player with most boxes
* the board can be of any size 2x2, 5x5 works well for experts

We will write scenarios for this game and code to completion (without the UI).


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LPToolKit;
using LPToolKit.LaunchPad;
using LPToolKit.Implants;
using LPToolKit.Session;
using Newtonsoft.Json;
using LPToolKit.MIDI;

namespace LPToolKit.WebServer.Ajax
{
    internal class LoggingAjax
    {
        private static string GetFilename(string path)
        {
            var i = path.LastIndexOf("/");
            return i > -1 ? path.Substring(i + 1) : path;
        }

        /// <summary>
        /// Handler for ajax requests to /logs/
        /// </summary>
        /// <param name="ctx"></param>
        public static void Process(LPWebContext ctx)
        {
            try
            {
                string logType = GetFilename(ctx.Request.Path);

                // get requests for data since an ordinal
                int ordinal = 0;
                int.TryParse(ctx.Request["i"], out ordinal);

                switch (logType)
                {
                    case "console":
                        ctx.Response.Write(JsonConvert.SerializeObject(UserSession.Current.Console.Messages.GetSinceOrdinal(ordinal)));
                        break;
                    case "midi":
                        ctx.Response.Write(JsonConvert.SerializeObject(UserSession.Current.MidiMap.Log.GetSinceOrdinal(ordinal)));
                        break;
                    case "osc":
                        ctx.Response.Write(JsonConvert.SerializeObject(UserSession.Current.OSC.Log.GetSinceOrdinal(ordinal)));
                        break;
                    case "lag":
                        /*int count = 50;
                        int.TryParse(ctx.Request["count"], out count);
                        ctx.Response.Write(JsonConvert.SerializeObject(MIDI.MidiOutputThread.Lag.GetRecent(count)));
                        break;*/
                        throw new Exception("lag screen is now obsolete.  will be replaces with full kernel debugger");
                    default:
                        throw new Exception("Unknown log type: " + logType);
                }
            }
            catch (Exception ex)
            {
                ctx.Response.Send500(ex.ToString());
            }
        }

        private class LagTimeStats
        {
            public List<int> Times = new List<int>();
            public double TotalTime = 0;
            public double Average = 0;
        }
    }
}


text:
package com.themodernway.server.core.support.spring;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import java.util.LinkedHashMap;
import java.util.Properties;

import org.springframework.util.DefaultPropertiesPersister;
import org.springframework.util.PropertiesPersister;

import com.themodernway.common.api.java.util.CommonOps;
import com.themodernway.common.api.java.util.StringOps;
import com.themodernway.server.core.security.IStringCryptoProvider;

public final class CoreEncryptedPropertiesProviderPlaceholderConfigurer extends CorePropertiesProviderPlaceholderConfigurer
{
    private boolean m_onsave = false;

    public CoreEncryptedPropertiesProviderPlaceholderConfigurer(final IStringCryptoProvider crypto, final String prefix)
    {
        setPropertiesPersister(new CoreEncryptionPropertiesPersister(CommonOps.requireNonNull(crypto), this, StringOps.requireTrimOrNull(prefix)));
    }

    public void setEncryptOnSave(final boolean onsave)
    {
        m_onsave = onsave;
    }

    public boolean isEncryptOnSave()
    {
        return m_onsave;
    }

    private static final class CoreEncryptionPropertiesPersister extends DefaultPropertiesPersister implements PropertiesPersister
    {
        private final IStringCryptoProvider                                m_crypto;

        private final CoreEncryptedPropertiesProviderPlaceholderConfigurer m_parent;

        private final String                                               m_prefix;

        public CoreEncryptionPropertiesPersister(final IStringCryptoProvider crypto, final CoreEncryptedPropertiesProviderPlaceholderConfigurer parent, final String prefix)
        {
            m_crypto = CommonOps.requireNonNull(crypto);

            m_parent = CommonOps.requireNonNull(parent);

            m_prefix = StringOps.requireTrimOrNull(prefix);
        }

        @Override
        public void load(final Properties props, final InputStream is) throws IOException
        {
            super.load(props, is);

            decrypt(props);
        }

        @Override
        public void load(final Properties props, final Reader reader) throws IOException
        {
            super.load(props, reader);

            decrypt(props);
        }

        @Override
        public void store(final Properties props, final OutputStream os, final String header) throws IOException
        {
            if (m_parent.isEncryptOnSave())
            {
                encrypt(props);
            }
            super.store(props, os, header);
        }

        @Override
        public void store(final Properties props, final Writer writer, final String header) throws IOException
        {
            if (m_parent.isEncryptOnSave())
            {
                encrypt(props);
            }
            super.store(props, writer, header);
        }

        @Override
        public void loadFromXml(final Properties props, final InputStream is) throws IOException
        {
            super.loadFromXml(props, is);

            decrypt(props);
        }

        @Override
        public void storeToXml(final Properties props, final OutputStream os, final String header) throws IOException
        {
            if (m_parent.isEncryptOnSave())
            {
                encrypt(props);
            }
            super.storeToXml(props, os, header);
        }

        @Override
        public void storeToXml(final Properties props, final OutputStream os, final String header, final String encoding) throws IOException
        {
            if (m_parent.isEncryptOnSave())
            {
                encrypt(props);
            }
            super.storeToXml(props, os, header, encoding);
        }

        private final void decrypt(final Properties props)
        {
            final LinkedHashMap<String, String> saved = new LinkedHashMap<>();

            props.forEach((e, o) -> {

                final String k = e.toString();

                final String v = props.getProperty(k);

                if ((null != v) && (false == v.isEmpty()) && (v.startsWith(m_prefix)))
                {
                    final String r = v.replace(m_prefix, StringOps.EMPTY_STRING);

                    final String d = (r.isEmpty() ? r : m_crypto.decrypt(r));

                    saved.put(k, d);
                }
            });
            saved.forEach((k, v) -> props.setProperty(k, v));
        }

        private final void encrypt(final Properties props)
        {
            final LinkedHashMap<String, String> saved = new LinkedHashMap<>(props.size());

            for (final Object o : props.keySet())
            {
                final String k = o.toString();

                final String v = props.getProperty(k);

                if ((null != v) && (false == v.isEmpty()))
                {
                    final String e = m_prefix + m_crypto.encrypt(v);

                    saved.put(k, e);
                }
            }
            saved.forEach((k, v) -> props.setProperty(k, v));
        }
    }
}


text:
package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// VvolBinding A VMware virtual volume (vVol) binding is an association between a LUN of class `protocol_endpoint` and a LUN of class `vvol`. Class `protocol_endpoint` LUNs are mapped to igroups and granted access using the same configuration as class `regular` LUNs. When a class `vvol` LUN is bound to a mapped class `protocol_endpoint` LUN, VMware can access the class `vvol` LUN through the class `protocol_endpoint` LUN mapping.

// Class `protocol_endpoint` and `vvol` LUNs support many-to-many vVol bindings. A LUN of one class can be bound to zero or more LUNs of the opposite class.

// The vVol binding between any two specific LUNs is reference counted. When a REST POST is executed for a vVol binding that already exists, the vVol binding reference count is incremented. When a REST DELETE is executed, the vVol binding reference count is decremented. Only when the vVol binding count reaches zero, or the query parameter `delete_all_references` is supplied, is the vVol binding destroyed.
//
// swagger:model vvol_binding
type VvolBinding struct {

	// links
	Links *VvolBindingLinks `json:"_links,omitempty"`

	// The vVol binding between any two specific LUNs is reference counted. When a REST POST is executed for a vVol binding that already exists, the vVol binding reference count is incremented. When a REST DELETE is executed, the vVol binding reference count is decremented. Only when the vVol binding count reaches zero, or the query parameter `delete_all_references` is supplied, is the vVol binding destroyed.
	//
	// Example: 1
	// Read Only: true
	Count int64 `json:"count,omitempty"`

	// The identifier assigned to the vVol binding. The bind identifier is unique amongst all class `vvol` LUNs bound to the same class `protocol_endpoint` LUN.
	//
	// Example: 1
	// Read Only: true
	ID int64 `json:"id,omitempty"`

	// Indicates if the class `procotol_endpoint` LUN and the class `vvol` LUN are on the same cluster node.
	//
	// Example: true
	// Read Only: true
	IsOptimal *bool `json:"is_optimal,omitempty"`

	// protocol endpoint
	ProtocolEndpoint *VvolBindingProtocolEndpoint `json:"protocol_endpoint,omitempty"`

	// svm
	Svm *VvolBindingSvm `json:"svm,omitempty"`

	// vvol
	Vvol *VvolBindingVvol `json:"vvol,omitempty"`
}

// Validate validates this vvol binding
func (m *VvolBinding) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateLinks(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateProtocolEndpoint(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateSvm(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateVvol(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBinding) validateLinks(formats strfmt.Registry) error {
	if swag.IsZero(m.Links) { // not required
		return nil
	}

	if m.Links != nil {
		if err := m.Links.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("_links")
			}
			return err
		}
	}

	return nil
}

func (m *VvolBinding) validateProtocolEndpoint(formats strfmt.Registry) error {
	if swag.IsZero(m.ProtocolEndpoint) { // not required
		return nil
	}

	if m.ProtocolEndpoint != nil {
		if err := m.ProtocolEndpoint.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("protocol_endpoint")
			}
			return err
		}
	}

	return nil
}

func (m *VvolBinding) validateSvm(formats strfmt.Registry) error {
	if swag.IsZero(m.Svm) { // not required
		return nil
	}

	if m.Svm != nil {
		if err := m.Svm.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("svm")
			}
			return err
		}
	}

	return nil
}

func (m *VvolBinding) validateVvol(formats strfmt.Registry) error {
	if swag.IsZero(m.Vvol) { // not required
		return nil
	}

	if m.Vvol != nil {
		if err := m.Vvol.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("vvol")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this vvol binding based on the context it is used
func (m *VvolBinding) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := m.contextValidateLinks(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := m.contextValidateCount(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := m.contextValidateID(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := m.contextValidateIsOptimal(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := m.contextValidateProtocolEndpoint(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := m.contextValidateSvm(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := m.contextValidateVvol(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBinding) contextValidateLinks(ctx context.Context, formats strfmt.Registry) error {

	if m.Links != nil {
		if err := m.Links.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("_links")
			}
			return err
		}
	}

	return nil
}

func (m *VvolBinding) contextValidateCount(ctx context.Context, formats strfmt.Registry) error {

	if err := validate.ReadOnly(ctx, "count", "body", int64(m.Count)); err != nil {
		return err
	}

	return nil
}

func (m *VvolBinding) contextValidateID(ctx context.Context, formats strfmt.Registry) error {

	if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil {
		return err
	}

	return nil
}

func (m *VvolBinding) contextValidateIsOptimal(ctx context.Context, formats strfmt.Registry) error {

	if err := validate.ReadOnly(ctx, "is_optimal", "body", m.IsOptimal); err != nil {
		return err
	}

	return nil
}

func (m *VvolBinding) contextValidateProtocolEndpoint(ctx context.Context, formats strfmt.Registry) error {

	if m.ProtocolEndpoint != nil {
		if err := m.ProtocolEndpoint.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("protocol_endpoint")
			}
			return err
		}
	}

	return nil
}

func (m *VvolBinding) contextValidateSvm(ctx context.Context, formats strfmt.Registry) error {

	if m.Svm != nil {
		if err := m.Svm.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("svm")
			}
			return err
		}
	}

	return nil
}

func (m *VvolBinding) contextValidateVvol(ctx context.Context, formats strfmt.Registry) error {

	if m.Vvol != nil {
		if err := m.Vvol.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("vvol")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *VvolBinding) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VvolBinding) UnmarshalBinary(b []byte) error {
	var res VvolBinding
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// VvolBindingLinks vvol binding links
//
// swagger:model VvolBindingLinks
type VvolBindingLinks struct {

	// self
	Self *Href `json:"self,omitempty"`
}

// Validate validates this vvol binding links
func (m *VvolBindingLinks) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateSelf(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingLinks) validateSelf(formats strfmt.Registry) error {
	if swag.IsZero(m.Self) { // not required
		return nil
	}

	if m.Self != nil {
		if err := m.Self.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("_links" + "." + "self")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this vvol binding links based on the context it is used
func (m *VvolBindingLinks) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := m.contextValidateSelf(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingLinks) contextValidateSelf(ctx context.Context, formats strfmt.Registry) error {

	if m.Self != nil {
		if err := m.Self.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("_links" + "." + "self")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *VvolBindingLinks) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VvolBindingLinks) UnmarshalBinary(b []byte) error {
	var res VvolBindingLinks
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// VvolBindingProtocolEndpoint The class `protocol_endpoint` LUN in the vVol binding. Required in POST.
//
// swagger:model VvolBindingProtocolEndpoint
type VvolBindingProtocolEndpoint struct {

	// links
	Links *VvolBindingProtocolEndpointLinks `json:"_links,omitempty"`

	// The fully qualified path name of the LUN composed of the "/vol" prefix, the volume name, the (optional) qtree name, and base name of the LUN. Valid in POST and PATCH.
	//
	// Example: /vol/volume1/lun1
	Name string `json:"name,omitempty"`

	// The unique identifier of the LUN.
	//
	// Example: 1cd8a442-86d1-11e0-ae1c-123478563412
	UUID string `json:"uuid,omitempty"`
}

// Validate validates this vvol binding protocol endpoint
func (m *VvolBindingProtocolEndpoint) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateLinks(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingProtocolEndpoint) validateLinks(formats strfmt.Registry) error {
	if swag.IsZero(m.Links) { // not required
		return nil
	}

	if m.Links != nil {
		if err := m.Links.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("protocol_endpoint" + "." + "_links")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this vvol binding protocol endpoint based on the context it is used
func (m *VvolBindingProtocolEndpoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := m.contextValidateLinks(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingProtocolEndpoint) contextValidateLinks(ctx context.Context, formats strfmt.Registry) error {

	if m.Links != nil {
		if err := m.Links.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("protocol_endpoint" + "." + "_links")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *VvolBindingProtocolEndpoint) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VvolBindingProtocolEndpoint) UnmarshalBinary(b []byte) error {
	var res VvolBindingProtocolEndpoint
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// VvolBindingProtocolEndpointLinks vvol binding protocol endpoint links
//
// swagger:model VvolBindingProtocolEndpointLinks
type VvolBindingProtocolEndpointLinks struct {

	// self
	Self *Href `json:"self,omitempty"`
}

// Validate validates this vvol binding protocol endpoint links
func (m *VvolBindingProtocolEndpointLinks) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateSelf(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingProtocolEndpointLinks) validateSelf(formats strfmt.Registry) error {
	if swag.IsZero(m.Self) { // not required
		return nil
	}

	if m.Self != nil {
		if err := m.Self.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("protocol_endpoint" + "." + "_links" + "." + "self")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this vvol binding protocol endpoint links based on the context it is used
func (m *VvolBindingProtocolEndpointLinks) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := m.contextValidateSelf(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingProtocolEndpointLinks) contextValidateSelf(ctx context.Context, formats strfmt.Registry) error {

	if m.Self != nil {
		if err := m.Self.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("protocol_endpoint" + "." + "_links" + "." + "self")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *VvolBindingProtocolEndpointLinks) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VvolBindingProtocolEndpointLinks) UnmarshalBinary(b []byte) error {
	var res VvolBindingProtocolEndpointLinks
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// VvolBindingSvm The SVM in which the vVol binding and its LUNs are located. Required in POST.
//
// swagger:model VvolBindingSvm
type VvolBindingSvm struct {

	// links
	Links *VvolBindingSvmLinks `json:"_links,omitempty"`

	// The name of the SVM.
	//
	// Example: svm1
	Name string `json:"name,omitempty"`

	// The unique identifier of the SVM.
	//
	// Example: 02c9e252-41be-11e9-81d5-00a0986138f7
	UUID string `json:"uuid,omitempty"`
}

// Validate validates this vvol binding svm
func (m *VvolBindingSvm) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateLinks(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingSvm) validateLinks(formats strfmt.Registry) error {
	if swag.IsZero(m.Links) { // not required
		return nil
	}

	if m.Links != nil {
		if err := m.Links.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("svm" + "." + "_links")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this vvol binding svm based on the context it is used
func (m *VvolBindingSvm) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := m.contextValidateLinks(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingSvm) contextValidateLinks(ctx context.Context, formats strfmt.Registry) error {

	if m.Links != nil {
		if err := m.Links.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("svm" + "." + "_links")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *VvolBindingSvm) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VvolBindingSvm) UnmarshalBinary(b []byte) error {
	var res VvolBindingSvm
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// VvolBindingSvmLinks vvol binding svm links
//
// swagger:model VvolBindingSvmLinks
type VvolBindingSvmLinks struct {

	// self
	Self *Href `json:"self,omitempty"`
}

// Validate validates this vvol binding svm links
func (m *VvolBindingSvmLinks) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateSelf(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingSvmLinks) validateSelf(formats strfmt.Registry) error {
	if swag.IsZero(m.Self) { // not required
		return nil
	}

	if m.Self != nil {
		if err := m.Self.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("svm" + "." + "_links" + "." + "self")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this vvol binding svm links based on the context it is used
func (m *VvolBindingSvmLinks) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := m.contextValidateSelf(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingSvmLinks) contextValidateSelf(ctx context.Context, formats strfmt.Registry) error {

	if m.Self != nil {
		if err := m.Self.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("svm" + "." + "_links" + "." + "self")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *VvolBindingSvmLinks) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VvolBindingSvmLinks) UnmarshalBinary(b []byte) error {
	var res VvolBindingSvmLinks
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// VvolBindingVvol The class `vvol` LUN in the vVol binding. Required in POST.
//
// swagger:model VvolBindingVvol
type VvolBindingVvol struct {

	// links
	Links *VvolBindingVvolLinks `json:"_links,omitempty"`

	// The fully qualified path name of the LUN composed of the "/vol" prefix, the volume name, the (optional) qtree name, and base name of the LUN. Valid in POST and PATCH.
	//
	// Example: /vol/volume1/lun1
	Name string `json:"name,omitempty"`

	// The unique identifier of the LUN.
	//
	// Example: 1cd8a442-86d1-11e0-ae1c-123478563412
	UUID string `json:"uuid,omitempty"`
}

// Validate validates this vvol binding vvol
func (m *VvolBindingVvol) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateLinks(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingVvol) validateLinks(formats strfmt.Registry) error {
	if swag.IsZero(m.Links) { // not required
		return nil
	}

	if m.Links != nil {
		if err := m.Links.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("vvol" + "." + "_links")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this vvol binding vvol based on the context it is used
func (m *VvolBindingVvol) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := m.contextValidateLinks(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingVvol) contextValidateLinks(ctx context.Context, formats strfmt.Registry) error {

	if m.Links != nil {
		if err := m.Links.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("vvol" + "." + "_links")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *VvolBindingVvol) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VvolBindingVvol) UnmarshalBinary(b []byte) error {
	var res VvolBindingVvol
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// VvolBindingVvolLinks vvol binding vvol links
//
// swagger:model VvolBindingVvolLinks
type VvolBindingVvolLinks struct {

	// self
	Self *Href `json:"self,omitempty"`
}

// Validate validates this vvol binding vvol links
func (m *VvolBindingVvolLinks) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateSelf(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingVvolLinks) validateSelf(formats strfmt.Registry) error {
	if swag.IsZero(m.Self) { // not required
		return nil
	}

	if m.Self != nil {
		if err := m.Self.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("vvol" + "." + "_links" + "." + "self")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this vvol binding vvol links based on the context it is used
func (m *VvolBindingVvolLinks) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := m.contextValidateSelf(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VvolBindingVvolLinks) contextValidateSelf(ctx context.Context, formats strfmt.Registry) error {

	if m.Self != nil {
		if err := m.Self.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("vvol" + "." + "_links" + "." + "self")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (m *VvolBindingVvolLinks) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VvolBindingVvolLinks) UnmarshalBinary(b []byte) error {
	var res VvolBindingVvolLinks
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}


text:
try:
    from ._mod import _append
except ImportError:
    _append = None

def _pyappend(lst, item, count):
    for i in range(count):
        lst.append(item)

if _append is not None:
    append = _append
else:
    append = _pyappend


text:
namespace Gdv.Boilers {

        using System;
        using Gdv;
        using System.Collections.Generic;
        using Diva.Basics;

        [BoilersAttribute]
        public static class ImageSheep {

                [BoilFuncAttribute (typeof (Gdv.ImageSheep))]
                public static void Boil (object o, ObjectContainer container, IBoilProvider provider)
                {
                        Gdv.ImageSheep sheep = o as Gdv.ImageSheep;
                        container.Add (new RefParameter ("projectformat", sheep.ProjectFormat, provider));
                        container.Add (new StringParameter ("basefile", sheep.BaseFile));
                }

                [GetDepObjectsFuncAttribute (typeof (Gdv.ImageSheep))]
                public static List <object> GetDepObjects (object o)
                {
                        Gdv.ImageSheep sheep = o as Gdv.ImageSheep;
                        return BoilFactory.GetList (sheep.ProjectFormat);
                }

                [UnBoilFuncAttribute (typeof (Gdv.ImageSheep))]
                public static object UnBoil (ObjectContainer container, IBoilProvider provider)
                {
                        Gdv.ProjectFormat format = (Gdv.ProjectFormat)
                                container.FindRef ("projectformat").ToObject (provider);
                        string baseFile =
                                container.FindString ("basefile").Value;

                        return new Gdv.ImageSheep (format, baseFile);
                }

        }

}


text:
package biotech.client;

import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
import biotech.Biotech;
import biotech.container.containerCowMilker;
import biotech.tileentity.tileEntityCowMilker;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class guiCowMilker extends GuiContainer
{
	private tileEntityCowMilker	tileEntity;

	private int					containerWidth;
	private int					containerHeight;

	public guiCowMilker(InventoryPlayer playerInventory, tileEntityCowMilker tileEntity)
	{
		super(new containerCowMilker(playerInventory, tileEntity));

		this.tileEntity = tileEntity;
	}

	/**
	 * Draw the foreground layer for the GuiContainer (everything in front of
	 * the items)
	 */
	@Override
	protected void drawGuiContainerForegroundLayer(int i, int j)
	{
		this.fontRenderer.drawString(this.tileEntity.getInvName(), 57, 4, 4210752);

		String displayText = "";

		if (this.tileEntity.isPowered)
		{
			displayText = "Working";
		}
		else
		{
			displayText = "Idle";
		}

		this.fontRenderer.drawString("Status: " + displayText, 28, 22, 0x00CD00);
		this.fontRenderer.drawString("Milk: " + this.tileEntity.getMilkStored() + "/" + this.tileEntity.getMaxMilk(), 28, 32, 0x00CD00);

		this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
	}

	/**
	 * Draw the background layer for the GuiContainer (everything behind the
	 * items)
	 */
	@Override
	protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
	{
		GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
		ResourceLocation rLoc = new ResourceLocation(Biotech.MOD_ID, this.getTexture());
		this.mc.renderEngine.func_110577_a(rLoc);

		this.containerWidth = ((this.width - this.xSize) / 2);
		this.containerHeight = ((this.height - this.ySize) / 2);

		this.drawTexturedModalRect(containerWidth, containerHeight, 0, 0, xSize, ySize);

		int milkScale = (int) (((double) this.tileEntity.getMilkStored() / this.tileEntity.getMaxMilk()) * 50);

		this.drawTexturedModalRect(containerWidth + 108, containerHeight + 71 - milkScale, 176, 50 - milkScale, 8, milkScale);

		if (this.tileEntity.processTicks > 0)
		{
			int scale = (int) (((double) this.tileEntity.processTicks / (double) this.tileEntity.PROCESS_TIME_REQUIRED) * 30);
			this.drawTexturedModalRect(containerWidth + 122, containerHeight + 38, 176, 51, 12, 28 - scale);
		}
	}

	public static String getTexture()
	{
		return Biotech.GUI_PATH + "GUI_CowMilker.png";
	}
}


text:
namespace GitReleaseNotes.Website
{
    using GitReleaseNotes.Website.Logging;
    using System.Web;
    using System.Web.Http;
    using Catel.Logging;
    using Catel.Mvc;
    using IoC;

    public class Global : HttpApplication
    {
        #region Methods
        protected void Application_Start()
        {
            GitReleaseNotesEnvironment.Log = new GitReleaseNotesLogger();

#if DEBUG
            LogManager.AddDebugListener(true);
#endif

            DependencyInjectionConfig.RegisterServiceLocatorAsDependencyResolver();
            GlobalConfiguration.Configuration.DependencyResolver = new CatelWebApiDependencyResolver();
        }
        #endregion
    }
}


text:
@implementation WeatherModel

#pragma mark - WTJSONModelProtocol
-(id)WTJSONModelProtocolInstanceForKey:(NSString*)key{
    return nil;
}

@end


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <title>jss px examples</title>

        Simple | Source


text:
using System;
using System.Reflection;
using System.Configuration;
using System.Transactions;
using PetShop.Model;
using PetShop.IDAL;

namespace PetShop.BLL
{
    /// <summary>
    /// A business component to manage the creation of orders
    /// Creation of an order requires a distributed transaction
    /// </summary>
    public class Order {

        // Using a static variable will cache the Order Insert strategy object for all instances of Order
        // We implement it this way to improve performance, so that the code will only load the instance once
        private static readonly PetShop.IBLLStrategy.IOrderStrategy orderInsertStrategy = LoadInsertStrategy();
        private static readonly PetShop.IMessaging.IOrder orderQueue = PetShop.MessagingFactory.QueueAccess.CreateOrder();

        // Get an instance of the Order DAL using the DALFactory
        // Making this static will cache the DAL instance after the initial load
        private static readonly IOrder dal = PetShop.DALFactory.DataAccess.CreateOrder();

        private const string CREDIT_CARD_ERROR_MSG = "Credit card processor thrown an exception.";

        /// <summary>
        /// A method to insert a new order into the system
        /// As part of the order creation the inventory will be reduced by the quantity ordered
        /// </summary>
        /// <param name="order">All the information about the order</param>
        public void Insert(OrderInfo order) {

            // Call credit card procesor
            ProcessCreditCard(order);

            // Insert the order (a)synchrounously based on configuration
            orderInsertStrategy.Insert(order);
        }

        /// <summary>
        /// Process credit card and get authorization number.
        /// </summary>
        /// <param name="order">Order object, containing credit card information, total, etc.</param>
        private void ProcessCreditCard(OrderInfo order) {

            // In the real life environment here should be a call to the credit card processor API.
            // We simulate credit card processing and generate an authorization number.
            Random rnd = new Random();
            order.AuthorizationNumber = (int)(rnd.NextDouble() * int.MaxValue);

            // Check if authorisation succeded
            if (!order.AuthorizationNumber.HasValue)
                throw new ApplicationException(CREDIT_CARD_ERROR_MSG);
        }

        /// <summary>
        /// A method to read an order from the system
        /// </summary>
        /// <param name="orderId">Unique identifier for an order</param>
        /// <returns>All the information about the order</returns>
        public OrderInfo GetOrder(int orderId) {

            // Validate input
            if (orderId < 1)
                return null;

            // Return the order from the DAL
            return dal.GetOrder(orderId);
        }

        /// <summary>
        /// Method to process asynchronous order from the queue
        /// </summary>
        public OrderInfo ReceiveFromQueue(int timeout) {

            return orderQueue.Receive(timeout);
        }

        /// <summary>
        /// This method determines which Order Insert Strategy to use based on user's configuration.
        /// </summary>
        /// <returns>An instance of PetShop.IBLLStrategy.IOrderStrategy</returns>
        private static PetShop.IBLLStrategy.IOrderStrategy LoadInsertStrategy() {

            // Look up which strategy to use from config file
            string path = ConfigurationManager.AppSettings["OrderStrategyAssembly"];
            string className = ConfigurationManager.AppSettings["OrderStrategyClass"];

            // Using the evidence given in the config file load the appropriate assembly and class
            return (PetShop.IBLLStrategy.IOrderStrategy)Assembly.Load(path).CreateInstance(className);
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<Form xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<CommandBarLocation>None</CommandBarLocation>
	<VerticalScroll>useIfNecessary</VerticalScroll>
	<AutoCommandBar name="ФормаКоманднаяПанель" id="-1"/>
	<Events>
		<Event name="OnCreateAtServer">ПриСозданииНаСервере</Event>
	</Events>
	<ChildItems>
		<CommandBar name="ОсновнаяКоманднаяПанель" id="1">
			<ExtendedTooltip name="ОсновнаяКоманднаяПанельExtendedTooltip" id="97"/>
			<ChildItems>
				<Button name="OK" id="60">
					<Type>CommandBarButton</Type>
					<DefaultButton>true</DefaultButton>
					<SkipOnInput>false</SkipOnInput>
					<CommandName>Form.StandardCommand.OK</CommandName>
					<Parameter xsi:nil="true"/>
					<ExtendedTooltip name="OKExtendedTooltip" id="98"/>
				</Button>
				<Button name="ИзменитьФорму" id="63">
					<Type>CommandBarButton</Type>
					<SkipOnInput>false</SkipOnInput>
					<CommandName>Form.StandardCommand.CustomizeForm</CommandName>
					<Parameter xsi:nil="true"/>
					<ExtendedTooltip name="ИзменитьФормуExtendedTooltip" id="99"/>
				</Button>
				<Button name="Справка" id="64">
					<Type>CommandBarButton</Type>
					<SkipOnInput>false</SkipOnInput>
					<CommandName>Form.StandardCommand.Help</CommandName>
					<Parameter xsi:nil="true"/>
					<ExtendedTooltip name="СправкаExtendedTooltip" id="100"/>
				</Button>
				<ButtonGroup name="КоманднаяПанельФормы" id="83">
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Командная панель формы</v8:content>
						</v8:item>
					</Title>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Командная панель формы</v8:content>
						</v8:item>
					</ToolTip>
					<CommandSource>FormCommandPanelGlobalCommands</CommandSource>
					<ExtendedTooltip name="КоманднаяПанельФормыExtendedTooltip" id="101"/>
				</ButtonGroup>
			</ChildItems>
		</CommandBar>
		<UsualGroup name="ГруппаСостояние" id="92">
			<HorizontalStretch>true</HorizontalStretch>
			<Group>Horizontal</Group>
			<Representation>StrongSeparation</Representation>
			<ShowTitle>false</ShowTitle>
			<ExtendedTooltip name="ГруппаСостояниеExtendedTooltip" id="102"/>
			<ChildItems>
				<PictureDecoration name="ДекорацияЗначок" id="93">
					<Width>4</Width>
					<Height>2</Height>
					<SkipOnInput>false</SkipOnInput>
					<Picture>
						<xr:Ref>CommonPicture.Информация32</xr:Ref>
						<xr:LoadTransparent>false</xr:LoadTransparent>
					</Picture>
					<ContextMenu name="ДекорацияЗначокКонтекстноеМеню" id="94"/>
					<ExtendedTooltip name="ДекорацияЗначокExtendedTooltip" id="103"/>
				</PictureDecoration>
				<LabelDecoration name="ДекорацияТекст" id="95">
					<Height>2</Height>
					<SkipOnInput>false</SkipOnInput>
					<Title formatted="false">
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Процесс завершен</v8:content>
						</v8:item>
					</Title>
					<ContextMenu name="ДекорацияТекстКонтекстноеМеню" id="96"/>
					<ExtendedTooltip name="ДекорацияТекстExtendedTooltip" id="104"/>
				</LabelDecoration>
			</ChildItems>
		</UsualGroup>
		<UsualGroup name="ГруппаПредметОтветственный" id="81">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Автор</v8:content>
				</v8:item>
			</Title>
			<TitleFont ref="sys:DefaultGUIFont" bold="true" italic="false" underline="false" strikeout="false" kind="WindowsFont"/>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Группа предмет ответственный</v8:content>
				</v8:item>
			</ToolTip>
			<HorizontalStretch>true</HorizontalStretch>
			<Representation>None</Representation>
			<ShowTitle>false</ShowTitle>
			<ExtendedTooltip name="ГруппаПредметОтветственныйExtendedTooltip" id="105"/>
			<ChildItems>
				<LabelField name="Предмет" id="86">
					<DataPath>Объект.Предмет</DataPath>
					<Hiperlink>true</Hiperlink>
					<ContextMenu name="ПредметКонтекстноеМеню" id="87"/>
					<ExtendedTooltip name="ПредметExtendedTooltip" id="106"/>
				</LabelField>
				<LabelField name="Ответственный" id="79">
					<DataPath>Объект.Автор</DataPath>
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Ответственный</v8:content>
						</v8:item>
					</Title>
					<Hiperlink>true</Hiperlink>
					<ContextMenu name="ОтветственныйКонтекстноеМеню" id="80"/>
					<ExtendedTooltip name="ОтветственныйExtendedTooltip" id="107"/>
				</LabelField>
			</ChildItems>
		</UsualGroup>
	</ChildItems>
	<Attributes>
		<Attribute name="Объект" id="1">
			<Type>
				<v8:Type>cfg:BusinessProcessObject.ТиповаяПродажа</v8:Type>
			</Type>
			<MainAttribute>true</MainAttribute>
			<SavedData>true</SavedData>
		</Attribute>
		<Attribute name="НачальныйПризнакСтарта" id="2">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Начальный признак старта</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:boolean</v8:Type>
			</Type>
		</Attribute>
		<Attribute name="ПредметСтрокой" id="3">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Предмет</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:string</v8:Type>
				<v8:StringQualifiers>
					<v8:Length>0</v8:Length>
					<v8:AllowedLength>Variable</v8:AllowedLength>
				</v8:StringQualifiers>
			</Type>
		</Attribute>
	</Attributes>
</Form>


text:
package com.gerken.resource.listener.popup.actions;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;

import com.gerken.resource.listener.Activator;

public class BeginListening implements IObjectActionDelegate {

	private Shell shell;

	/**
	 * Constructor for Action1.
	 */
	public BeginListening() {
		super();
	}

	/**
	 * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
	 */
	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
		shell = targetPart.getSite().getShell();
	}

	/**
	 * @see IActionDelegate#run(IAction)
	 */
	public void run(IAction action) {
		Activator.listener.beginRecording();
		MessageDialog.openInformation(
			shell,
			"Listener",
			"Listening and recording.");
	}

	/**
	 * @see IActionDelegate#selectionChanged(IAction, ISelection)
	 */
	public void selectionChanged(IAction action, ISelection selection) {
	}

}