text:
package org.apache.olingo.server.core.responses;

import java.util.List;
import java.util.Map;

import org.apache.olingo.commons.api.data.ContextURL;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.edm.EdmAction;
import org.apache.olingo.commons.api.edm.EdmEntitySet;
import org.apache.olingo.commons.api.edm.EdmEntityType;
import org.apache.olingo.commons.api.edm.EdmFunction;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.EdmProperty;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.commons.api.http.HttpHeader;
import org.apache.olingo.commons.api.http.HttpStatusCode;
import org.apache.olingo.commons.core.Encoder;
import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
import org.apache.olingo.commons.core.edm.primitivetype.EdmString;
import org.apache.olingo.server.api.ODataApplicationException;
import org.apache.olingo.server.api.ODataLibraryException;
import org.apache.olingo.server.api.ODataResponse;
import org.apache.olingo.server.api.ODataServerError;
import org.apache.olingo.server.api.ServiceMetadata;
import org.apache.olingo.server.api.serializer.EntitySerializerOptions;
import org.apache.olingo.server.api.serializer.ODataSerializer;
import org.apache.olingo.server.api.serializer.SerializerException;
import org.apache.olingo.server.core.ContentNegotiatorException;
import org.apache.olingo.server.core.ReturnRepresentation;
import org.apache.olingo.server.core.ServiceRequest;
import org.apache.olingo.server.core.serializer.utils.ContentTypeHelper;

public class EntityResponse extends ServiceResponse {
  private final ReturnRepresentation returnRepresentation;
  private final ODataSerializer serializer;
  private final EntitySerializerOptions options;
  private final ContentType responseContentType;
  private final String baseURL;

  private EntityResponse(ServiceMetadata metadata, ODataResponse response,
      ODataSerializer serializer, EntitySerializerOptions options, ContentType responseContentType,
      Map<String, String> preferences, ReturnRepresentation returnRepresentation, String baseURL) {
    super(metadata, response, preferences);
    this.serializer = serializer;
    this.options = options;
    this.responseContentType = responseContentType;
    this.returnRepresentation = returnRepresentation;
    this.baseURL = baseURL;
  }

  public static EntityResponse getInstance(ServiceRequest request, ContextURL contextURL,
      boolean references, ODataResponse response, ReturnRepresentation returnRepresentation)
      throws ContentNegotiatorException, SerializerException {
    EntitySerializerOptions options = request.getSerializerOptions(EntitySerializerOptions.class,
        contextURL, references);
    return new EntityResponse(request.getServiceMetaData(), response, request.getSerializer(),
        options, request.getResponseContentType(), request.getPreferences(), returnRepresentation,
        request.getODataRequest().getRawBaseUri());
  }

  public static EntityResponse getInstance(ServiceRequest request, ContextURL contextURL,
      boolean references, ODataResponse response)
      throws ContentNegotiatorException, SerializerException {
    EntitySerializerOptions options = request.getSerializerOptions(EntitySerializerOptions.class,
        contextURL, references);
    return new EntityResponse(request.getServiceMetaData(), response, request.getSerializer(),
        options, request.getResponseContentType(), request.getPreferences(), null,
        request.getODataRequest().getRawBaseUri());
  }

  // write single entity
  public void writeReadEntity(EdmEntityType entityType, Entity entity) throws SerializerException {

    assert (!isClosed());

    if (entity == null) {
      writeNotFound(true);
      return;
    }

    if (ContentTypeHelper.isODataMetadataFull(this.responseContentType)) {
      EdmAction action = this.metadata.getEdm().getBoundActionWithBindingType(
          entityType.getFullQualifiedName(), false);
      if (action != null) {
        entity.getOperations().add(buildOperation(action, entity.getId().toASCIIString()));
      }

      List<EdmFunction> functions = this.metadata.getEdm()
          .getBoundFunctionsWithBindingType(entityType.getFullQualifiedName(),false);

      for (EdmFunction function:functions) {
        entity.getOperations().add(buildOperation(function, entity.getId().toASCIIString()));
      }
    }

    // write the entity to response
    this.response.setContent(this.serializer.entity(this.metadata, entityType, entity, this.options).getContent());
    writeOK(responseContentType);
    close();
  }

  public void writeCreatedEntity(EdmEntitySet entitySet, Entity entity)
      throws SerializerException {
    // upsert/insert must created a entity, otherwise should have throw an
    // exception
    assert (entity != null);

    String locationHeader;
    try {
      locationHeader = buildLocation(this.baseURL, entity, entitySet.getName(), entitySet.getEntityType());
    } catch (EdmPrimitiveTypeException e) {
      throw new SerializerException(e.getMessage(), e, SerializerException.MessageKeys.WRONG_PRIMITIVE_VALUE);
    }

    // Note that if media written just like Stream, but on entity URL

    // 8.2.8.7
    if (this.returnRepresentation == ReturnRepresentation.MINIMAL) {
      writeNoContent(false);
      writeHeader(HttpHeader.LOCATION, locationHeader);
      writeHeader("Preference-Applied", "return=minimal"); //$NON-NLS-1$ //$NON-NLS-2$
      // 8.3.3
      writeHeader("OData-EntityId", entity.getId().toASCIIString()); //$NON-NLS-1$
      close();
      return;
    }

    // return the content of the created entity
    this.response.setContent(this.serializer.entity(this.metadata, entitySet.getEntityType(), entity, this.options)
        .getContent());
    writeCreated(false);
    writeHeader(HttpHeader.LOCATION, locationHeader);
    if (this.returnRepresentation != ReturnRepresentation.NONE) {
      writeHeader("Preference-Applied", "return=representation"); //$NON-NLS-1$ //$NON-NLS-2$
    }
    writeHeader(HttpHeader.CONTENT_TYPE, this.responseContentType.toContentTypeString());
    close();
  }

  public void writeUpdatedEntity() {
    // spec says just success response; so either 200 or 204. 200 typically has
    // payload
    writeNoContent(true);
  }

  public void writeDeletedEntityOrReference() {
    writeNoContent(true);
  }

  @Override
  public void accepts(ServiceResponseVisior visitor) throws ODataLibraryException,
      ODataApplicationException {
    visitor.visit(this);
  }

  public void writeCreated(boolean closeResponse) {
    this.response.setStatusCode(HttpStatusCode.CREATED.getStatusCode());
    if (closeResponse) {
      close();
    }
  }

  public void writeError(ODataServerError error) {
    try {
      writeHeader(HttpHeader.CONTENT_TYPE, this.responseContentType.toContentTypeString());
      writeContent(this.serializer.error(error).getContent(), error.getStatusCode(), true);
    } catch (SerializerException e) {
      writeServerError(true);
    }
  }

  public void writeNotModified() {
    this.response.setStatusCode(HttpStatusCode.NOT_MODIFIED.getStatusCode());
    close();
  }

  public static String buildLocation(String baseURL, Entity entity, String enitySetName, EdmEntityType type)
      throws EdmPrimitiveTypeException {
    StringBuilder location = new StringBuilder();

    location.append(baseURL).append("/").append(enitySetName);

    int i = 0;
    boolean usename = type.getKeyPredicateNames().size() > 1;
    location.append("(");
    for (String key : type.getKeyPredicateNames()) {
      if (i > 0) {
        location.append(",");
      }
      i++;
      if (usename) {
        location.append(key).append("=");
      }

      EdmProperty property = (EdmProperty)type.getProperty(key);
      String propertyType = entity.getProperty(key).getType();
      Object propertyValue = entity.getProperty(key).getValue();

      if (propertyValue == null) {
        throw new EdmPrimitiveTypeException("The key value for property "+key+" is invalid; Key value cannot be null");
      }

      if(propertyType.startsWith("Edm.")) {
        propertyType = propertyType.substring(4);
      }
      EdmPrimitiveTypeKind kind = EdmPrimitiveTypeKind.valueOf(propertyType);
      String value =  EdmPrimitiveTypeFactory.getInstance(kind).valueToString(
          propertyValue, property.isNullable(), property.getMaxLength(), property.getPrecision(), property.getScale(),
          property.isUnicode());
      if (kind == EdmPrimitiveTypeKind.String) {
          value = EdmString.getInstance().toUriLiteral(Encoder.encode(value));
      }
      location.append(value);
    }
    location.append(")");
    return location.toString();
  }
}


text:
class Users::InvitationsController < DeviseController

  prepend_before_filter :authenticate_inviter!, :only => [:new, :create]
  prepend_before_filter :has_invitations_left?, :only => [:create]
  prepend_before_filter :require_no_authentication, :only => [:edit, :update, :destroy]
  prepend_before_filter :resource_from_invitation_token, :only => [:edit, :destroy]
  helper_method :after_sign_in_path_for

  # GET /resource/invitation/new
  def new
    self.resource = resource_class.new
    render :new
  end

  # POST /resource/invitation
  def create
    self.resource = invite_resource

    if resource.errors.empty?
      set_flash_message :notice, :send_instructions, :email => self.resource.email if self.resource.invitation_sent_at
      respond_with resource, :location => after_invite_path_for(resource)
    else
      respond_with_navigational(resource) { render :new }
    end
  end

  # GET /resource/invitation/accept?invitation_token=abcdef
  def edit
    resource.invitation_token = params[:invitation_token]
    render :edit
  end

  # PUT /resource/invitation
  def update
    self.resource = resource_class.accept_invitation!(update_resource_params)

    if resource.errors.empty?
      flash_message = resource.active_for_authentication? ? :updated : :updated_not_active
      set_flash_message :notice, flash_message
      sign_in(resource_name, resource)
      respond_with resource, :location => after_accept_path_for(resource)
    else
      respond_with_navigational(resource){ render :edit }
    end
  end

  # GET /resource/invitation/remove?invitation_token=abcdef
  def destroy
    resource.destroy
    set_flash_message :notice, :invitation_removed
    redirect_to after_sign_out_path_for(resource_name)
  end

  protected

  def invite_resource
    resource_class.invite!(invite_params, current_inviter)
  end

  def current_inviter
    @current_inviter ||= authenticate_inviter!
  end

  def has_invitations_left?
    unless current_inviter.nil? || current_inviter.has_invitations_left?
      self.resource = resource_class.new
      set_flash_message :alert, :no_invitations_remaining
      respond_with_navigational(resource) { render :new }
    end
  end

  def resource_from_invitation_token
    unless params[:invitation_token] && self.resource = resource_class.find_by_invitation_token(params[:invitation_token], true)
      set_flash_message(:alert, :invitation_token_invalid)
      redirect_to after_sign_out_path_for(resource_name)
    end
  end

  def invite_params
    devise_parameter_sanitizer.sanitize(:invite)
  end

  def update_resource_params
    devise_parameter_sanitizer.sanitize(:accept_invitation)
  end

end

redpajama_set_name: RedPajamaGithub


text:
package org.apache.camel.idea.completion;

import java.util.Arrays;
import java.util.List;

import com.intellij.codeInsight.completion.CompletionType;
import org.apache.camel.idea.CamelLightCodeInsightFixtureTestCaseIT;
import org.hamcrest.Matchers;

import static org.junit.Assert.assertThat;

/**
 * Testing smart completion with Camel Java DSL
 */
public class JavaEndpointSmartCompletionMultiValueTestIT extends CamelLightCodeInsightFixtureTestCaseIT {

    public void testMultiValueCompletion() {
        myFixture.configureByFiles("CompleteJavaEndpointMultiValueTestData.java");
        myFixture.complete(CompletionType.BASIC, 1);
        List<String> strings = myFixture.getLookupElementStrings();
        // there should be plenty of options
        assertTrue(strings.size() > 60);

        // should include the scheduler. prefix again because its a multi value
        assertThat(strings, Matchers.hasItems("file:inbox?scheduler=quartz2&scheduler.foo=123&scheduler."));
    }

}


text:
/**
 */
package de.unidue.ecg.dialogScript.dialogScript.impl;

import de.unidue.ecg.dialogScript.dialogScript.*;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class DialogScriptFactoryImpl extends EFactoryImpl implements DialogScriptFactory
{
  /**
   * Creates the default factory implementation.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public static DialogScriptFactory init()
  {
    try
    {
      DialogScriptFactory theDialogScriptFactory = (DialogScriptFactory)EPackage.Registry.INSTANCE.getEFactory(DialogScriptPackage.eNS_URI);
      if (theDialogScriptFactory != null)
      {
        return theDialogScriptFactory;
      }
    }
    catch (Exception exception)
    {
      EcorePlugin.INSTANCE.log(exception);
    }
    return new DialogScriptFactoryImpl();
  }

  /**
   * Creates an instance of the factory.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public DialogScriptFactoryImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public EObject create(EClass eClass)
  {
    switch (eClass.getClassifierID())
    {
      case DialogScriptPackage.SCRIPT: return createScript();
      case DialogScriptPackage.CHARACTERS_DEFINITION: return createCharactersDefinition();
      case DialogScriptPackage.CHARACTER_DEFINITION: return createCharacterDefinition();
      case DialogScriptPackage.SWITCHES_DEFINITION: return createSwitchesDefinition();
      case DialogScriptPackage.SWITCH_DEFINITION: return createSwitchDefinition();
      case DialogScriptPackage.CONDITIONS_DEFINITION: return createConditionsDefinition();
      case DialogScriptPackage.CONDITION_DEFINITION: return createConditionDefinition();
      case DialogScriptPackage.SCENE: return createScene();
      case DialogScriptPackage.DIALOG: return createDialog();
      case DialogScriptPackage.RECURSIVE: return createRecursive();
      case DialogScriptPackage.DEFAULTS: return createDefaults();
      case DialogScriptPackage.FIRST_TIME: return createFirstTime();
      case DialogScriptPackage.OTHER_TIMES: return createOtherTimes();
      case DialogScriptPackage.PARTING_LINES: return createPartingLines();
      case DialogScriptPackage.HUB: return createHub();
      case DialogScriptPackage.HUB_FRAGMENT: return createHubFragment();
      case DialogScriptPackage.CONDITIONAL_CHOICE_DIALOG: return createConditionalChoiceDialog();
      case DialogScriptPackage.OTHERWISE_CHOICE: return createOtherwiseChoice();
      case DialogScriptPackage.CHOICE_DIALOG: return createChoiceDialog();
      case DialogScriptPackage.CONDITION_LIST: return createConditionList();
      case DialogScriptPackage.JUMP: return createJump();
      case DialogScriptPackage.INVOKE_HUB: return createInvokeHub();
      case DialogScriptPackage.INVOKE_SCENE: return createInvokeScene();
      case DialogScriptPackage.EXIT: return createExit();
      case DialogScriptPackage.CONDITIONAL: return createConditional();
      case DialogScriptPackage.SWITCH_LIST: return createSwitchList();
      case DialogScriptPackage.SWITCH: return createSwitch();
      case DialogScriptPackage.CONDITIONAL_BODY: return createConditionalBody();
      case DialogScriptPackage.STATEMENT: return createStatement();
      case DialogScriptPackage.OTHERWISE: return createOtherwise();
      case DialogScriptPackage.SWITCH_OFF: return createSwitchOff();
      case DialogScriptPackage.SWITCH_ON: return createSwitchOn();
      case DialogScriptPackage.DIALOG_LINE: return createDialogLine();
      default:
        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
    }
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object createFromString(EDataType eDataType, String initialValue)
  {
    switch (eDataType.getClassifierID())
    {
      case DialogScriptPackage.MODIFIER:
        return createModifierFromString(eDataType, initialValue);
      case DialogScriptPackage.SWITCH_VALUE:
        return createSwitchValueFromString(eDataType, initialValue);
      default:
        throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
    }
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public String convertToString(EDataType eDataType, Object instanceValue)
  {
    switch (eDataType.getClassifierID())
    {
      case DialogScriptPackage.MODIFIER:
        return convertModifierToString(eDataType, instanceValue);
      case DialogScriptPackage.SWITCH_VALUE:
        return convertSwitchValueToString(eDataType, instanceValue);
      default:
        throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
    }
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Script createScript()
  {
    ScriptImpl script = new ScriptImpl();
    return script;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public CharactersDefinition createCharactersDefinition()
  {
    CharactersDefinitionImpl charactersDefinition = new CharactersDefinitionImpl();
    return charactersDefinition;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public CharacterDefinition createCharacterDefinition()
  {
    CharacterDefinitionImpl characterDefinition = new CharacterDefinitionImpl();
    return characterDefinition;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public SwitchesDefinition createSwitchesDefinition()
  {
    SwitchesDefinitionImpl switchesDefinition = new SwitchesDefinitionImpl();
    return switchesDefinition;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public SwitchDefinition createSwitchDefinition()
  {
    SwitchDefinitionImpl switchDefinition = new SwitchDefinitionImpl();
    return switchDefinition;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ConditionsDefinition createConditionsDefinition()
  {
    ConditionsDefinitionImpl conditionsDefinition = new ConditionsDefinitionImpl();
    return conditionsDefinition;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ConditionDefinition createConditionDefinition()
  {
    ConditionDefinitionImpl conditionDefinition = new ConditionDefinitionImpl();
    return conditionDefinition;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Scene createScene()
  {
    SceneImpl scene = new SceneImpl();
    return scene;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Dialog createDialog()
  {
    DialogImpl dialog = new DialogImpl();
    return dialog;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Recursive createRecursive()
  {
    RecursiveImpl recursive = new RecursiveImpl();
    return recursive;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Defaults createDefaults()
  {
    DefaultsImpl defaults = new DefaultsImpl();
    return defaults;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public FirstTime createFirstTime()
  {
    FirstTimeImpl firstTime = new FirstTimeImpl();
    return firstTime;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public OtherTimes createOtherTimes()
  {
    OtherTimesImpl otherTimes = new OtherTimesImpl();
    return otherTimes;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public PartingLines createPartingLines()
  {
    PartingLinesImpl partingLines = new PartingLinesImpl();
    return partingLines;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Hub createHub()
  {
    HubImpl hub = new HubImpl();
    return hub;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public HubFragment createHubFragment()
  {
    HubFragmentImpl hubFragment = new HubFragmentImpl();
    return hubFragment;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ConditionalChoiceDialog createConditionalChoiceDialog()
  {
    ConditionalChoiceDialogImpl conditionalChoiceDialog = new ConditionalChoiceDialogImpl();
    return conditionalChoiceDialog;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public OtherwiseChoice createOtherwiseChoice()
  {
    OtherwiseChoiceImpl otherwiseChoice = new OtherwiseChoiceImpl();
    return otherwiseChoice;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ChoiceDialog createChoiceDialog()
  {
    ChoiceDialogImpl choiceDialog = new ChoiceDialogImpl();
    return choiceDialog;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ConditionList createConditionList()
  {
    ConditionListImpl conditionList = new ConditionListImpl();
    return conditionList;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Jump createJump()
  {
    JumpImpl jump = new JumpImpl();
    return jump;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public InvokeHub createInvokeHub()
  {
    InvokeHubImpl invokeHub = new InvokeHubImpl();
    return invokeHub;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public InvokeScene createInvokeScene()
  {
    InvokeSceneImpl invokeScene = new InvokeSceneImpl();
    return invokeScene;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Exit createExit()
  {
    ExitImpl exit = new ExitImpl();
    return exit;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Conditional createConditional()
  {
    ConditionalImpl conditional = new ConditionalImpl();
    return conditional;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public SwitchList createSwitchList()
  {
    SwitchListImpl switchList = new SwitchListImpl();
    return switchList;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Switch createSwitch()
  {
    SwitchImpl switch_ = new SwitchImpl();
    return switch_;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ConditionalBody createConditionalBody()
  {
    ConditionalBodyImpl conditionalBody = new ConditionalBodyImpl();
    return conditionalBody;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Statement createStatement()
  {
    StatementImpl statement = new StatementImpl();
    return statement;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Otherwise createOtherwise()
  {
    OtherwiseImpl otherwise = new OtherwiseImpl();
    return otherwise;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public SwitchOff createSwitchOff()
  {
    SwitchOffImpl switchOff = new SwitchOffImpl();
    return switchOff;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public SwitchOn createSwitchOn()
  {
    SwitchOnImpl switchOn = new SwitchOnImpl();
    return switchOn;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public DialogLine createDialogLine()
  {
    DialogLineImpl dialogLine = new DialogLineImpl();
    return dialogLine;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Modifier createModifierFromString(EDataType eDataType, String initialValue)
  {
    Modifier result = Modifier.get(initialValue);
    if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
    return result;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String convertModifierToString(EDataType eDataType, Object instanceValue)
  {
    return instanceValue == null ? null : instanceValue.toString();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public SwitchValue createSwitchValueFromString(EDataType eDataType, String initialValue)
  {
    SwitchValue result = SwitchValue.get(initialValue);
    if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
    return result;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String convertSwitchValueToString(EDataType eDataType, Object instanceValue)
  {
    return instanceValue == null ? null : instanceValue.toString();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public DialogScriptPackage getDialogScriptPackage()
  {
    return (DialogScriptPackage)getEPackage();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @deprecated
   * @generated
   */
  @Deprecated
  public static DialogScriptPackage getPackage()
  {
    return DialogScriptPackage.eINSTANCE;
  }

} //DialogScriptFactoryImpl


text:
<?php

declare(strict_types=1);

namespace Novuso\System\Serialization;

use Novuso\System\Exception\DomainException;
use Novuso\System\Utility\ClassName;

/**
 * Class JsonSerializer
 */
final class JsonSerializer implements Serializer
{
    /**
     * @inheritDoc
     */
    public function deserialize(string $state): Serializable
    {
        $data = json_decode($state, $array = true);

        $keys = ['@', '$'];
        foreach ($keys as $key) {
            if (!isset($data[$key])) {
                $message = sprintf('Invalid serialization format: %s', $state);
                throw new DomainException($message);
            }
        }

        $class = ClassName::full($data['@']);

        /** @var Serializable|string $class */
        return $class::arrayDeserialize($data['$']);
    }

    /**
     * @inheritDoc
     */
    public function serialize(Serializable $object): string
    {
        $data = [
            '@' => ClassName::canonical($object),
            '$' => $object->arraySerialize()
        ];

        return json_encode($data, JSON_UNESCAPED_SLASHES);
    }
}


text:
package org.hisp.dhis.dataexchange.analytics;

import static org.hisp.dhis.utils.Assertions.assertContainsOnly;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import java.util.List;

import org.hisp.dhis.dataexchange.aggregate.AggregateDataExchange;
import org.hisp.dhis.dataexchange.aggregate.AggregateDataExchangeStore;
import org.hisp.dhis.test.integration.TransactionalIntegrationTest;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

class AggregateDataExchangeStoreTest extends TransactionalIntegrationTest
{
    @Autowired
    private AggregateDataExchangeStore store;

    @Test
    void testSaveGet()
    {
        AggregateDataExchange deA = getAggregateDataExchange( 'A' );
        AggregateDataExchange deB = getAggregateDataExchange( 'B' );

        store.save( deA );
        store.save( deB );

        assertNotNull( store.get( deA.getId() ) );
        assertNotNull( store.get( deB.getId() ) );
    }

    @Test
    void testUpdate()
    {
        AggregateDataExchange de = getAggregateDataExchange( 'A' );

        store.save( de );

        assertNotNull( de.getSource().getRequests().get( 0 ) );

        de.setName( "DataExchangeUpdated" );
        de.getSource().getRequests().get( 0 ).getDx().add( "NhSFzklRD55" );
        de.getTarget().getApi().setUrl( "https://play.dhis2.org/dev" );

        store.update( de );

        assertEquals( "DataExchangeUpdated", de.getName() );
        assertEquals( 3, de.getSource().getRequests().get( 0 ).getDx().size() );
        assertContainsOnly( List.of( "LrDpG50RAU9", "uR5HCiJhQ1w", "NhSFzklRD55" ),
            de.getSource().getRequests().get( 0 ).getDx() );
        assertEquals( "https://play.dhis2.org/dev", de.getTarget().getApi().getUrl() );
    }
}


text:
import mixin from "reactjs-mixin";
import { Hooks } from "PluginSDK";
import { Link, routerShape } from "react-router";
import { MountService } from "foundation-ui";
/* eslint-disable no-unused-vars */
import React from "react";
/* eslint-enable no-unused-vars */
import { StoreMixin } from "mesosphere-shared-reactjs";

import AlertPanel from "../../components/AlertPanel";
import AlertPanelHeader from "../../components/AlertPanelHeader";
import Breadcrumb from "../../components/Breadcrumb";
import BreadcrumbTextContent from "../../components/BreadcrumbTextContent";
import CosmosErrorMessage from "../../components/CosmosErrorMessage";
import CosmosPackagesStore from "../../stores/CosmosPackagesStore";
import CreateServiceModalUniversePanelOption
  from "../../components/CreateServiceModalUniversePanelOption";
import defaultServiceImage
  from "../../../../plugins/services/src/img/icon-service-default-medium@2x.png";
import DisplayPackagesTable from "../../components/DisplayPackagesTable";
import FilterInputText from "../../components/FilterInputText";
import Image from "../../components/Image";
import InstallPackageModal from "../../components/modals/InstallPackageModal";
import Loader from "../../components/Loader";
import Page from "../../components/Page";
import Panel from "../../components/Panel";
import StringUtil from "../../utils/StringUtil";

const PackagesBreadcrumbs = () => {
  const crumbs = [
    <Breadcrumb key={0} title="Packages">
      <BreadcrumbTextContent>
        <Link to="/universe/packages">安装包</Link>
      </BreadcrumbTextContent>
    </Breadcrumb>
  ];

  return <Page.Header.Breadcrumbs iconID="packages" breadcrumbs={crumbs} />;
};

const METHODS_TO_BIND = ["handleInstallModalClose", "handleSearchStringChange"];

const shouldRenderUniverseOption = Hooks.applyFilter(
  "hasCapability",
  true,
  "packageAPI"
);

if (shouldRenderUniverseOption) {
  MountService.MountService.registerComponent(
    CreateServiceModalUniversePanelOption,
    "CreateService:ServicePicker:GridOptions",
    0
  );
}

class PackagesTab extends mixin(StoreMixin) {
  constructor() {
    super();

    this.state = {
      errorMessage: false,
      installModalPackage: null,
      isLoading: true,
      searchString: ""
    };

    this.store_listeners = [
      {
        name: "cosmosPackages",
        events: ["availableError", "availableSuccess"],
        suppressUpdate: true
      }
    ];

    METHODS_TO_BIND.forEach(method => {
      this[method] = this[method].bind(this);
    });
  }

  componentDidMount() {
    super.componentDidMount(...arguments);
    CosmosPackagesStore.fetchAvailablePackages();
  }

  onCosmosPackagesStoreAvailableError(errorMessage) {
    this.setState({ errorMessage });
  }

  onCosmosPackagesStoreAvailableSuccess() {
    this.setState({ errorMessage: false, isLoading: false });
  }

  handleDetailOpen(cosmosPackage, event) {
    event.stopPropagation();
    this.context.router.push({
      pathname: `/universe/packages/${cosmosPackage.getName()}`,
      query: {
        version: cosmosPackage.getCurrentVersion()
      }
    });
  }

  handleInstallModalClose() {
    this.setState({ installModalPackage: null });
  }

  handleInstallModalOpen(cosmosPackage, event) {
    event.stopPropagation();
    this.setState({ installModalPackage: cosmosPackage });
  }

  handleSearchStringChange(searchString = "") {
    this.setState({ searchString });
  }

  getErrorScreen() {
    const { errorMessage } = this.state;

    return (
      <AlertPanel>
        <AlertPanelHeader>An Error Occurred</AlertPanelHeader>
        <CosmosErrorMessage error={errorMessage} flushBottom={true} />
      </AlertPanel>
    );
  }

  getButton(cosmosPackage) {
    return (
      <button
        className="button button-success"
        onClick={this.handleInstallModalOpen.bind(this, cosmosPackage)}
      >
        点击安装
      </button>
    );
  }

  getIcon(cosmosPackage) {
    return (

        <Image
          fallbackSrc={defaultServiceImage}
          src={cosmosPackage.getIcons()["icon-medium"]}
        />

    );
  }

  getLoadingScreen() {
    return <Loader />;
  }

  getSelectedPackages(packages) {
    const { searchString } = this.state;
    if (searchString) {
      return null;
    }

    return packages.getItems().map((cosmosPackage, index) => {
      return (

          <Panel
            className="clickable"
            contentClass="horizontal-center"
            footer={this.getButton(cosmosPackage)}
            footerClass="horizontal-center"
            onClick={this.handleDetailOpen.bind(this, cosmosPackage)}
          >
            {this.getIcon(cosmosPackage)}

              {cosmosPackage.getName()}

              {cosmosPackage.getCurrentVersion()}

          </Panel>

      );
    });
  }

  getTitle(title) {
    return
{title}
;
  }

  getSelectedPackagesGrid(packages) {
    if (this.state.searchString) {
      return null;
    }

    //Selected Packages
    return (

        {this.getTitle("所有软件", true)}

            {this.getSelectedPackages(packages)}

    );
  }

  getPackagesTable(packages) {
    let title = "社区软件"; //Community Packages

    if (this.state.searchString) {
      const foundPackagesLength = packages.getItems().length;
      const packagesWord = StringUtil.pluralize("package", foundPackagesLength);

      title = `${packages.getItems().length} ${packagesWord} found`;
    }

    return (

        {this.getTitle(title, false)}
        <DisplayPackagesTable
          onDeploy={this.handleInstallModalOpen.bind(this)}
          onDetailOpen={this.handleDetailOpen.bind(this)}
          packages={packages}
        />

    );
  }

  render() {
    const { state } = this;
    let content, packageName, packageVersion;

    if (state.errorMessage) {
      content = this.getErrorScreen();
    } else if (state.isLoading) {
      content = this.getLoadingScreen();
    } else {
      if (state.installModalPackage) {
        packageName = state.installModalPackage.getName();
        packageVersion = state.installModalPackage.getCurrentVersion();
      }

      const packages = CosmosPackagesStore.getAvailablePackages();
      const splitPackages = packages.getSelectedAndNonSelectedPackages();

      let tablePackages = splitPackages.nonSelectedPackages;
      const gridPackages = splitPackages.selectedPackages;

      if (state.searchString) {
        tablePackages = packages.filterItemsByText(state.searchString);
      }

      content = (

            <FilterInputText
              className="flex-grow"
              placeholder="搜索"  //Search
              searchString={state.searchString}
              handleFilterChange={this.handleSearchStringChange}
            />

          {this.getSelectedPackagesGrid(gridPackages)}
          {this.getPackagesTable(tablePackages)}
          <InstallPackageModal
            open={!!state.installModalPackage}
            packageName={packageName}
            packageVersion={packageVersion}
            onClose={this.handleInstallModalClose}
          />

      );
    }

    return (
      <Page>
        <Page.Header breadcrumbs={<PackagesBreadcrumbs />} />
        {content}
      </Page>
    );
  }
}

PackagesTab.contextTypes = {
  router: routerShape
};

PackagesTab.routeConfig = {
  label: "安装包", //Packages
  matches: /^\/universe\/packages/
};

module.exports = PackagesTab;


text:
This example shows how to create a basic Murano Solution Application that consists of a single web page that graphs sensor data for a specific device.

### Shows:
* Interacting with Solution API Routes from Web Page (HTML/Javascript)
* Deploying a simple (HTML,CSS,Javascript) single page web app
* Murano Service Routing
 * Time Series data - Routing product data into time series database and querying out for the graph
 * Key Value data - Routing product data into key/value storage

### Does Not Include
* Users / Auth - this is a simple public web page for development and education purposes only
* Device / Product code - Assumes data is being generated by a device in a Murano Product instance.

### Assumptions
A device is sending data with resources `temperature` and `humidity` to your Product instance.

### To use:
1. Create a Solution - using this template 'https://github.com/exosite/murano-getting-started-solution-1/blob/master/Solutionfile.json' to populate the solution API Routes, Assets, and Service Set-up.

#### Notes:
1. WARNING: This is reference code, there are no guarantees.  It's easy to change the code and have it break.  Tip: Use source control when editing!
2. WARNING: Using code that refreshes often in browser windows carefully.  You can easily kill your browser.

### Timer Service API Code:

```lua
local identifier = "YOUR_IDENTIFIER"
local read = kv_read_opt(identifier, true)
local temperature = tonumber(read.temperature)

local title = "Exosite Swimming Pool Notification"
local message = "Wellcome Exosite Swimming Pool :D"

if temperature >= 80 then
  message = "Today's temperature is " .. temperature .. "F" .. ".\nIs really hot right?\nWhy don't you come Exosite to swim with us :D"
elseif 70 <= temperature and temperature < 80 then
  message = "Today's temperature is " .. temperature .. "F" .. ".\nIt's a good time to practice swimming~"
elseif temperature < 70 then
  message = "Today's temperature is " .. temperature .. "F" .. ".\nToday is cold so we have spa for you!"
end

Twilio.postMessage({
    From = "+16122551754",
    To = "+886xxxxxxxxx",
    Body = title .. "\n" .. message
})

Email.send({
  to = "yyyyyyyyy@exosite.com",
  subject = title,
  text = message
})

```

### Examples of what it looks like

![image](screen_shot_line_graph.png)


text:
import _ from 'lodash';
import VisAggConfigProvider from 'ui/vis/agg_config';
export default function GetColumnsProvider(Private) {
  const AggConfig = Private(VisAggConfigProvider);

  return function getColumns(vis, minimal) {
    const aggs = vis.aggs.getResponseAggs();

    if (minimal == null) minimal = !vis.isHierarchical();

    if (!vis.aggs.bySchemaGroup.metrics) {
      aggs.push(new AggConfig(vis, {
        type: 'count',
        schema: vis.type.schemas.metrics[0].name
      }));
    }

    // pick the columns
    if (minimal) {
      return aggs.map(function (agg) {
        return { aggConfig: agg };
      });
    }

    // supposed to be bucket,...metrics,bucket,...metrics
    const columns = [];

    // seperate the metrics
    const grouped = _.groupBy(aggs, function (agg) {
      return agg.schema.group;
    });

    if (!grouped.buckets) {
      // return just the metrics, in column format
      return grouped.metrics.map(function (agg) {
        return { aggConfig: agg };
      });
    }

    // return the buckets, and after each place all of the metrics
    grouped.buckets.forEach(function (agg, i) {
      columns.push({ aggConfig: agg });
      grouped.metrics.forEach(function (metric) {
        columns.push({ aggConfig: metric });
      });
    });

    return columns;
  };
}


text:
/* **** DO NOT EDIT - this file is generated by ARChitect2 ****
 *
 * Description: Header file declaring the compiler extensions for eia components
 */

#ifndef _eiaextensions_H_
#define _eiaextensions_H_

#ifndef __GNUC__

// User extension aux register - dsp_mac
#define AR_DSP_MAC_MSBOUT 0x80000000
#pragma aux_register(AR_DSP_MAC_MSBOUT, name => "ar_dsp_mac_msbout")
#define AR_DSP_MAC_LSBOUT 0x80000001
#pragma aux_register(AR_DSP_MAC_LSBOUT, name => "ar_dsp_mac_lsbout")

// User extension instruction - dmulh11
extern long dmulh11(long, long);
#pragma intrinsic(dmulh11, opcode => 0x06, sub_opcode => 0x08 , blocking_cycles => 7)

// User extension instruction - dmulh11_f
extern long dmulh11_f(long, long);
#pragma intrinsic(dmulh11_f, opcode => 0x06, sub_opcode => 0x08, set_flags => 1, flags => "zncv" , blocking_cycles => 7)

// User extension instruction - fmul
extern long fmul(long, long);
#pragma intrinsic(fmul, opcode => 0x06, sub_opcode => 0x00 , latency_cycles => 3)

// User extension instruction - fmul_f
extern long fmul_f(long, long);
#pragma intrinsic(fmul_f, opcode => 0x06, sub_opcode => 0x00, set_flags => 1, flags => "zncv" , latency_cycles => 3)

// User extension instruction - alg2
extern long alg2(long);
#pragma intrinsic(alg2, opcode => 0x07, sub_opcode => 0x20 )

// User extension instruction - alg2_f
extern long alg2_f(long);
#pragma intrinsic(alg2_f, opcode => 0x07, sub_opcode => 0x20, set_flags => 1, flags => "zncv" )

// User extension instruction - mulcc
extern long mulcc(long, long);
#pragma intrinsic(mulcc, opcode => 0x07, sub_opcode => 0x00 , latency_cycles => 2)

// User extension instruction - mulcc_f
extern long mulcc_f(long, long);
#pragma intrinsic(mulcc_f, opcode => 0x07, sub_opcode => 0x00, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - dsp_abs_1d
extern long dsp_abs_1d(long);
#pragma intrinsic(dsp_abs_1d, opcode => 0x07, sub_opcode => 0x00 )

// User extension instruction - dsp_add_1d
extern long dsp_add_1d(long, long);
#pragma intrinsic(dsp_add_1d, opcode => 0x07, sub_opcode => 0x03 )

// User extension instruction - dsp_fp_cmp
extern long dsp_fp_cmp(long, long);
#pragma intrinsic(dsp_fp_cmp, opcode => 0x07, sub_opcode => 0x2b )

// User extension instruction - dsp_fp_cmp_f
extern long dsp_fp_cmp_f(long, long);
#pragma intrinsic(dsp_fp_cmp_f, opcode => 0x07, sub_opcode => 0x2b, set_flags => 1, flags => "zncv" )

// User extension instruction - dsp_fp_div
extern long dsp_fp_div(long, long);
#pragma intrinsic(dsp_fp_div, opcode => 0x07, sub_opcode => 0x2a , blocking_cycles => 2)

// User extension instruction - dsp_fp_flt2i
extern long dsp_fp_flt2i(long);
#pragma intrinsic(dsp_fp_flt2i, opcode => 0x07, sub_opcode => 0x2b )

// User extension instruction - dsp_fp_i2flt
extern long dsp_fp_i2flt(long);
#pragma intrinsic(dsp_fp_i2flt, opcode => 0x07, sub_opcode => 0x2c )

// User extension instruction - dsp_fp_sqrt
extern long dsp_fp_sqrt(long);
#pragma intrinsic(dsp_fp_sqrt, opcode => 0x07, sub_opcode => 0x2d , blocking_cycles => 3)

// User extension instruction - dsp_mac
extern long dsp_mac(long, long);
#pragma intrinsic(dsp_mac, opcode => 0x07, sub_opcode => 0x1B , effects => "ar_dsp_mac_msbout:is_read;ar_dsp_mac_lsbout:is_read;ar_dsp_mac_msbout:is_written;ar_dsp_mac_lsbout:is_written")

// User extension instruction - dsp_negate_1d
extern long dsp_negate_1d(long);
#pragma intrinsic(dsp_negate_1d, opcode => 0x07, sub_opcode => 0x0F )

// User extension instruction - dsp_shift_1d
extern long dsp_shift_1d(long, long);
#pragma intrinsic(dsp_shift_1d, opcode => 0x07, sub_opcode => 0x18 )

// User extension instruction - dsp_cos
extern long dsp_cos(long);
#pragma intrinsic(dsp_cos, opcode => 0x07, sub_opcode => 0x1E , blocking_cycles => 7)

// User extension instruction - dsp_sub_1d
extern long dsp_sub_1d(long, long);
#pragma intrinsic(dsp_sub_1d, opcode => 0x07, sub_opcode => 0x06 )

// User extension instruction - lg2
extern long lg2(long);
#pragma intrinsic(lg2, opcode => 0x07, sub_opcode => 0x21 )

// User extension instruction - lg2_f
extern long lg2_f(long);
#pragma intrinsic(lg2_f, opcode => 0x07, sub_opcode => 0x21, set_flags => 1, flags => "zncv" )

// User extension instruction - mpy16x16_ll
extern long mpy16x16_ll(long, long);
#pragma intrinsic(mpy16x16_ll, opcode => 0x07, sub_opcode => 0x3e , latency_cycles => 2)

// User extension instruction - mpy16x16_ll_f
extern long mpy16x16_ll_f(long, long);
#pragma intrinsic(mpy16x16_ll_f, opcode => 0x07, sub_opcode => 0x3e, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - scgexpj
extern long scgexpj(long, long);
#pragma intrinsic(scgexpj, opcode => 0x07, sub_opcode => 0x10 , latency_cycles => 2)

// User extension instruction - dmulh12
extern long dmulh12(long, long);
#pragma intrinsic(dmulh12, opcode => 0x06, sub_opcode => 0x09 , blocking_cycles => 7)

// User extension instruction - dmulh12_f
extern long dmulh12_f(long, long);
#pragma intrinsic(dmulh12_f, opcode => 0x06, sub_opcode => 0x09, set_flags => 1, flags => "zncv" , blocking_cycles => 7)

// User extension instruction - fadd
extern long fadd(long, long);
#pragma intrinsic(fadd, opcode => 0x06, sub_opcode => 0x01 , latency_cycles => 3)

// User extension instruction - fadd_f
extern long fadd_f(long, long);
#pragma intrinsic(fadd_f, opcode => 0x06, sub_opcode => 0x01, set_flags => 1, flags => "zncv" , latency_cycles => 3)

// User extension instruction - mulrcc
extern long mulrcc(long, long);
#pragma intrinsic(mulrcc, opcode => 0x07, sub_opcode => 0x01 , latency_cycles => 2)

// User extension instruction - mulrcc_f
extern long mulrcc_f(long, long);
#pragma intrinsic(mulrcc_f, opcode => 0x07, sub_opcode => 0x01, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - dsp_abs_2d
extern long dsp_abs_2d(long);
#pragma intrinsic(dsp_abs_2d, opcode => 0x07, sub_opcode => 0x01 )

// User extension instruction - dsp_add_2d
extern long dsp_add_2d(long, long);
#pragma intrinsic(dsp_add_2d, opcode => 0x07, sub_opcode => 0x04 )

// User extension instruction - dsp_mult
extern long dsp_mult(long, long);
#pragma intrinsic(dsp_mult, opcode => 0x07, sub_opcode => 0x1C , effects => "ar_dsp_mac_msbout:is_written;ar_dsp_mac_lsbout:is_written")

// User extension instruction - dsp_negate_2d
extern long dsp_negate_2d(long);
#pragma intrinsic(dsp_negate_2d, opcode => 0x07, sub_opcode => 0x10 )

// User extension instruction - dsp_shift_2d
extern long dsp_shift_2d(long, long);
#pragma intrinsic(dsp_shift_2d, opcode => 0x07, sub_opcode => 0x19 )

// User extension instruction - dsp_sin
extern long dsp_sin(long);
#pragma intrinsic(dsp_sin, opcode => 0x07, sub_opcode => 0x1F , blocking_cycles => 7)

// User extension instruction - dsp_sub_2d
extern long dsp_sub_2d(long, long);
#pragma intrinsic(dsp_sub_2d, opcode => 0x07, sub_opcode => 0x07 )

// User extension instruction - mac16x16_ll
extern long mac16x16_ll(long, long);
#pragma intrinsic(mac16x16_ll, opcode => 0x07, sub_opcode => 0x37 , latency_cycles => 2)

// User extension instruction - mac16x16_ll_f
extern long mac16x16_ll_f(long, long);
#pragma intrinsic(mac16x16_ll_f, opcode => 0x07, sub_opcode => 0x37, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - scgexpnj
extern long scgexpnj(long, long);
#pragma intrinsic(scgexpnj, opcode => 0x07, sub_opcode => 0x11 , latency_cycles => 2)

// User extension instruction - dsubh21
extern long dsubh21(long, long);
#pragma intrinsic(dsubh21, opcode => 0x06, sub_opcode => 0x12 , blocking_cycles => 5)

// User extension instruction - dsubh21_f
extern long dsubh21_f(long, long);
#pragma intrinsic(dsubh21_f, opcode => 0x06, sub_opcode => 0x12, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - fsub
extern long fsub(long, long);
#pragma intrinsic(fsub, opcode => 0x06, sub_opcode => 0x02 , latency_cycles => 3)

// User extension instruction - fsub_f
extern long fsub_f(long, long);
#pragma intrinsic(fsub_f, opcode => 0x06, sub_opcode => 0x02, set_flags => 1, flags => "zncv" , latency_cycles => 3)

// User extension instruction - macdwe
extern long macdwe(long, long);
#pragma intrinsic(macdwe, opcode => 0x07, sub_opcode => 0x16 , latency_cycles => 2)

// User extension instruction - macdwe_f
extern long macdwe_f(long, long);
#pragma intrinsic(macdwe_f, opcode => 0x07, sub_opcode => 0x16, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - dsp_abs_4d
extern long dsp_abs_4d(long);
#pragma intrinsic(dsp_abs_4d, opcode => 0x07, sub_opcode => 0x02 )

// User extension instruction - dsp_add_4d
extern long dsp_add_4d(long, long);
#pragma intrinsic(dsp_add_4d, opcode => 0x07, sub_opcode => 0x05 )

// User extension instruction - dsp_negate_4d
extern long dsp_negate_4d(long);
#pragma intrinsic(dsp_negate_4d, opcode => 0x07, sub_opcode => 0x11 )

// User extension instruction - dsp_shift_4d
extern long dsp_shift_4d(long, long);
#pragma intrinsic(dsp_shift_4d, opcode => 0x07, sub_opcode => 0x1A )

// User extension instruction - dsp_sub_4d
extern long dsp_sub_4d(long, long);
#pragma intrinsic(dsp_sub_4d, opcode => 0x07, sub_opcode => 0x08 )

// User extension instruction - mac32x16_fl
extern long mac32x16_fl(long, long);
#pragma intrinsic(mac32x16_fl, opcode => 0x07, sub_opcode => 0x39 , latency_cycles => 2)

// User extension instruction - mac32x16_fl_f
extern long mac32x16_fl_f(long, long);
#pragma intrinsic(mac32x16_fl_f, opcode => 0x07, sub_opcode => 0x39, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - scgsin
extern long scgsin(long, long);
#pragma intrinsic(scgsin, opcode => 0x07, sub_opcode => 0x12 , latency_cycles => 2)

// User extension instruction - dsubh22
extern long dsubh22(long, long);
#pragma intrinsic(dsubh22, opcode => 0x06, sub_opcode => 0x13 , blocking_cycles => 5)

// User extension instruction - dsubh22_f
extern long dsubh22_f(long, long);
#pragma intrinsic(dsubh22_f, opcode => 0x06, sub_opcode => 0x13, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - macrdwe
extern long macrdwe(long, long);
#pragma intrinsic(macrdwe, opcode => 0x07, sub_opcode => 0x17 , latency_cycles => 2)

// User extension instruction - macrdwe_f
extern long macrdwe_f(long, long);
#pragma intrinsic(macrdwe_f, opcode => 0x07, sub_opcode => 0x17, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - msub32x16_fl
extern long msub32x16_fl(long, long);
#pragma intrinsic(msub32x16_fl, opcode => 0x07, sub_opcode => 0x3a , latency_cycles => 2)

// User extension instruction - msub32x16_fl_f
extern long msub32x16_fl_f(long, long);
#pragma intrinsic(msub32x16_fl_f, opcode => 0x07, sub_opcode => 0x3a, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - scgcos
extern long scgcos(long, long);
#pragma intrinsic(scgcos, opcode => 0x07, sub_opcode => 0x13 , latency_cycles => 2)

// User extension instruction - drsubh11
extern long drsubh11(long, long);
#pragma intrinsic(drsubh11, opcode => 0x06, sub_opcode => 0x14 , blocking_cycles => 5)

// User extension instruction - drsubh11_f
extern long drsubh11_f(long, long);
#pragma intrinsic(drsubh11_f, opcode => 0x06, sub_opcode => 0x14, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - mulcj
extern long mulcj(long, long);
#pragma intrinsic(mulcj, opcode => 0x07, sub_opcode => 0x02 , latency_cycles => 2)

// User extension instruction - mulcj_f
extern long mulcj_f(long, long);
#pragma intrinsic(mulcj_f, opcode => 0x07, sub_opcode => 0x02, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - mpy32x16_fh
extern long mpy32x16_fh(long, long);
#pragma intrinsic(mpy32x16_fh, opcode => 0x07, sub_opcode => 0x34 , latency_cycles => 2)

// User extension instruction - mpy32x16_fh_f
extern long mpy32x16_fh_f(long, long);
#pragma intrinsic(mpy32x16_fh_f, opcode => 0x07, sub_opcode => 0x34, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - scgexpjrst
extern void scgexpjrst();
#pragma intrinsic(scgexpjrst, opcode => 0x07, sub_opcode => 0x1c, assume_volatile => 1)

// User extension instruction - drsubh12
extern long drsubh12(long, long);
#pragma intrinsic(drsubh12, opcode => 0x06, sub_opcode => 0x15 , blocking_cycles => 5)

// User extension instruction - drsubh12_f
extern long drsubh12_f(long, long);
#pragma intrinsic(drsubh12_f, opcode => 0x06, sub_opcode => 0x15, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - muldwz
extern long muldwz(long, long);
#pragma intrinsic(muldwz, opcode => 0x07, sub_opcode => 0x25 , latency_cycles => 2)

// User extension instruction - muldwz_f
extern long muldwz_f(long, long);
#pragma intrinsic(muldwz_f, opcode => 0x07, sub_opcode => 0x25, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - mac32x16_fh
extern long mac32x16_fh(long, long);
#pragma intrinsic(mac32x16_fh, opcode => 0x07, sub_opcode => 0x3c , latency_cycles => 2)

// User extension instruction - mac32x16_fh_f
extern long mac32x16_fh_f(long, long);
#pragma intrinsic(mac32x16_fh_f, opcode => 0x07, sub_opcode => 0x3c, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - drsubh21
extern long drsubh21(long, long);
#pragma intrinsic(drsubh21, opcode => 0x06, sub_opcode => 0x16 , blocking_cycles => 5)

// User extension instruction - drsubh21_f
extern long drsubh21_f(long, long);
#pragma intrinsic(drsubh21_f, opcode => 0x06, sub_opcode => 0x16, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - mulrdwz
extern long mulrdwz(long, long);
#pragma intrinsic(mulrdwz, opcode => 0x07, sub_opcode => 0x26 , latency_cycles => 2)

// User extension instruction - mulrdwz_f
extern long mulrdwz_f(long, long);
#pragma intrinsic(mulrdwz_f, opcode => 0x07, sub_opcode => 0x26, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - msub32x16_fh
extern long msub32x16_fh(long, long);
#pragma intrinsic(msub32x16_fh, opcode => 0x07, sub_opcode => 0x3d , latency_cycles => 2)

// User extension instruction - msub32x16_fh_f
extern long msub32x16_fh_f(long, long);
#pragma intrinsic(msub32x16_fh_f, opcode => 0x07, sub_opcode => 0x3d, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - drsubh22
extern long drsubh22(long, long);
#pragma intrinsic(drsubh22, opcode => 0x06, sub_opcode => 0x17 , blocking_cycles => 5)

// User extension instruction - drsubh22_f
extern long drsubh22_f(long, long);
#pragma intrinsic(drsubh22_f, opcode => 0x06, sub_opcode => 0x17, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - macdwz
extern long macdwz(long, long);
#pragma intrinsic(macdwz, opcode => 0x07, sub_opcode => 0x28 , latency_cycles => 2)

// User extension instruction - macdwz_f
extern long macdwz_f(long, long);
#pragma intrinsic(macdwz_f, opcode => 0x07, sub_opcode => 0x28, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - msub16x16_ll
extern long msub16x16_ll(long, long);
#pragma intrinsic(msub16x16_ll, opcode => 0x07, sub_opcode => 0x3b , latency_cycles => 2)

// User extension instruction - msub16x16_ll_f
extern long msub16x16_ll_f(long, long);
#pragma intrinsic(msub16x16_ll_f, opcode => 0x07, sub_opcode => 0x3b, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - dexcl1
extern long dexcl1(long, long);
#pragma intrinsic(dexcl1, opcode => 0x06, sub_opcode => 0x18 )

// User extension instruction - dexcl1_f
extern long dexcl1_f(long, long);
#pragma intrinsic(dexcl1_f, opcode => 0x06, sub_opcode => 0x18, set_flags => 1, flags => "zncv" )

// User extension instruction - macrdwz
extern long macrdwz(long, long);
#pragma intrinsic(macrdwz, opcode => 0x07, sub_opcode => 0x29 , latency_cycles => 2)

// User extension instruction - macrdwz_f
extern long macrdwz_f(long, long);
#pragma intrinsic(macrdwz_f, opcode => 0x07, sub_opcode => 0x29, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - mpy16x16_hl
extern long mpy16x16_hl(long, long);
#pragma intrinsic(mpy16x16_hl, opcode => 0x07, sub_opcode => 0x31 , latency_cycles => 2)

// User extension instruction - mpy16x16_hl_f
extern long mpy16x16_hl_f(long, long);
#pragma intrinsic(mpy16x16_hl_f, opcode => 0x07, sub_opcode => 0x31, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - dexcl2
extern long dexcl2(long, long);
#pragma intrinsic(dexcl2, opcode => 0x06, sub_opcode => 0x19 )

// User extension instruction - dexcl2_f
extern long dexcl2_f(long, long);
#pragma intrinsic(dexcl2_f, opcode => 0x06, sub_opcode => 0x19, set_flags => 1, flags => "zncv" )

// User extension instruction - mulrcj
extern long mulrcj(long, long);
#pragma intrinsic(mulrcj, opcode => 0x07, sub_opcode => 0x20 , latency_cycles => 2)

// User extension instruction - mulrcj_f
extern long mulrcj_f(long, long);
#pragma intrinsic(mulrcj_f, opcode => 0x07, sub_opcode => 0x20, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - mac16x16_hl
extern long mac16x16_hl(long, long);
#pragma intrinsic(mac16x16_hl, opcode => 0x07, sub_opcode => 0x32 , latency_cycles => 2)

// User extension instruction - mac16x16_hl_f
extern long mac16x16_hl_f(long, long);
#pragma intrinsic(mac16x16_hl_f, opcode => 0x07, sub_opcode => 0x32, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - dmulh21
extern long dmulh21(long, long);
#pragma intrinsic(dmulh21, opcode => 0x06, sub_opcode => 0x0a , blocking_cycles => 7)

// User extension instruction - dmulh21_f
extern long dmulh21_f(long, long);
#pragma intrinsic(dmulh21_f, opcode => 0x06, sub_opcode => 0x0a, set_flags => 1, flags => "zncv" , blocking_cycles => 7)

// User extension instruction - mulr2w
extern long mulr2w(long, long);
#pragma intrinsic(mulr2w, opcode => 0x07, sub_opcode => 0x22 , latency_cycles => 2)

// User extension instruction - mulr2w_f
extern long mulr2w_f(long, long);
#pragma intrinsic(mulr2w_f, opcode => 0x07, sub_opcode => 0x22, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - msub16x16_hl
extern long msub16x16_hl(long, long);
#pragma intrinsic(msub16x16_hl, opcode => 0x07, sub_opcode => 0x35 , latency_cycles => 2)

// User extension instruction - msub16x16_hl_f
extern long msub16x16_hl_f(long, long);
#pragma intrinsic(msub16x16_hl_f, opcode => 0x07, sub_opcode => 0x35, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - dmulh22
extern long dmulh22(long, long);
#pragma intrinsic(dmulh22, opcode => 0x06, sub_opcode => 0x0b , blocking_cycles => 7)

// User extension instruction - dmulh22_f
extern long dmulh22_f(long, long);
#pragma intrinsic(dmulh22_f, opcode => 0x06, sub_opcode => 0x0b, set_flags => 1, flags => "zncv" , blocking_cycles => 7)

// User extension instruction - mul2w
extern long mul2w(long, long);
#pragma intrinsic(mul2w, opcode => 0x07, sub_opcode => 0x21 , latency_cycles => 2)

// User extension instruction - mul2w_f
extern long mul2w_f(long, long);
#pragma intrinsic(mul2w_f, opcode => 0x07, sub_opcode => 0x21, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - mpy16x16_hh
extern long mpy16x16_hh(long, long);
#pragma intrinsic(mpy16x16_hh, opcode => 0x07, sub_opcode => 0x30 , latency_cycles => 2)

// User extension instruction - mpy16x16_hh_f
extern long mpy16x16_hh_f(long, long);
#pragma intrinsic(mpy16x16_hh_f, opcode => 0x07, sub_opcode => 0x30, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - daddh11
extern long daddh11(long, long);
#pragma intrinsic(daddh11, opcode => 0x06, sub_opcode => 0x0c , blocking_cycles => 5)

// User extension instruction - daddh11_f
extern long daddh11_f(long, long);
#pragma intrinsic(daddh11_f, opcode => 0x06, sub_opcode => 0x0c, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - maccj
extern long maccj(long, long);
#pragma intrinsic(maccj, opcode => 0x07, sub_opcode => 0x0a , latency_cycles => 2)

// User extension instruction - maccj_f
extern long maccj_f(long, long);
#pragma intrinsic(maccj_f, opcode => 0x07, sub_opcode => 0x0a, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - mac16x16_hh
extern long mac16x16_hh(long, long);
#pragma intrinsic(mac16x16_hh, opcode => 0x07, sub_opcode => 0x36 , latency_cycles => 2)

// User extension instruction - mac16x16_hh_f
extern long mac16x16_hh_f(long, long);
#pragma intrinsic(mac16x16_hh_f, opcode => 0x07, sub_opcode => 0x36, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - daddh12
extern long daddh12(long, long);
#pragma intrinsic(daddh12, opcode => 0x06, sub_opcode => 0x0d , blocking_cycles => 5)

// User extension instruction - daddh12_f
extern long daddh12_f(long, long);
#pragma intrinsic(daddh12_f, opcode => 0x06, sub_opcode => 0x0d, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - muldwo
extern long muldwo(long, long);
#pragma intrinsic(muldwo, opcode => 0x07, sub_opcode => 0x23 , latency_cycles => 2)

// User extension instruction - muldwo_f
extern long muldwo_f(long, long);
#pragma intrinsic(muldwo_f, opcode => 0x07, sub_opcode => 0x23, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - msub16x16_hh
extern long msub16x16_hh(long, long);
#pragma intrinsic(msub16x16_hh, opcode => 0x07, sub_opcode => 0x38 , latency_cycles => 2)

// User extension instruction - msub16x16_hh_f
extern long msub16x16_hh_f(long, long);
#pragma intrinsic(msub16x16_hh_f, opcode => 0x07, sub_opcode => 0x38, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - daddh21
extern long daddh21(long, long);
#pragma intrinsic(daddh21, opcode => 0x06, sub_opcode => 0x0e , blocking_cycles => 5)

// User extension instruction - daddh21_f
extern long daddh21_f(long, long);
#pragma intrinsic(daddh21_f, opcode => 0x06, sub_opcode => 0x0e, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - mulrdwo
extern long mulrdwo(long, long);
#pragma intrinsic(mulrdwo, opcode => 0x07, sub_opcode => 0x27 , latency_cycles => 2)

// User extension instruction - mulrdwo_f
extern long mulrdwo_f(long, long);
#pragma intrinsic(mulrdwo_f, opcode => 0x07, sub_opcode => 0x27, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - mpy32x16_fl
extern long mpy32x16_fl(long, long);
#pragma intrinsic(mpy32x16_fl, opcode => 0x07, sub_opcode => 0x33 , latency_cycles => 2)

// User extension instruction - mpy32x16_fl_f
extern long mpy32x16_fl_f(long, long);
#pragma intrinsic(mpy32x16_fl_f, opcode => 0x07, sub_opcode => 0x33, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - daddh22
extern long daddh22(long, long);
#pragma intrinsic(daddh22, opcode => 0x06, sub_opcode => 0x0f , blocking_cycles => 5)

// User extension instruction - daddh22_f
extern long daddh22_f(long, long);
#pragma intrinsic(daddh22_f, opcode => 0x06, sub_opcode => 0x0f, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - maccc
extern long maccc(long, long);
#pragma intrinsic(maccc, opcode => 0x07, sub_opcode => 0x24 , latency_cycles => 2)

// User extension instruction - maccc_f
extern long maccc_f(long, long);
#pragma intrinsic(maccc_f, opcode => 0x07, sub_opcode => 0x24, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - dsubh11
extern long dsubh11(long, long);
#pragma intrinsic(dsubh11, opcode => 0x06, sub_opcode => 0x10 , blocking_cycles => 5)

// User extension instruction - dsubh11_f
extern long dsubh11_f(long, long);
#pragma intrinsic(dsubh11_f, opcode => 0x06, sub_opcode => 0x10, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - macrcc
extern long macrcc(long, long);
#pragma intrinsic(macrcc, opcode => 0x07, sub_opcode => 0x09 , latency_cycles => 2)

// User extension instruction - macrcc_f
extern long macrcc_f(long, long);
#pragma intrinsic(macrcc_f, opcode => 0x07, sub_opcode => 0x09, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - dsubh12
extern long dsubh12(long, long);
#pragma intrinsic(dsubh12, opcode => 0x06, sub_opcode => 0x11 , blocking_cycles => 5)

// User extension instruction - dsubh12_f
extern long dsubh12_f(long, long);
#pragma intrinsic(dsubh12_f, opcode => 0x06, sub_opcode => 0x11, set_flags => 1, flags => "zncv" , blocking_cycles => 5)

// User extension instruction - macrcj
extern long macrcj(long, long);
#pragma intrinsic(macrcj, opcode => 0x07, sub_opcode => 0x0b , latency_cycles => 2)

// User extension instruction - macrcj_f
extern long macrcj_f(long, long);
#pragma intrinsic(macrcj_f, opcode => 0x07, sub_opcode => 0x0b, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - mac2w
extern long mac2w(long, long);
#pragma intrinsic(mac2w, opcode => 0x07, sub_opcode => 0x0c , latency_cycles => 2)

// User extension instruction - mac2w_f
extern long mac2w_f(long, long);
#pragma intrinsic(mac2w_f, opcode => 0x07, sub_opcode => 0x0c, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - macr2w
extern long macr2w(long, long);
#pragma intrinsic(macr2w, opcode => 0x07, sub_opcode => 0x0d , latency_cycles => 2)

// User extension instruction - macr2w_f
extern long macr2w_f(long, long);
#pragma intrinsic(macr2w_f, opcode => 0x07, sub_opcode => 0x0d, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - macdwo
extern long macdwo(long, long);
#pragma intrinsic(macdwo, opcode => 0x07, sub_opcode => 0x0e , latency_cycles => 2)

// User extension instruction - macdwo_f
extern long macdwo_f(long, long);
#pragma intrinsic(macdwo_f, opcode => 0x07, sub_opcode => 0x0e, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - macrdwo
extern long macrdwo(long, long);
#pragma intrinsic(macrdwo, opcode => 0x07, sub_opcode => 0x0f , latency_cycles => 2)

// User extension instruction - macrdwo_f
extern long macrdwo_f(long, long);
#pragma intrinsic(macrdwo_f, opcode => 0x07, sub_opcode => 0x0f, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - muldwe
extern long muldwe(long, long);
#pragma intrinsic(muldwe, opcode => 0x07, sub_opcode => 0x14 , latency_cycles => 2)

// User extension instruction - muldwe_f
extern long muldwe_f(long, long);
#pragma intrinsic(muldwe_f, opcode => 0x07, sub_opcode => 0x14, set_flags => 1, flags => "zncv" , latency_cycles => 2)

// User extension instruction - mulrdwe
extern long mulrdwe(long, long);
#pragma intrinsic(mulrdwe, opcode => 0x07, sub_opcode => 0x15 , latency_cycles => 2)

// User extension instruction - mulrdwe_f
extern long mulrdwe_f(long, long);
#pragma intrinsic(mulrdwe_f, opcode => 0x07, sub_opcode => 0x15, set_flags => 1, flags => "zncv" , latency_cycles => 2)
#endif

// User extension aux register - dpfp_build
#define AR_DPFP_BUILD 0x6c

// User extension aux register - fp_build
#define AR_FP_BUILD 0x6b

// User extension aux register - aux_cmac_accum0
#define AR_AUX_CMAC_ACCUM0 0xB0

// User extension aux register - dsp_fp_cmp_min
#define AR_DSP_FP_CMP_MIN 0xBE

// User extension aux register - dsp_mac_msbout
#define AR_DSP_MAC_MSBOUT 0x80000000

// User extension aux register - io_adc0_set
#define AR_IO_ADC0_SET 0x80015000

// User extension aux register - io_creg_mst0_ctrl
#define AR_IO_CREG_MST0_CTRL 0x80018000

// User extension aux register - io_creg_slv0_obsr
#define AR_IO_CREG_SLV0_OBSR 0x80018080

// User extension aux register - io_creg_slv1_obsr
#define AR_IO_CREG_SLV1_OBSR 0x80018180

// User extension aux register - io_gpio_8b0_swporta_dr
#define AR_IO_GPIO_8B0_SWPORTA_DR 0x80017800

// User extension aux register - io_gpio_8b1_swporta_dr
#define AR_IO_GPIO_8B1_SWPORTA_DR 0x80017900

// User extension aux register - io_i2c_mst0_con
#define AR_IO_I2C_MST0_CON 0x80012000

// User extension aux register - io_i2c_mst1_con
#define AR_IO_I2C_MST1_CON 0x80012100

// User extension aux register - mul32x16_accum_l
#define AR_MUL32X16_ACCUM_L 0x110

// User extension aux register - aux_scgen_acc1
#define AR_AUX_SCGEN_ACC1 0xd9

// User extension aux register - aux_dpfp1l
#define AR_AUX_DPFP1L 0x301

// User extension aux register - fp_status
#define AR_FP_STATUS 0x300

// User extension aux register - aux_cmac_accum1
#define AR_AUX_CMAC_ACCUM1 0xB1

// User extension aux register - dsp_fp_cmp_max
#define AR_DSP_FP_CMP_MAX 0xBF

// User extension aux register - dsp_mac_lsbout
#define AR_DSP_MAC_LSBOUT 0x80000001

// User extension aux register - io_adc0_divseqstat
#define AR_IO_ADC0_DIVSEQSTAT 0x80015001

// User extension aux register - io_gpio_8b0_swporta_ddr
#define AR_IO_GPIO_8B0_SWPORTA_DDR 0x80017801

// User extension aux register - io_gpio_8b1_swporta_ddr
#define AR_IO_GPIO_8B1_SWPORTA_DDR 0x80017901

// User extension aux register - io_spi_mst0_ctrl
#define AR_IO_SPI_MST0_CTRL 0x80010000

// User extension aux register - io_spi_mst1_ctrl
#define AR_IO_SPI_MST1_CTRL 0x80010100

// User extension aux register - mul32x16_accum_h
#define AR_MUL32X16_ACCUM_H 0x111

// User extension aux register - aux_dpfp1h
#define AR_AUX_DPFP1H 0x302

// User extension aux register - aux_cmac_accum2
#define AR_AUX_CMAC_ACCUM2 0xB2

// User extension aux register - io_adc0_seq
#define AR_IO_ADC0_SEQ 0x80015002

// User extension aux register - io_i2c_mst0_data_cmd
#define AR_IO_I2C_MST0_DATA_CMD 0x80012001

// User extension aux register - io_i2c_mst1_data_cmd
#define AR_IO_I2C_MST1_DATA_CMD 0x80012101

// User extension aux register - mul32x16_ctrl
#define AR_MUL32X16_CTRL 0x112

// User extension aux register - aux_dpfp2l
#define AR_AUX_DPFP2L 0x303

// User extension aux register - aux_cmac_acc_shft
#define AR_AUX_CMAC_ACC_SHFT 0xB3

// User extension aux register - io_adc0_ctrl
#define AR_IO_ADC0_CTRL 0x80015003

// User extension aux register - io_gpio_8b0_inten
#define AR_IO_GPIO_8B0_INTEN 0x80017803

// User extension aux register - io_gpio_8b1_inten
#define AR_IO_GPIO_8B1_INTEN 0x80017903

// User extension aux register - aux_dpfp2h
#define AR_AUX_DPFP2H 0x304

// User extension aux register - aux_cmac_acc1
#define AR_AUX_CMAC_ACC1 0xB4

// User extension aux register - io_adc0_intstat
#define AR_IO_ADC0_INTSTAT 0x80015004

// User extension aux register - io_gpio_8b0_inttype_level
#define AR_IO_GPIO_8B0_INTTYPE_LEVEL 0x80017805

// User extension aux register - io_gpio_8b1_inttype_level
#define AR_IO_GPIO_8B1_INTTYPE_LEVEL 0x80017905

// User extension aux register - io_i2c_mst0_ss_scl_cnt
#define AR_IO_I2C_MST0_SS_SCL_CNT 0x80012002

// User extension aux register - io_i2c_mst1_ss_scl_cnt
#define AR_IO_I2C_MST1_SS_SCL_CNT 0x80012102

// User extension aux register - dpfp_status
#define AR_DPFP_STATUS 0x305

// User extension aux register - aux_cmac_acc2
#define AR_AUX_CMAC_ACC2 0xB5

// User extension aux register - io_adc0_sample
#define AR_IO_ADC0_SAMPLE 0x80015005

// User extension aux register - io_gpio_8b0_int_polarity
#define AR_IO_GPIO_8B0_INT_POLARITY 0x80017806

// User extension aux register - io_gpio_8b1_int_polarity
#define AR_IO_GPIO_8B1_INT_POLARITY 0x80017906

// User extension aux register - aux_cmac_status_mode
#define AR_AUX_CMAC_STATUS_MODE 0xB6

// User extension aux register - io_gpio_8b0_intstatus
#define AR_IO_GPIO_8B0_INTSTATUS 0x80017807

// User extension aux register - io_gpio_8b1_intstatus
#define AR_IO_GPIO_8B1_INTSTATUS 0x80017907

// User extension aux register - io_i2c_mst0_fs_scl_cnt
#define AR_IO_I2C_MST0_FS_SCL_CNT 0x80012004

// User extension aux register - io_i2c_mst1_fs_scl_cnt
#define AR_IO_I2C_MST1_FS_SCL_CNT 0x80012104

// User extension aux register - aux_cmac_src_shift
#define AR_AUX_CMAC_SRC_SHIFT 0xB7

// User extension aux register - io_gpio_8b0_debounce
#define AR_IO_GPIO_8B0_DEBOUNCE 0x80017808

// User extension aux register - io_gpio_8b1_debounce
#define AR_IO_GPIO_8B1_DEBOUNCE 0x80017908

// User extension aux register - io_i2c_mst0_intr_stat
#define AR_IO_I2C_MST0_INTR_STAT 0x80012006

// User extension aux register - io_i2c_mst1_intr_stat
#define AR_IO_I2C_MST1_INTR_STAT 0x80012106

// User extension aux register - io_gpio_8b0_porta_eoi
#define AR_IO_GPIO_8B0_PORTA_EOI 0x80017809

// User extension aux register - io_gpio_8b1_porta_eoi
#define AR_IO_GPIO_8B1_PORTA_EOI 0x80017909

// User extension aux register - io_i2c_mst0_intr_mask
#define AR_IO_I2C_MST0_INTR_MASK 0x80012007

// User extension aux register - io_i2c_mst1_intr_mask
#define AR_IO_I2C_MST1_INTR_MASK 0x80012107

// User extension aux register - io_gpio_8b0_ext_porta
#define AR_IO_GPIO_8B0_EXT_PORTA 0x8001780A

// User extension aux register - io_gpio_8b1_ext_porta
#define AR_IO_GPIO_8B1_EXT_PORTA 0x8001790a

// User extension aux register - io_i2c_mst0_tl
#define AR_IO_I2C_MST0_TL 0x80012008

// User extension aux register - io_i2c_mst1_tl
#define AR_IO_I2C_MST1_TL 0x80012108

// User extension aux register - io_gpio_8b0_ls_sync
#define AR_IO_GPIO_8B0_LS_SYNC 0x8001780B

// User extension aux register - io_gpio_8b1_ls_sync
#define AR_IO_GPIO_8B1_LS_SYNC 0x8001790b

// User extension aux register - io_gpio_8b0_intmask
#define AR_IO_GPIO_8B0_INTMASK 0x80017804

// User extension aux register - io_gpio_8b1_intmask
#define AR_IO_GPIO_8B1_INTMASK 0x80017904

// User extension aux register - io_i2c_mst0_intr_clr
#define AR_IO_I2C_MST0_INTR_CLR 0x8001200A

// User extension aux register - io_i2c_mst1_intr_clr
#define AR_IO_I2C_MST1_INTR_CLR 0x8001210a

// User extension aux register - io_spi_mst0_spien
#define AR_IO_SPI_MST0_SPIEN 0x80010002

// User extension aux register - io_spi_mst1_spien
#define AR_IO_SPI_MST1_SPIEN 0x80010102

// User extension aux register - io_i2c_mst0_status
#define AR_IO_I2C_MST0_STATUS 0x8001200B

// User extension aux register - io_i2c_mst1_status
#define AR_IO_I2C_MST1_STATUS 0x8001210b

// User extension aux register - io_i2c_mst0_txflr
#define AR_IO_I2C_MST0_TXFLR 0x8001200C

// User extension aux register - io_i2c_mst1_txflr
#define AR_IO_I2C_MST1_TXFLR 0x8001210c

// User extension aux register - io_i2c_mst0_rxflr
#define AR_IO_I2C_MST0_RXFLR 0x8001200D

// User extension aux register - io_i2c_mst1_rxflr
#define AR_IO_I2C_MST1_RXFLR 0x8001210d

// User extension aux register - io_i2c_mst0_sda_config
#define AR_IO_I2C_MST0_SDA_CONFIG 0x8001200E

// User extension aux register - io_i2c_mst1_sda_config
#define AR_IO_I2C_MST1_SDA_CONFIG 0x8001210e

// User extension aux register - io_i2c_mst0_tx_abrt_source
#define AR_IO_I2C_MST0_TX_ABRT_SOURCE 0x8001200F

// User extension aux register - io_i2c_mst1_tx_abrt_source
#define AR_IO_I2C_MST1_TX_ABRT_SOURCE 0x8001210f

// User extension aux register - io_spi_mst0_timing
#define AR_IO_SPI_MST0_TIMING 0x80010004

// User extension aux register - io_spi_mst1_timing
#define AR_IO_SPI_MST1_TIMING 0x80010104

// User extension aux register - io_i2c_mst0_enable_status
#define AR_IO_I2C_MST0_ENABLE_STATUS 0x80012011

// User extension aux register - io_i2c_mst1_enable_status
#define AR_IO_I2C_MST1_ENABLE_STATUS 0x80012111

// User extension aux register - io_spi_mst0_ftlr
#define AR_IO_SPI_MST0_FTLR 0x80010005

// User extension aux register - io_spi_mst1_ftlr
#define AR_IO_SPI_MST1_FTLR 0x80010105

// User extension aux register - io_spi_mst0_txflr
#define AR_IO_SPI_MST0_TXFLR 0x80010007

// User extension aux register - io_spi_mst1_txflr
#define AR_IO_SPI_MST1_TXFLR 0x80010107

// User extension aux register - io_spi_mst0_rxflr
#define AR_IO_SPI_MST0_RXFLR 0x80010008

// User extension aux register - io_spi_mst1_rxflr
#define AR_IO_SPI_MST1_RXFLR 0x80010108

// User extension aux register - io_spi_mst0_sr
#define AR_IO_SPI_MST0_SR 0x80010009

// User extension aux register - io_spi_mst1_sr
#define AR_IO_SPI_MST1_SR 0x80010109

// User extension aux register - io_spi_mst0_intr_stat
#define AR_IO_SPI_MST0_INTR_STAT 0x8001000A

// User extension aux register - io_spi_mst1_intr_stat
#define AR_IO_SPI_MST1_INTR_STAT 0x8001010a

// User extension aux register - io_spi_mst0_intr_mask
#define AR_IO_SPI_MST0_INTR_MASK 0x8001000B

// User extension aux register - io_spi_mst1_intr_mask
#define AR_IO_SPI_MST1_INTR_MASK 0x8001010b

// User extension aux register - io_spi_mst0_clr_intr
#define AR_IO_SPI_MST0_CLR_INTR 0x8001000C

// User extension aux register - io_spi_mst1_clr_intr
#define AR_IO_SPI_MST1_CLR_INTR 0x8001010c

// User extension aux register - io_spi_mst0_dr
#define AR_IO_SPI_MST0_DR 0x8001000D

// User extension aux register - io_spi_mst1_dr
#define AR_IO_SPI_MST1_DR 0x8001010d

#ifndef __GNUC__
// User extension condition code cmac_ps
#pragma condition(20, name=>"cmac_ps")

// User extension condition code cmac_psc
#pragma condition(21, name=>"cmac_psc")
#endif

#include "compiler.h"

#endif


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

using MvvmCross.Platform;
using MvvmCross.Platform.Plugins;
using MvvmCross.Plugins.BLE.Bluetooth.LE;
using MvvmCross.Plugins.BLE.Droid.Bluetooth.LE;

namespace MvvmCross.Plugins.BLE.Droid
{
    public class Plugin
     : IMvxPlugin
    {
        public void Load()
        {
            Mvx.LazyConstructAndRegisterSingleton<IAdapter>(() => new Adapter());
        }
    }
}


text:
class CommandLine;
struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params;

namespace base {
class MessageLoop;
}

namespace gfx {
class Size;
}

namespace content {
class AudioRendererHost;
class BrowserDemuxerAndroid;
class GpuMessageFilter;
class MessagePortMessageFilter;
class PeerConnectionTrackerHost;
class RendererMainThread;
class RenderWidgetHelper;
class RenderWidgetHost;
class RenderWidgetHostImpl;
class RenderWidgetHostViewFrameSubscriber;
class StoragePartition;
class StoragePartitionImpl;

// Implements a concrete RenderProcessHost for the browser process for talking
// to actual renderer processes (as opposed to mocks).
//
// Represents the browser side of the browser <--> renderer communication
// channel. There will be one RenderProcessHost per renderer process.
//
// This object is refcounted so that it can release its resources when all
// hosts using it go away.
//
// This object communicates back and forth with the RenderProcess object
// running in the renderer process. Each RenderProcessHost and RenderProcess
// keeps a list of RenderView (renderer) and WebContentsImpl (browser) which
// are correlated with IDs. This way, the Views and the corresponding ViewHosts
// communicate through the two process objects.
//
// A RenderProcessHost is also associated with one and only one
// StoragePartition.  This allows us to implement strong storage isolation
// because all the IPCs from the RenderViews (renderer) will only ever be able
// to access the partition they are assigned to.
class CONTENT_EXPORT RenderProcessHostImpl
    : public RenderProcessHost,
      public ChildProcessLauncher::Client,
      public GpuDataManagerObserver {
 public:
  RenderProcessHostImpl(BrowserContext* browser_context,
                        StoragePartitionImpl* storage_partition_impl,
                        bool supports_browser_plugin,
                        bool is_guest);
  virtual ~RenderProcessHostImpl();

  // RenderProcessHost implementation (public portion).
  virtual void EnableSendQueue() OVERRIDE;
  virtual bool Init() OVERRIDE;
  virtual int GetNextRoutingID() OVERRIDE;
  virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE;
  virtual void RemoveRoute(int32 routing_id) OVERRIDE;
  virtual bool WaitForBackingStoreMsg(int render_widget_id,
                                      const base::TimeDelta& max_delay,
                                      IPC::Message* msg) OVERRIDE;
  virtual void ReceivedBadMessage() OVERRIDE;
  virtual void WidgetRestored() OVERRIDE;
  virtual void WidgetHidden() OVERRIDE;
  virtual int VisibleWidgetCount() const OVERRIDE;
  virtual bool IsGuest() const OVERRIDE;
  virtual StoragePartition* GetStoragePartition() const OVERRIDE;
  virtual bool FastShutdownIfPossible() OVERRIDE;
  virtual void DumpHandles() OVERRIDE;
  virtual base::ProcessHandle GetHandle() const OVERRIDE;
  virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id) OVERRIDE;
  virtual TransportDIB* MapTransportDIB(TransportDIB::Id dib_id) OVERRIDE;
  virtual BrowserContext* GetBrowserContext() const OVERRIDE;
  virtual bool InSameStoragePartition(
      StoragePartition* partition) const OVERRIDE;
  virtual int GetID() const OVERRIDE;
  virtual bool HasConnection() const OVERRIDE;
  virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE;
  virtual bool IgnoreInputEvents() const OVERRIDE;
  virtual void Cleanup() OVERRIDE;
  virtual void AddPendingView() OVERRIDE;
  virtual void RemovePendingView() OVERRIDE;
  virtual void SetSuddenTerminationAllowed(bool enabled) OVERRIDE;
  virtual bool SuddenTerminationAllowed() const OVERRIDE;
  virtual IPC::ChannelProxy* GetChannel() OVERRIDE;
  virtual void AddFilter(BrowserMessageFilter* filter) OVERRIDE;
  virtual bool FastShutdownForPageCount(size_t count) OVERRIDE;
  virtual bool FastShutdownStarted() const OVERRIDE;
  virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE;
  virtual void SurfaceUpdated(int32 surface_id) OVERRIDE;
  virtual void ResumeRequestsForView(int route_id) OVERRIDE;

  // IPC::Sender via RenderProcessHost.
  virtual bool Send(IPC::Message* msg) OVERRIDE;

  // IPC::Listener via RenderProcessHost.
  virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
  virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
  virtual void OnChannelError() OVERRIDE;

  // ChildProcessLauncher::Client implementation.
  virtual void OnProcessLaunched() OVERRIDE;

  scoped_refptr<AudioRendererHost> audio_renderer_host() const;

  // Tells the ResourceDispatcherHost to resume a deferred navigation without
  // transferring it to a new renderer process.
  void ResumeDeferredNavigation(const GlobalRequestID& request_id);

  // Call this function when it is evident that the child process is actively
  // performing some operation, for example if we just received an IPC message.
  void mark_child_process_activity_time() {
    child_process_activity_time_ = base::TimeTicks::Now();
  }

  // Returns the current number of active views in this process.  Excludes
  // any RenderViewHosts that are swapped out.
  int GetActiveViewCount();

  // Start and end frame subscription for a specific renderer.
  // This API only supports subscription to accelerated composited frames.
  void BeginFrameSubscription(
      int route_id,
      scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber);
  void EndFrameSubscription(int route_id);

  // Register/unregister the host identified by the host id in the global host
  // list.
  static void RegisterHost(int host_id, RenderProcessHost* host);
  static void UnregisterHost(int host_id);

  // Returns true if |host| is suitable for launching a new view with |site_url|
  // in the given |browser_context|.
  static bool IsSuitableHost(RenderProcessHost* host,
                             BrowserContext* browser_context,
                             const GURL& site_url);

  // Returns an existing RenderProcessHost for |url| in |browser_context|,
  // if one exists.  Otherwise a new RenderProcessHost should be created and
  // registered using RegisterProcessHostForSite().
  // This should only be used for process-per-site mode, which can be enabled
  // globally with a command line flag or per-site, as determined by
  // SiteInstanceImpl::ShouldUseProcessPerSite.
  static RenderProcessHost* GetProcessHostForSite(
      BrowserContext* browser_context,
      const GURL& url);

  // Registers the given |process| to be used for any instance of |url|
  // within |browser_context|.
  // This should only be used for process-per-site mode, which can be enabled
  // globally with a command line flag or per-site, as determined by
  // SiteInstanceImpl::ShouldUseProcessPerSite.
  static void RegisterProcessHostForSite(
      BrowserContext* browser_context,
      RenderProcessHost* process,
      const GURL& url);

  static base::MessageLoop* GetInProcessRendererThreadForTesting();

#if defined(OS_ANDROID)
  const scoped_refptr<BrowserDemuxerAndroid>& browser_demuxer_android() {
    return browser_demuxer_android_;
  }
#endif

  MessagePortMessageFilter* message_port_message_filter() const {
    return message_port_message_filter_;
  }

 protected:
  // A proxy for our IPC::Channel that lives on the IO thread (see
  // browser_process.h)
  scoped_ptr<IPC::ChannelProxy> channel_;

  // True if fast shutdown has been performed on this RPH.
  bool fast_shutdown_started_;

  // True if we've posted a DeleteTask and will be deleted soon.
  bool deleting_soon_;

  // The count of currently swapped out but pending RenderViews.  We have
  // started to swap these in, so the renderer process should not exit if
  // this count is non-zero.
  int32 pending_views_;

 private:
  friend class VisitRelayingRenderProcessHost;

  // Creates and adds the IO thread message filters.
  void CreateMessageFilters();

  // Control message handlers.
  void OnShutdownRequest();
  void OnDumpHandlesDone();
  void SuddenTerminationChanged(bool enabled);
  void OnUserMetricsRecordAction(const std::string& action);
  void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size);

  // CompositorSurfaceBuffersSwapped handler when there's no RWH.
  void OnCompositorSurfaceBuffersSwappedNoHost(
      const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params);

  // Generates a command line to be used to spawn a renderer and appends the
  // results to |*command_line|.
  void AppendRendererCommandLine(CommandLine* command_line) const;

  // Copies applicable command line switches from the given |browser_cmd| line
  // flags to the output |renderer_cmd| line flags. Not all switches will be
  // copied over.
  void PropagateBrowserCommandLineToRenderer(const CommandLine& browser_cmd,
                                             CommandLine* renderer_cmd) const;

  // Callers can reduce the RenderProcess' priority.
  void SetBackgrounded(bool backgrounded);

  // Handle termination of our process.
  void ProcessDied(bool already_dead);

  virtual void OnGpuSwitching() OVERRIDE;

  // The registered IPC listener objects. When this list is empty, we should
  // delete ourselves.
  IDMap<IPC::Listener> listeners_;

  // The count of currently visible widgets.  Since the host can be a container
  // for multiple widgets, it uses this count to determine when it should be
  // backgrounded.
  int32 visible_widgets_;

  // Does this process have backgrounded priority.
  bool backgrounded_;

  // Used to allow a RenderWidgetHost to intercept various messages on the
  // IO thread.
  scoped_refptr<RenderWidgetHelper> widget_helper_;

  // The filter for GPU-related messages coming from the renderer.
  // Thread safety note: this field is to be accessed from the UI thread.
  // We don't keep a reference to it, to avoid it being destroyed on the UI
  // thread, but we clear this field when we clear channel_. When channel_ goes
  // away, it posts a task to the IO thread to destroy it there, so we know that
  // it's valid if non-NULL.
  GpuMessageFilter* gpu_message_filter_;

  // The filter for MessagePort messages coming from the renderer.
  scoped_refptr<MessagePortMessageFilter> message_port_message_filter_;

  // A map of transport DIB ids to cached TransportDIBs
  std::map<TransportDIB::Id, TransportDIB*> cached_dibs_;

  enum {
    // This is the maximum size of |cached_dibs_|
    MAX_MAPPED_TRANSPORT_DIBS = 3,
  };

  void ClearTransportDIBCache();
  // This is used to clear our cache five seconds after the last use.
  base::DelayTimer<RenderProcessHostImpl> cached_dibs_cleaner_;

  // Used in single-process mode.
  scoped_ptr<base::Thread> in_process_renderer_;

  // True after Init() has been called. We can't just check channel_ because we
  // also reset that in the case of process termination.
  bool is_initialized_;

  // Used to launch and terminate the process without blocking the UI thread.
  scoped_ptr<ChildProcessLauncher> child_process_launcher_;

  // Messages we queue while waiting for the process handle.  We queue them here
  // instead of in the channel so that we ensure they're sent after init related
  // messages that are sent once the process handle is available.  This is
  // because the queued messages may have dependencies on the init messages.
  std::queue<IPC::Message*> queued_messages_;

  // The globally-unique identifier for this RPH.
  int id_;

  BrowserContext* browser_context_;

  // Owned by |browser_context_|.
  StoragePartitionImpl* storage_partition_impl_;

  // True if the process can be shut down suddenly.  If this is true, then we're
  // sure that all the RenderViews in the process can be shutdown suddenly.  If
  // it's false, then specific RenderViews might still be allowed to be shutdown
  // suddenly by checking their SuddenTerminationAllowed() flag.  This can occur
  // if one WebContents has an unload event listener but another WebContents in
  // the same process doesn't.
  bool sudden_termination_allowed_;

  // Set to true if we shouldn't send input events.  We actually do the
  // filtering for this at the render widget level.
  bool ignore_input_events_;

  // Records the last time we regarded the child process active.
  base::TimeTicks child_process_activity_time_;

  // Indicates whether this is a RenderProcessHost that has permission to embed
  // Browser Plugins.
  bool supports_browser_plugin_;

  // Indicates whether this is a RenderProcessHost of a Browser Plugin guest
  // renderer.
  bool is_guest_;

  // Forwards messages between WebRTCInternals in the browser process
  // and PeerConnectionTracker in the renderer process.
  scoped_refptr<PeerConnectionTrackerHost> peer_connection_tracker_host_;

  // Prevents the class from being added as a GpuDataManagerImpl observer more
  // than once.
  bool gpu_observer_registered_;

  // Forwards power state messages to the renderer process.
  PowerMonitorMessageBroadcaster power_monitor_broadcaster_;

  scoped_refptr<AudioRendererHost> audio_renderer_host_;

#if defined(OS_ANDROID)
  scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_;
#endif

  DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
};

}  // namespace content

#endif  // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_


text:
<?php
namespace Payum\Adyen;

use Payum\Adyen\Action\AuthorizeAction;
use Payum\Adyen\Action\CancelAction;
use Payum\Adyen\Action\ConvertPaymentAction;
use Payum\Adyen\Action\CaptureAction;
use Payum\Adyen\Action\NotifyAction;
use Payum\Adyen\Action\RefundAction;
use Payum\Adyen\Action\StatusAction;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\GatewayFactory;

class AdyenGatewayFactory extends GatewayFactory
{
    /**
     * {@inheritDoc}
     */
    protected function populateConfig(ArrayObject $config)
    {
        $config->defaults([
            'payum.factory_name' => 'adyen',
            'payum.factory_title' => 'Adyen',
        ]);

        $config->defaults([
            'payum.action.capture' => new CaptureAction(),
            'payum.action.notify' => new NotifyAction(),
            'payum.action.convert_payment' => new ConvertPaymentAction(),
            'payum.action.status' => new StatusAction(),
        ]);

        if (false == $config['payum.api']) {
            $config['payum.default_options'] = [
                'skinCode' => '',
                'merchantAccount' => '',
                'hmacKey' => '',
                'sandbox' => true,
                'notification_method' => 'basic',
                'default_payment_fields' => [],
            ];
            $config->defaults($config['payum.default_options']);
            $config['payum.required_options'] = [
                'skinCode',
                'merchantAccount',
                'hmacKey',
            ];

            $config['payum.api'] = function (ArrayObject $config) {
                $config->validateNotEmpty($config['payum.required_options']);

                return new Api(
                    [
                        'skinCode' => $config['skinCode'],
                        'merchantAccount' => $config['merchantAccount'],
                        'hmacKey' => $config['hmacKey'],
                        'sandbox' => $config['sandbox'],
                        'notification_method' => $config['notification_method'],
                        'default_payment_fields' => $config['default_payment_fields'],
                    ],
                    $config['payum.http_client']
                );
            };
        }
    }
}


text:
package org.piccolo2d.util;

import java.awt.Dimension;
import java.awt.geom.Dimension2D;
import java.awt.geom.Point2D;

import org.piccolo2d.util.PDimension;

import junit.framework.TestCase;

/**
 * Unit test for PDimension.
 */
public class PDimensionTest extends TestCase {
    public void testDefaultConstructorResultsInEmptyDimension() {
        final PDimension dimension = new PDimension();

        assertEquals(0, dimension.getWidth(), 0.00001);
        assertEquals(0, dimension.getHeight(), 0.00001);
    }

    public void testCloningConstructorDoesSo() {
        final Dimension2D src = new Dimension(100, 50);
        final PDimension copy = new PDimension(src);

        assertEquals(100, copy.getWidth(), 0.00001);
        assertEquals(50, copy.getHeight(), 0.00001);
    }

    public void testDimensionGetBuiltFromPoints() {
        final PDimension dimension = new PDimension(new Point2D.Double(-50, -25), new Point2D.Double(50, 25));
        assertEquals(100, dimension.getWidth(), 0.00001);
        assertEquals(50, dimension.getHeight(), 0.00001);
    }
}


text:
@interface RTRefreshControl : UIRefreshControl

@property (strong, nonatomic) UIImageView *loadIndicator;
@property (strong, nonatomic) UIView *refreshLoadingView;

- (void)pull;
- (void)setup:(float)width color:(UIColor*)color;

@end


text:
			Posted on

			by


text:
set -ex

RAILS_ENV=production
export RAILS_ENV

git pull
rake db:migrate
rake db:data:load_dir dir="datadump"
rake assets:clean
rake assets:precompile
rake deface:precompile


text:
'use strict';

var appConfig = require('app.config');

module.exports = angular
    .module('app.global.notification', [
    ])
    .service('notificationService', require('./notification.service.js'));


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.crazyhitty.chdev.ks.popularmovies">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:name=".Initializer"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".ui.activities.MoviesActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.activities.MovieDetailsActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/title_activity_movie_details"
            android:parentActivityName=".ui.activities.MoviesActivity"
            android:theme="@style/AppTheme.NoActionBar">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.crazyhitty.chdev.ks.popularmovies.ui.activities.MoviesActivity" />
        </activity>
        <activity
            android:name=".ui.activities.SettingsActivity"
            android:label="@string/title_activity_settings"
            android:parentActivityName=".ui.activities.MoviesActivity">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.crazyhitty.chdev.ks.popularmovies.ui.activities.MoviesActivity" />
        </activity>
    </application>

</manifest>