text:
{{question.aboutYouHd}}

        {{question.aboutYouName}}
        {{aboutYou.firstName}} {{aboutYou.middleName}} {{aboutYou.surname}}

        {{question.aboutYouDOB}}
        {{aboutYou.dobDay}}/{{aboutYou.dobMonth}}/{{aboutYou.dobYear}}

        {{question.aboutYouNINO}}
        {{aboutYou.nino}}

    {{question.changeLinkTxt}}

{{question.appointeeHd}}

        {{question.applyingSelfHd}}
        {{appointee.appointee}}

      {% if appointee.appointee == 'Yes, with help from a friend, relative or third party such as a charity' %}

        {{question.appointeeNameHd}}
        {{appointee.name}}

        {{question.appointeeWhoHd}}
        {{appointee.relationship}}

        {{question.appointeeWhyHd}}
        {{appointee.why}}

        {% endif %}

      {{question.changeLinkTxt}}

  {% if appointee.appointee == 'Yes, I am applying for myself' %}

{{question.addSupportHd}}

        {{question.addCondHd}}

          {% if additionalSupport.additionalOptions == 'psychosis' %}
          {{additionalSupport.additionalOptions}}
          {% elif additionalSupport.additionalOptions|length < 10 %}

            {% for additionalOption in additionalSupport.additionalOptions %}

{{additionalOption}}

            {% endfor %}

          {% else %}
          {{additionalSupport.additionalOptions}}
          {% endif %}

      {{question.changeLinkTxt}}

    {% endif %}

{{question.detaialsHD}}

        {{question.detailsAddress}}

          {% if contactDetails.address1 %} {{contactDetails.address1}}
 {% endif %}
          {% if contactDetails.address2 %} {{contactDetails.address2}}
 {% endif %}
          {% if contactDetails.address3 %} {{contactDetails.address3}}
 {% endif %}
          {% if contactDetails.postcode %} {{contactDetails.postcode}} {% endif %}

        {{question.detailsCAddress}}

          {% if contactDetails.correspondenceAddress1 %} {{contactDetails.correspondenceAddress1}}
 {% endif %}
          {% if contactDetails.correspondenceAddress2 %} {{contactDetails.correspondenceAddress2}}
 {% endif %}
          {% if contactDetails.correspondenceAddress3 %} {{contactDetails.correspondenceAddress3}}
 {% endif %}
          {% if contactDetails.correspondencePostcode %} {{contactDetails.correspondencePostcode}} {% endif %}

        {{question.detailsPhone}}
        {{contactDetails.altPhone}}
          {% if contactDetails.smsContact == 'Yes' %}

          You want to get text messages about your claim
          {% endif %}

        {{question.detailsPhoneAlt}}
        {{contactDetails.phone}}

    {{question.changeLinkTxt}}

{{question.prefHd}}

        {{question.prefComms}}
        {{contactPref.optionsName}}
        {% if contactPref.optionsName == 'Other' %}
          - {{contactPref.textreadId2}}
        {% endif %}

    {{question.changeLinkTxt}}

{{question.whereHd}}

        {{question.whereCurrently}}
        {{currentWhereabouts.optionsLiving}}

      {% if currentWhereabouts.optionsLiving != 'You are not currently staying in any of these' %}

        {{question.whereDateIn}}
        {{currentWhereabouts.hospitalWhen}}
        {{currentWhereabouts.careHomeWhen}}
        {{currentWhereabouts.shelteredWhen}}
        {{currentWhereabouts.collegeWhen}}
        {{currentWhereabouts.hostelWhen}}
        {{currentWhereabouts.hospiceWhen}}

        {{question.whereAddress}}

          {% if currentWhereabouts.hospitalWhere1 %} {{currentWhereabouts.hospitalWhere1}}
 {% endif %}
          {% if currentWhereabouts.hospitalWhere2 %} {{currentWhereabouts.hospitalWhere2}}
 {% endif %}
          {% if currentWhereabouts.hospitalWhere3 %} {{currentWhereabouts.hospitalWhere3}}
 {% endif %}
          {% if currentWhereabouts.hospitalWhere4 %} {{currentWhereabouts.hospitalWhere4}} {% endif %}

          {% if currentWhereabouts.careHomeWhere1 %} {{currentWhereabouts.careHomeWhere1}}
 {% endif %}
          {% if currentWhereabouts.careHomeWhere2 %} {{currentWhereabouts.careHomeWhere2}}
 {% endif %}
          {% if currentWhereabouts.careHomeWhere3 %} {{currentWhereabouts.careHomeWhere3}}
 {% endif %}
          {% if currentWhereabouts.careHomeWhere4 %} {{currentWhereabouts.careHomeWhere4}} {% endif %}

          {% if currentWhereabouts.shelteredWhere1 %} {{currentWhereabouts.shelteredWhere1}}
 {% endif %}
          {% if currentWhereabouts.shelteredWhere2 %} {{currentWhereabouts.shelteredWhere2}}
 {% endif %}
          {% if currentWhereabouts.shelteredWhere3 %} {{currentWhereabouts.shelteredWhere3}}
 {% endif %}
          {% if currentWhereabouts.shelteredWhere4 %} {{currentWhereabouts.shelteredWhere4}} {% endif %}

          {% if currentWhereabouts.collegeWhere1 %} {{currentWhereabouts.collegeWhere1}}
 {% endif %}
          {% if currentWhereabouts.collegeWhere2 %} {{currentWhereabouts.collegeWhere2}}
 {% endif %}
          {% if currentWhereabouts.collegeWhere3 %} {{currentWhereabouts.collegeWhere3}}
 {% endif %}
          {% if currentWhereabouts.collegeWhere4 %} {{currentWhereabouts.collegeWhere4}} {% endif %}

          {% if currentWhereabouts.hostelWhere1 %} {{currentWhereabouts.hostelWhere1}}
 {% endif %}
          {% if currentWhereabouts.hostelWhere2 %} {{currentWhereabouts.hostelWhere2}}
 {% endif %}
          {% if currentWhereabouts.hostelWhere3 %} {{currentWhereabouts.hostelWhere3}}
 {% endif %}
          {% if currentWhereabouts.hostelWhere4 %} {{currentWhereabouts.hostelWhere4}} {% endif %}

          {% if currentWhereabouts.hospiceWhere1 %} {{currentWhereabouts.hospiceWhere1}}
 {% endif %}
          {% if currentWhereabouts.hospiceWhere2 %} {{currentWhereabouts.hospiceWhere2}}
 {% endif %}
          {% if currentWhereabouts.hospiceWhere3 %} {{currentWhereabouts.hospiceWhere3}}
 {% endif %}
          {% if currentWhereabouts.hospiceWhere4 %} {{currentWhereabouts.hospiceWhere4}} {% endif %}

      {% endif %}

    {{question.changeLinkTxt}}

{{question.nationalityHd}}

        {{question.nationalityCurrent}}

          {% if nationality.nationality == 'Other' %}
            {{nationality.otherNationality}}
          {% else %}
            {{nationality.nationality}}
          {% endif %}

        {{question.nationalityLiving}}
        {{nationality.countryLiving}}
          {% if nationality.countryLiving == 'No' %}
            - {{nationality.countryLivingOther}}
          {% endif %}

        {{question.nationalityAbroad}}
        {{nationality.livingAbroad}}

    {{question.changeLinkTxt}}

{{question.paymentsHd}}

        {{question.paymentsAbroad}}
        {{paymentsFromAbroad.workedAbroad}}

      {% if paymentsFromAbroad.workedAbroad == 'Yes' %}

          {{question.paymentsBenefits}}
          {{paymentsFromAbroad.benefitsAbroadPayment}}

          {{question.paymentsNi}}
          {{paymentsFromAbroad.payInsuranceAbroad}}

      {% endif %}

    {{question.changeLinkTxt}}

{{question.mainHcpHD}}

            {{question.hcpName}}
            {{mainHcp.name}}

            {{question.hcpAddress}}
            {{mainHcp.profession}}

            {{question.hcpLastSeen}}
            {{mainHcp.phone}}

    {{question.changeLinkTxt}}


text:
Welcome to the order screen.

To select a different table click on table select.

Click on a category item such as dinner to view dinner related items, then select
      an item to add to the current check. To go back to the categories, select main menu.

To add a check to the table, select add check or to remove an empty check select remove empty check.

On the right, you can click the arrows to view each check seperately and clicking on an item and selecting
      delete item will remove it from the check.

Selecting a specific check and clicking on checkout will bring up
     the checkout screen.

    <button type="button" ng-show="menu" ng-click="selectTable()" class="btn btn-default choices">Table Select</button>
    <button type="button" ng-hide="menu" ng-click="categorySelect()" class="btn btn-default choices">Main Menu</button>
    <button type="button" class="btn btn-default choices" ng-click="menuItems($event)" ng-repeat="item in choices" data-id="{{item._id}}">{{item.name}}</button>
    <button type="button" ng-click="deleteItem()" ng-disabled="deleteStatus" class="btn btn-default choices">Delete Item</button>
    <button type="button" ng-click="addCheck()" class="btn btn-default choices">Add Check</button>
    <button type="button" ng-click="deleteCheck()" class="btn btn-default choices">Remove Empty Check</button>
    <button type="button" ng-click="checkout()" class="btn btn-default choices">Checkout</button>
    <button type="button" disabled class="btn btn-default choices">Print Tables Checks</button>

      <button type="button" class="btn btn-default left-chev" aria-label="Left Align" data-id="left" ng-click="nextTable($event)">

      </button>
      Table# {{tableNumber}} Guest # {{checkNumber}} Total Guests# {{count}}
      <button type="button" class="btn btn-default right-chev" aria-label="Right Align" data-id="right" ng-click="nextTable($event)">

      </button>

{{item.dish}}

{{item.cost}}

{{item.notes}}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace SigeBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class DatosPreviaType extends AbstractType
{
    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('nota')
            ->add('folio')
            ->add('fecha', 'date' , array(
                'format' => 'ddMMyyyy',
                'years' => range(date('Y') -100, date('Y'))
                ))
            ->add('calificacionDP')
        ;
    }

    /**
     * @param OptionsResolverInterface $resolver
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'SigeBundle\Entity\DatosPrevia'
        ));
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'sigebundle_datosprevia';
    }
}


text:
classdef CADS < handle
    %UNTITLED3 Summary of this class goes here
    %   Detailed explanation goes here

    properties
        Name='un-named'
        ItemNames={}
        EntropyType='t-SE(20)'
        Species={}
        Full=struct('Header','','Sequence','')
        PDB
        Alignment=struct('Header','','Sequence','')
        Keep=struct('Alignment',[],'PDB',[])
        Subsets={}
        SubsetsTarget={}
        Results
        Target
        Map3D_2D
        Stats
    end
    properties (SetObservable, AbortSet)
        Settings
    end

    %     methods (Static)
    %         function handlePropEvents(src,evnt)
    %             switch src.Name % switch on the property name
    %                 case 'PropOne'
    %                     % PropOne has triggered an event
    %                     ...
    %                 case 'PropTwo'
    %                 % PropTwo has triggered an event
    %                 ...
    %             end
    %         end
    %     end

    methods
        function CADS_object = CADS(name)
            if nargin > 0
                if iscell(name)
                    CADS_object(1).Name = name{1};
                    CADS_object(1).Results=ConAnalOutput(CADS_object(1).Name);
                    CADS_object(1).PDB=PDBentry(CADS_object(1).Name);
                    CADS_object(1).Target=PDBentry(CADS_object(1).Name);
                    CADS_object(1).Map3D_2D=Map2D(CADS_object(1).Name);
                    for i=2:length(name)
                        CADS_object(i) = CADS(name{i});
                    end
                else
                    CADS_object.Name = name;
                    CADS_object.Results=ConAnalOutput(name);
                    CADS_object.PDB=PDBentry(name);
                    CADS_object.Target=PDBentry(name);
                    CADS_object.Map3D_2D=Map2D(name);
                end
            end
        end

        function AddPDB(CADS_object,PDB_object,model_ind)
            if nargin < 3
                model_ind=1;
            end

            numCads=length(CADS_object);

            if length(PDB_object) < numCads
                PDB_object=SplitByMolID(PDB_object);
            end
            for i=1:numCads

                try
                    if isempty(CADS_object(i).PDB(model_ind))
                        CADS_object(i).PDB=PDBentry();
                    end
                catch
                end

                switch class(PDB_object)
                    case 'PDBentry'
                        CADS_object(i).PDB(model_ind)=PDB_object(i);
                    case 'struct'
                        CADS_object(i).PDB(model_ind).PDBfromStruct(PDB_object(i))
                    case 'char'
                        CADS_object(i).PDB(model_ind).ImportPDB(PDB_object(i))%% array of chars?
                    case 'cell'
                        CADS_object(i).PDB(model_ind).ImportPDB(PDB_object{i})
                end
                CADS_object(i).PDB(model_ind).Process()
                try
                    name=regexp(reshape(CADS_object(i).PDB(model_ind).PDB.Source',1,[]),...
                        'ORGANISM_SCIENTIFIC: ([^;]+);','tokens','once');
                    CADS_object(i).Species{model_ind}=name{1};
                catch
                end

                [urs,I]=unique(CADS_object(i).PDB(model_ind).UniqueResSeq);
                D=regexp(urs,'[\w]_[\s]*([\w]+)','tokens');
                d=vertcat(D{:});
                if isempty(d)
                    e={''};
                else
                    e=vertcat(d{:});
                end
                CADS_object(i).ItemNames=e;
                CADS_object(i).Keep(model_ind).PDB=e;
                CADS_object(i).Keep(model_ind).Alignment=e;
                CADS_object(i).Subsets{model_ind}=colon(1,length(I));
                try
                    rn={CADS_object(i).PDB(model_ind).PDB.Model.Atom(I).resName};
                    seq=aminolookup(rn(~ismember(rn,{'HOH','MG','NA','CL','ZN'})));
                    if length(seq)==1
                        CADS_object(i).Full(model_ind).Sequence=seq{1};
                        CADS_object(i).Full(model_ind).Header=CADS_object.Species{model_ind};
                        CADS_object(i).Alignment(model_ind).Sequence=seq{1};
                        CADS_object(i).Alignment(model_ind).Header=CADS_object.Species{model_ind};
                    end
                catch
                end
                CADS_object(i).Subsets{model_ind}(ismember(rn,{'HOH','MG','NA','CL','ZN'}))=[];
            end
        end

        function Alignment = AddAlignment(CADS_object,Alignment_Mode,Alignment)
            switch Alignment_Mode
                case 'built-in'
                    if length( CADS_object.Alignment) < 3
                        [~,align]=nwalign(CADS_object.Alignment(1).Sequence,CADS_object.Alignment(2).Sequence);
                        CADS_object.Alignment(1).Sequence=align(1,:);
                        CADS_object.Alignment(2).Sequence=align(3,:);

                    else
                        CADS_object.Alignment=multialign(CADS_object.Alignment);
                    end
                    for i=1:length(CADS_object.Keep)
                        W=zeros(1,length(CADS_object.Alignment(1).Sequence));
                        W(regexp(CADS_object.Alignment(i).Sequence,'\w'))=CADS_object.Keep(i).Alignment;
                        CADS_object.Keep(i).Alignment=W;
                    end
                    CADS_object.Subsets={colon(1,length(CADS_object.Alignment(1).Sequence))};
                case 'premade'
                    for i=1:length(Alignment)
                        Alignment(i).Sequence=regexprep(Alignment(i).Sequence,'~','-');
                    end
                    CADS_object.Alignment=Alignment;
            end

        end

        function AddTarget(CADS_object,Target,model_ind)
            if nargin < 3
                model_ind=1;
            end
            numCads=length(CADS_object);
            for i=1:numCads
                try
                    if isempty(CADS_object(i).Target)
                        CADS_object(i).Target=PDBentry();
                    end
                catch
                end
                CADS_object(i).Target(model_ind)=Target;
            end
        end

        function Add3D_2DMap(CADS_object,Map3D_2D,model_ind)
            if nargin < 3
                model_ind=1;
            end
            try
                if isempty(CADS_object.Map3D_2D)
                    CADS_object.Map3D_2D=Map2D();
                end
            catch
            end
            CADS_object.Map3D_2D(model_ind)=Map3D_2D;

        end

        function CADS_object2 = Copy(CADS_object)
            for i=1:length(CADS_object)
                CADS_object2(i)=CADS([CADS_object(i).Name,'_copy']);
                CADS_object2(i).EntropyType=CADS_object(i).EntropyType;
                CADS_object2(i).Species=CADS_object(i).Species;
                CADS_object2(i).Full=CADS_object(i).Full;
                CADS_object2(i).PDB=CADS_object(i).PDB;
                CADS_object2(i).Alignment=CADS_object(i).Alignment;
                CADS_object2(i).Keep=CADS_object(i).Keep;
                CADS_object2(i).Subsets=CADS_object(i).Subsets;
                CADS_object2(i).Settings=CADS_object(i).Settings;
                CADS_object2(i).Target=CADS_object(i).Target;
                CADS_object2(i).Map3D_2D=CADS_object(i).Map3D_2D;
                CADS_object2(i).SubsetsTarget=CADS_object(i).SubsetsTarget;
                CADS_object2(i).ItemNames=CADS_object(i).ItemNames;
            end
        end

        Analyze(CADS_object,varargin)
        [rmse, residuals, Keep] = RMSE(CADS_object,varargin)
        [Stats] = SubsetAnalysis(CADS_object,varargin)
        KeepFilter=FilterMap(CADS_object,varargin)
        Map3Dto2D(CADS_object,varargin)

        %         [Pro,d]=OnionPlot(CADS_object,varargin)
        [Keep,F]=PlotVar(CADS_object,varargin)
        Ramachandran=PlotRamachandran(CADS_object,varargin)
        [Alignment,Residue_Numbers]=PlotAlignment(CADS_object,varargin)

        [Propdistro,AAdistro,CutAlignments,PropMatrix]=PropDistro(CADS_object,varargin)
        VarPDBWrite(CADS_object,index)
        [ Table, Keep, F ] = EntropyFiltering(CADS_object,ClassFileNames,varargin)

        % 2D Map function
        Plot2DMap(CADS_object,varargin)

    end

end


text:
package org.robolectric.shadows;

import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AccountManagerCallback;
import android.accounts.AccountManagerFuture;
import android.accounts.AuthenticatorDescription;
import android.accounts.AuthenticatorException;
import android.accounts.OnAccountsUpdateListener;
import android.accounts.OperationCanceledException;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.Resetter;
import org.robolectric.internal.Shadow;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.TimeUnit;

/**
 * Shadow implementation for the Android {@code AccountManager } class.
 */
@Implements(AccountManager.class)
public class ShadowAccountManager {
  private static final Object lock = new Object();

  private static AccountManager instance;

  private List<Account> accounts = new ArrayList<Account>();
  private Map<Account, Map<String, String>> authTokens = new HashMap<Account, Map<String,String>>();
  private Map<String, AuthenticatorDescription> authenticators = new LinkedHashMap<String, AuthenticatorDescription>();
  private List<OnAccountsUpdateListener> listeners = new ArrayList<OnAccountsUpdateListener>();
  private Map<Account, Map<String, String>> userData = new HashMap<Account, Map<String,String>>();
  private Map<Account, String> passwords = new HashMap<Account, String>();
  private AccountManagerCallback<Bundle> pendingAddCallback;
  private RoboAccountManagerFuture pendingAddFuture;

  @Resetter
  public static void reset() {
    synchronized (lock) {
      instance = null;
    }
  }

  @Implementation
  public static AccountManager get(Context context) {
    synchronized (lock) {
      if (instance == null) {
        instance = Shadow.newInstanceOf(AccountManager.class);
      }
      return instance;
    }
  }

  @Implementation
  public Account[] getAccounts() {
    return accounts.toArray(new Account[accounts.size()]);
  }

  @Implementation
  public Account[] getAccountsByType(String type) {
    List<Account> accountsByType = new ArrayList<Account>();

    for (Account a : accounts) {
      if (type.equals(a.type)) {
        accountsByType.add(a);
      }
    }

    return accountsByType.toArray(new Account[accountsByType.size()]);
  }

  @Implementation
  public synchronized void setAuthToken(Account account, String tokenType, String authToken) {
    if(accounts.contains(account)) {
      Map<String, String> tokenMap = authTokens.get(account);
      if(tokenMap == null) {
        tokenMap = new HashMap<String, String>();
        authTokens.put(account, tokenMap);
      }
      tokenMap.put(tokenType, authToken);
    }
  }

  @Implementation
  public String peekAuthToken(Account account, String tokenType) {
    Map<String, String> tokenMap = authTokens.get(account);
    if(tokenMap != null) {
      return tokenMap.get(tokenType);
    }
    return null;
  }

  @Implementation
  public boolean addAccountExplicitly(Account account, String password, Bundle userdata) {
    if (account == null) {
      throw new IllegalArgumentException("account is null");
    }
    for (Account a: getAccountsByType(account.type)) {
      if (a.name.equals(account.name)) {
        return false;
      }
    }

    if (!accounts.add(account)) {
    	return false;
    }

    setPassword(account, password);

    if(userdata != null) {
      for (String key : userdata.keySet()) {
        setUserData(account, key, userdata.get(key).toString());
      }
    }

    return true;
  }

  @Implementation
  public String blockingGetAuthToken(Account account, String authTokenType,
                                     boolean notifyAuthFailure) {
    if (account == null) {
      throw new IllegalArgumentException("account is null");
    }
    if (authTokenType == null) {
      throw new IllegalArgumentException("authTokenType is null");
    }

    Map<String, String> tokensForAccount = authTokens.get(account);
    if (tokensForAccount == null) {
      return null;
    }
    return tokensForAccount.get(authTokenType);
  }

  @Implementation
  public AccountManagerFuture<Boolean> removeAccount (final Account account,
                                                      AccountManagerCallback<Boolean> callback,
                                                      Handler handler) {

    if (account == null) throw new IllegalArgumentException("account is null");

    final boolean accountRemoved = accounts.remove(account);
	passwords.remove(account);
	userData.remove(account);

    return new AccountManagerFuture<Boolean>() {
      @Override
      public boolean cancel(boolean mayInterruptIfRunning) {
        return false;
      }

      @Override
      public boolean isCancelled() {
        return false;
      }

      @Override
      public boolean isDone() {
        return false;
      }

      @Override
      public Boolean getResult() throws OperationCanceledException, IOException,
              AuthenticatorException {
        return accountRemoved;
      }

      @Override
      public Boolean getResult(long timeout, TimeUnit unit) throws OperationCanceledException,
              IOException, AuthenticatorException {
        return accountRemoved;
      }
    };
  }

  @Implementation
  public AuthenticatorDescription[] getAuthenticatorTypes() {
    return authenticators.values().toArray(new AuthenticatorDescription[authenticators.size()]);
  }

  @Implementation
  public void addOnAccountsUpdatedListener(final OnAccountsUpdateListener listener,
      Handler handler, boolean updateImmediately) {

    if (listeners.contains(listener)) {
      return;
    }

    listeners.add(listener);

    if (updateImmediately) {
      listener.onAccountsUpdated(getAccounts());
    }
  }

  @Implementation
  public String getUserData(Account account, String key) {
    if (account == null) {
      throw new IllegalArgumentException("account is null");
    }

    if (!userData.containsKey(account)) {
      return null;
    }

    Map<String, String> userDataMap = userData.get(account);
    if (userDataMap.containsKey(key)) {
      return userDataMap.get(key);
    }

	return null;
  }

  @Implementation
  public void setUserData(Account account, String key, String value) {
    if (account == null) {
      throw new IllegalArgumentException("account is null");
    }

    if (!userData.containsKey(account)) {
      userData.put(account, new HashMap<String, String>());
    }

    Map<String, String> userDataMap = userData.get(account);

    if (value == null) {
      userDataMap.remove(key);
    } else {
      userDataMap.put(key, value);
    }
  }

  @Implementation
  public void setPassword (Account account, String password) {
    if (account == null) {
      throw new IllegalArgumentException("account is null");
    }

    if (password == null) {
      passwords.remove(account);
    } else {
      passwords.put(account, password);
    }
  }

  @Implementation
  public String getPassword (Account account) {
    if (account == null) {
      throw new IllegalArgumentException("account is null");
    }

    if (passwords.containsKey(account)) {
      return passwords.get(account);
    } else {
      return null;
    }
  }

  @Implementation
  public void invalidateAuthToken(final String accountType, final String authToken) {
    Account[] accountsByType = getAccountsByType(accountType);
    for (Account account : accountsByType) {
      Map<String, String> tokenMap = authTokens.get(account);
      if (tokenMap != null) {
        Iterator<Entry<String, String>> it = tokenMap.entrySet().iterator();
        while (it.hasNext()) {
          Map.Entry<String, String> map = it.next();
          if (map.getValue().equals(authToken)) {
            it.remove();
          }
        }
        authTokens.put(account, tokenMap);
      }
    }
  }

  private void notifyListeners() {
    Account[] accounts = getAccounts();
    Iterator<OnAccountsUpdateListener> iter = listeners.iterator();
    OnAccountsUpdateListener listener;
    while (iter.hasNext()) {
      listener = iter.next();
      listener.onAccountsUpdated(accounts);
    }
  }

  /**
   * Non-android accessor.
   *
   * @param account User account.
   */
  public void addAccount(Account account) {
    accounts.add(account);
    if (pendingAddCallback != null) {
      pendingAddFuture.resultBundle.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);
      pendingAddCallback.run(pendingAddFuture);
    }
    notifyListeners();
  }

  private class RoboAccountManagerFuture implements AccountManagerFuture<Bundle> {
    private final String accountType;
    final Bundle resultBundle;

    public RoboAccountManagerFuture(String accountType, Bundle resultBundle) {
      this.accountType = accountType;
      this.resultBundle = resultBundle;
    }

    @Override
    public boolean cancel(boolean b) {
      return false;
    }

    @Override
    public boolean isCancelled() {
      return false;
    }

    @Override
    public boolean isDone() {
      return resultBundle.containsKey(AccountManager.KEY_ACCOUNT_NAME);
    }

    @Override
    public Bundle getResult() throws OperationCanceledException, IOException, AuthenticatorException {
      if (!authenticators.containsKey(accountType)) {
        throw new AuthenticatorException("No authenticator specified for " + accountType);
      }
      resultBundle.putString(AccountManager.KEY_ACCOUNT_TYPE, accountType);
      return resultBundle;
    }

    @Override
    public Bundle getResult(long l, TimeUnit timeUnit) throws OperationCanceledException, IOException, AuthenticatorException {
      if (!authenticators.containsKey(accountType)) {
        throw new AuthenticatorException("No authenticator specified for " + accountType);
      }
      return resultBundle;
    }
  }

  @Implementation
  public AccountManagerFuture<Bundle> addAccount(final String accountType, String authTokenType, String[] requiredFeatures, Bundle addAccountOptions, Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) {
    final Bundle resultBundle = new Bundle();
    if (activity == null) {
      Intent resultIntent = new Intent();
      resultBundle.putParcelable(AccountManager.KEY_INTENT, resultIntent);
    } else if (callback == null) {
      resultBundle.putString(AccountManager.KEY_ACCOUNT_NAME, "some_user@gmail.com");
    }
    pendingAddCallback = callback;

    pendingAddFuture = new RoboAccountManagerFuture(accountType, resultBundle);
    return pendingAddFuture;
  }

  /**
   * Non-android accessor.
   *
   * @param authenticator System authenticator.
   */
  public void addAuthenticator(AuthenticatorDescription authenticator) {
    authenticators.put(authenticator.type, authenticator);
  }

  public void addAuthenticator(String type) {
    addAuthenticator(AuthenticatorDescription.newKey(type));
  }
}


text:
#include <string>
#include <stdlib.h>
#include <vector>
#if !defined(STRUCTURE_H)
#define STRUCTURE_H

#include <vector>
#include <string>
using namespace std;

#include "defines.h"

#ifdef EXTENDED_DOUBLE
	#include "extended_double.h" //inlcude code for extended double if needed
#endif//defined EXTENDED_DOUBLE

//This is a deprecated array size that must be removed:
#define maxforce 3000

//Single structure is a wrapper for the information associated with just a single structure, i.e. pairs, energy, and labels.
struct singlestructure {

	//This function sizes the vectors to the approprate size:
	singlestructure(int sequencelength);

	//keep track of the basepairs
	vector<int> basepr;

	//keep track of the energy of the structure, if available
	int energy;

	//keep a string, from a ct file or sequence file with the sequence desription
	string ctlabel;

};

//! structure Class.
/*!
	The structure class provides a class for handling sequences and structures.
*/

//////////////////////////////////////////////////////////////////////
class structure //this structure contains all the info for a structure
{
/*<<<<<<< structure.h
public:
int numofstructures;//number of structures
int numofbases;//number of nucleotides in sequence
short int pair[maxforce][2],npair,nforbid,forbid[maxforce][2];//arrays to hold lists of forced pairs or pairs forbidden
short int *numseq,*hnumber;
int **basepr;
int *energy;//[maxstructures+1];
char **ctlabel;//[maxstructures+1][ctheaderlength];
short int ndbl, dbl[maxforce];
int inter[3],allocatedstructures;
short int nnopair,*nopair,nmod,mod[maxforce];
int nopairmax;//maximum number of nucleotides not allowed to pair
short int ngu,gu[maxgu];
char *nucs;
bool intermolecular,allocated,templated,stacking;
bool **tem;//tem stores template information as to whether a pair is allowed
bool SHAPEFileRead,distsread;
structure(int structures = maxstructures+1);
~structure();
void allocate(int size = maxbases);
void allocatestructure();
void deletestructure();
void checknopair();//make sure that the nopair array is large enough to add more items
void checknumberofstructures();//check to make sure there is room for one more structure
void allocatetem();//allocate space in **tem
short int min_gu, min_g_or_u;//NMR-derived constraint variables
short int neighbors[maxforce][maxneighborlength],nneighbors;//also NMR-derived index this from zero in both dimensions
//regional NMR constraints:
short int nregion,rmin_gu[maxregions],rmin_g_or_u[maxregions];
short int rneighbors[maxregions][maxforce][maxneighborlength],rnneighbors[maxregions],start[maxregions],stop[maxregions];
//microarray type constraints:
short int nmicroarray,microstart[maxregions],microstop[maxregions],microunpair[maxregions];
bool *fcedbl;//pointer to a 2-D array used in Dynalign to track nucleotides that must be double-stranded
void sort();//sort the structures so that the lowest free energy structure is in position one
			//NOTE: This function sorts the the list of base pairs according to energy.  The energies (*energy) and basepairs (**basepr)
			//		arrays are correctly sorted, but ct labels (**ctlabel) is not sorted.
double CalculatePseudoEnergy(double data, std::string modifier, double, double);
double Gammadist(double data, double shape, double loc, double scale);
double Potential(double data, std::vector< std::vector<double> > params, double kT);
void ReadProbabilisticPotentialParams();//Read chemical modifier distributions from file
void ReadSHAPE(const char *filename, std::string modifier="SHAPE", bool calculate=true, bool nosum=false);//Read SHAPE reactivity data from a file
void ReadSHAPE(const char *filename, float SingleStrandThreshold, float ModificationThreshold);//Read SHAPE reactivity data from a file
void ReadOffset(const char *SSOffset, const char *DSOffset);//Read Free Energy Offset Files.
void ReadExperimentalPairBonus(const char *filename, double const experimentalOffset = 0.0, double const experimentalScaling = 1.0 );
bool limitdistance;//toggle to indicate that there is a limit on the maximum distance between nucs in base pairs
int maxdistance;//maximum distance between nucs in base pairs
double *SHAPE;//double array to contain SHAPE data -- values less than -500 are ignored
double **EX;// double array that contains experimental bonuses/penalties
bool shaped;//keeps track of whether SHAPE data was loaded
bool experimentalPairBonusExists;//keeps track of whether experimental bonus data was loaded
bool ssoffset;//keeps track of whether a single stranded offset was read from disk
double SHAPEslope,SHAPEintercept;//values of slope and intercept for SHAPE data modification of pairing stability
//SINGLE STRANDED SHAPE ENERGY VARIABLES AND FUNCTIONS
double *SHAPEss; //short int array that contains SHAPE data for single-stranded segments
double SHAPEslope_ss, SHAPEintercept_ss; //values of the slope and intercept for SHAPE data modifying single stranded loop stability
short int **SHAPEss_region;  //2-d short int array containing energy values for hairpin loop combinations
//Parameters for distributions
std::vector< std::vector<double> > SHAPE_params;
std::vector< std::vector<double> > DMS_params;
std::vector< std::vector<double> > CMCT_params;
int SHAPEss_calc(int index_i, int index_j);  //Returns pseudoenergy term for a hairpin loop using single stranded SHAPE data
short int SHAPEss_give_value(int index);  //Returns the single stranded SHAPE pseudo energy for a given nucleotide
||||||| ../../RNAstructure-before-fork/src/structure.h
public:
int numofstructures;//number of structures
int numofbases;//number of nucleotides in sequence
short int pair[maxforce][2],npair,nforbid,forbid[maxforce][2];//arrays to hold lists of forced pairs or pairs forbidden
short int *numseq,*hnumber;
int **basepr;
int *energy;//[maxstructures+1];
char **ctlabel;//[maxstructures+1][ctheaderlength];
short int ndbl, dbl[maxforce];
int inter[3],allocatedstructures;
short int nnopair,*nopair,nmod,mod[maxforce];
int nopairmax;//maximum number of nucleotides not allowed to pair
short int ngu,gu[maxgu];
char *nucs;
bool intermolecular,allocated,templated,stacking;
bool **tem;//tem stores template information as to whether a pair is allowed
structure(int structures = maxstructures+1);
~structure();
void allocate(int size = maxbases);
void allocatestructure();
void deletestructure();
void checknopair();//make sure that the nopair array is large enough to add more items
void checknumberofstructures();//check to make sure there is room for one more structure
void allocatetem();//allocate space in **tem
short int min_gu, min_g_or_u;//NMR-derived constraint variables
short int neighbors[maxforce][maxneighborlength],nneighbors;//also NMR-derived index this from zero in both dimensions
//regional NMR constraints:
short int nregion,rmin_gu[maxregions],rmin_g_or_u[maxregions];
short int rneighbors[maxregions][maxforce][maxneighborlength],rnneighbors[maxregions],start[maxregions],stop[maxregions];
//microarray type constraints:
short int nmicroarray,microstart[maxregions],microstop[maxregions],microunpair[maxregions];
bool *fcedbl;//pointer to a 2-D array used in Dynalign to track nucleotides that must be double-stranded
void sort();//sort the structures so that the lowest free energy structure is in position one
			//NOTE: This function sorts the the list of base pairs according to energy.  The energies (*energy) and basepairs (**basepr)
			//		arrays are correctly sorted, but ct labels (**ctlabel) is not sorted.
void ReadSHAPE(const char *filename, float SingleStrandThreshold, float ModificationThreshold);//Read SHAPE reactivity data from a file
void ReadSHAPE(const char *filename, bool calculate=true);//Read SHAPE reactivity data from a file
void ReadOffset(const char *SSOffset, const char *DSOffset);//Read Free Energy Offset Files.
void ReadExperimentalPairBonus(const char *filename, double const experimentalOffset = 0.0, double const experimentalScaling = 1.0 );
bool limitdistance;//toggle to indicate that there is a limit on the maximum distance between nucs in base pairs
int maxdistance;//maximum distance between nucs in base pairs
double *SHAPE;//double array to contain SHAPE data -- values less than -500 are ignored
double **EX;// double array that contains experimental bonuses/penalties
bool shaped;//keeps track of whether SHAPE data was loaded
bool experimentalPairBonusExists;//keeps track of whether experimental bonus data was loaded
bool ssoffset;//keeps track of whether a single stranded offset was read from disk
double SHAPEslope,SHAPEintercept;//values of slope and intercept for SHAPE data modification of pairing stability
//SINGLE STRANDED SHAPE ENERGY VARIABLES AND FUNCTIONS
double *SHAPEss; //short int array that contains SHAPE data for single-stranded segments
double SHAPEslope_ss, SHAPEintercept_ss; //values of the slope and intercept for SHAPE data modifying single stranded loop stability
short int **SHAPEss_region;  //2-d short int array containing energy values for hairpin loop combinations
int SHAPEss_calc(int index_i, int index_j);  //Returns pseudoenergy term for a hairpin loop using single stranded SHAPE data
short int SHAPEss_give_value(int index);  //Returns the single stranded SHAPE pseudo energy for a given nucleotide
=======*/
	public:

		//******************************
		//Constructor:
		//******************************

		//!Constructor.
		//!	\param sructures is an int that specifies how many structures should be anticipated.  This sets up an initial memory allocation, but this can expand as needed.
		structure(int structures = maxstructures+1);

		//!Destructor.
		~structure();

		//*********************************
		//Get and receive sequence and structure information:
		//*********************************

		//! Get the label for structure numer structurenumber.

		//! \param structurenumber is an int that gives the structure number being indexed, this is one indexed.
		//! \return a string that gives the label.
		string GetCtLabel(int structurenumber);

		//! Get the energy for structure number structurenumber.

		//! This function requires that an energy calculation has been performed.  It does not do an eenrgy calculation.
		//! \param structurenumber is an int that gives the structure number being indexed, this is one indexed.
		//! \return an int that gives the energy in kcal/mol*conversionfactor, where conversionfactor is set in /src/defines.h.
		int GetEnergy(int structurenumber);

		//! Get the number of structures stored.

		//! \return An integer that is the number of structures encoded.
		int GetNumberofStructures();

		//! Get the pairing partner for i in structure structurenumber.

		//! \param i is the nucleotide index, which is one-indexed.
		//! \param structurenumber is the structure number, which is one-indexed.
		//! \return The pairing partner, as a nucleotide index.
		int GetPair(int i, int structurenumber=1);

		//! Get the label associated with the sequence.

		//! \return The string read from the sequence file.
		string GetSequenceLabel();

		//! Get the length of the sequence.

		//! \return An integer that is the sequence length.
		inline int GetSequenceLength() {
			//Return the value of numofbases:
			return numofbases;
		}

		//! Remove the pair at index i for structure number structurenumber.

		//! If i is paired to j, the pairing for j is also removed.
		//! \param i is the nucleotide for whic pairing is to be removed.  This is one-indexed.
		//! \param structurenumber is an int that provides from which structure the pair should be removed.  This is one-indexed.
		void RemovePair(int i, int structurenumber=1);

		//! Set the label for a structure, using a string.

		//! \param label is a string that will be strored.
		//! \param structurenumber is the index to which structure will hold the label.  This is one-indexed.
		void SetCtLabel(string label, int structurenumber);

		//! Set the label for a structure,using a pointer to cstring.

		//! \param label is a pointer to char that provides the label.
		//! \param structurenumber is the index to which structure will hold the label.
		void SetCtLabel(char *label, int structurenumber);

		//! Set the energy for structure numer structurenumber.

		//! \param structurenumber is an int that gives the structure number being indexed, this is one indexed.
		//! \param energy is an int that sets the energy in kcal/mol*conversionfactor, where conversionfactor is set in /src/defines.h.
		void SetEnergy(int structurenumber, int energy);

		//Set the pairing partner for i in structure structurenumber.

		//! This function sets nucleotide i paired to j in structure number structurenumber.
		//! \param i is the nucleotide index of the first pairing partner, which is one-indexed.
		//! \param j is the nucleotide index of the second pairing partner.
		//! \param structurenumber is the structure number, which is one-indexed.
		void SetPair(int i, int j, int structurenumber=1);

		//! Set the label from a sequence, using a string.

		//! \param label is a string that will be stored.
		void SetSequenceLabel(string label);

		//********************************
		// Get and Set constraint information
		//*********************************

		//! Allocate a bool array with information about whether any given pair is allowed.

		//! This function must be called after reading a sequence and before any template information is read or written.
		//! This mechanism is orthogonal to the functions AddForbiddenPair, GetForbiddenPair5, and GetForbiddenPair3.  It exists for the convenience of coding functiopns that need to forbid a large number of pairs.
		//! The memory use is cleaned up in the destructor.
		void allocatetem();

		//! Add a nucleotide to the list of those that must pair.

		//! \param i is an int that indicates the nucleotide position, one indexed.
		void AddDouble(int i);

		//! Add a pair of nucleotides to the list of those not allowed to form.

		//! \param i is an int that indicates the 5' nucleotide position, one indexed.
		//! \param j is an int that indicates the 3' nucleotide position, one indexed.
		void AddForbiddenPair(int i, int j);

		//! Add a nucleotide to the list of Us in GU pairs.

		//! Note that there is no error checking.  This nucleotide must be a U.
		//! \param i is an int that indicates the nucleotide position, one indexed.
		void AddGUPair(int i);

		//! Add a nucleotide to the list of those accessible to traditional chemical modification.

		//! These nucleotides can only be unpaired, at the end of a helix, in a GU pair, or adjacent to a GU pair.
		//! \param i is an int that indicates the nucleotide position, one indexed.
		void AddModified(int i);

		//! Add a pair of nucleotides to the list of those that must form.

		//! Note that there is no error checking.  This should be an allowed base pair.
		//! \param i is an int that indicates the 5' nucleotide position, one indexed.
		//! \param j is an int that indicates the 3' nucleotide position, one indexed.
		void AddPair(int i, int j);

		//! Add a nucleotide to the list of those not able to pair.

		//! \param i is an int that indicates the nucleotide position, one indexed.
		void AddSingle(int i);

		//!	Indicate if pairing distance is limited for structrure prediction methods.
//>>>>>>> ../../RNAstructure-object/src/structure.h

		//! \return A bool that is true if the pairing distance has a limit.
		inline bool DistanceLimited() {

			return limitdistance;

		}

		//! Get a nucleotide that must be base paired.

		//! \return An int that gives the nucleotide position, one indexed.
		//! \param i is an int that gives the constraint number, which should be between 0 and GetNumberofDoubles()-1, inclusive.
		int GetDouble(int i);

		//! Get a nucleotide that must not be in a specific pair.

		//! \return An int that gives the nucleotide position for the 5' partner, one indexed.
		//! \param i is an int that gives the constraint number, which should be between 0 and GetNumberofForbiddenPairs()-1, inclusive.
		int GetForbiddenPair5(int i);

		//! Get a nucleotide that must not be in a specific pair.

		//! \return An int that gives the nucleotide position for the 3' partner, one indexed.
		//! \param i is an int that gives the constraint number, which should be between 0 and GetNumberofForbiddenPairs()-1, inclusive.
		int GetForbiddenPair3(int i);

		//! Get a nucleotide that must be a U in a GU pair.

		//! \return An int that gives the nucleotide position, one indexed.
		//! \param i is an int that gives the constraint number, which should be between 0 and GetNumberofGU()-1, inclusive.
		int GetGUpair(int i);

		//! Get a nucleotide that is accessible to chemical modification.

		//! These nucleotides can only be unpaired, at the end of a helix, in a GU pair, or adjacent to a GU pair.
		//! \return An int that gives the nucleotide position, one indexed.
		//! \param i is an int that gives the constraint number, which should be between 0 and GetNumberofMofidied()-1, inclusive.
		int GetModified(int i);

		//! Get the number of nucleotides forced to be double-stranded.

		//! \return An int that is the number of nucleotides constrained to be double stranded.
		int GetNumberofDoubles();

		//! Get the number of pairs that are forbidden.

		//! \return An int that is the number of forbidden pairs.
		int GetNumberofForbiddenPairs();

		//! Get the number of Us forced to be in GU pairs.

		//! \return An int that is the number of nucleotides constrained to be in GU pairs.
		int GetNumberofGU();

		//! Get the number of nucleotides that are accessible to chemical modification.

		//! \return An int that is the number of nucleotides constrained to be chemically modified.
		int GetNumberofModified();

		//! Get the number of nucleotides forced to be single-stranded.

		//! \return An int that is the number of nucleotides constrained to be single stranded.
		int GetNumberofSingles();

		//! Get the number of pairs that are constrained to occur.

		//! \return An int that is the number of forced pairs.
		int GetNumberofPairs();

		//! Get a nucleotide that must be in a specific pair.

		//! \return An int that gives the nucleotide position for the 5' partner, one indexed.
		//! \param i is an int that gives the constraint number, which should be between 0 and GetNumberofPairs()-1, inclusive.
		int GetPair5(int i);

		//! Get a nucleotide that must be in a specific pair.

		//! \return An int that gives the nucleotide position for the 3' partner, one indexed.
		//! \param i is an int that gives the constraint number, which should be between 0 and GetNumberofPairs()-1, inclusive.
		int GetPair3(int i);

		//!	Provide the maximum distance between nucleotides that can pair.

		//! \return An int that is the maximum distance in sequence for nucleotides that can pair.
		inline int GetPairingDistanceLimit() {

			return maxdistance;

		}

		//! Get a nucleotide that must be single stranded.

		//! \return An int that gives the nucleotide position, one indexed.
		//! \param i is an int that gives the constraint number, which should be between 0 and GetNumberofSingles()-1, inclusive.
		int GetSingle(int i);

		//! Reset, i.e. remove, all constraints
		void RemoveConstraints();

		//! Set a maximum pairing distance between nucleotides that can pair.

		//! For nucleotides i and j, if |j-i|>=ct->maxdistance, the nucleotides cannot pair.
		//! This also sets a bool so that DistanceLimited() will return true.
		//! \param maxdistance is an int that will be the maximum distance.
		void SetPairingDistance(int maxdistance);

		//*********************************
		//Functions for disk I/O
		//*********************************

		//! Write a ct file to disk.

		//!	if append is set to true, the ct information is appended to an existing file, if the file exists.
		//! \param ctoutfile is a const char pointer to a Null-terminated cstring that provides a filename.
		//! \param append is a bool that indicates if these structures should be appended to the end of the file.  The default, falase, is to overwrite any existing file.
		void ctout (const char *ctoutfile, bool append=false);

		//! Open a CT File.

		//! This opens a ct file and stores all the information in this instance of structure.
		//! A non-zero return indicates and error in reading the file.  The value of the return is the line number that contains an error.
		//! \param ctfile is a pointer to a Null-terminated cstring that gives the filename, including any necessary path information.
		//! \return An int that gives the linenumber of an error or -1 if the file was not found.
		long openct(const char *ctfile);

		//! Open a sequence file.

		//! This function works on both .seq and FASTA files.

		//! \param seqfile is a const char pointer to a cstring that gives the filename, including any path information.
		//! \return An int that indicates an error state: 1 on no error and 0 on error.
		int openseq (const char *seqfile);

		//! Write a .bracket file (Vienna Format).

		//! The file will be decipherable only if there are no pseudoknots in the structure.  There is no error checking on this.
		//! \param filename is a const char pointer to a Null-terminated cstring that provides a filename.
		void writedotbracket(const char *filename);

		//*******************************
		//Functions that act on whole structures
		//*******************************

		//! Add another empty structure to the list of singlestructures.
		// DHM: Remember if this is structure 1 to set the label from some sequence label.!
		void AddStructure();

		//! Remove all pairs from a structure, i.e. make it a clean slate for a new set of pairs

		//! \param struturenumber is an index to the structure to be cleaned.
		void CleanStructure(int structurenumber);

		//! Remove the last structure.
		void RemoveLastStructure();

		//! Remove the structure at structurenumber.

		//! If the last structure is being removed, it is more efficient to use RemoveLastStructure();
		//! \param structurenumber is an int that is the index to which structure should be removed.  This is one indexed.
		void RemoveStructure(int structurenumber);

		//********************************
		//Additional functions
		//********************************

		//! Sort structures by energy.

		//! This function sorts structures in energy from lowest to highest.
		//! It is important that the structure energies be present by structure prediction or by efn2.
		void sort();

		//! Find problem in the set of structures.

		//! This function is for debugging.  It checks each pair in each structure to look for inconsistencies.
		//! \return true when an inconstency with pairing is found and false otherwise.
		bool ProblemwithStructures();

		void ReadSHAPE(const char *filename, float SingleStrandThreshold, float ModificationThreshold);//Read SHAPE reactivity data from a file
		//void ReadSHAPE(const char *filename, bool calculate=true);//Read SHAPE reactivity data from a file
		void ReadSHAPE(const char *filename, std::string modifier="SHAPE", bool calculate=true, bool nosum=false);//Read SHAPE reactivity data from a file
		void ReadOffset(const char *SSOffset, const char *DSOffset);//Read Free Energy Offset Files.
		void ReadExperimentalPairBonus(const char *filename, double const experimentalOffset = 0.0, double const experimentalScaling = 1.0 );

		double **constant;//constant is used to hold an array of equilibrium constants.  In partition function calculations,
					//the equilibrium constant is multiplied by constant[j][i] when the i-j pair is formed.
					//NOTE: The use of constant is NOT orthogonal to using chemical modification data.  They cannot
					//both be used at once.
		void allocateconstant();//Function to allocate memory for constant array.
		bool SHAPEFileRead;

	//private:

		string sequencelabel;//a label that was read from disk along with a sequence

		short int *numseq,*hnumber;

		int inter[3],allocatedstructures;
		char *nucs;
		bool intermolecular,allocated,templated,stacking;
		bool **tem;//tem stores template information as to whether a pair is allowed

		void allocate(int size = maxbases);
		void allocatestructure(int structures);

		short int min_gu, min_g_or_u;//NMR-derived constraint variables
		short int neighbors[maxforce][maxneighborlength],nneighbors;//also NMR-derived index this from zero in both dimensions
		//regional NMR constraints:
		short int nregion,rmin_gu[maxregions],rmin_g_or_u[maxregions];
		short int rneighbors[maxregions][maxforce][maxneighborlength],rnneighbors[maxregions],start[maxregions],stop[maxregions];
		//microarray type constraints:
		short int nmicroarray,microstart[maxregions],microstop[maxregions],microunpair[maxregions];
		bool *fcedbl;//pointer to a 2-D array used in Dynalign to track nucleotides that must be double-stranded

		double *SHAPE;//double array to contain SHAPE data -- values less than -500 are ignored
		double **EX;// double array that contains experimental bonuses/penalties
		bool shaped;//keeps track of whether SHAPE data was loaded
		bool experimentalPairBonusExists;//keeps track of whether experimental bonus data was loaded
		bool ssoffset;//keeps track of whether a single stranded offset was read from disk
		double SHAPEslope,SHAPEintercept;//values of slope and intercept for SHAPE data modification of pairing stability
		//SINGLE STRANDED SHAPE ENERGY VARIABLES AND FUNCTIONS
		double *SHAPEss; //short int array that contains SHAPE data for single-stranded segments
		double SHAPEslope_ss, SHAPEintercept_ss; //values of the slope and intercept for SHAPE data modifying single stranded loop stability
		short int **SHAPEss_region;  //2-d short int array containing energy values for hairpin loop combinations
		int SHAPEss_calc(int index_i, int index_j);  //Returns pseudoenergy term for a hairpin loop using single stranded SHAPE data
		short int SHAPEss_give_value(int index);  //Returns the single stranded SHAPE pseudo energy for a given nucleotide
		double CalculatePseudoEnergy(double data, std::string modifier, double, double);
		double Gammadist(double data, double shape, double loc, double scale);
		double Potential(double data, std::vector< std::vector<double> > params, double kT);
		void ReadProbabilisticPotentialParams();//Read chemical modifier distributions from file
		//Parameters for distributions
		std::vector< std::vector<double> > SHAPE_params;
		std::vector< std::vector<double> > DMS_params;
		std::vector< std::vector<double> > CMCT_params;
		bool distsread;//keep track if the distruibution files have been read from disk.

	private:

		int numofbases;//number of nucleotides in sequence
		bool limitdistance;//toggle to indicate that there is a limit on the maximum distance between nucs in base pairs
		int maxdistance;//maximum distance between nucs in base pairs

		vector<singlestructure> arrayofstructures;//This holds an array of structures, i.e. base pairing information and comments

		//variables for holding folding constraints:
		vector<int> doublestranded; //nucleotides that must be double stranded
		vector<int> singlestranded; //nucleotides that must be single stranded
		vector<int> GUpair; //Us in GU pairs
		vector<int>	modified; //nucleotides accessible to tradictional chemical modification agents
		vector<int> pair5; //5' partner in forced pair
		vector<int> pair3; //3' partner in forced pair
		vector<int> forbid5; //5' partner in a forbidden pair
		vector<int> forbid3; //3' partner in a forbidden pair

};

short int tonumi(char *base); //converts base to a numeric

char *tobase (int i);//convert a numeric value for a base to the familiar
								//character

void tonum(char *base,structure *ct,int count); //converts base to a numeric

int ecompare(const void *i, const void *j);

void swap(int *a,int *b);//Swap two variables
void swap(short int *a,short int *b);//swap two variables
void swap(float *a,float *b);//swap two variables
void swap(double *a,double *b);//swap two variables

#endif


text:
package joshie.mariculture.modules.fishery.rod;

import joshie.mariculture.api.fishing.Fishing.Size;
import net.minecraft.util.ResourceLocation;

import java.util.HashMap;
import java.util.Map;

public class RodHook extends RodComponent<RodHook> {
    public static final Map<ResourceLocation, RodHook> HOOKS = new HashMap<>();
    private final Size[] bestSizes;
    private final int catchSpeed;

    public RodHook(ResourceLocation resource, int catchSpeed, Size... bestSizes) {
        super(resource, "hook");
        this.catchSpeed = catchSpeed;
        this.bestSizes = bestSizes;
        HOOKS.put(resource, this);
    }

    int getCatchSpeed() {
        return catchSpeed;
    }

    Size[] getBestSize() {
        return bestSizes;
    }
}


text:
__author__ = 'Arnaud Wery'

import oauth2 as oauth
import json
from datetime import datetime, date
from urllib import quote_plus
from httplib2 import ServerNotFoundError, MalformedHeader
import time
import socket

json_data = open('oAuth')
oAuth = json.load(json_data)

BASE_URL = oAuth['BASE_URL']
CONSUMER_KEY = oAuth['CONSUMER_KEY']
CONSUMER_SECRET = oAuth['CONSUMER_SECRET']
HEADERS = oAuth['HEADERS']

class railtimeFetcher():

    def __init__(self, key=CONSUMER_KEY, secret=CONSUMER_SECRET, headers=HEADERS, return_json_object=True):
        self.consumer = oauth.Consumer(key=key, secret=secret)
        self.client = oauth.Client(self.consumer, timeout=5)
        self.headers = headers
        self.return_json_object = return_json_object

    def fetch(self, url):
        tries = 0
        while tries < 10:
            tries += 1
            try:
                resp, content = self.client.request(BASE_URL+url, headers=self.headers) # default : GET
                if resp.status == 200: # OK
                    if self.return_json_object:
                        return json.loads(content)
                    else:
                        return content
                else:
                    print 'Response status: %s, wait 2 sec. before retrying' % resp.status
                    time.sleep(2)
            except (ServerNotFoundError, MalformedHeader):
                print 'Site is down or Malformed header, wait 2 sec. before retrying'
                time.sleep(2) # 2 sec
            except socket.timeout:
                print "Timeout, wait 2 sec. before retrying"
                time.sleep(2)
        print 'Exceeded number tries'
        return None

    def trainSchedule(self, trainNumber, trainDate=date.today()):
        if trainDate > date.today():
            print 'Impossible to predict the futur (train date: ' + self.formatDate(trainDate) +')'
            return

        url = "RetrieveTrainSchedule?trainNumber="+str(trainNumber)+"&requestedDate=" + self.formatDate(trainDate)+ "+00%3A00%3A00&dateType=1&language=3"
        return self.fetch(url)

    def routes(self, departureStation, arrivalStation, trainDatetime=datetime.now(), countBefore=0, countAfter=3):
        if trainDatetime.date() > date.today():
            print 'Impossible to predict the futur (train date: ' + self.formatDate(trainDatetime) +')'
            return

        url = "RetrieveRoutes?departureStationId="+str(departureStation)+"&arrivalStationId="+str(arrivalStation)+"&dateTime="+self.formatDate(trainDatetime)+"&searchType=1&minTransferTime=0&resultCountBefore="+str(countBefore)+"&resultCountAfter="+str(countAfter)
        return self.fetch(url)

    def stationList(self):
        url = "RetrieveStationList"
        return self.fetch(url)

    def formatDate(self, d):
        if type(d) is date:
            return d.isoformat()
        elif type(d) is datetime:
            return quote_plus(d.strftime("%Y-%m-%d %H:%M:%S"))

    def printJSON(self, myJson):
         print json.dumps(myJson, sort_keys=True, indent=4, separators=(',', ': '))


text:
if defined? ActiveSupport::Dependencies
  module ActiveSupport::Dependencies
    add_method_tracer :load_file, "Rails/Application Code Loading"
  end
else
  module Dependencies
    add_method_tracer :load_file, "Rails/Application Code Loading"
  end
end

class ERB::Compiler
  add_method_tracer :compile, 'View/.rhtml Processing'
end


text:
package com.pie.tlatoani.Util;

import org.bukkit.Location;
import org.bukkit.World;

/**
 * Created by Tlatoani on 8/9/17.
 * A Location whose setWorld() method does not do anything
 */
public class WorldLockedLocation extends Location {

    public WorldLockedLocation(Location location) {
        super(location.getWorld(), location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
    }

    public WorldLockedLocation(World world, double x, double y, double z) {
        super(world, x, y, z);
    }

    public WorldLockedLocation(World world, double x, double y, double z, float yaw, float pitch) {
        super(world, x, y, z, yaw, pitch);
    }

    @Override
    public void setWorld(World world) {
        //do nothing
    }
}


text:
package io.renren.modules.oss.cloud;

import com.aliyun.oss.OSSClient;
import io.renren.common.exception.RRException;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

/**
 * 阿里云存储
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2017-03-26 16:22
 */
public class AliyunCloudStorageService extends CloudStorageService {
    private OSSClient client;

    public AliyunCloudStorageService(CloudStorageConfig config){
        this.config = config;

        //初始化
        init();
    }

    private void init(){
        client = new OSSClient(config.getAliyunEndPoint(), config.getAliyunAccessKeyId(),
                config.getAliyunAccessKeySecret());
    }

    @Override
    public String upload(byte[] data, String path) {
        return upload(new ByteArrayInputStream(data), path);
    }

    @Override
    public String upload(InputStream inputStream, String path) {
        try {
            client.putObject(config.getAliyunBucketName(), path, inputStream);
        } catch (Exception e){
            throw new RRException("上传文件失败,请检查配置信息", e);
        }

        return config.getAliyunDomain() + "/" + path;
    }

    @Override
    public String uploadSuffix(byte[] data, String suffix) {
        return upload(data, getPath(config.getAliyunPrefix(), suffix));
    }

    @Override
    public String uploadSuffix(InputStream inputStream, String suffix) {
        return upload(inputStream, getPath(config.getAliyunPrefix(), suffix));
    }
}


text:
<?php

namespace Centreon\Tests\Resources\Dependency;

use Pimple\Container;
use Centreon\ServiceProvider;
use Centreon\Test\Mock\CentreonDBManagerService;
use Symfony\Component\Validator\Validator\RecursiveValidator;

/**
 * Container provider for Symfony\Component\Validator\Validator\ValidatorInterface
 *
 * @author Centreon
 * @version 1.0.0
 * @package centreon
 * @subpackage test
 */
trait ValidatorDependencyTrait
{
    /**
     * Set up DB manager service in container
     *
     * <code>
     * public function setUp()
     * {
     *     $container = new \Pimple\Container;
     *     $this->setUpValidator($container);
     * }
     * </code>
     *
     * @param \Pimple\Container $container
     */
    public function setUpValidator(Container $container)
    {
        $container[ServiceProvider::VALIDATOR] = $this->createMock(RecursiveValidator::class);
    }
}


text:
F5 Networks is an application delivery networking and security company. Collect health and performance metrics of your F5 devices, including including the Big IP and LTM platforms.

## Setup

All metrics from F5 appliances are collected from SNMP. To start collecting metrics, install and configure the SNMP integration. See the [Network Device Monitoring][2] documentation for more details and configuration options.

## Data Collected

### Metrics

All possible metrics collected with SNMP can be found in the Network Device Monitoring documentation under [Data Collected][1]. All metrics collected from F5 appliances can be found under the [F5] namespace.

### Service Checks

There are no service checks included with the F5 integration.

### Events

No additional events are sent to Datadog from any component of the F5 platform.

## Further Reading

Additional helpful documentation, links, and articles:

* [Monitoring Datacenters and Network Devices with Datadog][4]
* [SNMP Monitoring with Datadog][3]

## Troubleshooting

Need help? Contact [Datadog support][5].

[1]: https://docs.datadoghq.com/network_monitoring/devices/data
[2]: https://docs.datadoghq.com/network_monitoring/devices/setup
[3]: https://www.datadoghq.com/blog/monitor-snmp-with-datadog/
[4]: https://www.datadoghq.com/blog/datacenter-monitoring-dashboards/
[5]: https://docs.datadoghq.com/help/