text:
/*
 * generated by Xtext 2.9.1
 */
package org.mobadsl.grammar.serializer;

import com.google.inject.Inject;
import java.util.Set;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.xtext.Action;
import org.eclipse.xtext.Parameter;
import org.eclipse.xtext.ParserRule;
import org.eclipse.xtext.serializer.ISerializationContext;
import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer;
import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;
import org.mobadsl.grammar.services.MobaGrammarAccess;
import org.mobadsl.semantic.model.moba.MobaAppInstallTrigger;
import org.mobadsl.semantic.model.moba.MobaAppUpdateTrigger;
import org.mobadsl.semantic.model.moba.MobaApplication;
import org.mobadsl.semantic.model.moba.MobaAuthorization;
import org.mobadsl.semantic.model.moba.MobaBluetoothModule;
import org.mobadsl.semantic.model.moba.MobaCache;
import org.mobadsl.semantic.model.moba.MobaConstant;
import org.mobadsl.semantic.model.moba.MobaConstantValue;
import org.mobadsl.semantic.model.moba.MobaDataType;
import org.mobadsl.semantic.model.moba.MobaDeviceStartupTrigger;
import org.mobadsl.semantic.model.moba.MobaDigitsConstraint;
import org.mobadsl.semantic.model.moba.MobaDto;
import org.mobadsl.semantic.model.moba.MobaDtoAttribute;
import org.mobadsl.semantic.model.moba.MobaDtoEmbeddable;
import org.mobadsl.semantic.model.moba.MobaDtoReference;
import org.mobadsl.semantic.model.moba.MobaEmailTrigger;
import org.mobadsl.semantic.model.moba.MobaEntity;
import org.mobadsl.semantic.model.moba.MobaEntityAttribute;
import org.mobadsl.semantic.model.moba.MobaEntityEmbeddable;
import org.mobadsl.semantic.model.moba.MobaEntityIndex;
import org.mobadsl.semantic.model.moba.MobaEntityReference;
import org.mobadsl.semantic.model.moba.MobaEnum;
import org.mobadsl.semantic.model.moba.MobaEnumLiteral;
import org.mobadsl.semantic.model.moba.MobaFriend;
import org.mobadsl.semantic.model.moba.MobaGenerator;
import org.mobadsl.semantic.model.moba.MobaGeneratorIDFeature;
import org.mobadsl.semantic.model.moba.MobaGeneratorMixinFeature;
import org.mobadsl.semantic.model.moba.MobaGeneratorSlot;
import org.mobadsl.semantic.model.moba.MobaGeofenceTrigger;
import org.mobadsl.semantic.model.moba.MobaMaxConstraint;
import org.mobadsl.semantic.model.moba.MobaMaxLengthConstraint;
import org.mobadsl.semantic.model.moba.MobaMinConstraint;
import org.mobadsl.semantic.model.moba.MobaMinLengthConstraint;
import org.mobadsl.semantic.model.moba.MobaModel;
import org.mobadsl.semantic.model.moba.MobaMuliplicity;
import org.mobadsl.semantic.model.moba.MobaNFCModule;
import org.mobadsl.semantic.model.moba.MobaNotNullConstraint;
import org.mobadsl.semantic.model.moba.MobaNullConstraint;
import org.mobadsl.semantic.model.moba.MobaPackage;
import org.mobadsl.semantic.model.moba.MobaPersistenceType;
import org.mobadsl.semantic.model.moba.MobaProject;
import org.mobadsl.semantic.model.moba.MobaProperty;
import org.mobadsl.semantic.model.moba.MobaPushModule;
import org.mobadsl.semantic.model.moba.MobaPushTrigger;
import org.mobadsl.semantic.model.moba.MobaQueue;
import org.mobadsl.semantic.model.moba.MobaQueueReference;
import org.mobadsl.semantic.model.moba.MobaRESTAttribute;
import org.mobadsl.semantic.model.moba.MobaRESTCrud;
import org.mobadsl.semantic.model.moba.MobaRESTCustomService;
import org.mobadsl.semantic.model.moba.MobaRESTDtoAttribute;
import org.mobadsl.semantic.model.moba.MobaRESTHeader;
import org.mobadsl.semantic.model.moba.MobaRESTPayloadDefinition;
import org.mobadsl.semantic.model.moba.MobaRESTWorkflow;
import org.mobadsl.semantic.model.moba.MobaRegexpConstraint;
import org.mobadsl.semantic.model.moba.MobaSMSTrigger;
import org.mobadsl.semantic.model.moba.MobaServer;
import org.mobadsl.semantic.model.moba.MobaSettings;
import org.mobadsl.semantic.model.moba.MobaSettingsAttribute;
import org.mobadsl.semantic.model.moba.MobaSettingsEntityReference;
import org.mobadsl.semantic.model.moba.MobaTemplate;
import org.mobadsl.semantic.model.moba.MobaTransportSerializationType;

@SuppressWarnings("all")
public class MobaSemanticSequencer extends AbstractDelegatingSemanticSequencer {

	@Inject
	private MobaGrammarAccess grammarAccess;

	@Override
	public void sequence(ISerializationContext context, EObject semanticObject) {
		EPackage epackage = semanticObject.eClass().getEPackage();
		ParserRule rule = context.getParserRule();
		Action action = context.getAssignedAction();
		Set<Parameter> parameters = context.getEnabledBooleanParameters();
		if (epackage == MobaPackage.eINSTANCE)
			switch (semanticObject.eClass().getClassifierID()) {
			case MobaPackage.MOBA_APP_INSTALL_TRIGGER:
				sequence_MobaAppInstallTrigger(context, (MobaAppInstallTrigger) semanticObject);
				return;
			case MobaPackage.MOBA_APP_UPDATE_TRIGGER:
				sequence_MobaAppUpdateTrigger(context, (MobaAppUpdateTrigger) semanticObject);
				return;
			case MobaPackage.MOBA_APPLICATION:
				sequence_MobaApplication_MobaFriendsAble(context, (MobaApplication) semanticObject);
				return;
			case MobaPackage.MOBA_AUTHORIZATION:
				sequence_MobaAuthorization_MobaFriendsAble(context, (MobaAuthorization) semanticObject);
				return;
			case MobaPackage.MOBA_BLUETOOTH_MODULE:
				sequence_MobaBluetoothModule_MobaFriendsAble(context, (MobaBluetoothModule) semanticObject);
				return;
			case MobaPackage.MOBA_CACHE:
				sequence_MobaCache(context, (MobaCache) semanticObject);
				return;
			case MobaPackage.MOBA_CONSTANT:
				sequence_MobaConstant_MobaFriendsAble(context, (MobaConstant) semanticObject);
				return;
			case MobaPackage.MOBA_CONSTANT_VALUE:
				sequence_MobaConstantValue(context, (MobaConstantValue) semanticObject);
				return;
			case MobaPackage.MOBA_DATA_TYPE:
				sequence_MobaDataType_MobaFriendsAble(context, (MobaDataType) semanticObject);
				return;
			case MobaPackage.MOBA_DEVICE_STARTUP_TRIGGER:
				sequence_MobaDeviceStartupTrigger(context, (MobaDeviceStartupTrigger) semanticObject);
				return;
			case MobaPackage.MOBA_DIGITS_CONSTRAINT:
				sequence_MobaDigitsConstraint(context, (MobaDigitsConstraint) semanticObject);
				return;
			case MobaPackage.MOBA_DTO:
				sequence_MobaDto_MobaFriendsAble(context, (MobaDto) semanticObject);
				return;
			case MobaPackage.MOBA_DTO_ATTRIBUTE:
				sequence_MobaDtoAttribute_MobaFriendsAble_MobaMultiplicityAble(context, (MobaDtoAttribute) semanticObject);
				return;
			case MobaPackage.MOBA_DTO_EMBEDDABLE:
				sequence_MobaDtoEmbeddable_MobaFriendsAble_MobaMultiplicityAble(context, (MobaDtoEmbeddable) semanticObject);
				return;
			case MobaPackage.MOBA_DTO_REFERENCE:
				sequence_MobaDtoReference_MobaFriendsAble_MobaMultiplicityAble(context, (MobaDtoReference) semanticObject);
				return;
			case MobaPackage.MOBA_EMAIL_TRIGGER:
				sequence_MobaEmailTrigger(context, (MobaEmailTrigger) semanticObject);
				return;
			case MobaPackage.MOBA_ENTITY:
				sequence_MobaEntity_MobaFriendsAble(context, (MobaEntity) semanticObject);
				return;
			case MobaPackage.MOBA_ENTITY_ATTRIBUTE:
				sequence_MobaEntityAttribute_MobaFriendsAble_MobaMultiplicityAble(context, (MobaEntityAttribute) semanticObject);
				return;
			case MobaPackage.MOBA_ENTITY_EMBEDDABLE:
				sequence_MobaEntityEmbeddable_MobaFriendsAble_MobaMultiplicityAble(context, (MobaEntityEmbeddable) semanticObject);
				return;
			case MobaPackage.MOBA_ENTITY_INDEX:
				sequence_MobaEntityIndex(context, (MobaEntityIndex) semanticObject);
				return;
			case MobaPackage.MOBA_ENTITY_REFERENCE:
				sequence_MobaEntityReference_MobaFriendsAble_MobaMultiplicityAble(context, (MobaEntityReference) semanticObject);
				return;
			case MobaPackage.MOBA_ENUM:
				sequence_MobaEnum(context, (MobaEnum) semanticObject);
				return;
			case MobaPackage.MOBA_ENUM_LITERAL:
				sequence_MobaEnumLiteral(context, (MobaEnumLiteral) semanticObject);
				return;
			case MobaPackage.MOBA_FRIEND:
				sequence_MobaFriend(context, (MobaFriend) semanticObject);
				return;
			case MobaPackage.MOBA_GENERATOR:
				sequence_MobaGenerator(context, (MobaGenerator) semanticObject);
				return;
			case MobaPackage.MOBA_GENERATOR_ID_FEATURE:
				sequence_MobaGeneratorIDFeature(context, (MobaGeneratorIDFeature) semanticObject);
				return;
			case MobaPackage.MOBA_GENERATOR_MIXIN_FEATURE:
				sequence_MobaGeneratorMixinFeature(context, (MobaGeneratorMixinFeature) semanticObject);
				return;
			case MobaPackage.MOBA_GENERATOR_SLOT:
				sequence_MobaGeneratorSlot(context, (MobaGeneratorSlot) semanticObject);
				return;
			case MobaPackage.MOBA_GEOFENCE_TRIGGER:
				sequence_MobaGeofenceTrigger(context, (MobaGeofenceTrigger) semanticObject);
				return;
			case MobaPackage.MOBA_MAX_CONSTRAINT:
				sequence_MobaMaxConstraint(context, (MobaMaxConstraint) semanticObject);
				return;
			case MobaPackage.MOBA_MAX_LENGTH_CONSTRAINT:
				sequence_MobaMaxLengthConstraint(context, (MobaMaxLengthConstraint) semanticObject);
				return;
			case MobaPackage.MOBA_MIN_CONSTRAINT:
				sequence_MobaMinConstraint(context, (MobaMinConstraint) semanticObject);
				return;
			case MobaPackage.MOBA_MIN_LENGTH_CONSTRAINT:
				sequence_MobaMinLengthConstraint(context, (MobaMinLengthConstraint) semanticObject);
				return;
			case MobaPackage.MOBA_MODEL:
				sequence_MobaModel(context, (MobaModel) semanticObject);
				return;
			case MobaPackage.MOBA_MULIPLICITY:
				sequence_MobaMuliplicity(context, (MobaMuliplicity) semanticObject);
				return;
			case MobaPackage.MOBA_NFC_MODULE:
				sequence_MobaFriendsAble_MobaNFCModule(context, (MobaNFCModule) semanticObject);
				return;
			case MobaPackage.MOBA_NOT_NULL_CONSTRAINT:
				sequence_MobaNotNullConstraint(context, (MobaNotNullConstraint) semanticObject);
				return;
			case MobaPackage.MOBA_NULL_CONSTRAINT:
				sequence_MobaNullConstraint(context, (MobaNullConstraint) semanticObject);
				return;
			case MobaPackage.MOBA_PERSISTENCE_TYPE:
				sequence_MobaFriendsAble_MobaPersistenceType(context, (MobaPersistenceType) semanticObject);
				return;
			case MobaPackage.MOBA_PROJECT:
				sequence_MobaFriendsAble_MobaProject(context, (MobaProject) semanticObject);
				return;
			case MobaPackage.MOBA_PROPERTY:
				sequence_MobaProperty(context, (MobaProperty) semanticObject);
				return;
			case MobaPackage.MOBA_PUSH_MODULE:
				sequence_MobaFriendsAble_MobaPushModule(context, (MobaPushModule) semanticObject);
				return;
			case MobaPackage.MOBA_PUSH_TRIGGER:
				sequence_MobaPushTrigger(context, (MobaPushTrigger) semanticObject);
				return;
			case MobaPackage.MOBA_QUEUE:
				sequence_MobaFriendsAble_MobaQueue(context, (MobaQueue) semanticObject);
				return;
			case MobaPackage.MOBA_QUEUE_REFERENCE:
				sequence_MobaFriendsAble_MobaQueueReference(context, (MobaQueueReference) semanticObject);
				return;
			case MobaPackage.MOBA_REST_ATTRIBUTE:
				if (rule == grammarAccess.getMobaRESTAbstractAttributeRule()
						|| rule == grammarAccess.getMobaRESTAttributeRule()) {
					sequence_MobaRESTAttribute(context, (MobaRESTAttribute) semanticObject);
					return;
				}
				else if (rule == grammarAccess.getMobaRESTAbstractMultipartAttributeRule()
						|| rule == grammarAccess.getMobaRESTMultipartAttributeRule()) {
					sequence_MobaRESTMultipartAttribute(context, (MobaRESTAttribute) semanticObject);
					return;
				}
				else break;
			case MobaPackage.MOBA_REST_CRUD:
				sequence_MobaFriendsAble_MobaRESTCrud(context, (MobaRESTCrud) semanticObject);
				return;
			case MobaPackage.MOBA_REST_CUSTOM_SERVICE:
				sequence_MobaFriendsAble_MobaRESTCustomService(context, (MobaRESTCustomService) semanticObject);
				return;
			case MobaPackage.MOBA_REST_DTO_ATTRIBUTE:
				if (rule == grammarAccess.getMobaRESTAbstractAttributeRule()
						|| rule == grammarAccess.getMobaRESTDtoAttributeRule()) {
					sequence_MobaRESTDtoAttribute(context, (MobaRESTDtoAttribute) semanticObject);
					return;
				}
				else if (rule == grammarAccess.getMobaRESTAbstractMultipartAttributeRule()
						|| rule == grammarAccess.getMobaRESTMultipartDtoAttributeRule()) {
					sequence_MobaRESTMultipartDtoAttribute(context, (MobaRESTDtoAttribute) semanticObject);
					return;
				}
				else break;
			case MobaPackage.MOBA_REST_HEADER:
				sequence_MobaRestHeader(context, (MobaRESTHeader) semanticObject);
				return;
			case MobaPackage.MOBA_REST_PAYLOAD_DEFINITION:
				sequence_MobaRESTPayloadDefinition(context, (MobaRESTPayloadDefinition) semanticObject);
				return;
			case MobaPackage.MOBA_REST_WORKFLOW:
				sequence_MobaFriendsAble_MobaRESTWorkflow(context, (MobaRESTWorkflow) semanticObject);
				return;
			case MobaPackage.MOBA_REGEXP_CONSTRAINT:
				sequence_MobaRegexpConstraint(context, (MobaRegexpConstraint) semanticObject);
				return;
			case MobaPackage.MOBA_SMS_TRIGGER:
				sequence_MobaSMSTrigger(context, (MobaSMSTrigger) semanticObject);
				return;
			case MobaPackage.MOBA_SERVER:
				sequence_MobaFriendsAble_MobaServer(context, (MobaServer) semanticObject);
				return;
			case MobaPackage.MOBA_SETTINGS:
				sequence_MobaFriendsAble_MobaSettings(context, (MobaSettings) semanticObject);
				return;
			case MobaPackage.MOBA_SETTINGS_ATTRIBUTE:
				sequence_MobaFriendsAble_MobaMultiplicityAble_MobaSettingsAttribute(context, (MobaSettingsAttribute) semanticObject);
				return;
			case MobaPackage.MOBA_SETTINGS_ENTITY_REFERENCE:
				sequence_MobaFriendsAble_MobaMultiplicityAble_MobaSettingsEntityReference(context, (MobaSettingsEntityReference) semanticObject);
				return;
			case MobaPackage.MOBA_TEMPLATE:
				sequence_MobaTemplate(context, (MobaTemplate) semanticObject);
				return;
			case MobaPackage.MOBA_TRANSPORT_SERIALIZATION_TYPE:
				sequence_MobaFriendsAble_MobaTransportSerializationType(context, (MobaTransportSerializationType) semanticObject);
				return;
			}
		if (errorAcceptor != null)
			errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaAppInstallTrigger
	 *     MobaTrigger returns MobaAppInstallTrigger
	 *     MobaAppInstallTrigger returns MobaAppInstallTrigger
	 *
	 * Constraint:
	 *     name=ID
	 */
	protected void sequence_MobaAppInstallTrigger(ISerializationContext context, MobaAppInstallTrigger semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getMobaAppInstallTriggerAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.finish();
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaAppUpdateTrigger
	 *     MobaTrigger returns MobaAppUpdateTrigger
	 *     MobaAppUpdateTrigger returns MobaAppUpdateTrigger
	 *
	 * Constraint:
	 *     name=ID
	 */
	protected void sequence_MobaAppUpdateTrigger(ISerializationContext context, MobaAppUpdateTrigger semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getMobaAppUpdateTriggerAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.finish();
	}

	/**
	 * Contexts:
	 *     MobaModelFeature returns MobaApplication
	 *     MobaApplication returns MobaApplication
	 *
	 * Constraint:
	 *     (
	 *         name=ID
	 *         version=VERSION
	 *         defaultCache=[MobaCache|ID]?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *         (javaPackage=FQN | features+=MobaApplicationFeature)*
	 *     )
	 */
	protected void sequence_MobaApplication_MobaFriendsAble(ISerializationContext context, MobaApplication semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaAuthorization
	 *     MobaAuthorization returns MobaAuthorization
	 *
	 * Constraint:
	 *     (name=CONSTANT ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*)
	 */
	protected void sequence_MobaAuthorization_MobaFriendsAble(ISerializationContext context, MobaAuthorization semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaBluetoothModule
	 *     MobaExternalModule returns MobaBluetoothModule
	 *     MobaBluetoothModule returns MobaBluetoothModule
	 *
	 * Constraint:
	 *     (name=ID type=MobaBlueToothModuleType ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*)
	 */
	protected void sequence_MobaBluetoothModule_MobaFriendsAble(ISerializationContext context, MobaBluetoothModule semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaCache
	 *     MobaCache returns MobaCache
	 *
	 * Constraint:
	 *     (
	 *         name=ID
	 *         (
	 *             cacheTypeString=STRING |
	 *             cacheTypeConst=[MobaConstant|CONSTANT] |
	 *             cacheStrategyString=STRING |
	 *             cacheStrategyConst=[MobaConstant|CONSTANT] |
	 *             cacheIntervalInt=INT |
	 *             cacheIntervalConst=[MobaConstant|CONSTANT] |
	 *             cachePersistence=[MobaPersistenceType|CONSTANT]
	 *         )*
	 *     )
	 */
	protected void sequence_MobaCache(ISerializationContext context, MobaCache semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaConstantValue returns MobaConstantValue
	 *
	 * Constraint:
	 *     (
	 *         (valueString=STRING | valueInt=INT | valueDouble=DOUBLE | (valueConst=[MobaConstant|CONSTANT] valueConstFunctions+=MobaConstantValueFunction*))
	 *         tail=MobaConstantValue?
	 *     )
	 */
	protected void sequence_MobaConstantValue(ISerializationContext context, MobaConstantValue semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaConstant
	 *     MobaConstant returns MobaConstant
	 *
	 * Constraint:
	 *     (name=CONSTANT valueAST=MobaConstantValue ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*)
	 */
	protected void sequence_MobaConstant_MobaFriendsAble(ISerializationContext context, MobaConstant semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaDataType
	 *     MobaDataType returns MobaDataType
	 *
	 * Constraint:
	 *     (
	 *         name=ID
	 *         superType=[MobaDataType|ID]?
	 *         (
	 *             (array?='isArray' | enumAST=MobaEnum | predefined?='isPredefined')?
	 *             (string?='isString' primitive?='isPrimitive'?)?
	 *             (bool?='isBool' primitive?='isPrimitive'?)?
	 *             (numeric?='isNumeric' primitive?='isPrimitive'?)?
	 *             (decimal?='isDecimal' primitive?='isPrimitive'?)?
	 *             (constraints+=MobaConstraint constraints+=MobaConstraint*)?
	 *             ((date?='isDate' | time?='isTime' | timestamp?='isTimestamp') (dateFormatString=STRING | dateFormatConst=[MobaConstant|CONSTANT])?)?
	 *         )+
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *     )
	 */
	protected void sequence_MobaDataType_MobaFriendsAble(ISerializationContext context, MobaDataType semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaDeviceStartupTrigger
	 *     MobaTrigger returns MobaDeviceStartupTrigger
	 *     MobaDeviceStartupTrigger returns MobaDeviceStartupTrigger
	 *
	 * Constraint:
	 *     name=ID
	 */
	protected void sequence_MobaDeviceStartupTrigger(ISerializationContext context, MobaDeviceStartupTrigger semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getMobaDeviceStartupTriggerAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.finish();
	}

	/**
	 * Contexts:
	 *     MobaConstraint returns MobaDigitsConstraint
	 *     MobaDigitsConstraint returns MobaDigitsConstraint
	 *
	 * Constraint:
	 *     ((filterIntegerValue=INT | filterIntegerConst=[MobaConstant|CONSTANT]) (filterFractionValue=INT | filterFractionConst=[MobaConstant|CONSTANT]))
	 */
	protected void sequence_MobaDigitsConstraint(ISerializationContext context, MobaDigitsConstraint semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaDtoFeature returns MobaDtoAttribute
	 *     MobaDtoAttribute returns MobaDtoAttribute
	 *
	 * Constraint:
	 *     (
	 *         (
	 *             (lazy?='lazy' | transient?='transient' | domainKey?='domainKey' | domainDescription?='domainDescription')?
	 *             (constraints+=MobaConstraint constraints+=MobaConstraint*)?
	 *         )+
	 *         type=[MobaDataType|ID]
	 *         multiplicity=MobaMuliplicity?
	 *         name=ID
	 *         (alias=ID | formatString=STRING | formatConst=[MobaConstant|CONSTANT])*
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *     )
	 */
	protected void sequence_MobaDtoAttribute_MobaFriendsAble_MobaMultiplicityAble(ISerializationContext context, MobaDtoAttribute semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaDtoFeature returns MobaDtoEmbeddable
	 *     MobaDtoEmbeddable returns MobaDtoEmbeddable
	 *
	 * Constraint:
	 *     (
	 *         transient?='transient'?
	 *         type=[MobaDto|ID]
	 *         multiplicity=MobaMuliplicity?
	 *         name=ID
	 *         alias=ID?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *     )
	 */
	protected void sequence_MobaDtoEmbeddable_MobaFriendsAble_MobaMultiplicityAble(ISerializationContext context, MobaDtoEmbeddable semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaDtoFeature returns MobaDtoReference
	 *     MobaDtoReference returns MobaDtoReference
	 *
	 * Constraint:
	 *     (
	 *         (cascading?='cascading' | lazy?='lazy' | transient?='transient')*
	 *         type=[MobaDto|ID]
	 *         multiplicity=MobaMuliplicity?
	 *         name=ID
	 *         alias=ID?
	 *         opposite=[MobaDtoReference|ID]?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *     )
	 */
	protected void sequence_MobaDtoReference_MobaFriendsAble_MobaMultiplicityAble(ISerializationContext context, MobaDtoReference semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaDto
	 *     MobaData returns MobaDto
	 *     MobaDto returns MobaDto
	 *
	 * Constraint:
	 *     (
	 *         name=ID
	 *         superType=[MobaDto|ID]?
	 *         wrappedEntity=[MobaEntity|ID]?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *         features+=MobaDtoFeature*
	 *     )
	 */
	protected void sequence_MobaDto_MobaFriendsAble(ISerializationContext context, MobaDto semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaEmailTrigger
	 *     MobaTrigger returns MobaEmailTrigger
	 *     MobaEmailTrigger returns MobaEmailTrigger
	 *
	 * Constraint:
	 *     name=ID
	 */
	protected void sequence_MobaEmailTrigger(ISerializationContext context, MobaEmailTrigger semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getMobaEmailTriggerAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.finish();
	}

	/**
	 * Contexts:
	 *     MobaEntityFeature returns MobaEntityAttribute
	 *     MobaEntityAttribute returns MobaEntityAttribute
	 *
	 * Constraint:
	 *     (
	 *         (
	 *             (lazy?='lazy' | transient?='transient' | domainKey?='domainKey' | domainDescription?='domainDescription')?
	 *             (constraints+=MobaConstraint constraints+=MobaConstraint*)?
	 *         )+
	 *         type=[MobaDataType|ID]
	 *         multiplicity=MobaMuliplicity?
	 *         name=ID
	 *         (formatString=STRING | formatConst=[MobaConstant|CONSTANT])?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *     )
	 */
	protected void sequence_MobaEntityAttribute_MobaFriendsAble_MobaMultiplicityAble(ISerializationContext context, MobaEntityAttribute semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaEntityFeature returns MobaEntityEmbeddable
	 *     MobaEntityEmbeddable returns MobaEntityEmbeddable
	 *
	 * Constraint:
	 *     (
	 *         transient?='transient'?
	 *         type=[MobaEntity|ID]
	 *         multiplicity=MobaMuliplicity?
	 *         name=ID
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *     )
	 */
	protected void sequence_MobaEntityEmbeddable_MobaFriendsAble_MobaMultiplicityAble(ISerializationContext context, MobaEntityEmbeddable semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaEntityIndex returns MobaEntityIndex
	 *
	 * Constraint:
	 *     (unique?='unique'? name=ID attributes+=[MobaEntityAttribute|ID] attributes+=[MobaEntityAttribute|ID]*)
	 */
	protected void sequence_MobaEntityIndex(ISerializationContext context, MobaEntityIndex semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaEntityFeature returns MobaEntityReference
	 *     MobaEntityReference returns MobaEntityReference
	 *
	 * Constraint:
	 *     (
	 *         (cascading?='cascading' | lazy?='lazy' | transient?='transient')*
	 *         type=[MobaEntity|ID]
	 *         multiplicity=MobaMuliplicity?
	 *         name=ID
	 *         opposite=[MobaEntityReference|ID]?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *     )
	 */
	protected void sequence_MobaEntityReference_MobaFriendsAble_MobaMultiplicityAble(ISerializationContext context, MobaEntityReference semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaEntity
	 *     MobaData returns MobaEntity
	 *     MobaEntity returns MobaEntity
	 *
	 * Constraint:
	 *     (
	 *         name=ID
	 *         (superType=[MobaEntity|ID] | cache=[MobaCache|ID])*
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *         features+=MobaEntityFeature*
	 *         indizes+=MobaEntityIndex*
	 *     )
	 */
	protected void sequence_MobaEntity_MobaFriendsAble(ISerializationContext context, MobaEntity semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaEnumLiteral returns MobaEnumLiteral
	 *
	 * Constraint:
	 *     (name=CONSTANT literal=STRING value=INT (default?='isDefault' | undefined?='isUndefined' | hidden?='isHidden')*)
	 */
	protected void sequence_MobaEnumLiteral(ISerializationContext context, MobaEnumLiteral semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaEnum returns MobaEnum
	 *
	 * Constraint:
	 *     literals+=MobaEnumLiteral*
	 */
	protected void sequence_MobaEnum(ISerializationContext context, MobaEnum semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaFriend returns MobaFriend
	 *
	 * Constraint:
	 *     (valueString=STRING | valueConst=[MobaConstant|CONSTANT])
	 */
	protected void sequence_MobaFriend(ISerializationContext context, MobaFriend semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaSettingsFeature returns MobaSettingsAttribute
	 *     MobaSettingsAttribute returns MobaSettingsAttribute
	 *
	 * Constraint:
	 *     (
	 *         (
	 *             (lazy?='lazy' | transient?='transient' | domainKey?='domainKey' | domainDescription?='domainDescription')?
	 *             (constraints+=MobaConstraint constraints+=MobaConstraint*)?
	 *         )+
	 *         type=[MobaDataType|ID]
	 *         multiplicity=MobaMuliplicity?
	 *         name=ID
	 *         (formatString=STRING | formatConst=[MobaConstant|CONSTANT])?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *     )
	 */
	protected void sequence_MobaFriendsAble_MobaMultiplicityAble_MobaSettingsAttribute(ISerializationContext context, MobaSettingsAttribute semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaSettingsFeature returns MobaSettingsEntityReference
	 *     MobaSettingsEntityReference returns MobaSettingsEntityReference
	 *
	 * Constraint:
	 *     (
	 *         (cascading?='cascading' | lazy?='lazy' | transient?='transient')*
	 *         type=[MobaEntity|ID]
	 *         multiplicity=MobaMuliplicity?
	 *         name=ID
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *     )
	 */
	protected void sequence_MobaFriendsAble_MobaMultiplicityAble_MobaSettingsEntityReference(ISerializationContext context, MobaSettingsEntityReference semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaNFCModule
	 *     MobaExternalModule returns MobaNFCModule
	 *     MobaNFCModule returns MobaNFCModule
	 *
	 * Constraint:
	 *     (name=ID type=MobaNFCModuleType ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*)
	 */
	protected void sequence_MobaFriendsAble_MobaNFCModule(ISerializationContext context, MobaNFCModule semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaPersistenceType
	 *     MobaPersistenceType returns MobaPersistenceType
	 *
	 * Constraint:
	 *     (name=CONSTANT ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*)
	 */
	protected void sequence_MobaFriendsAble_MobaPersistenceType(ISerializationContext context, MobaPersistenceType semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaModelFeature returns MobaProject
	 *     MobaProject returns MobaProject
	 *
	 * Constraint:
	 *     (
	 *         name=ID
	 *         version=VERSION
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *         (uiApplication=[MobaApplication|ID] | backgroundApplication=[MobaApplication|ID])*
	 *     )
	 */
	protected void sequence_MobaFriendsAble_MobaProject(ISerializationContext context, MobaProject semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaPushModule
	 *     MobaExternalModule returns MobaPushModule
	 *     MobaPushModule returns MobaPushModule
	 *
	 * Constraint:
	 *     (name=ID ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*)
	 */
	protected void sequence_MobaFriendsAble_MobaPushModule(ISerializationContext context, MobaPushModule semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaQueueFeature returns MobaQueueReference
	 *     MobaQueueReference returns MobaQueueReference
	 *
	 * Constraint:
	 *     (restService=[MobaREST|ID] name=ID ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*)
	 */
	protected void sequence_MobaFriendsAble_MobaQueueReference(ISerializationContext context, MobaQueueReference semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaQueue
	 *     MobaData returns MobaQueue
	 *     MobaQueue returns MobaQueue
	 *
	 * Constraint:
	 *     (
	 *         name=ID
	 *         superType=[MobaQueue|ID]?
	 *         cache=[MobaCache|ID]?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *         features+=MobaQueueFeature*
	 *     )
	 */
	protected void sequence_MobaFriendsAble_MobaQueue(ISerializationContext context, MobaQueue semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaRESTCrud
	 *     MobaREST returns MobaRESTCrud
	 *     MobaRESTCrud returns MobaRESTCrud
	 *
	 * Constraint:
	 *     (name=ID superType=[MobaRESTCrud|ID]? ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*)
	 */
	protected void sequence_MobaFriendsAble_MobaRESTCrud(ISerializationContext context, MobaRESTCrud semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaRESTCustomService
	 *     MobaREST returns MobaRESTCustomService
	 *     MobaRESTCustomService returns MobaRESTCustomService
	 *
	 * Constraint:
	 *     (
	 *         bigData?='bigData'?
	 *         name=ID
	 *         superType=[MobaRESTCustomService|ID]?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *         (
	 *             path=STRING |
	 *             headers+=MobaRestHeader |
	 *             parameters+=MobaRESTAbstractAttribute |
	 *             multipartParameters+=MobaRESTAbstractMultipartAttribute |
	 *             authorization=[MobaAuthorization|CONSTANT] |
	 *             requestDto=MobaRESTPayloadDefinition |
	 *             responseDto=MobaRESTPayloadDefinition |
	 *             errorDto=MobaRESTPayloadDefinition |
	 *             contextDto=MobaRESTPayloadDefinition |
	 *             operation=MobaRESTMethods
	 *         )*
	 *     )
	 */
	protected void sequence_MobaFriendsAble_MobaRESTCustomService(ISerializationContext context, MobaRESTCustomService semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaRESTWorkflow
	 *     MobaREST returns MobaRESTWorkflow
	 *     MobaRESTWorkflow returns MobaRESTWorkflow
	 *
	 * Constraint:
	 *     (
	 *         name=ID
	 *         superType=[MobaRESTWorkflow|ID]?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *         services+=[MobaREST|ID]*
	 *     )
	 */
	protected void sequence_MobaFriendsAble_MobaRESTWorkflow(ISerializationContext context, MobaRESTWorkflow semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaServer
	 *     MobaServer returns MobaServer
	 *
	 * Constraint:
	 *     (
	 *         name=ID
	 *         (urlString=STRING | urlConst=[MobaConstant|CONSTANT])
	 *         superType=[MobaServer|ID]?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *         (authorization=[MobaAuthorization|CONSTANT]? (services+=[MobaREST|ID] services+=[MobaREST|ID]*)?)+
	 *     )
	 */
	protected void sequence_MobaFriendsAble_MobaServer(ISerializationContext context, MobaServer semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaSettings
	 *     MobaSettings returns MobaSettings
	 *
	 * Constraint:
	 *     (
	 *         active?='active'?
	 *         name=ID
	 *         superType=[MobaSettings|ID]?
	 *         ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*
	 *         features+=MobaSettingsFeature*
	 *     )
	 */
	protected void sequence_MobaFriendsAble_MobaSettings(ISerializationContext context, MobaSettings semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaTransportSerializationType
	 *     MobaTransportSerializationType returns MobaTransportSerializationType
	 *
	 * Constraint:
	 *     (name=CONSTANT ((friends+=MobaFriend friends+=MobaFriend*) | (properties+=MobaProperty properties+=MobaProperty*))*)
	 */
	protected void sequence_MobaFriendsAble_MobaTransportSerializationType(ISerializationContext context, MobaTransportSerializationType semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaGeneratorFeature returns MobaGeneratorIDFeature
	 *     MobaGeneratorIDFeature returns MobaGeneratorIDFeature
	 *
	 * Constraint:
	 *     (generatorId=FQN generatorVersion=VERSION)
	 */
	protected void sequence_MobaGeneratorIDFeature(ISerializationContext context, MobaGeneratorIDFeature semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, MobaPackage.Literals.MOBA_GENERATOR_ID_FEATURE__GENERATOR_ID) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MobaPackage.Literals.MOBA_GENERATOR_ID_FEATURE__GENERATOR_ID));
			if (transientValues.isValueTransient(semanticObject, MobaPackage.Literals.MOBA_GENERATOR_ID_FEATURE__GENERATOR_VERSION) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MobaPackage.Literals.MOBA_GENERATOR_ID_FEATURE__GENERATOR_VERSION));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getMobaGeneratorIDFeatureAccess().getGeneratorIdFQNTerminalRuleCall_1_0(), semanticObject.getGeneratorId());
		feeder.accept(grammarAccess.getMobaGeneratorIDFeatureAccess().getGeneratorVersionVERSIONTerminalRuleCall_3_0(), semanticObject.getGeneratorVersion());
		feeder.finish();
	}

	/**
	 * Contexts:
	 *     MobaGeneratorFeature returns MobaGeneratorMixinFeature
	 *     MobaGeneratorMixinFeature returns MobaGeneratorMixinFeature
	 *
	 * Constraint:
	 *     generatorRef=[MobaGenerator|ID]
	 */
	protected void sequence_MobaGeneratorMixinFeature(ISerializationContext context, MobaGeneratorMixinFeature semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, MobaPackage.Literals.MOBA_GENERATOR_MIXIN_FEATURE__GENERATOR_REF) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MobaPackage.Literals.MOBA_GENERATOR_MIXIN_FEATURE__GENERATOR_REF));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getMobaGeneratorMixinFeatureAccess().getGeneratorRefMobaGeneratorIDTerminalRuleCall_1_0_1(), semanticObject.getGeneratorRef());
		feeder.finish();
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaGeneratorSlot
	 *     MobaGeneratorSlot returns MobaGeneratorSlot
	 *
	 * Constraint:
	 *     (name=ID type=STRING?)
	 */
	protected void sequence_MobaGeneratorSlot(ISerializationContext context, MobaGeneratorSlot semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaGenerator
	 *     MobaGenerator returns MobaGenerator
	 *
	 * Constraint:
	 *     (active?='active'? name=ID features+=MobaGeneratorFeature*)
	 */
	protected void sequence_MobaGenerator(ISerializationContext context, MobaGenerator semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaGeofenceTrigger
	 *     MobaTrigger returns MobaGeofenceTrigger
	 *     MobaGeofenceTrigger returns MobaGeofenceTrigger
	 *
	 * Constraint:
	 *     (name=ID eventType=MobaGeofenceEvent)
	 */
	protected void sequence_MobaGeofenceTrigger(ISerializationContext context, MobaGeofenceTrigger semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME));
			if (transientValues.isValueTransient(semanticObject, MobaPackage.Literals.MOBA_GEOFENCE_TRIGGER__EVENT_TYPE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MobaPackage.Literals.MOBA_GEOFENCE_TRIGGER__EVENT_TYPE));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getMobaGeofenceTriggerAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getMobaGeofenceTriggerAccess().getEventTypeMobaGeofenceEventEnumRuleCall_4_0(), semanticObject.getEventType());
		feeder.finish();
	}

	/**
	 * Contexts:
	 *     MobaConstraint returns MobaMaxConstraint
	 *     MobaMaxConstraint returns MobaMaxConstraint
	 *
	 * Constraint:
	 *     (filterValue=DOUBLE | filterConst=[MobaConstant|CONSTANT])
	 */
	protected void sequence_MobaMaxConstraint(ISerializationContext context, MobaMaxConstraint semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaConstraint returns MobaMaxLengthConstraint
	 *     MobaMaxLengthConstraint returns MobaMaxLengthConstraint
	 *
	 * Constraint:
	 *     (filterValue=INT | filterConst=[MobaConstant|CONSTANT])
	 */
	protected void sequence_MobaMaxLengthConstraint(ISerializationContext context, MobaMaxLengthConstraint semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaConstraint returns MobaMinConstraint
	 *     MobaMinConstraint returns MobaMinConstraint
	 *
	 * Constraint:
	 *     (filterValue=DOUBLE | filterConst=[MobaConstant|CONSTANT])
	 */
	protected void sequence_MobaMinConstraint(ISerializationContext context, MobaMinConstraint semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaConstraint returns MobaMinLengthConstraint
	 *     MobaMinLengthConstraint returns MobaMinLengthConstraint
	 *
	 * Constraint:
	 *     (filterValue=INT | filterConst=[MobaConstant|CONSTANT])
	 */
	protected void sequence_MobaMinLengthConstraint(ISerializationContext context, MobaMinLengthConstraint semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaModel returns MobaModel
	 *
	 * Constraint:
	 *     ((copyright=STRING features+=MobaModelFeature+) | features+=MobaModelFeature+)?
	 */
	protected void sequence_MobaModel(ISerializationContext context, MobaModel semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaMuliplicity returns MobaMuliplicity
	 *
	 * Constraint:
	 *     (lower=MobaLowerBound upper=MobaUpperBound?)
	 */
	protected void sequence_MobaMuliplicity(ISerializationContext context, MobaMuliplicity semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaConstraint returns MobaNotNullConstraint
	 *     MobaNotNullConstraint returns MobaNotNullConstraint
	 *
	 * Constraint:
	 *     {MobaNotNullConstraint}
	 */
	protected void sequence_MobaNotNullConstraint(ISerializationContext context, MobaNotNullConstraint semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaConstraint returns MobaNullConstraint
	 *     MobaNullConstraint returns MobaNullConstraint
	 *
	 * Constraint:
	 *     {MobaNullConstraint}
	 */
	protected void sequence_MobaNullConstraint(ISerializationContext context, MobaNullConstraint semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaProperty returns MobaProperty
	 *
	 * Constraint:
	 *     ((keyString=STRING | keyConst=[MobaConstant|CONSTANT]) (valueString=STRING | valueConst=[MobaConstant|CONSTANT]))
	 */
	protected void sequence_MobaProperty(ISerializationContext context, MobaProperty semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaPushTrigger
	 *     MobaTrigger returns MobaPushTrigger
	 *     MobaPushTrigger returns MobaPushTrigger
	 *
	 * Constraint:
	 *     name=ID
	 */
	protected void sequence_MobaPushTrigger(ISerializationContext context, MobaPushTrigger semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getMobaPushTriggerAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.finish();
	}

	/**
	 * Contexts:
	 *     MobaRESTAbstractAttribute returns MobaRESTAttribute
	 *     MobaRESTAttribute returns MobaRESTAttribute
	 *
	 * Constraint:
	 *     (
	 *         type=[MobaDataType|ID]
	 *         (keyString=ID | keyConst=[MobaConstant|CONSTANT])
	 *         (aliasString=STRING | aliasConst=[MobaConstant|CONSTANT])?
	 *         (valueString=STRING | valueInt=INT | valueDouble=DOUBLE | valueConst=[MobaConstant|CONSTANT])?
	 *     )
	 */
	protected void sequence_MobaRESTAttribute(ISerializationContext context, MobaRESTAttribute semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaRESTAbstractAttribute returns MobaRESTDtoAttribute
	 *     MobaRESTDtoAttribute returns MobaRESTDtoAttribute
	 *
	 * Constraint:
	 *     (dtoFeature=[MobaDtoFeature|ID] (aliasString=STRING | aliasConst=[MobaConstant|CONSTANT])?)
	 */
	protected void sequence_MobaRESTDtoAttribute(ISerializationContext context, MobaRESTDtoAttribute semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaRESTAbstractMultipartAttribute returns MobaRESTAttribute
	 *     MobaRESTMultipartAttribute returns MobaRESTAttribute
	 *
	 * Constraint:
	 *     (
	 *         attachment?='attachment'?
	 *         type=[MobaDataType|ID]
	 *         (keyString=ID | keyConst=[MobaConstant|CONSTANT])
	 *         (aliasString=STRING | aliasConst=[MobaConstant|CONSTANT])?
	 *         (valueString=STRING | valueInt=INT | valueDouble=DOUBLE | valueConst=[MobaConstant|CONSTANT])?
	 *     )
	 */
	protected void sequence_MobaRESTMultipartAttribute(ISerializationContext context, MobaRESTAttribute semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaRESTAbstractMultipartAttribute returns MobaRESTDtoAttribute
	 *     MobaRESTMultipartDtoAttribute returns MobaRESTDtoAttribute
	 *
	 * Constraint:
	 *     (attachment?='attachment'? dtoFeature=[MobaDtoFeature|ID] (aliasString=STRING | aliasConst=[MobaConstant|CONSTANT])?)
	 */
	protected void sequence_MobaRESTMultipartDtoAttribute(ISerializationContext context, MobaRESTDtoAttribute semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaRESTPayloadDefinition returns MobaRESTPayloadDefinition
	 *
	 * Constraint:
	 *     (dto=[MobaDto|ID] (array?='isArray' | serializationType=[MobaTransportSerializationType|CONSTANT])*)
	 */
	protected void sequence_MobaRESTPayloadDefinition(ISerializationContext context, MobaRESTPayloadDefinition semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaConstraint returns MobaRegexpConstraint
	 *     MobaRegexpConstraint returns MobaRegexpConstraint
	 *
	 * Constraint:
	 *     (filterString=STRING | filterConst=[MobaConstant|CONSTANT])
	 */
	protected void sequence_MobaRegexpConstraint(ISerializationContext context, MobaRegexpConstraint semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaRestHeader returns MobaRESTHeader
	 *
	 * Constraint:
	 *     (
	 *         (contentTypeHeader?='ContentTypeHeader' (keyString=STRING | keyConst=[MobaConstant|CONSTANT])) |
	 *         (rawHeader?='RawHeader' (keyString=STRING | keyConst=[MobaConstant|CONSTANT]) (valueString=STRING | valueConst=[MobaConstant|CONSTANT]))
	 *     )
	 */
	protected void sequence_MobaRestHeader(ISerializationContext context, MobaRESTHeader semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaSMSTrigger
	 *     MobaTrigger returns MobaSMSTrigger
	 *     MobaSMSTrigger returns MobaSMSTrigger
	 *
	 * Constraint:
	 *     name=ID
	 */
	protected void sequence_MobaSMSTrigger(ISerializationContext context, MobaSMSTrigger semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MobaPackage.Literals.MOBA_TRIGGER__NAME));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getMobaSMSTriggerAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.finish();
	}

	/**
	 * Contexts:
	 *     MobaApplicationFeature returns MobaTemplate
	 *     MobaTemplate returns MobaTemplate
	 *
	 * Constraint:
	 *     (template=[MobaApplication|ID] | downloadTemplate=DOWNLOAD_TEMPLATE)
	 */
	protected void sequence_MobaTemplate(ISerializationContext context, MobaTemplate semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}

}


text:
layout:     post
title:      "Google Chart Color List"
subtitle:   "Carefully curated and complimentary colors fo charting"
tags:       [css, ux]
author:     "Craig Davis"
header-img: "img/headers/butterflies.jpg"
---

## Charting Colors

#3366CC

#DC3912

#FF9900

#109618

#990099

#3B3EAC

#0099C6

#DD4477

#66AA00

#B82E2E

#316395

#994499

#22AA99

#AAAA11

#6633CC

#E67300

#8B0707

#329262

#5574A6

#3B3EAC

This is the list of the first 20 colors from the [Google Chart][glc] Color list.
It's a great collection of unique and distinct saturated colors for use in
charts and graphs.

## Plain Text

{% gist 2579834 chart_colors.txt %}

[glc]: https://developers.google.com/chart/

redpajama_set_name: RedPajamaGithub


text:
@interface FLEXClassBuilder ()
@property (nonatomic) NSString *name;
@end

@implementation FLEXClassBuilder

- (id)init {
    [NSException
        raise:NSInternalInconsistencyException
        format:@"Class instance should not be created with -init"
    ];
    return nil;
}

#pragma mark Initializers
+ (instancetype)allocateClass:(NSString *)name {
    return [self allocateClass:name superclass:NSObject.class];
}

+ (instancetype)allocateClass:(NSString *)name superclass:(Class)superclass {
    return [self allocateClass:name superclass:superclass extraBytes:0];
}

+ (instancetype)allocateClass:(NSString *)name superclass:(Class)superclass extraBytes:(size_t)bytes {
    NSParameterAssert(name);
    return [[self alloc] initWithClass:objc_allocateClassPair(superclass, name.UTF8String, bytes)];
}

+ (instancetype)allocateRootClass:(NSString *)name {
    NSParameterAssert(name);
    return [[self alloc] initWithClass:objc_allocateClassPair(Nil, name.UTF8String, 0)];
}

+ (instancetype)builderForClass:(Class)cls {
    return [[self alloc] initWithClass:cls];
}

- (id)initWithClass:(Class)cls {
    NSParameterAssert(cls);

    self = [super init];
    if (self) {
        _workingClass = cls;
        _name = NSStringFromClass(_workingClass);
    }

    return self;
}

- (NSString *)description {
    return [NSString stringWithFormat:@"<%@ name=%@, registered=%d>",
            NSStringFromClass(self.class), self.name, self.isRegistered];
}

#pragma mark Building
- (NSArray *)addMethods:(NSArray *)methods {
    NSParameterAssert(methods.count);

    NSMutableArray *failed = [NSMutableArray new];
    for (FLEXMethodBase *m in methods) {
        if (!class_addMethod(self.workingClass, m.selector, m.implementation, m.typeEncoding.UTF8String)) {
            [failed addObject:m];
        }
    }

    return failed;
}

- (NSArray *)addProperties:(NSArray *)properties {
    NSParameterAssert(properties.count);

    NSMutableArray *failed = [NSMutableArray new];
    for (FLEXProperty *p in properties) {
        unsigned int pcount;
        objc_property_attribute_t *attributes = [p copyAttributesList:&pcount];
        if (!class_addProperty(self.workingClass, p.name.UTF8String, attributes, pcount)) {
            [failed addObject:p];
        }
        free(attributes);
    }

    return failed;
}

- (NSArray *)addProtocols:(NSArray *)protocols {
    NSParameterAssert(protocols.count);

    NSMutableArray *failed = [NSMutableArray new];
    for (FLEXProtocol *p in protocols) {
        if (!class_addProtocol(self.workingClass, p.objc_protocol)) {
            [failed addObject:p];
        }
    }

    return failed;
}

- (NSArray *)addIvars:(NSArray *)ivars {
    NSParameterAssert(ivars.count);

    NSMutableArray *failed = [NSMutableArray new];
    for (FLEXIvarBuilder *ivar in ivars) {
        if (!class_addIvar(self.workingClass, ivar.name.UTF8String, ivar.size, ivar.alignment, ivar.encoding.UTF8String)) {
            [failed addObject:ivar];
        }
    }

    return failed;
}

- (Class)registerClass {
    if (self.isRegistered) {
        [NSException raise:NSInternalInconsistencyException format:@"Class is already registered"];
    }

    objc_registerClassPair(self.workingClass);
    return self.workingClass;
}

- (BOOL)isRegistered {
    return objc_lookUpClass(self.name.UTF8String) != nil;
}

@end

#pragma mark FLEXIvarBuilder

@implementation FLEXIvarBuilder

+ (instancetype)name:(NSString *)name size:(size_t)size alignment:(uint8_t)alignment typeEncoding:(NSString *)encoding {
    return [[self alloc] initWithName:name size:size alignment:alignment typeEncoding:encoding];
}

- (id)initWithName:(NSString *)name size:(size_t)size alignment:(uint8_t)alignment typeEncoding:(NSString *)encoding {
    NSParameterAssert(name); NSParameterAssert(encoding);
    NSParameterAssert(size > 0); NSParameterAssert(alignment > 0);

    self = [super init];
    if (self) {
        _name      = name;
        _encoding  = encoding;
        _size      = size;
        _alignment = alignment;
    }

    return self;
}

@end


text:
public class PN532_Example {

	public static void main(String[] args) throws InterruptedException {
		// ! [Interesting]
		// Instantiate an PN532 on I2C bus 0 (default) using gpio 3 for the
		// IRQ, and gpio 2 for the reset pin.

		upm_pn532.PN532 nfc = new upm_pn532.PN532(3, 2);

		if (!nfc.init())
			System.out.println("init() failed");

		long vers = nfc.getFirmwareVersion();

		if (vers != 0)
			System.out.println("Got firmware version: " + String.format("0x%08x", vers));
		else {
			System.out.println("Could not identify PN532\n");
			return;
		}

		// Now scan and identify any cards that come in range (1 for now)

		// Retry forever
		nfc.setPassiveActivationRetries((short) 0xff);

		nfc.SAMConfig();

		short[] uidSize = new short[1];
		byte[] uid = new byte[7];

		while (true) {
			if (nfc.readPassiveTargetID(PN532.BAUD_T.BAUD_MIFARE_ISO14443A, uid, uidSize, 2000)) {
				// found a card
				System.out.println("Found a card: UID len " + uidSize[0]);
				System.out.print("UID: ");

				for (int i = 0; i < uidSize[0]; i++)
					System.out.print(String.format("%02x", uid[i]) + " ");

				System.out.println("\nSAK: " + String.format("0x%02x", nfc.getSAK()));
				System.out.println("ATQA: " + String.format("0x%04x\n\n", nfc.getATQA()));

				Thread.sleep(1000);
			} else {
				System.out.println("Waiting for a card...");
			}
		}

		// ! [Interesting]
	}
}


text:
"""This script takes two fasta files and interleaves them

Usage:
    interleave-fasta.py fasta_file1 fasta_file2
"""

# Importing modules
import sys

# Main
if __name__ == '__main__':
    try:
        file1 = sys.argv[1]
        file2 = sys.argv[2]
    except:
        print __doc__
        sys.exit(1)

    with open(file1) as f1:
        with open(file2) as f2:
            while True:
                line = f1.readline()
                if line.strip() == "":
                    break

                print line.strip()
                print f1.readline().strip()
                print f2.readline().strip()
                print f2.readline().strip()


text:
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: >
    This test is actually testing the [[Delete]] internal method (8.12.8). Since the
    language provides no way to directly exercise [[Delete]], the tests are placed here.
es5id: 11.4.1-4.a-10
description: >
    delete operator returns true for property (stringify) defined on
    built-in object (JSON)
---*/

var d = delete JSON.stringify;

assert.sameValue(d, true, 'd');
assert.sameValue(JSON.stringify, undefined, 'JSON.stringify');


text:
import pathlib
import abc
import chardet

from django.utils.timezone import get_default_timezone_name, now

def decode_from_filesystem(path):
    """
    Decode a given Path object to unicode by detecting its encoding
    :param path: The Path object to decode
    :type path: pathlib.Path
    :return: Tuple of the str representation of the path, and it's original
        codec name
    :rtype: tuple
    """
    value = str(path)
    b = bytes(path)
    codec = chardet.detect(b)['encoding']
    return value.encode('utf-8', 'surrogateescape').decode(codec), codec

def encode_to_filesystem(value, codec):
    """
    Encode the given value using the given codec back Path object
    :param value: Unicode represented path
    :type value: str
    :param codec: Originally detected codec
    :type codec: str
    :return: Path object
    :rtype: pathlib.Path
    """
    return pathlib.Path(value.encode(codec).decode('utf-8', 'surrogateescape'))

class BaseFilesystem(metaclass=abc.ABCMeta):

    def __init__(self, name, mountpoint=''):
        self._name = name
        self._mountpoint = mountpoint

    @property
    @abc.abstractmethod
    def name(self):
        """
        :return: The name of the filesystem
        :rtype: basestring
        """

    @property
    @abc.abstractmethod
    def mountpoint(self):
        """
        :return: The mountpoint of the filesystem
        :rtype: basestring
        """

class BaseSnapshot(metaclass=abc.ABCMeta):

    def __init__(self, name, timestamp=None, filesystem=None):
        self._name = name
        self._filesystem = filesystem
        if timestamp is not None:
            self._timestamp = timestamp
        else:
            self._timestamp = now()

    @property
    @abc.abstractmethod
    def name(self):
        """
        :return: The name of the snapshot
        :rtype: basestring
        """

    @property
    @abc.abstractmethod
    def timestamp(self):
        """
        :return: The creation time of this snapshot
        :rtype: `datetime.datetime`
        """

    @property
    @abc.abstractmethod
    def filesystem(self):
        """
        :return: The parent filesystem of this snapshot
        :rtype: `BaseFilesystem`
        """

class BaseUtil(metaclass=abc.ABCMeta):
    timezone_name = get_default_timezone_name()

    @classmethod
    @abc.abstractmethod
    def get_filesystems(cls):
        """
        Gets a list of filesystems
        :return: A list of `BaseFilesystem` objects
        :rtype: list
        """

    @classmethod
    @abc.abstractmethod
    def get_snapshots(cls):
        """
        Gets a list of snapshots
        :return: A list of `BaseSnapshot`
        :rtype: list
        """


text:
<?php

class Instagram{

    public $user_id;
    public $client_id;
    protected $access_token = '1376315739.23e2ac7.7d9fa8f94b064c448369d8961c02b16a';

    public function __construct( $user_id, $client_id)
    {
        $this->user_id = ($user_id) ? $user_id : NULL;
        $this->client_id = $client_id;
    }

    public function authorize()
    {
        $authorize_data = $this->get_data("https://instagram.com/oauth/authorize/?client_id=$this->client_id&redirect_uri=http://smsarvip.com&response_type=token");
    }

    public function get_data($url){
        $json = file_get_contents($url);
        $data = json_decode($json);
        return $data;
    }

    public function get_recent_medias($count = 12)
    {
        return $this->get_data("https://api.instagram.com/v1/users/$this->user_id/media/recent/?client_id=$this->client_id&count=$count&access_token=$this->access_token");
    }

}


text:
layout: single
title: Full Stack Fest 2016 - Podsumowanie
categories: other
---

Na początku września moja firma postanowiła wysłać dwójkę programistów (Martę oraz mnie) do Barcelony na konferencję [Full Stack Fest](https://2016.fullstackfest.com). Jako że była to moja pierwsza techniczna konferencja, nie byłem do końca pewien, czego powinienem się spodziewać.

![Intro](/images/fsf_intro.png)

FSF (oraz sama Barcelona) przerosły nieco moje oczekiwania. Chociaż w programie było mało tematów związanych bezpośrednio z moją tematyką, szczególnie w dwóch ostatnich dniach, gdzie rozwiązania JavaScriptowe atakowały ze wszystkich stron, nie sposób było się nudzić. Poniżej wybrałem kilka najbardziej interesujących prezentacji, a całość konferencji możecie obejrzeć na [kanale Youtubowym organizatorów](https://www.youtube.com/watch?v=vxMASndC3k4&list=PLe9psSNJBf76DOOKMkDpyo_A5PfZk7JWc).

![Profesjonalna delegacja ;)](/images/fsf_polcode.jpg)

Muszę też pochwalić oczywiście organizatorów imprezy za profesjonalne jej przygotowanie - naprawdę dobra lokalizacja z wystarczającą ilością miejsca dla uczestników oraz dużą ilością pobliskich restauracji i sporym zapasem kawy i innych napojów dostępnych dla wszystkich. Cały czas działał też kanał na Slacku oraz aplikacja mobilna, która zawierała wszystkie ważne informacje.

Wszystkie prezentacje były oczywiście nagrane, a miały także wpisywane na żywo napisy dla niesłyszących. Można by się oczywiście przyczepić do słabego internetu w audytorium, ale to już tak naprawdę rzeczy poza kontrolą organizatorów.

![Awesome](/images/fsf_ident.jpg)

No i oczywiście identyfikatory. To oczywiście najbardziej drobna z drobnostek, ale trzeba to powiedzieć - najlepsze identyfikatory ever. Niestety nic nie ma na nich zapisanego, taka zmarnowana okazja... ;)

## Część backendowa.

Pierwsze dwa dni FSF skupiły się na backendzie w dość szerokim znaczeniu. Niestety mało rzeczy związanych z Ruby samym w sobie, ale i tak warto było spędzić te dwa dni słuchając i dowiadując się o nowinkach i ciekawych rzeczach. Moją uwagę najbardziej zwróciły trzy prezentacje:

### [Computing: The first 100 years](https://youtu.be/itKFrXghGuA)

![Computing: The first 100 years](/images/fsf_history.jpg)

Doskonała prezentacja na rozpoczęcie technicznej konferencji - skrócona historia komputerów, ciekawie zaprezentowana przez twórcę języka Erlang.

### [How secure are Docker containers?](https://youtu.be/oANurUSaOFs)

Bezpieczeństwo Dockerowych kontenerów na przykładzie zabezpieczania serwisu Katacoda, który pozwala ludziom na deployowanie i zabawę w owych kontenerach. Ciekawa techniczna prezentacja, która zagłębia się nieco bardziej w ten temat.

### [Distributed Apps with IPFS](https://youtu.be/jONZtXMu03w)

![IPFS](/images/fsf_ipfs.jpg)

To jedna z tych technologii, na które zdecydowanie warto zwrócić swoją uwagę. [IPFS](http://ipfs.io) to nowy protokół do dystrybuowania stron i aplikacji, gdzie odnośniki nie są do serwerów, ale do zawartości - czyli mając hash adresowy, możemy daną aplikację pobrać z dowolnego miejsca w sieci, które taką zawartość posiada, nie musimy odwoływać się do jednego konkretnego serwera.

Sama prezentacja jest też warta obejrzenia, chociaż nieco odchodzi od samego tematu. W połączeniu jednak z historią komputerów tworzą one fajną parę łączącą przeszłość z przyszłością.

## Przerwa na zwiedzanie.

W środę nie było żadnych prezentacji, tak więc spędziłem ten dzień aktywnie zwiedzając miasto. Barcelona jest naprawdę piękna i chętnie wróciłbym tam obejrzeć je dokładniej, chociaż z racji swojej wielkości zajmuje to sporo czasu.

![Plac Uniwersytecki](/images/fsf_barcelona.jpg)

Ogólnie nie zwiedziłem zbyt wiele, ale też jest to nieco trudne - szczególnie kiedy o 18 kończą się prezentacje, zanim się gdziekolwiek dojedzie to mija kolejna godzina (Barcelona to strasznie duże miasto i mimo dobrej sieci komunikacji publicznej po prostu zajmuje to czas), muzeum które chciałem zwiedzić zamyka się o 20, a w dodatku akurat zachodzi słońce i robienie jakichkolwiek zdjęć staje się bardzo utrudnione. Niemniej udało mi się obejrzeć najważniejsze miejsca w Barcelonie, znalazłem też nawet nieco czasu na proste posiedzenie sobie na plaży. :)

![Plaża](/images/fsf_duck_beach.jpg)

## Część frontendowa.

![Wnętrze audytorium](/images/fsf_auditorium.jpg)

Ostatnie dwa dni były poświęcone technologiom frontendowym. Dla mnie nie było to akurat najciekawsze przeżycie - zdecydowanie wolę Ruby od JavaScriptu, ale i tutaj znalazło się kilka ciekawych prezentacji.

### [CSS4 Grid: True Layout Finally Arrives](https://youtu.be/axVw1Zduqn0)

Nie mogę się doczekać! Tworzenie layoutu w CSSie zawsze było ćwiczeniem z cierpliwości (oraz inwencji twórczej, głównie w wymyślaniu nowych tortur dla twórców Internet Explorera), to może teraz będzie to nieco łatwiejsze - przynajmniej kiedy w końcu wszystkie przeglądarki zaczną to poprawnie obsługiwać.

### [The Physical Web: building on top of the open web](https://youtu.be/gV72mCdomo4)

![Przyszłość Physical Web](/images/fsf_physical_web.jpg)

Demo i prezentacja opowiadająca o Fizycznej Sieci - sieci opartej na małych bluetoothowych beaconach, które wysyłają ciągle sygnał zawierający krótki url. Naprawdę fajna technologia, która w ostatnim czasie niesamowicie się rozwinęła, a w prezentacji mamy też trochę pogadanek o możliwych jej zastosowaniach oraz jej przyszłości.

## Powrót do rzeczywistości.

Full Stack Fest 2016 zdecydowanie mogę uznać za ciekawą konferencję i naprawdę chętnie wrócę tam za rok, jeśli tylko będzie taka okazja.

![Zewnętrze Auditori AXA](/images/fsf_outside.jpg)

Poznałem trochę nowych technologii, jak chociażby IPFS (którego [implementacja w Ruby](https://github.com/Fryie/ipfs-ruby) aż się prosi o jej dalsze rozwijanie), mam też trochę pomysłów na wykorzystanie beaconów oraz Physical Web do różnych rzeczy w biurze i domu - ale o tym już w przyszłości, a tymczasem czas wrócić do pracy.


text:
<?php

namespace JasperPHP;

use JasperPHP;

/**
 * classe TLabel
 * classe para construção de rótulos de texto
 *
 * @author   Rogerio Muniz de Castro <rogerio@quilhasoft.com.br>
 * @version  2015.03.11
 * @access   restrict
 *
 * 2015.03.11 -- criação
 * */
class Summary extends Element {

    public function generate($dbData = null) {
        $height = (string) $this->children['0']->objElement['height'];
        if ($this->children['0']->splitType == 'Stretch' || $this->children['0']->splitType == 'Prevent') {
            JasperPHP\Instructions::addInstruction(array("type" => "PreventY_axis", "y_axis" => $height));
        }
        parent::generate($dbData);
        if ($this->children['0']->splitType == 'Stretch' || $this->children['0']->splitType == 'Prevent') {
            JasperPHP\Instructions::addInstruction(array("type" => "SetY_axis", "y_axis" => $height));
        }
    }

}

?>


text:
pre {
    white-space: pre !important
}

button {
    color: black
}


text:
using namespace v8;
using namespace v8_utils;

namespace node_dbus {

NodeDBusError::NodeDBusError() {
    dbus_error_init(&error_);
}

NodeDBusError::~NodeDBusError() {
    if (dbus_error_is_set(&error_)) {
        dbus_error_free(&error_);
    }
}

v8::Handle<v8::Value>
NodeDBusError::exception() const {
    std::ostringstream msg;
    msg << "DBus error: " << error_.message;
    return throwError(msg.str().c_str());
}

} // end of namespace node_dbus


text:
var Arena = function (height,width) {
  this.height = height;
  this.width = width;

  // elements to variables
  this.canvasElem = document.getElementById('canvas');
  this.ctx = this.canvasElem.getContext('2d');

  // attach fastclick
  FastClick.attach(this.canvasElem);
};
Arena.prototype.drawComponent = function (posOnX,posOnY,height,width,color) {
  this.ctx.fillStyle = color;
  this.ctx.fillRect(posOnX,posOnY,height,width);
};

var Player = function (posOnX,posOnY,height,width,speed,color) {
  this.positionOnX = posOnX;
  this.positionOnY = posOnY;
  this.height = height;
  this.width = width;
  this.speed = speed;
  this.color = color;

  this.maxPositionOnY = arena.height-this.height;
  this.goingUp = false;

  this.hasShield = false;
};
Player.prototype.move = function () {
  // move inside canvas
  if ((this.goingUp) && (this.positionOnY>0)){
    this.positionOnY -= this.speed;
  } else if ((!this.goingUp) && (this.positionOnY<this.maxPositionOnY)) {
    this.positionOnY += this.speed;
  }
};

var Collectable = function (posOnX,posOnY,height,width,speed,color) {
  this.positionOnX = posOnX;
  this.positionOnY = posOnY;
  this.height = height;
  this.width = width;
  this.speed = speed;
  this.color = color;

  this.providesShield = false;
};
Collectable.prototype.reset = function () {
  this.positionOnX = arena.width+this.width;
  this.positionOnY = getRandom(0,arena.height-this.height);
};
Collectable.prototype.move = function () {
  // point too far left or collected
  if(this.positionOnX<-this.width){
    this.reset();
  }
  this.positionOnX -= this.speed;
};

var Shield = function (posOnX,posOnY,height,width,color) {
  this.positionOnX = posOnX;
  this.positionOnY = posOnY;
  this.height = height;
  this.width = width;
  this.color = color;
};

var Foe = function (posOnX,posOnY,height,width,speed,color) {
  this.positionOnX = posOnX;
  this.positionOnY = posOnY;
  this.height = height;
  this.width = width;
  this.speed = speed;
  this.color = color;
};
Foe.prototype.levelUp = function (levelCounter) {
  this.speed = this.speed+(levelCounter*2);
};
Foe.prototype.reset = function () {
  this.positionOnX = arena.width+this.width;
  this.positionOnY = getRandom(0,arena.height-this.height);
};
Foe.prototype.move = function () {
  // enemy too far left
  if (this.positionOnX<-this.width){
    this.reset();
  }
  this.positionOnX -= this.speed;
};

var Menu = function () {
  // elements to variables
  this.menuElem = document.getElementById('menu');
  this.lastScoreElem = document.getElementById('last_score');
  this.highscoreElem = document.getElementById('highscore');
};
Menu.prototype.show = function () {
  this.lastScoreElem.innerHTML = 'Score: '+pointCounter;
  this.highscoreElem.innerHTML = 'Highscore: '+highscore;
  this.menuElem.style.display = 'block';
};
Menu.prototype.hide = function () {
  this.menuElem.style.display = 'none';
};


text:
@implementation PSTLaw

- (BOOL)isBrokenBySubject:(id)subject
{
    return NO;
}

- (NSString *)explanationForSubject:(id)subject
{
    return nil;
}

@end


text:
1. Clone rosa

        $ git clone git@github.com:abencz/rosa.git
        $ cd rosa
        $ git clone git@github.com:abencz/rosa_debian.git debian

1. Bump version

        $ dch -i

    or update changelog with explicit version

        $ dch -v

1. Build package

        $ cd ../
        $ dpkg-buildpackage -S

1. (optional) Release to Launchpad using [`dput`](https://help.launchpad.net/Packaging/PPA/Uploading)


text:
from __future__ import division, print_function, unicode_literals

__docformat__ = 'restructuredtext'

from cocos import audio

try:
    from cocos.audio.pygame.mixer import Sound
except ImportError:
    audio._working = False

from . import actions

class Effect(object):
    """Effects are sounds effect loaded in memory

    Example ::

        shot = Effect('bullet.wav')
        shot.play() # Play right now
        sprite.do(shot.action)
    """

    def __init__(self, filename):
        """Initialize the effect

        :Parameters:
            `filename` : fullpath
                path of a WAV or Ogg audio file
        """
        if audio._working:
            self.sound = Sound(filename)
        else:
            self.sound = None
        self.action = actions.PlayAction(self.sound)

    def play(self):
        if audio._working:
            self.sound.play()


text:
<?php

namespace Kanboard\Core;

/**
 * Translator class
 *
 * @package core
 * @author  Frederic Guillot
 */
class Translator
{
    /**
     * Locale path
     *
     * @var string
     */
    const PATH = 'app/Locale';

    /**
     * Locale
     *
     * @static
     * @access private
     * @var array
     */
    private static $locales = array();

    /**
     * Instance
     *
     * @static
     * @access private
     * @var Translator
     */
    private static $instance = null;

    /**
     * Get instance
     *
     * @static
     * @access public
     * @return Translator
     */
    public static function getInstance()
    {
        if (self::$instance === null) {
            self::$instance = new self;
        }

        return self::$instance;
    }

    /**
     * Get a translation
     *
     * $translator->translate('I have %d kids', 5);
     *
     * @access public
     * @param  string   $identifier       Default string
     * @return string
     */
    public function translate($identifier)
    {
        $args = func_get_args();

        array_shift($args);
        array_unshift($args, $this->get($identifier, $identifier));

        foreach ($args as &$arg) {
            $arg = htmlspecialchars($arg, ENT_QUOTES, 'UTF-8', false);
        }

        return call_user_func_array(
            'sprintf',
            $args
        );
    }

    /**
     * Get a translation with no HTML escaping
     *
     * $translator->translateNoEscaping('I have %d kids', 5);
     *
     * @access public
     * @param  string   $identifier       Default string
     * @return string
     */
    public function translateNoEscaping($identifier)
    {
        $args = func_get_args();

        array_shift($args);
        array_unshift($args, $this->get($identifier, $identifier));

        return call_user_func_array(
            'sprintf',
            $args
        );
    }

    /**
     * Get a formatted number
     *
     * $translator->number(1234.56);
     *
     * @access public
     * @param  float    $number   Number to format
     * @return string
     */
    public function number($number)
    {
        return number_format(
            $number,
            $this->get('number.decimals', 2),
            $this->get('number.decimals_separator', '.'),
            $this->get('number.thousands_separator', ',')
        );
    }

    /**
     * Get a formatted currency number
     *
     * $translator->currency(1234.56);
     *
     * @access public
     * @param  float    $amount   Number to format
     * @return string
     */
    public function currency($amount)
    {
        $position = $this->get('currency.position', 'before');
        $symbol = $this->get('currency.symbol', '$');
        $str = '';

        if ($position === 'before') {
            $str .= $symbol;
        }

        $str .= $this->number($amount);

        if ($position === 'after') {
            $str .= ' '.$symbol;
        }

        return $str;
    }

    /**
     * Get a formatted datetime
     *
     * $translator->datetime('%Y-%m-%d', time());
     *
     * @access public
     * @param  string   $format      Format defined by the strftime function
     * @param  integer  $timestamp   Unix timestamp
     * @return string
     */
    public function datetime($format, $timestamp)
    {
        if (! $timestamp) {
            return '';
        }

        $format = $this->get($format, $format);

        if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
            $format = str_replace('%e', '%d', $format);
            $format = str_replace('%k', '%H', $format);
        }

        return strftime($format, (int) $timestamp);
    }

    /**
     * Get an identifier from the translations or return the default
     *
     * @access public
     * @param  string   $identifier   Locale identifier
     * @param  string   $default      Default value
     * @return string
     */
    public function get($identifier, $default = '')
    {
        if (isset(self::$locales[$identifier])) {
            return self::$locales[$identifier];
        } else {
            return $default;
        }
    }

    /**
     * Load translations
     *
     * @static
     * @access public
     * @param  string   $language   Locale code: fr_FR
     * @param  string   $path       Locale folder
     */
    public static function load($language, $path = self::PATH)
    {
        setlocale(LC_TIME, $language.'.UTF-8', $language);

        $filename = $path.DIRECTORY_SEPARATOR.$language.DIRECTORY_SEPARATOR.'translations.php';

        if (file_exists($filename)) {
            self::$locales = array_merge(self::$locales, require($filename));
        }
    }

    /**
     * Clear locales stored in memory
     *
     * @static
     * @access public
     */
    public static function unload()
    {
        self::$locales = array();
    }
}


text:
[@puppeteer/replay](../README.md) / KeyDownStep

# Interface: KeyDownStep

## Hierarchy

- [`StepWithTarget`](Schema.StepWithTarget.md)

  ↳ **`KeyDownStep`**

## Table of contents

### Properties

- [assertedEvents](KeyDownStep.md#assertedevents)
- [key](KeyDownStep.md#key)
- [target](KeyDownStep.md#target)
- [timeout](KeyDownStep.md#timeout)
- [type](KeyDownStep.md#type)

## Properties

### assertedEvents

• `Optional` **assertedEvents**: [`NavigationEvent`](Schema.NavigationEvent.md)[]

#### Inherited from

[StepWithTarget](Schema.StepWithTarget.md).[assertedEvents](Schema.StepWithTarget.md#assertedevents)

#### Defined in

[Schema.ts:61](https://github.com/puppeteer/replay/blob/main/src/Schema.ts#L61)

---

### key

• **key**: [`Key`](../modules/Schema.md#key)

#### Defined in

[Schema.ts:160](https://github.com/puppeteer/replay/blob/main/src/Schema.ts#L160)

---

### target

• `Optional` **target**: `string`

Defaults to main

#### Inherited from

[StepWithTarget](Schema.StepWithTarget.md).[target](Schema.StepWithTarget.md#target)

#### Defined in

[Schema.ts:68](https://github.com/puppeteer/replay/blob/main/src/Schema.ts#L68)

---

### timeout

• `Optional` **timeout**: `number`

#### Inherited from

[StepWithTarget](Schema.StepWithTarget.md).[timeout](Schema.StepWithTarget.md#timeout)

#### Defined in

[Schema.ts:60](https://github.com/puppeteer/replay/blob/main/src/Schema.ts#L60)

---

### type

• **type**: [`KeyDown`](../enums/Schema.StepType.md#keydown)

#### Overrides

[StepWithTarget](Schema.StepWithTarget.md).[type](Schema.StepWithTarget.md#type)

#### Defined in

[Schema.ts:159](https://github.com/puppeteer/replay/blob/main/src/Schema.ts#L159)


text:
using System;

namespace Microsoft.DirectX.DirectSound
{
	public struct Listener3DOrientation
	{
		public Vector3 Front {
			get {
				throw new NotImplementedException ();
			}
			set {
				throw new NotImplementedException ();
			}
		}

		public Vector3 Top {
			get {
				throw new NotImplementedException ();
			}
			set {
				throw new NotImplementedException ();
			}
		}

		public override string ToString ()
		{
			throw new NotImplementedException ();
		}

		public Listener3DOrientation (Vector3 front, Vector3 top)
		{
			throw new NotImplementedException ();
		}
	}
}


text:
<?php

namespace PriyankPatel\ProxifyLaravel;

use Illuminate\Support\ServiceProvider;

class ProxifyLaravelServiceProvider extends ServiceProvider {

	/**
	 * Perform post-registration booting of service
	 * @return void
	 */
	public function boot()
	{
		// Publih the config
		$this->publishes([
			__DIR__ . '/../../config/proxify.php' => config_path('proxify.php'),
		], 'config');
	}

	/**
	 * Register bindings in the container
	 * @return void
	 */
	public function register()
	{
		// Merge proxify.php config with the application's config
		$this->mergeConfigFrom(
			__DIR__ . '/../../config/proxify.php', 'proxify'
		);

		// Share Proxify Class with the service
		$this->app['proxify'] = $this->app->share(function ($app) {

			// Create Proxify Instance
			$proxify = new Proxify($app['configi']->get('proxify'));

			// return newly created Proxify Instance
			return $proxify;
		});

		// Bind the app
		$this->app->bind('PriyankPatel\ProxifyLaravel\Proxify', function ($app) {
			return $app['proxify'];
		});
	}
}


text:
<!DOCTYPE html>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />

define(function(require, exports, module) {
    require('$LIB/dr/shim/language.js');
    var globalScope = require('$SPRITE/global.js');

    // PhantomJS doesn't support Promises so polyfill
    if (!globalScope.Promise) globalScope.Promise = require('$CORE/promisepolyfill.js');

    module.exports = {
        // Expose JSClass
        JS:require('$LIB/jsclass.js'),

        // Use the current date and time as a version
        version: 20150623.1045,

        /** Dictionary to map global ID's to the dreem global root. Used for
            constraint-resolving. See dr.sprite.storeGlobal and
            dr.sprite.retrieveGlobal for methods that access this dictionary.
            @private */
        IDdictionary: {},

        /** Used to generate globally unique IDs.
            @private */
        __GUID_COUNTER: 0,

        /** Generates a globally unique id, (GUID).
            @return number */
        generateGuid: function() {
            return ++this.__GUID_COUNTER;
        },

        getGlobalScope: function() {
            return globalScope;
        },

        /** Common noop function. Also used as a return value for setters to
            prevent the default setAttribute behavior. */
        noop: function() {},

        /** Called from previewers to deserialize undoables. Not intended for
            use in other contexts, though it may still be useful. */
        deserialize: function(json) {
          var objTree = JSON.parse(json),
            classname = objTree.classname,
            data = objTree.data;

          var klass = this.lookupClass(classname);
          if (klass) {
              var obj = new klass();
              if (obj.deserialize) obj.deserialize(data);
              return obj;
          }
          return null;
        },

        /** Takes a '.' separated string such as "foo.bar.baz" and resolves it
            into the value found at that location relative to a starting scope.
            If no scope is provided global scope is used.
            @param objName:string|array The name to resolve or an array of path
                parts in descending order.
            @param scope:Object The scope to resolve from. If resolution fails
                against this scope the global scope will then be tried.
            @returns The referenced object or undefined if resolution failed. */
        resolveName: function(objName, scope) {
            if (!objName || objName.length === 0) return undefined;

            var isArray = Array.isArray(objName);
            if (isArray) {
                var firstName = objName[0];
                if (firstName === 'dr') {
                    scope = this;
                    objName.shift();
                    if (objName.length === 0) return scope;
                } else if (firstName === 'global') {
                    scope = this.getGlobalScope();
                    objName.shift();
                    if (objName.length === 0) return scope;
                }
            } else {
                if (objName === 'this') {
                    return scope;
                } else if (objName.startsWith('this.')) {
                    objName = objName.substring(5);
                } else if (objName === 'dr') {
                    return this;
                } else if (objName.startsWith('dr.')) {
                    objName = objName.substring(3);
                    scope = this;
                } else if (objName === 'global') {
                    return this.getGlobalScope();
                } else if (objName.startsWith('global.')) {
                    objName = objName.substring(7);
                    scope = this.getGlobalScope();
                }
            }

            objName = isArray ? objName : objName.split(".");

            // Check first part against provided scope. If it's undefined
            // then fail over to global scope
            if (scope[objName[0]] === undefined) scope = this.getGlobalScope();

            for (var i = 0, len = objName.length; i < len; ++i) {
                scope = scope[objName[i]];
                if (scope === undefined) {
                    this.sprite.console.warn("resolveName failed for:" + objName.join('.') + ' at part:' + i + ' "' + objName[i] + '"');
                    return undefined;
                }
            }

            return scope;
        },

        /** Used to wrap the first function with the second function. The first
            function is exposed as this.callSuper within the wrapper function.
            @param fn:function the function to wrap.
            @param wrapperFn:function the wrapper function.
            @returns a wrapped function. */
        wrapFunction: function(fn, wrapperFn) {
            return function() {
                // Store existing callSuper function so we can put it back later.
                var oldSuper = this.callSuper;

                // Assign new callSuper and execute wrapperFn
                this.callSuper = fn;
                var retval = wrapperFn.apply(this, arguments);

                // Restore existing callSuper or delete new callSuper
                if (oldSuper !== undefined) {
                    this.callSuper = oldSuper;
                } else {
                    delete this.callSuper;
                }

                return retval;
            };
        },

        /** A wrapper on dr.global.error.notify
            @param err:Error/string The error or message to dump stack for.
            @param type:string (optional) The type of console message to write.
                Allowed values are 'error', 'warn', 'log' and 'debug'. Defaults to
                'error'.
            @returns void */
        dumpStack: function(err, type) {
            this.global.error.notify(type || 'error', err, err, typeof err === 'string' ? null : err);
        },

        // Text Templating
        /** Populates a text "template" with 1 or more arguments. The
            template consists of a string with text interspersed with
            curly-braced indices. The arguments are replaced in order one at
            a time into the template. For example:

                dr.fillTextTemplate("{0}/{2}/{1} hey {0}", 1, 2, 3)
                will return "1/3/2 hey 1".

            @param (first arg):string The template to use.
            @param (remaining args):(coerced to string) The parameters for the
                template.
            @returns A populated string. */
        fillTextTemplate: function() {
            var params = Array.prototype.slice.call(arguments),
                template = params.shift();

            if (template == null) return '';

            var param, i = 0, len = params.length;
            for (; len > i; ++i) {
                param = params[i];
                template = template.split("{" + i + "}").join(param == null ? '' : param);
            }
            return template;
        },

        // Misc
        /** Memoize a function.
            @param f:function The function to memoize
            @returns function: The memoized function. */
        memoize: function(f) {
            return function() {
                var hash = JSON.stringify(arguments),
                    cache = f.__cache || (f.__cache = {});
                return (hash in cache) ? cache[hash] : cache[hash] = f.apply(this, arguments);
            };
        },

        /** Copies properties from the source objects to the target object.
            @param targetObj:object The object that properties will be copied into.
            @param sourceObj:object The object that properties will be copied from.
            @param arguments... Additional arguments beyond the second will also
                be used as source objects and copied in order from left to right.
            @param mappingFunction:function (optional) If the last argument is a
                function it will be used to copy values from the source to the
                target. The function will be passed three values, the key, the
                target and the source. The mapping function should copy the
                source value into the target value if so desired.
            @returns The target object. */
        extend: function(targetObj, sourceObj) {
            var iterable = targetObj,
                result = iterable,
                args = arguments, argsLength = args.length, argsIndex = 0,
                key, mappingFunc, ownIndex, ownKeys, length;

            if (iterable) {
                if (argsLength > 2 && typeof args[argsLength - 1] === 'function') mappingFunc = args[--argsLength];

                while (++argsIndex < argsLength) {
                    iterable = args[argsIndex];

                    if (iterable) {
                        ownIndex = -1;
                        ownKeys = Object.keys(iterable);
                        length = ownKeys ? ownKeys.length : 0;

                        while (++ownIndex < length) {
                            key = ownKeys[ownIndex];
                            if (mappingFunc) {
                                mappingFunc(key, result, iterable);
                            } else {
                                result[key] = iterable[key];
                            }
                        }
                    }
                }
            }
            return result
        },

        /** Common float comparison function. */
        closeTo: function(a, b, epsilon) {
            // Default of 0.01 is appropriate for many pixel related comparisons
            return Math.abs(a - b) < (epsilon != null ? epsilon : 0.01);
        },

        // Geometry
        measureDistance: function(x1, y1, x2, y2, squared) {
            var diffX = x2 - x1,
                diffY = y2 - y1,
                diffSquared = diffX * diffX + diffY * diffY;
            return squared ? diffSquared : Math.sqrt(diffSquared);
        },

        /** Get the closest point on a line to a given point.
            @param Ax:number The x-coordinate of the first point that defines
                the line.
            @param Ay:number The y-coordinate of the first point that defines
                the line.
            @param Bx:number The x-coordinate of the second point that defines
                the line.
            @param By:number The y-coordinate of the second point that defines
                the line.
            @param Px:number The x-coordinate of the point.
            @param Py:number The y-coordinate of the point.
            @returns object: A position object with x and y properties. */
        getClosestPointOnALineToAPoint: function(Ax, Ay, Bx, By, Px, Py) {
            var APx = Px - Ax,
                APy = Py - Ay,
                ABx = Bx - Ax,
                ABy = By - Ay,
                magAB2 = ABx * ABx + ABy * ABy,
                ABdotAP = ABx * APx + ABy * APy,
                t = ABdotAP / magAB2;
            return {x:Ax + ABx * t, y:Ay + ABy * t};
        },

        // Random numbers
        /** @returns a random number between 0 (inclusive) and 1 (exclusive)
            @param func:function (optional) a distribution function for the
                random numbers. The function should map a number between 0 and 1
                to another number between 0 (inclusive) and 1 (exclusive). If not
                provided a flat distribution will be used. Example functions:
                    - function(v) {return v * v;} will skew the value towards 0.
                    - function(v) {return 0.9999999999 - v * v;} will skew the
                      value towards a value very close to 1.
            @returns number: a random number between 0 and almost 1. */
        getRandom: function(func) {
            var v = Math.random();
            if (func) {
                v = func(v);

                // Correct for badly behaved skew functions.
                if (v >= 1) {
                    v = 0.9999999999;
                } else if (v < 0) {
                    v = 0;
                }
            }
            return v;
        },

        /** @returns a random number between min (inclusive) and max (exclusive).
            @param min:number the minimum value returned.
            @param max:number the maximum value returned.
            @param func:function a skew function. See myt.getRandom for more info.
            @returns number: between min and max. */
        getRandomArbitrary: function(min, max, func) {
            if (min > max) {
                var tmp = min;
                min = max;
                max = tmp;
            }
            return this.getRandom(func) * (max - min) + min;
        },

        /** @returns a random integer between min (inclusive) and max (inclusive)
            @param min:number the minimum value returned.
            @param max:number the maximum value returned.
            @param func:function a skew function. See myt.getRandom for more info.
            @returns number: an integer between min and max. */
        getRandomInt: function(min, max, func) {
            if (min > max) {
                var tmp = min;
                min = max;
                max = tmp;
            }
            return Math.floor(this.getRandom(func) * (max - min + 1) + min);
        },

        // Dreem Instantiation
        lookupClass: function(classname) {
            return this.maker.lookupClass(classname, this.pkg);
        },

        makeChildren: function(target, json, isClassroot) {
            this.maker.walkForInstance(target, json, isClassroot, this.pkg);
        },

        registerHandlers: function(target, handlers) {
            if (handlers) {
                var len = handlers.length;
                if (len > 0) {
                    var i = 0, handler, ref, refTarget;
                    for (; len > i;) {
                        handler = handlers[i++];
                        ref = handler.reference;
                        refTarget = ref ? this.resolveName(ref, target) : target;
                        if (refTarget) target.listenTo(refTarget, handler.event, handler.name);
                    }
                }
            }
        },

        /** Called at the end of instantiation. Bind all the constraints registered
            during instantiation and notifies each root view that we are "ready". */
        notifyReady: function() {
            this.ready = true;

            // Fire any pending events
            if (this.Observable) this.Observable.firePendingEvents();

            // Notify every view that we are now ready. Will also trigger the
            // firing of oninit events for each node depth first.
            if (this.global.roots) {
                var rootViews = this.global.roots.getRoots(), len = rootViews.length, i = 0;
                for (; len > i;) rootViews[i++].setAttribute('ready', true);
            }

            // Send a dreeminit event. Used by phantomjs testing
            if (this.sprite.sendReadyEvent) this.sprite.sendReadyEvent();
        }
    };
});


text:
import os
import parsl

from parsl.app.app import bash_app, python_app
from parsl.tests.configs.local_threads import config
from parsl.data_provider.files import File

import pytest

# parsl.set_stream_logger()

@bash_app
def generate(outputs=[]):
    return "echo $(( RANDOM % (10 - 5 + 1 ) + 5 )) &> {o}".format(o=outputs[0])

@bash_app
def concat(inputs=[], outputs=[], stdout="stdout.txt", stderr='stderr.txt'):
    return "cat {0} >> {1}".format(" ".join(map(lambda x: x.filepath, inputs)), outputs[0])

@python_app
def total(inputs=[]):
    total = 0
    with open(inputs[0].filepath, 'r') as f:
        for line in f:
            total += int(line)
    return total

@pytest.mark.staging_required
def test_parallel_dataflow():
    """Test parallel dataflow from docs on Composing workflows
    """

    if os.path.exists('all.txt'):
        os.remove('all.txt')

    # create 5 files with random numbers
    output_files = []
    for i in range(5):
        if os.path.exists('random-%s.txt' % i):
            os.remove('random-%s.txt' % i)
        output_files.append(generate(outputs=[File('random-%s.txt' % i)]))

    # concatenate the files into a single file
    cc = concat(inputs=[i.outputs[0]
                        for i in output_files], outputs=[File("all.txt")])

    # calculate the average of the random numbers
    totals = total(inputs=[cc.outputs[0]])
    print(totals.result())

if __name__ == "__main__":
    parsl.clear()
    parsl.load(config)

    test_parallel_dataflow()